From 4331834003a6206283c692fe0d6bfbc3c6cfc868 Mon Sep 17 00:00:00 2001 From: Paul Hauner Date: Mon, 18 May 2020 21:24:23 +1000 Subject: [PATCH] Directory Restructure (#1163) * Move tests -> testing * Directory restructure * Update Cargo.toml during restructure * Update Makefile during restructure * Fix arbitrary path --- Cargo.toml | 103 +++++++++--------- Makefile | 6 +- account_manager/Cargo.toml | 18 +-- beacon_node/Cargo.toml | 12 +- beacon_node/beacon_chain/Cargo.toml | 22 ++-- beacon_node/client/Cargo.toml | 8 +- beacon_node/eth1/Cargo.toml | 10 +- beacon_node/eth2-libp2p/Cargo.toml | 10 +- beacon_node/genesis/Cargo.toml | 10 +- beacon_node/network/Cargo.toml | 10 +- .../operation_pool/Cargo.toml | 8 +- .../operation_pool/src/attestation.rs | 0 .../operation_pool/src/attestation_id.rs | 0 .../operation_pool/src/lib.rs | 0 .../operation_pool/src/max_cover.rs | 0 .../operation_pool/src/persistence.rs | 0 beacon_node/rest_api/Cargo.toml | 20 ++-- beacon_node/store/Cargo.toml | 6 +- beacon_node/timer/Cargo.toml | 4 +- beacon_node/websocket_server/Cargo.toml | 2 +- book/src/setup.md | 2 +- {eth2 => common}/README.md | 0 {eth2/utils => common}/clap_utils/Cargo.toml | 2 +- {eth2/utils => common}/clap_utils/src/lib.rs | 0 .../compare_fields/Cargo.toml | 0 .../compare_fields/src/lib.rs | 0 .../compare_fields_derive/Cargo.toml | 0 .../compare_fields_derive/src/lib.rs | 0 .../deposit_contract/.gitignore | 0 .../deposit_contract/Cargo.toml | 2 +- .../deposit_contract/build.rs | 0 .../deposit_contract/src/lib.rs | 0 {eth2/utils => common}/eth2_config/Cargo.toml | 2 +- {eth2/utils => common}/eth2_config/src/lib.rs | 0 .../eth2_interop_keypairs/Cargo.toml | 0 .../specs/keygen_10_validators.yaml | 0 .../eth2_interop_keypairs/src/lib.rs | 0 .../eth2_interop_keypairs/tests/from_file.rs | 0 .../eth2_interop_keypairs/tests/generation.rs | 0 .../eth2_testnet_config/.gitignore | 0 .../eth2_testnet_config/Cargo.toml | 4 +- .../eth2_testnet_config/build.rs | 0 .../eth2_testnet_config/src/lib.rs | 0 .../eth2_wallet_manager/Cargo.toml | 4 +- .../eth2_wallet_manager/src/filesystem.rs | 0 .../eth2_wallet_manager/src/lib.rs | 0 .../eth2_wallet_manager/src/locked_wallet.rs | 0 .../eth2_wallet_manager/src/wallet_manager.rs | 0 .../utils => common}/hashset_delay/Cargo.toml | 0 .../hashset_delay/src/hashset_delay.rs | 0 .../utils => common}/hashset_delay/src/lib.rs | 0 .../lighthouse_metrics/Cargo.toml | 0 .../lighthouse_metrics/src/lib.rs | 0 {eth2/utils => common}/logging/Cargo.toml | 0 {eth2/utils => common}/logging/src/lib.rs | 0 .../remote_beacon_node/Cargo.toml | 8 +- .../remote_beacon_node/src/lib.rs | 0 {eth2/utils => common}/rest_types/Cargo.toml | 6 +- .../utils => common}/rest_types/src/beacon.rs | 0 .../rest_types/src/consensus.rs | 0 {eth2/utils => common}/rest_types/src/lib.rs | 0 {eth2/utils => common}/rest_types/src/node.rs | 0 .../rest_types/src/validator.rs | 0 {eth2/utils => common}/slot_clock/Cargo.toml | 2 +- {eth2/utils => common}/slot_clock/src/lib.rs | 0 .../slot_clock/src/manual_slot_clock.rs | 0 .../slot_clock/src/metrics.rs | 0 .../slot_clock/src/system_time_slot_clock.rs | 0 .../test_random_derive/Cargo.toml | 0 .../test_random_derive/src/lib.rs | 0 .../utils => common}/validator_dir/Cargo.toml | 14 +-- .../validator_dir/src/builder.rs | 0 .../validator_dir/src/insecure_keys.rs | 0 .../utils => common}/validator_dir/src/lib.rs | 0 .../validator_dir/src/manager.rs | 0 .../validator_dir/src/unencrypted_keys.rs | 0 .../validator_dir/src/validator_dir.rs | 0 .../validator_dir/tests/tests.rs | 0 .../cached_tree_hash/Cargo.toml | 0 .../cached_tree_hash/src/cache.rs | 0 .../cached_tree_hash/src/cache_arena.rs | 0 .../cached_tree_hash/src/impls.rs | 0 .../cached_tree_hash/src/lib.rs | 0 .../cached_tree_hash/src/test.rs | 0 .../int_to_bytes/Cargo.toml | 0 .../int_to_bytes/src/lib.rs | 0 .../src/specs/test_vector_int_to_bytes.yml | 0 .../merkle_proof/Cargo.toml | 0 .../merkle_proof/src/lib.rs | 0 .../proto_array_fork_choice/.gitignore | 0 .../proto_array_fork_choice/Cargo.toml | 0 .../proto_array_fork_choice/src/bin.rs | 0 .../proto_array_fork_choice/src/error.rs | 0 .../src/fork_choice_test_definition.rs | 0 .../ffg_updates.rs | 0 .../fork_choice_test_definition/no_votes.rs | 0 .../src/fork_choice_test_definition/votes.rs | 0 .../proto_array_fork_choice/src/lib.rs | 0 .../src/proto_array.rs | 0 .../src/proto_array_fork_choice.rs | 0 .../src/ssz_container.rs | 0 .../utils => consensus}/safe_arith/Cargo.toml | 0 .../utils => consensus}/safe_arith/src/lib.rs | 0 .../utils => consensus}/serde_hex/Cargo.toml | 0 .../utils => consensus}/serde_hex/src/lib.rs | 0 {eth2/utils => consensus}/ssz/Cargo.toml | 0 {eth2/utils => consensus}/ssz/README.md | 0 .../ssz/examples/large_list.rs | 0 .../ssz/examples/large_list_of_structs.rs | 0 .../ssz/examples/struct_definition.rs | 0 {eth2/utils => consensus}/ssz/src/decode.rs | 0 .../ssz/src/decode/impls.rs | 0 {eth2/utils => consensus}/ssz/src/encode.rs | 0 .../ssz/src/encode/impls.rs | 0 {eth2/utils => consensus}/ssz/src/lib.rs | 0 {eth2/utils => consensus}/ssz/tests/tests.rs | 0 .../utils => consensus}/ssz_derive/Cargo.toml | 0 .../utils => consensus}/ssz_derive/src/lib.rs | 0 .../utils => consensus}/ssz_types/Cargo.toml | 0 .../ssz_types/src/bitfield.rs | 0 .../ssz_types/src/fixed_vector.rs | 0 .../utils => consensus}/ssz_types/src/lib.rs | 0 .../ssz_types/src/tree_hash.rs | 0 .../ssz_types/src/variable_list.rs | 0 .../state_processing/.gitignore | 0 .../state_processing/Cargo.toml | 13 +-- .../state_processing/benches/benches.rs | 0 .../src/common/deposit_data_tree.rs | 0 .../src/common/get_attesting_indices.rs | 0 .../src/common/get_base_reward.rs | 0 .../src/common/get_indexed_attestation.rs | 0 .../src/common/initiate_validator_exit.rs | 0 .../state_processing/src/common/mod.rs | 0 .../src/common/slash_validator.rs | 0 .../state_processing/src/genesis.rs | 0 .../state_processing/src/lib.rs | 0 .../state_processing/src/macros.rs | 0 .../src/per_block_processing.rs | 0 .../block_processing_builder.rs | 0 .../block_signature_verifier.rs | 0 .../src/per_block_processing/errors.rs | 0 .../is_valid_indexed_attestation.rs | 0 .../per_block_processing/signature_sets.rs | 0 .../src/per_block_processing/tests.rs | 0 .../verify_attestation.rs | 0 .../verify_attester_slashing.rs | 0 .../per_block_processing/verify_deposit.rs | 0 .../src/per_block_processing/verify_exit.rs | 0 .../verify_proposer_slashing.rs | 0 .../src/per_epoch_processing.rs | 0 .../src/per_epoch_processing/apply_rewards.rs | 0 .../src/per_epoch_processing/errors.rs | 0 .../per_epoch_processing/process_slashings.rs | 0 .../per_epoch_processing/registry_updates.rs | 0 .../src/per_epoch_processing/tests.rs | 0 .../validator_statuses.rs | 0 .../src/per_slot_processing.rs | 0 .../state_processing/src/test_utils.rs | 0 .../state_processing/tests/tests.rs | 0 .../swap_or_not_shuffle/Cargo.toml | 0 .../swap_or_not_shuffle/benches/benches.rs | 0 .../src/compute_shuffled_index.rs | 0 .../swap_or_not_shuffle/src/lib.rs | 0 .../swap_or_not_shuffle/src/shuffle_list.rs | 0 .../utils => consensus}/tree_hash/Cargo.toml | 2 +- .../tree_hash/benches/benches.rs | 0 .../examples/flamegraph_beacon_state.rs | 0 .../tree_hash/src/impls.rs | 0 .../utils => consensus}/tree_hash/src/lib.rs | 0 .../tree_hash/src/merkle_hasher.rs | 0 .../tree_hash/src/merkleize_padded.rs | 0 .../tree_hash/src/merkleize_standard.rs | 0 .../tree_hash_derive/Cargo.toml | 0 .../tree_hash_derive/src/lib.rs | 0 {eth2 => consensus}/types/Cargo.toml | 22 ++-- {eth2 => consensus}/types/benches/benches.rs | 0 .../types/examples/clone_state.rs | 0 .../types/examples/ssz_encode_state.rs | 0 .../types/examples/tree_hash_state.rs | 0 .../types/src/aggregate_and_proof.rs | 0 {eth2 => consensus}/types/src/attestation.rs | 0 .../types/src/attestation_data.rs | 0 .../types/src/attestation_duty.rs | 0 .../types/src/attester_slashing.rs | 0 {eth2 => consensus}/types/src/beacon_block.rs | 0 .../types/src/beacon_block_body.rs | 0 .../types/src/beacon_block_header.rs | 0 .../types/src/beacon_committee.rs | 0 {eth2 => consensus}/types/src/beacon_state.rs | 0 .../types/src/beacon_state/clone_config.rs | 0 .../types/src/beacon_state/committee_cache.rs | 0 .../src/beacon_state/committee_cache/tests.rs | 0 .../types/src/beacon_state/exit_cache.rs | 0 .../types/src/beacon_state/pubkey_cache.rs | 0 .../types/src/beacon_state/tests.rs | 0 .../types/src/beacon_state/tree_hash_cache.rs | 0 {eth2 => consensus}/types/src/chain_spec.rs | 0 {eth2 => consensus}/types/src/checkpoint.rs | 0 {eth2 => consensus}/types/src/deposit.rs | 0 {eth2 => consensus}/types/src/deposit_data.rs | 0 .../types/src/deposit_message.rs | 0 {eth2 => consensus}/types/src/enr_fork_id.rs | 0 {eth2 => consensus}/types/src/eth1_data.rs | 0 {eth2 => consensus}/types/src/eth_spec.rs | 0 {eth2 => consensus}/types/src/fork.rs | 0 {eth2 => consensus}/types/src/fork_data.rs | 0 .../types/src/free_attestation.rs | 0 .../types/src/historical_batch.rs | 0 .../types/src/indexed_attestation.rs | 0 {eth2 => consensus}/types/src/lib.rs | 0 .../types/src/pending_attestation.rs | 0 .../types/src/proposer_slashing.rs | 0 .../types/src/relative_epoch.rs | 0 .../types/src/selection_proof.rs | 0 .../types/src/signed_aggregate_and_proof.rs | 0 .../types/src/signed_beacon_block.rs | 0 .../types/src/signed_beacon_block_header.rs | 0 .../types/src/signed_voluntary_exit.rs | 0 {eth2 => consensus}/types/src/signing_root.rs | 0 {eth2 => consensus}/types/src/slot_epoch.rs | 0 .../types/src/slot_epoch_macros.rs | 0 {eth2 => consensus}/types/src/sqlite.rs | 0 {eth2 => consensus}/types/src/subnet_id.rs | 0 .../types/src/test_utils/builders.rs | 0 .../builders/testing_attestation_builder.rs | 0 .../testing_attestation_data_builder.rs | 0 .../testing_attester_slashing_builder.rs | 0 .../builders/testing_beacon_block_builder.rs | 0 .../builders/testing_beacon_state_builder.rs | 0 .../builders/testing_deposit_builder.rs | 0 .../testing_pending_attestation_builder.rs | 0 .../testing_proposer_slashing_builder.rs | 0 .../testing_voluntary_exit_builder.rs | 0 .../generate_deterministic_keypairs.rs | 0 .../types/src/test_utils/keypairs_file.rs | 0 .../types/src/test_utils/macros.rs | 0 .../types/src/test_utils/mod.rs | 0 .../types/src/test_utils/test_random.rs | 0 .../src/test_utils/test_random/address.rs | 0 .../test_random/aggregate_signature.rs | 0 .../src/test_utils/test_random/bitfield.rs | 0 .../src/test_utils/test_random/hash256.rs | 0 .../src/test_utils/test_random/public_key.rs | 0 .../test_random/public_key_bytes.rs | 0 .../src/test_utils/test_random/secret_key.rs | 0 .../src/test_utils/test_random/signature.rs | 0 .../test_utils/test_random/signature_bytes.rs | 0 .../types/src/tree_hash_impls.rs | 0 {eth2 => consensus}/types/src/utils.rs | 0 .../types/src/utils/serde_utils.rs | 0 {eth2 => consensus}/types/src/validator.rs | 0 .../types/src/voluntary_exit.rs | 0 {eth2/utils => crypto}/bls/Cargo.toml | 4 +- .../bls/src/aggregate_public_key.rs | 0 .../bls/src/aggregate_signature.rs | 0 .../bls/src/fake_aggregate_public_key.rs | 0 .../bls/src/fake_aggregate_signature.rs | 0 .../bls/src/fake_public_key.rs | 0 .../bls/src/fake_signature.rs | 0 {eth2/utils => crypto}/bls/src/keypair.rs | 0 {eth2/utils => crypto}/bls/src/lib.rs | 0 {eth2/utils => crypto}/bls/src/macros.rs | 0 {eth2/utils => crypto}/bls/src/public_key.rs | 0 .../bls/src/public_key_bytes.rs | 0 {eth2/utils => crypto}/bls/src/secret_key.rs | 0 {eth2/utils => crypto}/bls/src/signature.rs | 0 .../bls/src/signature_bytes.rs | 0 .../utils => crypto}/bls/src/signature_set.rs | 0 .../eth2_hashing/.cargo/config | 0 .../utils => crypto}/eth2_hashing/Cargo.toml | 0 .../utils => crypto}/eth2_hashing/src/lib.rs | 0 .../eth2_key_derivation/Cargo.toml | 0 .../eth2_key_derivation/src/derived_key.rs | 0 .../src/lamport_secret_key.rs | 0 .../eth2_key_derivation/src/lib.rs | 0 .../eth2_key_derivation/src/path.rs | 0 .../eth2_key_derivation/src/secret_bytes.rs | 0 .../eth2_key_derivation/src/secret_hash.rs | 0 .../tests/eip2333_vectors.rs | 0 .../eth2_key_derivation/tests/tests.rs | 0 .../utils => crypto}/eth2_keystore/Cargo.toml | 2 +- .../eth2_keystore/src/derived_key.rs | 0 .../src/json_keystore/checksum_module.rs | 0 .../src/json_keystore/cipher_module.rs | 0 .../src/json_keystore/hex_bytes.rs | 0 .../src/json_keystore/kdf_module.rs | 0 .../eth2_keystore/src/json_keystore/mod.rs | 0 .../eth2_keystore/src/keystore.rs | 0 .../utils => crypto}/eth2_keystore/src/lib.rs | 0 .../eth2_keystore/src/plain_text.rs | 0 .../eth2_keystore/tests/eip2335_vectors.rs | 0 .../eth2_keystore/tests/json.rs | 0 .../eth2_keystore/tests/params.rs | 0 .../eth2_keystore/tests/tests.rs | 0 {eth2/utils => crypto}/eth2_wallet/Cargo.toml | 2 +- .../eth2_wallet/src/json_wallet/mod.rs | 0 {eth2/utils => crypto}/eth2_wallet/src/lib.rs | 0 .../eth2_wallet/src/validator_path.rs | 0 .../eth2_wallet/src/wallet.rs | 0 .../eth2_wallet/tests/eip2386_vectors.rs | 0 .../eth2_wallet/tests/json.rs | 0 .../eth2_wallet/tests/tests.rs | 0 eth2/utils/lighthouse_bootstrap/Cargo.toml | 16 --- lcli/Cargo.toml | 16 +-- lighthouse/Cargo.toml | 10 +- lighthouse/environment/Cargo.toml | 8 +- {tests => testing}/ef_tests/.gitignore | 0 {tests => testing}/ef_tests/Cargo.toml | 12 +- {tests => testing}/ef_tests/Makefile | 0 {tests => testing}/ef_tests/README.md | 0 .../ef_tests/src/bls_setting.rs | 0 .../ef_tests/src/case_result.rs | 0 {tests => testing}/ef_tests/src/cases.rs | 0 .../ef_tests/src/cases/bls_aggregate_sigs.rs | 0 .../src/cases/bls_aggregate_verify.rs | 0 .../src/cases/bls_fast_aggregate_verify.rs | 0 .../ef_tests/src/cases/bls_sign_msg.rs | 0 .../ef_tests/src/cases/bls_verify_msg.rs | 0 .../ef_tests/src/cases/common.rs | 0 .../ef_tests/src/cases/epoch_processing.rs | 0 .../src/cases/genesis_initialization.rs | 0 .../ef_tests/src/cases/genesis_validity.rs | 0 .../ef_tests/src/cases/operations.rs | 0 .../ef_tests/src/cases/sanity_blocks.rs | 0 .../ef_tests/src/cases/sanity_slots.rs | 0 .../ef_tests/src/cases/shuffling.rs | 0 .../ef_tests/src/cases/ssz_generic.rs | 0 .../ef_tests/src/cases/ssz_static.rs | 0 {tests => testing}/ef_tests/src/decode.rs | 0 {tests => testing}/ef_tests/src/error.rs | 0 {tests => testing}/ef_tests/src/handler.rs | 0 {tests => testing}/ef_tests/src/lib.rs | 0 {tests => testing}/ef_tests/src/results.rs | 0 {tests => testing}/ef_tests/src/type_name.rs | 0 {tests => testing}/ef_tests/tests/tests.rs | 0 {tests => testing}/eth1_test_rig/.gitignore | 0 {tests => testing}/eth1_test_rig/Cargo.toml | 4 +- .../eth1_test_rig/src/ganache.rs | 0 {tests => testing}/eth1_test_rig/src/lib.rs | 0 {tests => testing}/node_test_rig/Cargo.toml | 8 +- {tests => testing}/node_test_rig/src/lib.rs | 0 {tests => testing}/simulator/Cargo.toml | 2 +- {tests => testing}/simulator/src/checks.rs | 0 {tests => testing}/simulator/src/cli.rs | 0 {tests => testing}/simulator/src/eth1_sim.rs | 0 .../simulator/src/local_network.rs | 0 {tests => testing}/simulator/src/main.rs | 0 .../simulator/src/no_eth1_sim.rs | 0 {tests => testing}/simulator/src/sync_sim.rs | 0 .../state_transition_vectors/.gitignore | 0 .../state_transition_vectors/Cargo.toml | 4 +- .../state_transition_vectors/Makefile | 0 .../state_transition_vectors/README.md | 0 .../state_transition_vectors/src/exit.rs | 0 .../state_transition_vectors/src/macros.rs | 0 .../state_transition_vectors/src/main.rs | 0 validator_client/Cargo.toml | 22 ++-- .../slashing_protection/Cargo.toml | 4 +- 358 files changed, 217 insertions(+), 229 deletions(-) rename {eth2 => beacon_node}/operation_pool/Cargo.toml (59%) rename {eth2 => beacon_node}/operation_pool/src/attestation.rs (100%) rename {eth2 => beacon_node}/operation_pool/src/attestation_id.rs (100%) rename {eth2 => beacon_node}/operation_pool/src/lib.rs (100%) rename {eth2 => beacon_node}/operation_pool/src/max_cover.rs (100%) rename {eth2 => beacon_node}/operation_pool/src/persistence.rs (100%) rename {eth2 => common}/README.md (100%) rename {eth2/utils => common}/clap_utils/Cargo.toml (89%) rename {eth2/utils => common}/clap_utils/src/lib.rs (100%) rename {eth2/utils => common}/compare_fields/Cargo.toml (100%) rename {eth2/utils => common}/compare_fields/src/lib.rs (100%) rename {eth2/utils => common}/compare_fields_derive/Cargo.toml (100%) rename {eth2/utils => common}/compare_fields_derive/src/lib.rs (100%) rename {eth2/utils => common}/deposit_contract/.gitignore (100%) rename {eth2/utils => common}/deposit_contract/Cargo.toml (88%) rename {eth2/utils => common}/deposit_contract/build.rs (100%) rename {eth2/utils => common}/deposit_contract/src/lib.rs (100%) rename {eth2/utils => common}/eth2_config/Cargo.toml (81%) rename {eth2/utils => common}/eth2_config/src/lib.rs (100%) rename {eth2/utils => common}/eth2_interop_keypairs/Cargo.toml (100%) rename {eth2/utils => common}/eth2_interop_keypairs/specs/keygen_10_validators.yaml (100%) rename {eth2/utils => common}/eth2_interop_keypairs/src/lib.rs (100%) rename {eth2/utils => common}/eth2_interop_keypairs/tests/from_file.rs (100%) rename {eth2/utils => common}/eth2_interop_keypairs/tests/generation.rs (100%) rename {eth2/utils => common}/eth2_testnet_config/.gitignore (100%) rename {eth2/utils => common}/eth2_testnet_config/Cargo.toml (77%) rename {eth2/utils => common}/eth2_testnet_config/build.rs (100%) rename {eth2/utils => common}/eth2_testnet_config/src/lib.rs (100%) rename {eth2/utils => common}/eth2_wallet_manager/Cargo.toml (71%) rename {eth2/utils => common}/eth2_wallet_manager/src/filesystem.rs (100%) rename {eth2/utils => common}/eth2_wallet_manager/src/lib.rs (100%) rename {eth2/utils => common}/eth2_wallet_manager/src/locked_wallet.rs (100%) rename {eth2/utils => common}/eth2_wallet_manager/src/wallet_manager.rs (100%) rename {eth2/utils => common}/hashset_delay/Cargo.toml (100%) rename {eth2/utils => common}/hashset_delay/src/hashset_delay.rs (100%) rename {eth2/utils => common}/hashset_delay/src/lib.rs (100%) rename {eth2/utils => common}/lighthouse_metrics/Cargo.toml (100%) rename {eth2/utils => common}/lighthouse_metrics/src/lib.rs (100%) rename {eth2/utils => common}/logging/Cargo.toml (100%) rename {eth2/utils => common}/logging/src/lib.rs (100%) rename {eth2/utils => common}/remote_beacon_node/Cargo.toml (64%) rename {eth2/utils => common}/remote_beacon_node/src/lib.rs (100%) rename {eth2/utils => common}/rest_types/Cargo.toml (66%) rename {eth2/utils => common}/rest_types/src/beacon.rs (100%) rename {eth2/utils => common}/rest_types/src/consensus.rs (100%) rename {eth2/utils => common}/rest_types/src/lib.rs (100%) rename {eth2/utils => common}/rest_types/src/node.rs (100%) rename {eth2/utils => common}/rest_types/src/validator.rs (100%) rename {eth2/utils => common}/slot_clock/Cargo.toml (84%) rename {eth2/utils => common}/slot_clock/src/lib.rs (100%) rename {eth2/utils => common}/slot_clock/src/manual_slot_clock.rs (100%) rename {eth2/utils => common}/slot_clock/src/metrics.rs (100%) rename {eth2/utils => common}/slot_clock/src/system_time_slot_clock.rs (100%) rename {eth2/utils => common}/test_random_derive/Cargo.toml (100%) rename {eth2/utils => common}/test_random_derive/src/lib.rs (100%) rename {eth2/utils => common}/validator_dir/Cargo.toml (54%) rename {eth2/utils => common}/validator_dir/src/builder.rs (100%) rename {eth2/utils => common}/validator_dir/src/insecure_keys.rs (100%) rename {eth2/utils => common}/validator_dir/src/lib.rs (100%) rename {eth2/utils => common}/validator_dir/src/manager.rs (100%) rename {eth2/utils => common}/validator_dir/src/unencrypted_keys.rs (100%) rename {eth2/utils => common}/validator_dir/src/validator_dir.rs (100%) rename {eth2/utils => common}/validator_dir/tests/tests.rs (100%) rename {eth2/utils => consensus}/cached_tree_hash/Cargo.toml (100%) rename {eth2/utils => consensus}/cached_tree_hash/src/cache.rs (100%) rename {eth2/utils => consensus}/cached_tree_hash/src/cache_arena.rs (100%) rename {eth2/utils => consensus}/cached_tree_hash/src/impls.rs (100%) rename {eth2/utils => consensus}/cached_tree_hash/src/lib.rs (100%) rename {eth2/utils => consensus}/cached_tree_hash/src/test.rs (100%) rename {eth2/utils => consensus}/int_to_bytes/Cargo.toml (100%) rename {eth2/utils => consensus}/int_to_bytes/src/lib.rs (100%) rename {eth2/utils => consensus}/int_to_bytes/src/specs/test_vector_int_to_bytes.yml (100%) rename {eth2/utils => consensus}/merkle_proof/Cargo.toml (100%) rename {eth2/utils => consensus}/merkle_proof/src/lib.rs (100%) rename {eth2 => consensus}/proto_array_fork_choice/.gitignore (100%) rename {eth2 => consensus}/proto_array_fork_choice/Cargo.toml (100%) rename {eth2 => consensus}/proto_array_fork_choice/src/bin.rs (100%) rename {eth2 => consensus}/proto_array_fork_choice/src/error.rs (100%) rename {eth2 => consensus}/proto_array_fork_choice/src/fork_choice_test_definition.rs (100%) rename {eth2 => consensus}/proto_array_fork_choice/src/fork_choice_test_definition/ffg_updates.rs (100%) rename {eth2 => consensus}/proto_array_fork_choice/src/fork_choice_test_definition/no_votes.rs (100%) rename {eth2 => consensus}/proto_array_fork_choice/src/fork_choice_test_definition/votes.rs (100%) rename {eth2 => consensus}/proto_array_fork_choice/src/lib.rs (100%) rename {eth2 => consensus}/proto_array_fork_choice/src/proto_array.rs (100%) rename {eth2 => consensus}/proto_array_fork_choice/src/proto_array_fork_choice.rs (100%) rename {eth2 => consensus}/proto_array_fork_choice/src/ssz_container.rs (100%) rename {eth2/utils => consensus}/safe_arith/Cargo.toml (100%) rename {eth2/utils => consensus}/safe_arith/src/lib.rs (100%) rename {eth2/utils => consensus}/serde_hex/Cargo.toml (100%) rename {eth2/utils => consensus}/serde_hex/src/lib.rs (100%) rename {eth2/utils => consensus}/ssz/Cargo.toml (100%) rename {eth2/utils => consensus}/ssz/README.md (100%) rename {eth2/utils => consensus}/ssz/examples/large_list.rs (100%) rename {eth2/utils => consensus}/ssz/examples/large_list_of_structs.rs (100%) rename {eth2/utils => consensus}/ssz/examples/struct_definition.rs (100%) rename {eth2/utils => consensus}/ssz/src/decode.rs (100%) rename {eth2/utils => consensus}/ssz/src/decode/impls.rs (100%) rename {eth2/utils => consensus}/ssz/src/encode.rs (100%) rename {eth2/utils => consensus}/ssz/src/encode/impls.rs (100%) rename {eth2/utils => consensus}/ssz/src/lib.rs (100%) rename {eth2/utils => consensus}/ssz/tests/tests.rs (100%) rename {eth2/utils => consensus}/ssz_derive/Cargo.toml (100%) rename {eth2/utils => consensus}/ssz_derive/src/lib.rs (100%) rename {eth2/utils => consensus}/ssz_types/Cargo.toml (100%) rename {eth2/utils => consensus}/ssz_types/src/bitfield.rs (100%) rename {eth2/utils => consensus}/ssz_types/src/fixed_vector.rs (100%) rename {eth2/utils => consensus}/ssz_types/src/lib.rs (100%) rename {eth2/utils => consensus}/ssz_types/src/tree_hash.rs (100%) rename {eth2/utils => consensus}/ssz_types/src/variable_list.rs (100%) rename {eth2 => consensus}/state_processing/.gitignore (100%) rename {eth2 => consensus}/state_processing/Cargo.toml (74%) rename {eth2 => consensus}/state_processing/benches/benches.rs (100%) rename {eth2 => consensus}/state_processing/src/common/deposit_data_tree.rs (100%) rename {eth2 => consensus}/state_processing/src/common/get_attesting_indices.rs (100%) rename {eth2 => consensus}/state_processing/src/common/get_base_reward.rs (100%) rename {eth2 => consensus}/state_processing/src/common/get_indexed_attestation.rs (100%) rename {eth2 => consensus}/state_processing/src/common/initiate_validator_exit.rs (100%) rename {eth2 => consensus}/state_processing/src/common/mod.rs (100%) rename {eth2 => consensus}/state_processing/src/common/slash_validator.rs (100%) rename {eth2 => consensus}/state_processing/src/genesis.rs (100%) rename {eth2 => consensus}/state_processing/src/lib.rs (100%) rename {eth2 => consensus}/state_processing/src/macros.rs (100%) rename {eth2 => consensus}/state_processing/src/per_block_processing.rs (100%) rename {eth2 => consensus}/state_processing/src/per_block_processing/block_processing_builder.rs (100%) rename {eth2 => consensus}/state_processing/src/per_block_processing/block_signature_verifier.rs (100%) rename {eth2 => consensus}/state_processing/src/per_block_processing/errors.rs (100%) rename {eth2 => consensus}/state_processing/src/per_block_processing/is_valid_indexed_attestation.rs (100%) rename {eth2 => consensus}/state_processing/src/per_block_processing/signature_sets.rs (100%) rename {eth2 => consensus}/state_processing/src/per_block_processing/tests.rs (100%) rename {eth2 => consensus}/state_processing/src/per_block_processing/verify_attestation.rs (100%) rename {eth2 => consensus}/state_processing/src/per_block_processing/verify_attester_slashing.rs (100%) rename {eth2 => consensus}/state_processing/src/per_block_processing/verify_deposit.rs (100%) rename {eth2 => consensus}/state_processing/src/per_block_processing/verify_exit.rs (100%) rename {eth2 => consensus}/state_processing/src/per_block_processing/verify_proposer_slashing.rs (100%) rename {eth2 => consensus}/state_processing/src/per_epoch_processing.rs (100%) rename {eth2 => consensus}/state_processing/src/per_epoch_processing/apply_rewards.rs (100%) rename {eth2 => consensus}/state_processing/src/per_epoch_processing/errors.rs (100%) rename {eth2 => consensus}/state_processing/src/per_epoch_processing/process_slashings.rs (100%) rename {eth2 => consensus}/state_processing/src/per_epoch_processing/registry_updates.rs (100%) rename {eth2 => consensus}/state_processing/src/per_epoch_processing/tests.rs (100%) rename {eth2 => consensus}/state_processing/src/per_epoch_processing/validator_statuses.rs (100%) rename {eth2 => consensus}/state_processing/src/per_slot_processing.rs (100%) rename {eth2 => consensus}/state_processing/src/test_utils.rs (100%) rename {eth2 => consensus}/state_processing/tests/tests.rs (100%) rename {eth2/utils => consensus}/swap_or_not_shuffle/Cargo.toml (100%) rename {eth2/utils => consensus}/swap_or_not_shuffle/benches/benches.rs (100%) rename {eth2/utils => consensus}/swap_or_not_shuffle/src/compute_shuffled_index.rs (100%) rename {eth2/utils => consensus}/swap_or_not_shuffle/src/lib.rs (100%) rename {eth2/utils => consensus}/swap_or_not_shuffle/src/shuffle_list.rs (100%) rename {eth2/utils => consensus}/tree_hash/Cargo.toml (93%) rename {eth2/utils => consensus}/tree_hash/benches/benches.rs (100%) rename {eth2/utils => consensus}/tree_hash/examples/flamegraph_beacon_state.rs (100%) rename {eth2/utils => consensus}/tree_hash/src/impls.rs (100%) rename {eth2/utils => consensus}/tree_hash/src/lib.rs (100%) rename {eth2/utils => consensus}/tree_hash/src/merkle_hasher.rs (100%) rename {eth2/utils => consensus}/tree_hash/src/merkleize_padded.rs (100%) rename {eth2/utils => consensus}/tree_hash/src/merkleize_standard.rs (100%) rename {eth2/utils => consensus}/tree_hash_derive/Cargo.toml (100%) rename {eth2/utils => consensus}/tree_hash_derive/src/lib.rs (100%) rename {eth2 => consensus}/types/Cargo.toml (64%) rename {eth2 => consensus}/types/benches/benches.rs (100%) rename {eth2 => consensus}/types/examples/clone_state.rs (100%) rename {eth2 => consensus}/types/examples/ssz_encode_state.rs (100%) rename {eth2 => consensus}/types/examples/tree_hash_state.rs (100%) rename {eth2 => consensus}/types/src/aggregate_and_proof.rs (100%) rename {eth2 => consensus}/types/src/attestation.rs (100%) rename {eth2 => consensus}/types/src/attestation_data.rs (100%) rename {eth2 => consensus}/types/src/attestation_duty.rs (100%) rename {eth2 => consensus}/types/src/attester_slashing.rs (100%) rename {eth2 => consensus}/types/src/beacon_block.rs (100%) rename {eth2 => consensus}/types/src/beacon_block_body.rs (100%) rename {eth2 => consensus}/types/src/beacon_block_header.rs (100%) rename {eth2 => consensus}/types/src/beacon_committee.rs (100%) rename {eth2 => consensus}/types/src/beacon_state.rs (100%) rename {eth2 => consensus}/types/src/beacon_state/clone_config.rs (100%) rename {eth2 => consensus}/types/src/beacon_state/committee_cache.rs (100%) rename {eth2 => consensus}/types/src/beacon_state/committee_cache/tests.rs (100%) rename {eth2 => consensus}/types/src/beacon_state/exit_cache.rs (100%) rename {eth2 => consensus}/types/src/beacon_state/pubkey_cache.rs (100%) rename {eth2 => consensus}/types/src/beacon_state/tests.rs (100%) rename {eth2 => consensus}/types/src/beacon_state/tree_hash_cache.rs (100%) rename {eth2 => consensus}/types/src/chain_spec.rs (100%) rename {eth2 => consensus}/types/src/checkpoint.rs (100%) rename {eth2 => consensus}/types/src/deposit.rs (100%) rename {eth2 => consensus}/types/src/deposit_data.rs (100%) rename {eth2 => consensus}/types/src/deposit_message.rs (100%) rename {eth2 => consensus}/types/src/enr_fork_id.rs (100%) rename {eth2 => consensus}/types/src/eth1_data.rs (100%) rename {eth2 => consensus}/types/src/eth_spec.rs (100%) rename {eth2 => consensus}/types/src/fork.rs (100%) rename {eth2 => consensus}/types/src/fork_data.rs (100%) rename {eth2 => consensus}/types/src/free_attestation.rs (100%) rename {eth2 => consensus}/types/src/historical_batch.rs (100%) rename {eth2 => consensus}/types/src/indexed_attestation.rs (100%) rename {eth2 => consensus}/types/src/lib.rs (100%) rename {eth2 => consensus}/types/src/pending_attestation.rs (100%) rename {eth2 => consensus}/types/src/proposer_slashing.rs (100%) rename {eth2 => consensus}/types/src/relative_epoch.rs (100%) rename {eth2 => consensus}/types/src/selection_proof.rs (100%) rename {eth2 => consensus}/types/src/signed_aggregate_and_proof.rs (100%) rename {eth2 => consensus}/types/src/signed_beacon_block.rs (100%) rename {eth2 => consensus}/types/src/signed_beacon_block_header.rs (100%) rename {eth2 => consensus}/types/src/signed_voluntary_exit.rs (100%) rename {eth2 => consensus}/types/src/signing_root.rs (100%) rename {eth2 => consensus}/types/src/slot_epoch.rs (100%) rename {eth2 => consensus}/types/src/slot_epoch_macros.rs (100%) rename {eth2 => consensus}/types/src/sqlite.rs (100%) rename {eth2 => consensus}/types/src/subnet_id.rs (100%) rename {eth2 => consensus}/types/src/test_utils/builders.rs (100%) rename {eth2 => consensus}/types/src/test_utils/builders/testing_attestation_builder.rs (100%) rename {eth2 => consensus}/types/src/test_utils/builders/testing_attestation_data_builder.rs (100%) rename {eth2 => consensus}/types/src/test_utils/builders/testing_attester_slashing_builder.rs (100%) rename {eth2 => consensus}/types/src/test_utils/builders/testing_beacon_block_builder.rs (100%) rename {eth2 => consensus}/types/src/test_utils/builders/testing_beacon_state_builder.rs (100%) rename {eth2 => consensus}/types/src/test_utils/builders/testing_deposit_builder.rs (100%) rename {eth2 => consensus}/types/src/test_utils/builders/testing_pending_attestation_builder.rs (100%) rename {eth2 => consensus}/types/src/test_utils/builders/testing_proposer_slashing_builder.rs (100%) rename {eth2 => consensus}/types/src/test_utils/builders/testing_voluntary_exit_builder.rs (100%) rename {eth2 => consensus}/types/src/test_utils/generate_deterministic_keypairs.rs (100%) rename {eth2 => consensus}/types/src/test_utils/keypairs_file.rs (100%) rename {eth2 => consensus}/types/src/test_utils/macros.rs (100%) rename {eth2 => consensus}/types/src/test_utils/mod.rs (100%) rename {eth2 => consensus}/types/src/test_utils/test_random.rs (100%) rename {eth2 => consensus}/types/src/test_utils/test_random/address.rs (100%) rename {eth2 => consensus}/types/src/test_utils/test_random/aggregate_signature.rs (100%) rename {eth2 => consensus}/types/src/test_utils/test_random/bitfield.rs (100%) rename {eth2 => consensus}/types/src/test_utils/test_random/hash256.rs (100%) rename {eth2 => consensus}/types/src/test_utils/test_random/public_key.rs (100%) rename {eth2 => consensus}/types/src/test_utils/test_random/public_key_bytes.rs (100%) rename {eth2 => consensus}/types/src/test_utils/test_random/secret_key.rs (100%) rename {eth2 => consensus}/types/src/test_utils/test_random/signature.rs (100%) rename {eth2 => consensus}/types/src/test_utils/test_random/signature_bytes.rs (100%) rename {eth2 => consensus}/types/src/tree_hash_impls.rs (100%) rename {eth2 => consensus}/types/src/utils.rs (100%) rename {eth2 => consensus}/types/src/utils/serde_utils.rs (100%) rename {eth2 => consensus}/types/src/validator.rs (100%) rename {eth2 => consensus}/types/src/voluntary_exit.rs (100%) rename {eth2/utils => crypto}/bls/Cargo.toml (80%) rename {eth2/utils => crypto}/bls/src/aggregate_public_key.rs (100%) rename {eth2/utils => crypto}/bls/src/aggregate_signature.rs (100%) rename {eth2/utils => crypto}/bls/src/fake_aggregate_public_key.rs (100%) rename {eth2/utils => crypto}/bls/src/fake_aggregate_signature.rs (100%) rename {eth2/utils => crypto}/bls/src/fake_public_key.rs (100%) rename {eth2/utils => crypto}/bls/src/fake_signature.rs (100%) rename {eth2/utils => crypto}/bls/src/keypair.rs (100%) rename {eth2/utils => crypto}/bls/src/lib.rs (100%) rename {eth2/utils => crypto}/bls/src/macros.rs (100%) rename {eth2/utils => crypto}/bls/src/public_key.rs (100%) rename {eth2/utils => crypto}/bls/src/public_key_bytes.rs (100%) rename {eth2/utils => crypto}/bls/src/secret_key.rs (100%) rename {eth2/utils => crypto}/bls/src/signature.rs (100%) rename {eth2/utils => crypto}/bls/src/signature_bytes.rs (100%) rename {eth2/utils => crypto}/bls/src/signature_set.rs (100%) rename {eth2/utils => crypto}/eth2_hashing/.cargo/config (100%) rename {eth2/utils => crypto}/eth2_hashing/Cargo.toml (100%) rename {eth2/utils => crypto}/eth2_hashing/src/lib.rs (100%) rename {eth2/utils => crypto}/eth2_key_derivation/Cargo.toml (100%) rename {eth2/utils => crypto}/eth2_key_derivation/src/derived_key.rs (100%) rename {eth2/utils => crypto}/eth2_key_derivation/src/lamport_secret_key.rs (100%) rename {eth2/utils => crypto}/eth2_key_derivation/src/lib.rs (100%) rename {eth2/utils => crypto}/eth2_key_derivation/src/path.rs (100%) rename {eth2/utils => crypto}/eth2_key_derivation/src/secret_bytes.rs (100%) rename {eth2/utils => crypto}/eth2_key_derivation/src/secret_hash.rs (100%) rename {eth2/utils => crypto}/eth2_key_derivation/tests/eip2333_vectors.rs (100%) rename {eth2/utils => crypto}/eth2_key_derivation/tests/tests.rs (100%) rename {eth2/utils => crypto}/eth2_keystore/Cargo.toml (92%) rename {eth2/utils => crypto}/eth2_keystore/src/derived_key.rs (100%) rename {eth2/utils => crypto}/eth2_keystore/src/json_keystore/checksum_module.rs (100%) rename {eth2/utils => crypto}/eth2_keystore/src/json_keystore/cipher_module.rs (100%) rename {eth2/utils => crypto}/eth2_keystore/src/json_keystore/hex_bytes.rs (100%) rename {eth2/utils => crypto}/eth2_keystore/src/json_keystore/kdf_module.rs (100%) rename {eth2/utils => crypto}/eth2_keystore/src/json_keystore/mod.rs (100%) rename {eth2/utils => crypto}/eth2_keystore/src/keystore.rs (100%) rename {eth2/utils => crypto}/eth2_keystore/src/lib.rs (100%) rename {eth2/utils => crypto}/eth2_keystore/src/plain_text.rs (100%) rename {eth2/utils => crypto}/eth2_keystore/tests/eip2335_vectors.rs (100%) rename {eth2/utils => crypto}/eth2_keystore/tests/json.rs (100%) rename {eth2/utils => crypto}/eth2_keystore/tests/params.rs (100%) rename {eth2/utils => crypto}/eth2_keystore/tests/tests.rs (100%) rename {eth2/utils => crypto}/eth2_wallet/Cargo.toml (92%) rename {eth2/utils => crypto}/eth2_wallet/src/json_wallet/mod.rs (100%) rename {eth2/utils => crypto}/eth2_wallet/src/lib.rs (100%) rename {eth2/utils => crypto}/eth2_wallet/src/validator_path.rs (100%) rename {eth2/utils => crypto}/eth2_wallet/src/wallet.rs (100%) rename {eth2/utils => crypto}/eth2_wallet/tests/eip2386_vectors.rs (100%) rename {eth2/utils => crypto}/eth2_wallet/tests/json.rs (100%) rename {eth2/utils => crypto}/eth2_wallet/tests/tests.rs (100%) delete mode 100644 eth2/utils/lighthouse_bootstrap/Cargo.toml rename {tests => testing}/ef_tests/.gitignore (100%) rename {tests => testing}/ef_tests/Cargo.toml (59%) rename {tests => testing}/ef_tests/Makefile (100%) rename {tests => testing}/ef_tests/README.md (100%) rename {tests => testing}/ef_tests/src/bls_setting.rs (100%) rename {tests => testing}/ef_tests/src/case_result.rs (100%) rename {tests => testing}/ef_tests/src/cases.rs (100%) rename {tests => testing}/ef_tests/src/cases/bls_aggregate_sigs.rs (100%) rename {tests => testing}/ef_tests/src/cases/bls_aggregate_verify.rs (100%) rename {tests => testing}/ef_tests/src/cases/bls_fast_aggregate_verify.rs (100%) rename {tests => testing}/ef_tests/src/cases/bls_sign_msg.rs (100%) rename {tests => testing}/ef_tests/src/cases/bls_verify_msg.rs (100%) rename {tests => testing}/ef_tests/src/cases/common.rs (100%) rename {tests => testing}/ef_tests/src/cases/epoch_processing.rs (100%) rename {tests => testing}/ef_tests/src/cases/genesis_initialization.rs (100%) rename {tests => testing}/ef_tests/src/cases/genesis_validity.rs (100%) rename {tests => testing}/ef_tests/src/cases/operations.rs (100%) rename {tests => testing}/ef_tests/src/cases/sanity_blocks.rs (100%) rename {tests => testing}/ef_tests/src/cases/sanity_slots.rs (100%) rename {tests => testing}/ef_tests/src/cases/shuffling.rs (100%) rename {tests => testing}/ef_tests/src/cases/ssz_generic.rs (100%) rename {tests => testing}/ef_tests/src/cases/ssz_static.rs (100%) rename {tests => testing}/ef_tests/src/decode.rs (100%) rename {tests => testing}/ef_tests/src/error.rs (100%) rename {tests => testing}/ef_tests/src/handler.rs (100%) rename {tests => testing}/ef_tests/src/lib.rs (100%) rename {tests => testing}/ef_tests/src/results.rs (100%) rename {tests => testing}/ef_tests/src/type_name.rs (100%) rename {tests => testing}/ef_tests/tests/tests.rs (100%) rename {tests => testing}/eth1_test_rig/.gitignore (100%) rename {tests => testing}/eth1_test_rig/Cargo.toml (72%) rename {tests => testing}/eth1_test_rig/src/ganache.rs (100%) rename {tests => testing}/eth1_test_rig/src/lib.rs (100%) rename {tests => testing}/node_test_rig/Cargo.toml (62%) rename {tests => testing}/node_test_rig/src/lib.rs (100%) rename {tests => testing}/simulator/Cargo.toml (91%) rename {tests => testing}/simulator/src/checks.rs (100%) rename {tests => testing}/simulator/src/cli.rs (100%) rename {tests => testing}/simulator/src/eth1_sim.rs (100%) rename {tests => testing}/simulator/src/local_network.rs (100%) rename {tests => testing}/simulator/src/main.rs (100%) rename {tests => testing}/simulator/src/no_eth1_sim.rs (100%) rename {tests => testing}/simulator/src/sync_sim.rs (100%) rename {tests => testing}/state_transition_vectors/.gitignore (100%) rename {tests => testing}/state_transition_vectors/Cargo.toml (70%) rename {tests => testing}/state_transition_vectors/Makefile (100%) rename {tests => testing}/state_transition_vectors/README.md (100%) rename {tests => testing}/state_transition_vectors/src/exit.rs (100%) rename {tests => testing}/state_transition_vectors/src/macros.rs (100%) rename {tests => testing}/state_transition_vectors/src/main.rs (100%) diff --git a/Cargo.toml b/Cargo.toml index 3546676cb..8a4179ae8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,40 +1,6 @@ [workspace] members = [ - "eth2/proto_array_fork_choice", - "eth2/operation_pool", - "eth2/state_processing", - "eth2/types", - "eth2/utils/bls", - "eth2/utils/clap_utils", - "eth2/utils/compare_fields", - "eth2/utils/compare_fields_derive", - "eth2/utils/deposit_contract", - "eth2/utils/eth2_config", - "eth2/utils/eth2_interop_keypairs", - "eth2/utils/eth2_key_derivation", - "eth2/utils/eth2_keystore", - "eth2/utils/eth2_testnet_config", - "eth2/utils/eth2_wallet", - "eth2/utils/eth2_wallet_manager", - "eth2/utils/logging", - "eth2/utils/eth2_hashing", - "eth2/utils/hashset_delay", - "eth2/utils/lighthouse_metrics", - "eth2/utils/merkle_proof", - "eth2/utils/int_to_bytes", - "eth2/utils/safe_arith", - "eth2/utils/serde_hex", - "eth2/utils/slot_clock", - "eth2/utils/rest_types", - "eth2/utils/ssz", - "eth2/utils/ssz_derive", - "eth2/utils/ssz_types", - "eth2/utils/swap_or_not_shuffle", - "eth2/utils/cached_tree_hash", - "eth2/utils/tree_hash", - "eth2/utils/tree_hash_derive", - "eth2/utils/test_random_derive", - "eth2/utils/validator_dir", + "account_manager", "beacon_node", "beacon_node/beacon_chain", "beacon_node/client", @@ -46,25 +12,64 @@ members = [ "beacon_node/timer", "beacon_node/version", "beacon_node/websocket_server", - "tests/simulator", - "tests/ef_tests", - "tests/eth1_test_rig", - "tests/node_test_rig", - "tests/state_transition_vectors", + + "common/clap_utils", + "common/compare_fields", + "common/compare_fields_derive", + "common/deposit_contract", + "common/eth2_config", + "common/eth2_interop_keypairs", + "common/eth2_testnet_config", + "common/eth2_wallet_manager", + "common/hashset_delay", + "common/lighthouse_metrics", + "common/logging", + "common/remote_beacon_node", + "common/rest_types", + "common/slot_clock", + "common/test_random_derive", + "common/validator_dir", + + "consensus/cached_tree_hash", + "consensus/int_to_bytes", + "consensus/proto_array_fork_choice", + "consensus/safe_arith", + "consensus/ssz", + "consensus/ssz_derive", + "consensus/ssz_types", + "consensus/serde_hex", + "consensus/state_processing", + "consensus/swap_or_not_shuffle", + "consensus/tree_hash", + "consensus/tree_hash_derive", + + "crypto/bls", + "crypto/eth2_hashing", + "crypto/eth2_key_derivation", + "crypto/eth2_keystore", + "crypto/eth2_wallet", + "lcli", + + "lighthouse", + "lighthouse/environment", + + "testing/simulator", + "testing/ef_tests", + "testing/eth1_test_rig", + "testing/node_test_rig", + "testing/state_transition_vectors", + "validator_client", "validator_client/slashing_protection", - "account_manager", - "lighthouse", - "lighthouse/environment" ] [patch] [patch.crates-io] -tree_hash = { path = "eth2/utils/tree_hash" } -tree_hash_derive = { path = "eth2/utils/tree_hash_derive" } -eth2_ssz = { path = "eth2/utils/ssz" } -eth2_ssz_derive = { path = "eth2/utils/ssz_derive" } -eth2_ssz_types = { path = "eth2/utils/ssz_types" } -eth2_hashing = { path = "eth2/utils/eth2_hashing" } +tree_hash = { path = "consensus/tree_hash" } +tree_hash_derive = { path = "consensus/tree_hash_derive" } +eth2_ssz = { path = "consensus/ssz" } +eth2_ssz_derive = { path = "consensus/ssz_derive" } +eth2_ssz_types = { path = "consensus/ssz_types" } +eth2_hashing = { path = "crypto/eth2_hashing" } web3 = { git = "https://github.com/tomusdrw/rust-web3" } diff --git a/Makefile b/Makefile index 011e0ce56..8f650ed0b 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ .PHONY: tests -EF_TESTS = "tests/ef_tests" -STATE_TRANSITION_VECTORS = "tests/state_transition_vectors" +EF_TESTS = "testing/ef_tests" +STATE_TRANSITION_VECTORS = "testing/state_transition_vectors" # Builds the Lighthouse binary in release (optimized). # @@ -65,7 +65,7 @@ make-ef-tests: # Verifies that state_processing feature arbitrary-fuzz will compile arbitrary-fuzz: - cargo check --manifest-path=eth2/state_processing/Cargo.toml --features arbitrary-fuzz + cargo check --manifest-path=consensus/state_processing/Cargo.toml --features arbitrary-fuzz # Performs a `cargo` clean and cleans the `ef_tests` directory. clean: diff --git a/account_manager/Cargo.toml b/account_manager/Cargo.toml index 842dacd61..eadb2ad6b 100644 --- a/account_manager/Cargo.toml +++ b/account_manager/Cargo.toml @@ -8,28 +8,28 @@ edition = "2018" tempdir = "0.3.7" [dependencies] -bls = { path = "../eth2/utils/bls" } +bls = { path = "../crypto/bls" } clap = "2.33.0" slog = "2.5.2" slog-term = "2.5.0" slog-async = "2.5.0" -types = { path = "../eth2/types" } +types = { path = "../consensus/types" } dirs = "2.0.2" environment = { path = "../lighthouse/environment" } -deposit_contract = { path = "../eth2/utils/deposit_contract" } +deposit_contract = { path = "../common/deposit_contract" } libc = "0.2.65" eth2_ssz = "0.1.2" eth2_ssz_derive = "0.1.0" hex = "0.4.2" validator_client = { path = "../validator_client" } rayon = "1.3.0" -eth2_testnet_config = { path = "../eth2/utils/eth2_testnet_config" } +eth2_testnet_config = { path = "../common/eth2_testnet_config" } web3 = "0.10.0" futures = { version = "0.3.5", features = ["compat"] } -clap_utils = { path = "../eth2/utils/clap_utils" } -eth2_wallet = { path = "../eth2/utils/eth2_wallet" } -eth2_wallet_manager = { path = "../eth2/utils/eth2_wallet_manager" } +clap_utils = { path = "../common/clap_utils" } +eth2_wallet = { path = "../crypto/eth2_wallet" } +eth2_wallet_manager = { path = "../common/eth2_wallet_manager" } rand = "0.7.2" -validator_dir = { path = "../eth2/utils/validator_dir", features = ["unencrypted_keys"] } +validator_dir = { path = "../common/validator_dir", features = ["unencrypted_keys"] } tokio = {version = "0.2.20", features = ["full"]} -eth2_keystore = { path = "../eth2/utils/eth2_keystore" } +eth2_keystore = { path = "../crypto/eth2_keystore" } diff --git a/beacon_node/Cargo.toml b/beacon_node/Cargo.toml index 9b336dbcc..6ffa70df8 100644 --- a/beacon_node/Cargo.toml +++ b/beacon_node/Cargo.toml @@ -9,15 +9,15 @@ name = "beacon_node" path = "src/lib.rs" [dev-dependencies] -node_test_rig = { path = "../tests/node_test_rig" } +node_test_rig = { path = "../testing/node_test_rig" } [features] write_ssz_files = ["beacon_chain/write_ssz_files"] # Writes debugging .ssz files to /tmp during block processing. [dependencies] -eth2_config = { path = "../eth2/utils/eth2_config" } +eth2_config = { path = "../common/eth2_config" } beacon_chain = { path = "beacon_chain" } -types = { path = "../eth2/types" } +types = { path = "../consensus/types" } store = { path = "./store" } client = { path = "client" } version = { path = "version" } @@ -31,13 +31,13 @@ tokio = {version = "0.2.20", features = ["time"] } exit-future = "0.2.0" env_logger = "0.7.1" dirs = "2.0.2" -logging = { path = "../eth2/utils/logging" } +logging = { path = "../common/logging" } futures = "0.3.5" environment = { path = "../lighthouse/environment" } genesis = { path = "genesis" } -eth2_testnet_config = { path = "../eth2/utils/eth2_testnet_config" } +eth2_testnet_config = { path = "../common/eth2_testnet_config" } eth2-libp2p = { path = "./eth2-libp2p" } eth2_ssz = "0.1.2" toml = "0.5.6" serde = "1.0.110" -clap_utils = { path = "../eth2/utils/clap_utils" } +clap_utils = { path = "../common/clap_utils" } diff --git a/beacon_node/beacon_chain/Cargo.toml b/beacon_node/beacon_chain/Cargo.toml index d740778bd..796ca4b6d 100644 --- a/beacon_node/beacon_chain/Cargo.toml +++ b/beacon_node/beacon_chain/Cargo.toml @@ -10,14 +10,14 @@ write_ssz_files = [] # Writes debugging .ssz files to /tmp during block process participation_metrics = [] # Exposes validator participation metrics to Prometheus. [dependencies] -eth2_config = { path = "../../eth2/utils/eth2_config" } -merkle_proof = { path = "../../eth2/utils/merkle_proof" } +eth2_config = { path = "../../common/eth2_config" } +merkle_proof = { path = "../../consensus/merkle_proof" } store = { path = "../store" } parking_lot = "0.10.2" lazy_static = "1.4.0" -lighthouse_metrics = { path = "../../eth2/utils/lighthouse_metrics" } +lighthouse_metrics = { path = "../../common/lighthouse_metrics" } log = "0.4.8" -operation_pool = { path = "../../eth2/operation_pool" } +operation_pool = { path = "../operation_pool" } rayon = "1.3.0" serde = "1.0.110" serde_derive = "1.0.110" @@ -25,14 +25,14 @@ serde_yaml = "0.8.11" serde_json = "1.0.52" slog = { version = "2.5.2", features = ["max_level_trace"] } sloggers = "1.0.0" -slot_clock = { path = "../../eth2/utils/slot_clock" } +slot_clock = { path = "../../common/slot_clock" } eth2_hashing = "0.1.0" eth2_ssz = "0.1.2" -eth2_ssz_types = { path = "../../eth2/utils/ssz_types" } +eth2_ssz_types = { path = "../../consensus/ssz_types" } eth2_ssz_derive = "0.1.0" -state_processing = { path = "../../eth2/state_processing" } +state_processing = { path = "../../consensus/state_processing" } tree_hash = "0.1.0" -types = { path = "../../eth2/types" } +types = { path = "../../consensus/types" } tokio = "0.2.20" eth1 = { path = "../eth1" } websocket_server = { path = "../websocket_server" } @@ -40,12 +40,12 @@ futures = "0.3.5" genesis = { path = "../genesis" } integer-sqrt = "0.1.3" rand = "0.7.3" -proto_array_fork_choice = { path = "../../eth2/proto_array_fork_choice" } +proto_array_fork_choice = { path = "../../consensus/proto_array_fork_choice" } lru = "0.4.3" tempfile = "3.1.0" bitvec = "0.17.4" -bls = { path = "../../eth2/utils/bls" } -safe_arith = { path = "../../eth2/utils/safe_arith" } +bls = { path = "../../crypto/bls" } +safe_arith = { path = "../../consensus/safe_arith" } [dev-dependencies] lazy_static = "1.4.0" diff --git a/beacon_node/client/Cargo.toml b/beacon_node/client/Cargo.toml index c9a9eb0f3..d78ec620b 100644 --- a/beacon_node/client/Cargo.toml +++ b/beacon_node/client/Cargo.toml @@ -18,10 +18,10 @@ rest_api = { path = "../rest_api" } parking_lot = "0.10.2" websocket_server = { path = "../websocket_server" } prometheus = "0.8.0" -types = { path = "../../eth2/types" } +types = { path = "../../consensus/types" } tree_hash = "0.1.0" -eth2_config = { path = "../../eth2/utils/eth2_config" } -slot_clock = { path = "../../eth2/utils/slot_clock" } +eth2_config = { path = "../../common/eth2_config" } +slot_clock = { path = "../../common/slot_clock" } serde = "1.0.110" serde_derive = "1.0.110" error-chain = "0.12.2" @@ -38,4 +38,4 @@ genesis = { path = "../genesis" } environment = { path = "../../lighthouse/environment" } eth2_ssz = "0.1.2" lazy_static = "1.4.0" -lighthouse_metrics = { path = "../../eth2/utils/lighthouse_metrics" } +lighthouse_metrics = { path = "../../common/lighthouse_metrics" } diff --git a/beacon_node/eth1/Cargo.toml b/beacon_node/eth1/Cargo.toml index baf565f3b..e1b5dfbbb 100644 --- a/beacon_node/eth1/Cargo.toml +++ b/beacon_node/eth1/Cargo.toml @@ -5,7 +5,7 @@ authors = ["Paul Hauner "] edition = "2018" [dev-dependencies] -eth1_test_rig = { path = "../../tests/eth1_test_rig" } +eth1_test_rig = { path = "../../testing/eth1_test_rig" } environment = { path = "../../lighthouse/environment" } toml = "0.5.6" web3 = "0.10.0" @@ -17,8 +17,8 @@ futures = { version = "0.3.5", features = ["compat"] } serde_json = "1.0.52" serde = { version = "1.0.110", features = ["derive"] } hex = "0.4.2" -types = { path = "../../eth2/types"} -merkle_proof = { path = "../../eth2/utils/merkle_proof"} +types = { path = "../../consensus/types"} +merkle_proof = { path = "../../consensus/merkle_proof"} eth2_ssz = "0.1.2" eth2_ssz_derive = "0.1.0" tree_hash = "0.1.0" @@ -26,7 +26,7 @@ eth2_hashing = "0.1.0" parking_lot = "0.10.2" slog = "2.5.2" tokio = { version = "0.2.20", features = ["full"] } -state_processing = { path = "../../eth2/state_processing" } +state_processing = { path = "../../consensus/state_processing" } libflate = "1.0.0" -lighthouse_metrics = { path = "../../eth2/utils/lighthouse_metrics"} +lighthouse_metrics = { path = "../../common/lighthouse_metrics"} lazy_static = "1.4.0" diff --git a/beacon_node/eth2-libp2p/Cargo.toml b/beacon_node/eth2-libp2p/Cargo.toml index 3e2efe9b1..dcf327117 100644 --- a/beacon_node/eth2-libp2p/Cargo.toml +++ b/beacon_node/eth2-libp2p/Cargo.toml @@ -6,9 +6,9 @@ edition = "2018" [dependencies] hex = "0.4.2" -types = { path = "../../eth2/types" } -hashset_delay = { path = "../../eth2/utils/hashset_delay" } -eth2_ssz_types = { path = "../../eth2/utils/ssz_types" } +types = { path = "../../consensus/types" } +hashset_delay = { path = "../../common/hashset_delay" } +eth2_ssz_types = { path = "../../consensus/ssz_types" } serde = { version = "1.0.110", features = ["derive"] } serde_derive = "1.0.110" eth2_ssz = "0.1.2" @@ -22,7 +22,7 @@ dirs = "2.0.2" fnv = "1.0.6" unsigned-varint = { git = "https://github.com/sigp/unsigned-varint", branch = "latest-codecs", features = ["codec"] } lazy_static = "1.4.0" -lighthouse_metrics = { path = "../../eth2/utils/lighthouse_metrics" } +lighthouse_metrics = { path = "../../common/lighthouse_metrics" } smallvec = "1.4.0" lru = "0.4.3" parking_lot = "0.10.2" @@ -35,7 +35,7 @@ tokio-util = { version = "0.3.1", features = ["codec", "compat"] } # Patched for quick updates discv5 = { git = "https://github.com/sigp/discv5", rev = "7b3bd40591b62b8c002ffdb85de008aa9f82e2e5" } tiny-keccak = "2.0.2" -libp2p-tcp = { version = "0.18.0", default-features = false, features = ["tokio"] } +libp2p-tcp = { version = "0.18.0", default-features = false, features = ["tokio"] } [dependencies.libp2p] version = "0.18.1" diff --git a/beacon_node/genesis/Cargo.toml b/beacon_node/genesis/Cargo.toml index b62ac996f..8b01f7fde 100644 --- a/beacon_node/genesis/Cargo.toml +++ b/beacon_node/genesis/Cargo.toml @@ -5,16 +5,16 @@ authors = ["Paul Hauner "] edition = "2018" [dev-dependencies] -eth1_test_rig = { path = "../../tests/eth1_test_rig" } +eth1_test_rig = { path = "../../testing/eth1_test_rig" } [dependencies] futures = "0.3.5" -types = { path = "../../eth2/types"} +types = { path = "../../consensus/types"} environment = { path = "../../lighthouse/environment"} eth1 = { path = "../eth1"} rayon = "1.3.0" -state_processing = { path = "../../eth2/state_processing" } -merkle_proof = { path = "../../eth2/utils/merkle_proof" } +state_processing = { path = "../../consensus/state_processing" } +merkle_proof = { path = "../../consensus/merkle_proof" } eth2_ssz = "0.1.2" eth2_hashing = "0.1.0" tree_hash = "0.1.0" @@ -24,4 +24,4 @@ slog = "2.5.2" exit-future = "0.2.0" serde = "1.0.110" serde_derive = "1.0.110" -int_to_bytes = { path = "../../eth2/utils/int_to_bytes" } +int_to_bytes = { path = "../../consensus/int_to_bytes" } diff --git a/beacon_node/network/Cargo.toml b/beacon_node/network/Cargo.toml index b335457cf..56a6b3700 100644 --- a/beacon_node/network/Cargo.toml +++ b/beacon_node/network/Cargo.toml @@ -15,10 +15,10 @@ tempfile = "3.1.0" beacon_chain = { path = "../beacon_chain" } store = { path = "../store" } eth2-libp2p = { path = "../eth2-libp2p" } -hashset_delay = { path = "../../eth2/utils/hashset_delay" } -rest_types = { path = "../../eth2/utils/rest_types" } -types = { path = "../../eth2/types" } -slot_clock = { path = "../../eth2/utils/slot_clock" } +hashset_delay = { path = "../../common/hashset_delay" } +rest_types = { path = "../../common/rest_types" } +types = { path = "../../consensus/types" } +slot_clock = { path = "../../common/slot_clock" } slog = { version = "2.5.2", features = ["max_level_trace"] } hex = "0.4.2" eth2_ssz = "0.1.2" @@ -33,4 +33,4 @@ rand = "0.7.3" fnv = "1.0.6" rlp = "0.4.5" lazy_static = "1.4.0" -lighthouse_metrics = { path = "../../eth2/utils/lighthouse_metrics" } +lighthouse_metrics = { path = "../../common/lighthouse_metrics" } diff --git a/eth2/operation_pool/Cargo.toml b/beacon_node/operation_pool/Cargo.toml similarity index 59% rename from eth2/operation_pool/Cargo.toml rename to beacon_node/operation_pool/Cargo.toml index b2eb5d7a0..d388df2b4 100644 --- a/eth2/operation_pool/Cargo.toml +++ b/beacon_node/operation_pool/Cargo.toml @@ -5,15 +5,15 @@ authors = ["Michael Sproul "] edition = "2018" [dependencies] -int_to_bytes = { path = "../utils/int_to_bytes" } +int_to_bytes = { path = "../../consensus/int_to_bytes" } parking_lot = "0.10.2" -types = { path = "../types" } -state_processing = { path = "../state_processing" } +types = { path = "../../consensus/types" } +state_processing = { path = "../../consensus/state_processing" } eth2_ssz = "0.1.2" eth2_ssz_derive = "0.1.0" serde = "1.0.110" serde_derive = "1.0.110" -store = { path = "../../beacon_node/store" } +store = { path = "../store" } [dev-dependencies] rand = "0.7.3" diff --git a/eth2/operation_pool/src/attestation.rs b/beacon_node/operation_pool/src/attestation.rs similarity index 100% rename from eth2/operation_pool/src/attestation.rs rename to beacon_node/operation_pool/src/attestation.rs diff --git a/eth2/operation_pool/src/attestation_id.rs b/beacon_node/operation_pool/src/attestation_id.rs similarity index 100% rename from eth2/operation_pool/src/attestation_id.rs rename to beacon_node/operation_pool/src/attestation_id.rs diff --git a/eth2/operation_pool/src/lib.rs b/beacon_node/operation_pool/src/lib.rs similarity index 100% rename from eth2/operation_pool/src/lib.rs rename to beacon_node/operation_pool/src/lib.rs diff --git a/eth2/operation_pool/src/max_cover.rs b/beacon_node/operation_pool/src/max_cover.rs similarity index 100% rename from eth2/operation_pool/src/max_cover.rs rename to beacon_node/operation_pool/src/max_cover.rs diff --git a/eth2/operation_pool/src/persistence.rs b/beacon_node/operation_pool/src/persistence.rs similarity index 100% rename from eth2/operation_pool/src/persistence.rs rename to beacon_node/operation_pool/src/persistence.rs diff --git a/beacon_node/rest_api/Cargo.toml b/beacon_node/rest_api/Cargo.toml index b846d4722..e2dddb056 100644 --- a/beacon_node/rest_api/Cargo.toml +++ b/beacon_node/rest_api/Cargo.toml @@ -6,8 +6,8 @@ edition = "2018" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -bls = { path = "../../eth2/utils/bls" } -rest_types = { path = "../../eth2/utils/rest_types" } +bls = { path = "../../crypto/bls" } +rest_types = { path = "../../common/rest_types" } beacon_chain = { path = "../beacon_chain" } network = { path = "../network" } eth2-libp2p = { path = "../eth2-libp2p" } @@ -21,23 +21,23 @@ slog-term = "2.5.0" slog-async = "2.5.0" eth2_ssz = "0.1.2" eth2_ssz_derive = "0.1.0" -state_processing = { path = "../../eth2/state_processing" } -types = { path = "../../eth2/types" } +state_processing = { path = "../../consensus/state_processing" } +types = { path = "../../consensus/types" } http = "0.2.1" hyper = "0.13.5" tokio = { version = "0.2", features = ["sync"] } url = "2.1.1" lazy_static = "1.4.0" -eth2_config = { path = "../../eth2/utils/eth2_config" } -lighthouse_metrics = { path = "../../eth2/utils/lighthouse_metrics" } -slot_clock = { path = "../../eth2/utils/slot_clock" } +eth2_config = { path = "../../common/eth2_config" } +lighthouse_metrics = { path = "../../common/lighthouse_metrics" } +slot_clock = { path = "../../common/slot_clock" } hex = "0.4.2" parking_lot = "0.10.2" futures = "0.3.5" -operation_pool = { path = "../../eth2/operation_pool" } +operation_pool = { path = "../operation_pool" } rayon = "1.3.0" [dev-dependencies] -remote_beacon_node = { path = "../../eth2/utils/remote_beacon_node" } -node_test_rig = { path = "../../tests/node_test_rig" } +remote_beacon_node = { path = "../../common/remote_beacon_node" } +node_test_rig = { path = "../../testing/node_test_rig" } tree_hash = "0.1.0" diff --git a/beacon_node/store/Cargo.toml b/beacon_node/store/Cargo.toml index 556391117..d651ec804 100644 --- a/beacon_node/store/Cargo.toml +++ b/beacon_node/store/Cargo.toml @@ -22,11 +22,11 @@ itertools = "0.9.0" eth2_ssz = "0.1.2" eth2_ssz_derive = "0.1.0" tree_hash = "0.1.0" -types = { path = "../../eth2/types" } -state_processing = { path = "../../eth2/state_processing" } +types = { path = "../../consensus/types" } +state_processing = { path = "../../consensus/state_processing" } slog = "2.5.2" serde = "1.0.110" serde_derive = "1.0.110" lazy_static = "1.4.0" -lighthouse_metrics = { path = "../../eth2/utils/lighthouse_metrics" } +lighthouse_metrics = { path = "../../common/lighthouse_metrics" } lru = "0.4.3" diff --git a/beacon_node/timer/Cargo.toml b/beacon_node/timer/Cargo.toml index da1a70e57..2c183db53 100644 --- a/beacon_node/timer/Cargo.toml +++ b/beacon_node/timer/Cargo.toml @@ -6,8 +6,8 @@ edition = "2018" [dependencies] beacon_chain = { path = "../beacon_chain" } -types = { path = "../../eth2/types" } -slot_clock = { path = "../../eth2/utils/slot_clock" } +types = { path = "../../consensus/types" } +slot_clock = { path = "../../common/slot_clock" } tokio = { version = "0.2.20", features = ["full"] } slog = "2.5.2" parking_lot = "0.10.2" diff --git a/beacon_node/websocket_server/Cargo.toml b/beacon_node/websocket_server/Cargo.toml index 798fe091b..a470a427d 100644 --- a/beacon_node/websocket_server/Cargo.toml +++ b/beacon_node/websocket_server/Cargo.toml @@ -13,5 +13,5 @@ serde_derive = "1.0.110" serde_json = "1.0.52" slog = "2.5.2" tokio = { version = "0.2.20", features = ["full"] } -types = { path = "../../eth2/types" } +types = { path = "../../consensus/types" } ws = "0.9.1" diff --git a/book/src/setup.md b/book/src/setup.md index 0edb0ac0e..2d1447961 100644 --- a/book/src/setup.md +++ b/book/src/setup.md @@ -19,7 +19,7 @@ As with most other Rust projects, Lighthouse uses `cargo test` for unit and integration tests. For example, to test the `ssz` crate run: ```bash -cd eth2/utils/ssz +cd consensus/ssz cargo test ``` diff --git a/eth2/README.md b/common/README.md similarity index 100% rename from eth2/README.md rename to common/README.md diff --git a/eth2/utils/clap_utils/Cargo.toml b/common/clap_utils/Cargo.toml similarity index 89% rename from eth2/utils/clap_utils/Cargo.toml rename to common/clap_utils/Cargo.toml index b7c8cdfa4..0f84869ad 100644 --- a/eth2/utils/clap_utils/Cargo.toml +++ b/common/clap_utils/Cargo.toml @@ -10,6 +10,6 @@ edition = "2018" clap = "2.33.0" hex = "0.4.2" dirs = "2.0.2" -types = { path = "../../types" } +types = { path = "../../consensus/types" } eth2_testnet_config = { path = "../eth2_testnet_config" } eth2_ssz = "0.1.2" diff --git a/eth2/utils/clap_utils/src/lib.rs b/common/clap_utils/src/lib.rs similarity index 100% rename from eth2/utils/clap_utils/src/lib.rs rename to common/clap_utils/src/lib.rs diff --git a/eth2/utils/compare_fields/Cargo.toml b/common/compare_fields/Cargo.toml similarity index 100% rename from eth2/utils/compare_fields/Cargo.toml rename to common/compare_fields/Cargo.toml diff --git a/eth2/utils/compare_fields/src/lib.rs b/common/compare_fields/src/lib.rs similarity index 100% rename from eth2/utils/compare_fields/src/lib.rs rename to common/compare_fields/src/lib.rs diff --git a/eth2/utils/compare_fields_derive/Cargo.toml b/common/compare_fields_derive/Cargo.toml similarity index 100% rename from eth2/utils/compare_fields_derive/Cargo.toml rename to common/compare_fields_derive/Cargo.toml diff --git a/eth2/utils/compare_fields_derive/src/lib.rs b/common/compare_fields_derive/src/lib.rs similarity index 100% rename from eth2/utils/compare_fields_derive/src/lib.rs rename to common/compare_fields_derive/src/lib.rs diff --git a/eth2/utils/deposit_contract/.gitignore b/common/deposit_contract/.gitignore similarity index 100% rename from eth2/utils/deposit_contract/.gitignore rename to common/deposit_contract/.gitignore diff --git a/eth2/utils/deposit_contract/Cargo.toml b/common/deposit_contract/Cargo.toml similarity index 88% rename from eth2/utils/deposit_contract/Cargo.toml rename to common/deposit_contract/Cargo.toml index 14dafda2d..298b126df 100644 --- a/eth2/utils/deposit_contract/Cargo.toml +++ b/common/deposit_contract/Cargo.toml @@ -11,7 +11,7 @@ reqwest = { version = "0.10.4", features = ["blocking", "json"] } serde_json = "1.0.52" [dependencies] -types = { path = "../../types"} +types = { path = "../../consensus/types"} eth2_ssz = "0.1.2" tree_hash = "0.1.0" ethabi = "12.0.0" diff --git a/eth2/utils/deposit_contract/build.rs b/common/deposit_contract/build.rs similarity index 100% rename from eth2/utils/deposit_contract/build.rs rename to common/deposit_contract/build.rs diff --git a/eth2/utils/deposit_contract/src/lib.rs b/common/deposit_contract/src/lib.rs similarity index 100% rename from eth2/utils/deposit_contract/src/lib.rs rename to common/deposit_contract/src/lib.rs diff --git a/eth2/utils/eth2_config/Cargo.toml b/common/eth2_config/Cargo.toml similarity index 81% rename from eth2/utils/eth2_config/Cargo.toml rename to common/eth2_config/Cargo.toml index 13be59963..b551a2349 100644 --- a/eth2/utils/eth2_config/Cargo.toml +++ b/common/eth2_config/Cargo.toml @@ -8,4 +8,4 @@ edition = "2018" serde = "1.0.110" serde_derive = "1.0.110" toml = "0.5.6" -types = { path = "../../types" } +types = { path = "../../consensus/types" } diff --git a/eth2/utils/eth2_config/src/lib.rs b/common/eth2_config/src/lib.rs similarity index 100% rename from eth2/utils/eth2_config/src/lib.rs rename to common/eth2_config/src/lib.rs diff --git a/eth2/utils/eth2_interop_keypairs/Cargo.toml b/common/eth2_interop_keypairs/Cargo.toml similarity index 100% rename from eth2/utils/eth2_interop_keypairs/Cargo.toml rename to common/eth2_interop_keypairs/Cargo.toml diff --git a/eth2/utils/eth2_interop_keypairs/specs/keygen_10_validators.yaml b/common/eth2_interop_keypairs/specs/keygen_10_validators.yaml similarity index 100% rename from eth2/utils/eth2_interop_keypairs/specs/keygen_10_validators.yaml rename to common/eth2_interop_keypairs/specs/keygen_10_validators.yaml diff --git a/eth2/utils/eth2_interop_keypairs/src/lib.rs b/common/eth2_interop_keypairs/src/lib.rs similarity index 100% rename from eth2/utils/eth2_interop_keypairs/src/lib.rs rename to common/eth2_interop_keypairs/src/lib.rs diff --git a/eth2/utils/eth2_interop_keypairs/tests/from_file.rs b/common/eth2_interop_keypairs/tests/from_file.rs similarity index 100% rename from eth2/utils/eth2_interop_keypairs/tests/from_file.rs rename to common/eth2_interop_keypairs/tests/from_file.rs diff --git a/eth2/utils/eth2_interop_keypairs/tests/generation.rs b/common/eth2_interop_keypairs/tests/generation.rs similarity index 100% rename from eth2/utils/eth2_interop_keypairs/tests/generation.rs rename to common/eth2_interop_keypairs/tests/generation.rs diff --git a/eth2/utils/eth2_testnet_config/.gitignore b/common/eth2_testnet_config/.gitignore similarity index 100% rename from eth2/utils/eth2_testnet_config/.gitignore rename to common/eth2_testnet_config/.gitignore diff --git a/eth2/utils/eth2_testnet_config/Cargo.toml b/common/eth2_testnet_config/Cargo.toml similarity index 77% rename from eth2/utils/eth2_testnet_config/Cargo.toml rename to common/eth2_testnet_config/Cargo.toml index a0ccdc5d8..a531cb754 100644 --- a/eth2/utils/eth2_testnet_config/Cargo.toml +++ b/common/eth2_testnet_config/Cargo.toml @@ -15,6 +15,6 @@ tempdir = "0.3.7" [dependencies] serde = "1.0.110" serde_yaml = "0.8.11" -types = { path = "../../types"} -eth2-libp2p = { path = "../../../beacon_node/eth2-libp2p"} +types = { path = "../../consensus/types"} +eth2-libp2p = { path = "../../beacon_node/eth2-libp2p"} eth2_ssz = "0.1.2" diff --git a/eth2/utils/eth2_testnet_config/build.rs b/common/eth2_testnet_config/build.rs similarity index 100% rename from eth2/utils/eth2_testnet_config/build.rs rename to common/eth2_testnet_config/build.rs diff --git a/eth2/utils/eth2_testnet_config/src/lib.rs b/common/eth2_testnet_config/src/lib.rs similarity index 100% rename from eth2/utils/eth2_testnet_config/src/lib.rs rename to common/eth2_testnet_config/src/lib.rs diff --git a/eth2/utils/eth2_wallet_manager/Cargo.toml b/common/eth2_wallet_manager/Cargo.toml similarity index 71% rename from eth2/utils/eth2_wallet_manager/Cargo.toml rename to common/eth2_wallet_manager/Cargo.toml index 3d7769337..7f3b6b545 100644 --- a/eth2/utils/eth2_wallet_manager/Cargo.toml +++ b/common/eth2_wallet_manager/Cargo.toml @@ -7,8 +7,8 @@ edition = "2018" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -eth2_keystore = { path = "../eth2_keystore" } -eth2_wallet = { path = "../eth2_wallet" } +eth2_keystore = { path = "../../crypto/eth2_keystore" } +eth2_wallet = { path = "../../crypto/eth2_wallet" } [dev-dependencies] tempfile = "3.1.0" diff --git a/eth2/utils/eth2_wallet_manager/src/filesystem.rs b/common/eth2_wallet_manager/src/filesystem.rs similarity index 100% rename from eth2/utils/eth2_wallet_manager/src/filesystem.rs rename to common/eth2_wallet_manager/src/filesystem.rs diff --git a/eth2/utils/eth2_wallet_manager/src/lib.rs b/common/eth2_wallet_manager/src/lib.rs similarity index 100% rename from eth2/utils/eth2_wallet_manager/src/lib.rs rename to common/eth2_wallet_manager/src/lib.rs diff --git a/eth2/utils/eth2_wallet_manager/src/locked_wallet.rs b/common/eth2_wallet_manager/src/locked_wallet.rs similarity index 100% rename from eth2/utils/eth2_wallet_manager/src/locked_wallet.rs rename to common/eth2_wallet_manager/src/locked_wallet.rs diff --git a/eth2/utils/eth2_wallet_manager/src/wallet_manager.rs b/common/eth2_wallet_manager/src/wallet_manager.rs similarity index 100% rename from eth2/utils/eth2_wallet_manager/src/wallet_manager.rs rename to common/eth2_wallet_manager/src/wallet_manager.rs diff --git a/eth2/utils/hashset_delay/Cargo.toml b/common/hashset_delay/Cargo.toml similarity index 100% rename from eth2/utils/hashset_delay/Cargo.toml rename to common/hashset_delay/Cargo.toml diff --git a/eth2/utils/hashset_delay/src/hashset_delay.rs b/common/hashset_delay/src/hashset_delay.rs similarity index 100% rename from eth2/utils/hashset_delay/src/hashset_delay.rs rename to common/hashset_delay/src/hashset_delay.rs diff --git a/eth2/utils/hashset_delay/src/lib.rs b/common/hashset_delay/src/lib.rs similarity index 100% rename from eth2/utils/hashset_delay/src/lib.rs rename to common/hashset_delay/src/lib.rs diff --git a/eth2/utils/lighthouse_metrics/Cargo.toml b/common/lighthouse_metrics/Cargo.toml similarity index 100% rename from eth2/utils/lighthouse_metrics/Cargo.toml rename to common/lighthouse_metrics/Cargo.toml diff --git a/eth2/utils/lighthouse_metrics/src/lib.rs b/common/lighthouse_metrics/src/lib.rs similarity index 100% rename from eth2/utils/lighthouse_metrics/src/lib.rs rename to common/lighthouse_metrics/src/lib.rs diff --git a/eth2/utils/logging/Cargo.toml b/common/logging/Cargo.toml similarity index 100% rename from eth2/utils/logging/Cargo.toml rename to common/logging/Cargo.toml diff --git a/eth2/utils/logging/src/lib.rs b/common/logging/src/lib.rs similarity index 100% rename from eth2/utils/logging/src/lib.rs rename to common/logging/src/lib.rs diff --git a/eth2/utils/remote_beacon_node/Cargo.toml b/common/remote_beacon_node/Cargo.toml similarity index 64% rename from eth2/utils/remote_beacon_node/Cargo.toml rename to common/remote_beacon_node/Cargo.toml index 6b0486401..767da56d8 100644 --- a/eth2/utils/remote_beacon_node/Cargo.toml +++ b/common/remote_beacon_node/Cargo.toml @@ -11,11 +11,11 @@ reqwest = { version = "0.10.4", features = ["json"] } url = "2.1.1" serde = "1.0.110" futures = "0.3.5" -types = { path = "../../../eth2/types" } +types = { path = "../../consensus/types" } rest_types = { path = "../rest_types" } hex = "0.4.2" eth2_ssz = "0.1.2" serde_json = "1.0.52" -eth2_config = { path = "../../../eth2/utils/eth2_config" } -proto_array_fork_choice = { path = "../../../eth2/proto_array_fork_choice" } -operation_pool = { path = "../../../eth2/operation_pool" } +eth2_config = { path = "../eth2_config" } +proto_array_fork_choice = { path = "../../consensus/proto_array_fork_choice" } +operation_pool = { path = "../../beacon_node/operation_pool" } diff --git a/eth2/utils/remote_beacon_node/src/lib.rs b/common/remote_beacon_node/src/lib.rs similarity index 100% rename from eth2/utils/remote_beacon_node/src/lib.rs rename to common/remote_beacon_node/src/lib.rs diff --git a/eth2/utils/rest_types/Cargo.toml b/common/rest_types/Cargo.toml similarity index 66% rename from eth2/utils/rest_types/Cargo.toml rename to common/rest_types/Cargo.toml index b9867c912..5874601cc 100644 --- a/eth2/utils/rest_types/Cargo.toml +++ b/common/rest_types/Cargo.toml @@ -5,12 +5,12 @@ authors = ["Age Manning "] edition = "2018" [dependencies] -types = { path = "../../types" } +types = { path = "../../consensus/types" } eth2_ssz_derive = "0.1.0" eth2_ssz = "0.1.2" eth2_hashing = "0.1.0" tree_hash = "0.1.0" -state_processing = { path = "../../state_processing" } -bls = { path = "../bls" } +state_processing = { path = "../../consensus/state_processing" } +bls = { path = "../../crypto/bls" } serde = { version = "1.0.110", features = ["derive"] } rayon = "1.3.0" diff --git a/eth2/utils/rest_types/src/beacon.rs b/common/rest_types/src/beacon.rs similarity index 100% rename from eth2/utils/rest_types/src/beacon.rs rename to common/rest_types/src/beacon.rs diff --git a/eth2/utils/rest_types/src/consensus.rs b/common/rest_types/src/consensus.rs similarity index 100% rename from eth2/utils/rest_types/src/consensus.rs rename to common/rest_types/src/consensus.rs diff --git a/eth2/utils/rest_types/src/lib.rs b/common/rest_types/src/lib.rs similarity index 100% rename from eth2/utils/rest_types/src/lib.rs rename to common/rest_types/src/lib.rs diff --git a/eth2/utils/rest_types/src/node.rs b/common/rest_types/src/node.rs similarity index 100% rename from eth2/utils/rest_types/src/node.rs rename to common/rest_types/src/node.rs diff --git a/eth2/utils/rest_types/src/validator.rs b/common/rest_types/src/validator.rs similarity index 100% rename from eth2/utils/rest_types/src/validator.rs rename to common/rest_types/src/validator.rs diff --git a/eth2/utils/slot_clock/Cargo.toml b/common/slot_clock/Cargo.toml similarity index 84% rename from eth2/utils/slot_clock/Cargo.toml rename to common/slot_clock/Cargo.toml index 40da33af2..86b013e10 100644 --- a/eth2/utils/slot_clock/Cargo.toml +++ b/common/slot_clock/Cargo.toml @@ -5,7 +5,7 @@ authors = ["Paul Hauner "] edition = "2018" [dependencies] -types = { path = "../../types" } +types = { path = "../../consensus/types" } lazy_static = "1.4.0" lighthouse_metrics = { path = "../lighthouse_metrics" } parking_lot = "0.10.2" diff --git a/eth2/utils/slot_clock/src/lib.rs b/common/slot_clock/src/lib.rs similarity index 100% rename from eth2/utils/slot_clock/src/lib.rs rename to common/slot_clock/src/lib.rs diff --git a/eth2/utils/slot_clock/src/manual_slot_clock.rs b/common/slot_clock/src/manual_slot_clock.rs similarity index 100% rename from eth2/utils/slot_clock/src/manual_slot_clock.rs rename to common/slot_clock/src/manual_slot_clock.rs diff --git a/eth2/utils/slot_clock/src/metrics.rs b/common/slot_clock/src/metrics.rs similarity index 100% rename from eth2/utils/slot_clock/src/metrics.rs rename to common/slot_clock/src/metrics.rs diff --git a/eth2/utils/slot_clock/src/system_time_slot_clock.rs b/common/slot_clock/src/system_time_slot_clock.rs similarity index 100% rename from eth2/utils/slot_clock/src/system_time_slot_clock.rs rename to common/slot_clock/src/system_time_slot_clock.rs diff --git a/eth2/utils/test_random_derive/Cargo.toml b/common/test_random_derive/Cargo.toml similarity index 100% rename from eth2/utils/test_random_derive/Cargo.toml rename to common/test_random_derive/Cargo.toml diff --git a/eth2/utils/test_random_derive/src/lib.rs b/common/test_random_derive/src/lib.rs similarity index 100% rename from eth2/utils/test_random_derive/src/lib.rs rename to common/test_random_derive/src/lib.rs diff --git a/eth2/utils/validator_dir/Cargo.toml b/common/validator_dir/Cargo.toml similarity index 54% rename from eth2/utils/validator_dir/Cargo.toml rename to common/validator_dir/Cargo.toml index 3273c31c0..7bb58c9b6 100644 --- a/eth2/utils/validator_dir/Cargo.toml +++ b/common/validator_dir/Cargo.toml @@ -11,16 +11,16 @@ insecure_keys = [] # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -eth2_wallet = { path = "../eth2_wallet" } -bls = { path = "../bls" } -eth2_keystore = { path = "../eth2_keystore" } -types = { path = "../../types" } +eth2_wallet = { path = "../../crypto/eth2_wallet" } +bls = { path = "../../crypto/bls" } +eth2_keystore = { path = "../../crypto/eth2_keystore" } +types = { path = "../../consensus/types" } rand = "0.7.2" deposit_contract = { path = "../deposit_contract" } -eth2_ssz = { path = "../ssz" } -eth2_ssz_derive = { path = "../ssz_derive" } +eth2_ssz = { path = "../../consensus/ssz" } +eth2_ssz_derive = { path = "../../consensus/ssz_derive" } rayon = "1.3.0" -tree_hash = { path = "../tree_hash" } +tree_hash = { path = "../../consensus/tree_hash" } [dev-dependencies] tempfile = "3.1.0" diff --git a/eth2/utils/validator_dir/src/builder.rs b/common/validator_dir/src/builder.rs similarity index 100% rename from eth2/utils/validator_dir/src/builder.rs rename to common/validator_dir/src/builder.rs diff --git a/eth2/utils/validator_dir/src/insecure_keys.rs b/common/validator_dir/src/insecure_keys.rs similarity index 100% rename from eth2/utils/validator_dir/src/insecure_keys.rs rename to common/validator_dir/src/insecure_keys.rs diff --git a/eth2/utils/validator_dir/src/lib.rs b/common/validator_dir/src/lib.rs similarity index 100% rename from eth2/utils/validator_dir/src/lib.rs rename to common/validator_dir/src/lib.rs diff --git a/eth2/utils/validator_dir/src/manager.rs b/common/validator_dir/src/manager.rs similarity index 100% rename from eth2/utils/validator_dir/src/manager.rs rename to common/validator_dir/src/manager.rs diff --git a/eth2/utils/validator_dir/src/unencrypted_keys.rs b/common/validator_dir/src/unencrypted_keys.rs similarity index 100% rename from eth2/utils/validator_dir/src/unencrypted_keys.rs rename to common/validator_dir/src/unencrypted_keys.rs diff --git a/eth2/utils/validator_dir/src/validator_dir.rs b/common/validator_dir/src/validator_dir.rs similarity index 100% rename from eth2/utils/validator_dir/src/validator_dir.rs rename to common/validator_dir/src/validator_dir.rs diff --git a/eth2/utils/validator_dir/tests/tests.rs b/common/validator_dir/tests/tests.rs similarity index 100% rename from eth2/utils/validator_dir/tests/tests.rs rename to common/validator_dir/tests/tests.rs diff --git a/eth2/utils/cached_tree_hash/Cargo.toml b/consensus/cached_tree_hash/Cargo.toml similarity index 100% rename from eth2/utils/cached_tree_hash/Cargo.toml rename to consensus/cached_tree_hash/Cargo.toml diff --git a/eth2/utils/cached_tree_hash/src/cache.rs b/consensus/cached_tree_hash/src/cache.rs similarity index 100% rename from eth2/utils/cached_tree_hash/src/cache.rs rename to consensus/cached_tree_hash/src/cache.rs diff --git a/eth2/utils/cached_tree_hash/src/cache_arena.rs b/consensus/cached_tree_hash/src/cache_arena.rs similarity index 100% rename from eth2/utils/cached_tree_hash/src/cache_arena.rs rename to consensus/cached_tree_hash/src/cache_arena.rs diff --git a/eth2/utils/cached_tree_hash/src/impls.rs b/consensus/cached_tree_hash/src/impls.rs similarity index 100% rename from eth2/utils/cached_tree_hash/src/impls.rs rename to consensus/cached_tree_hash/src/impls.rs diff --git a/eth2/utils/cached_tree_hash/src/lib.rs b/consensus/cached_tree_hash/src/lib.rs similarity index 100% rename from eth2/utils/cached_tree_hash/src/lib.rs rename to consensus/cached_tree_hash/src/lib.rs diff --git a/eth2/utils/cached_tree_hash/src/test.rs b/consensus/cached_tree_hash/src/test.rs similarity index 100% rename from eth2/utils/cached_tree_hash/src/test.rs rename to consensus/cached_tree_hash/src/test.rs diff --git a/eth2/utils/int_to_bytes/Cargo.toml b/consensus/int_to_bytes/Cargo.toml similarity index 100% rename from eth2/utils/int_to_bytes/Cargo.toml rename to consensus/int_to_bytes/Cargo.toml diff --git a/eth2/utils/int_to_bytes/src/lib.rs b/consensus/int_to_bytes/src/lib.rs similarity index 100% rename from eth2/utils/int_to_bytes/src/lib.rs rename to consensus/int_to_bytes/src/lib.rs diff --git a/eth2/utils/int_to_bytes/src/specs/test_vector_int_to_bytes.yml b/consensus/int_to_bytes/src/specs/test_vector_int_to_bytes.yml similarity index 100% rename from eth2/utils/int_to_bytes/src/specs/test_vector_int_to_bytes.yml rename to consensus/int_to_bytes/src/specs/test_vector_int_to_bytes.yml diff --git a/eth2/utils/merkle_proof/Cargo.toml b/consensus/merkle_proof/Cargo.toml similarity index 100% rename from eth2/utils/merkle_proof/Cargo.toml rename to consensus/merkle_proof/Cargo.toml diff --git a/eth2/utils/merkle_proof/src/lib.rs b/consensus/merkle_proof/src/lib.rs similarity index 100% rename from eth2/utils/merkle_proof/src/lib.rs rename to consensus/merkle_proof/src/lib.rs diff --git a/eth2/proto_array_fork_choice/.gitignore b/consensus/proto_array_fork_choice/.gitignore similarity index 100% rename from eth2/proto_array_fork_choice/.gitignore rename to consensus/proto_array_fork_choice/.gitignore diff --git a/eth2/proto_array_fork_choice/Cargo.toml b/consensus/proto_array_fork_choice/Cargo.toml similarity index 100% rename from eth2/proto_array_fork_choice/Cargo.toml rename to consensus/proto_array_fork_choice/Cargo.toml diff --git a/eth2/proto_array_fork_choice/src/bin.rs b/consensus/proto_array_fork_choice/src/bin.rs similarity index 100% rename from eth2/proto_array_fork_choice/src/bin.rs rename to consensus/proto_array_fork_choice/src/bin.rs diff --git a/eth2/proto_array_fork_choice/src/error.rs b/consensus/proto_array_fork_choice/src/error.rs similarity index 100% rename from eth2/proto_array_fork_choice/src/error.rs rename to consensus/proto_array_fork_choice/src/error.rs diff --git a/eth2/proto_array_fork_choice/src/fork_choice_test_definition.rs b/consensus/proto_array_fork_choice/src/fork_choice_test_definition.rs similarity index 100% rename from eth2/proto_array_fork_choice/src/fork_choice_test_definition.rs rename to consensus/proto_array_fork_choice/src/fork_choice_test_definition.rs diff --git a/eth2/proto_array_fork_choice/src/fork_choice_test_definition/ffg_updates.rs b/consensus/proto_array_fork_choice/src/fork_choice_test_definition/ffg_updates.rs similarity index 100% rename from eth2/proto_array_fork_choice/src/fork_choice_test_definition/ffg_updates.rs rename to consensus/proto_array_fork_choice/src/fork_choice_test_definition/ffg_updates.rs diff --git a/eth2/proto_array_fork_choice/src/fork_choice_test_definition/no_votes.rs b/consensus/proto_array_fork_choice/src/fork_choice_test_definition/no_votes.rs similarity index 100% rename from eth2/proto_array_fork_choice/src/fork_choice_test_definition/no_votes.rs rename to consensus/proto_array_fork_choice/src/fork_choice_test_definition/no_votes.rs diff --git a/eth2/proto_array_fork_choice/src/fork_choice_test_definition/votes.rs b/consensus/proto_array_fork_choice/src/fork_choice_test_definition/votes.rs similarity index 100% rename from eth2/proto_array_fork_choice/src/fork_choice_test_definition/votes.rs rename to consensus/proto_array_fork_choice/src/fork_choice_test_definition/votes.rs diff --git a/eth2/proto_array_fork_choice/src/lib.rs b/consensus/proto_array_fork_choice/src/lib.rs similarity index 100% rename from eth2/proto_array_fork_choice/src/lib.rs rename to consensus/proto_array_fork_choice/src/lib.rs diff --git a/eth2/proto_array_fork_choice/src/proto_array.rs b/consensus/proto_array_fork_choice/src/proto_array.rs similarity index 100% rename from eth2/proto_array_fork_choice/src/proto_array.rs rename to consensus/proto_array_fork_choice/src/proto_array.rs diff --git a/eth2/proto_array_fork_choice/src/proto_array_fork_choice.rs b/consensus/proto_array_fork_choice/src/proto_array_fork_choice.rs similarity index 100% rename from eth2/proto_array_fork_choice/src/proto_array_fork_choice.rs rename to consensus/proto_array_fork_choice/src/proto_array_fork_choice.rs diff --git a/eth2/proto_array_fork_choice/src/ssz_container.rs b/consensus/proto_array_fork_choice/src/ssz_container.rs similarity index 100% rename from eth2/proto_array_fork_choice/src/ssz_container.rs rename to consensus/proto_array_fork_choice/src/ssz_container.rs diff --git a/eth2/utils/safe_arith/Cargo.toml b/consensus/safe_arith/Cargo.toml similarity index 100% rename from eth2/utils/safe_arith/Cargo.toml rename to consensus/safe_arith/Cargo.toml diff --git a/eth2/utils/safe_arith/src/lib.rs b/consensus/safe_arith/src/lib.rs similarity index 100% rename from eth2/utils/safe_arith/src/lib.rs rename to consensus/safe_arith/src/lib.rs diff --git a/eth2/utils/serde_hex/Cargo.toml b/consensus/serde_hex/Cargo.toml similarity index 100% rename from eth2/utils/serde_hex/Cargo.toml rename to consensus/serde_hex/Cargo.toml diff --git a/eth2/utils/serde_hex/src/lib.rs b/consensus/serde_hex/src/lib.rs similarity index 100% rename from eth2/utils/serde_hex/src/lib.rs rename to consensus/serde_hex/src/lib.rs diff --git a/eth2/utils/ssz/Cargo.toml b/consensus/ssz/Cargo.toml similarity index 100% rename from eth2/utils/ssz/Cargo.toml rename to consensus/ssz/Cargo.toml diff --git a/eth2/utils/ssz/README.md b/consensus/ssz/README.md similarity index 100% rename from eth2/utils/ssz/README.md rename to consensus/ssz/README.md diff --git a/eth2/utils/ssz/examples/large_list.rs b/consensus/ssz/examples/large_list.rs similarity index 100% rename from eth2/utils/ssz/examples/large_list.rs rename to consensus/ssz/examples/large_list.rs diff --git a/eth2/utils/ssz/examples/large_list_of_structs.rs b/consensus/ssz/examples/large_list_of_structs.rs similarity index 100% rename from eth2/utils/ssz/examples/large_list_of_structs.rs rename to consensus/ssz/examples/large_list_of_structs.rs diff --git a/eth2/utils/ssz/examples/struct_definition.rs b/consensus/ssz/examples/struct_definition.rs similarity index 100% rename from eth2/utils/ssz/examples/struct_definition.rs rename to consensus/ssz/examples/struct_definition.rs diff --git a/eth2/utils/ssz/src/decode.rs b/consensus/ssz/src/decode.rs similarity index 100% rename from eth2/utils/ssz/src/decode.rs rename to consensus/ssz/src/decode.rs diff --git a/eth2/utils/ssz/src/decode/impls.rs b/consensus/ssz/src/decode/impls.rs similarity index 100% rename from eth2/utils/ssz/src/decode/impls.rs rename to consensus/ssz/src/decode/impls.rs diff --git a/eth2/utils/ssz/src/encode.rs b/consensus/ssz/src/encode.rs similarity index 100% rename from eth2/utils/ssz/src/encode.rs rename to consensus/ssz/src/encode.rs diff --git a/eth2/utils/ssz/src/encode/impls.rs b/consensus/ssz/src/encode/impls.rs similarity index 100% rename from eth2/utils/ssz/src/encode/impls.rs rename to consensus/ssz/src/encode/impls.rs diff --git a/eth2/utils/ssz/src/lib.rs b/consensus/ssz/src/lib.rs similarity index 100% rename from eth2/utils/ssz/src/lib.rs rename to consensus/ssz/src/lib.rs diff --git a/eth2/utils/ssz/tests/tests.rs b/consensus/ssz/tests/tests.rs similarity index 100% rename from eth2/utils/ssz/tests/tests.rs rename to consensus/ssz/tests/tests.rs diff --git a/eth2/utils/ssz_derive/Cargo.toml b/consensus/ssz_derive/Cargo.toml similarity index 100% rename from eth2/utils/ssz_derive/Cargo.toml rename to consensus/ssz_derive/Cargo.toml diff --git a/eth2/utils/ssz_derive/src/lib.rs b/consensus/ssz_derive/src/lib.rs similarity index 100% rename from eth2/utils/ssz_derive/src/lib.rs rename to consensus/ssz_derive/src/lib.rs diff --git a/eth2/utils/ssz_types/Cargo.toml b/consensus/ssz_types/Cargo.toml similarity index 100% rename from eth2/utils/ssz_types/Cargo.toml rename to consensus/ssz_types/Cargo.toml diff --git a/eth2/utils/ssz_types/src/bitfield.rs b/consensus/ssz_types/src/bitfield.rs similarity index 100% rename from eth2/utils/ssz_types/src/bitfield.rs rename to consensus/ssz_types/src/bitfield.rs diff --git a/eth2/utils/ssz_types/src/fixed_vector.rs b/consensus/ssz_types/src/fixed_vector.rs similarity index 100% rename from eth2/utils/ssz_types/src/fixed_vector.rs rename to consensus/ssz_types/src/fixed_vector.rs diff --git a/eth2/utils/ssz_types/src/lib.rs b/consensus/ssz_types/src/lib.rs similarity index 100% rename from eth2/utils/ssz_types/src/lib.rs rename to consensus/ssz_types/src/lib.rs diff --git a/eth2/utils/ssz_types/src/tree_hash.rs b/consensus/ssz_types/src/tree_hash.rs similarity index 100% rename from eth2/utils/ssz_types/src/tree_hash.rs rename to consensus/ssz_types/src/tree_hash.rs diff --git a/eth2/utils/ssz_types/src/variable_list.rs b/consensus/ssz_types/src/variable_list.rs similarity index 100% rename from eth2/utils/ssz_types/src/variable_list.rs rename to consensus/ssz_types/src/variable_list.rs diff --git a/eth2/state_processing/.gitignore b/consensus/state_processing/.gitignore similarity index 100% rename from eth2/state_processing/.gitignore rename to consensus/state_processing/.gitignore diff --git a/eth2/state_processing/Cargo.toml b/consensus/state_processing/Cargo.toml similarity index 74% rename from eth2/state_processing/Cargo.toml rename to consensus/state_processing/Cargo.toml index c9bf9d4f4..297af4897 100644 --- a/eth2/state_processing/Cargo.toml +++ b/consensus/state_processing/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "state_processing" version = "0.2.0" -authors = ["Paul Hauner "] +authors = ["Paul Hauner ", "Michael Sproul "] edition = "2018" [[bench]] @@ -18,22 +18,21 @@ serde_yaml = "0.8.11" beacon_chain = { path = "../../beacon_node/beacon_chain" } store = { path = "../../beacon_node/store" } - [dependencies] -bls = { path = "../utils/bls" } +bls = { path = "../../crypto/bls" } integer-sqrt = "0.1.3" itertools = "0.9.0" eth2_ssz = "0.1.2" -eth2_ssz_types = { path = "../utils/ssz_types" } -merkle_proof = { path = "../utils/merkle_proof" } +eth2_ssz_types = { path = "../ssz_types" } +merkle_proof = { path = "../merkle_proof" } log = "0.4.8" -safe_arith = { path = "../utils/safe_arith" } +safe_arith = { path = "../safe_arith" } tree_hash = "0.1.0" tree_hash_derive = "0.2.0" types = { path = "../types" } rayon = "1.3.0" eth2_hashing = "0.1.0" -int_to_bytes = { path = "../utils/int_to_bytes" } +int_to_bytes = { path = "../int_to_bytes" } arbitrary = { version = "0.4.4", features = ["derive"], optional = true } [features] diff --git a/eth2/state_processing/benches/benches.rs b/consensus/state_processing/benches/benches.rs similarity index 100% rename from eth2/state_processing/benches/benches.rs rename to consensus/state_processing/benches/benches.rs diff --git a/eth2/state_processing/src/common/deposit_data_tree.rs b/consensus/state_processing/src/common/deposit_data_tree.rs similarity index 100% rename from eth2/state_processing/src/common/deposit_data_tree.rs rename to consensus/state_processing/src/common/deposit_data_tree.rs diff --git a/eth2/state_processing/src/common/get_attesting_indices.rs b/consensus/state_processing/src/common/get_attesting_indices.rs similarity index 100% rename from eth2/state_processing/src/common/get_attesting_indices.rs rename to consensus/state_processing/src/common/get_attesting_indices.rs diff --git a/eth2/state_processing/src/common/get_base_reward.rs b/consensus/state_processing/src/common/get_base_reward.rs similarity index 100% rename from eth2/state_processing/src/common/get_base_reward.rs rename to consensus/state_processing/src/common/get_base_reward.rs diff --git a/eth2/state_processing/src/common/get_indexed_attestation.rs b/consensus/state_processing/src/common/get_indexed_attestation.rs similarity index 100% rename from eth2/state_processing/src/common/get_indexed_attestation.rs rename to consensus/state_processing/src/common/get_indexed_attestation.rs diff --git a/eth2/state_processing/src/common/initiate_validator_exit.rs b/consensus/state_processing/src/common/initiate_validator_exit.rs similarity index 100% rename from eth2/state_processing/src/common/initiate_validator_exit.rs rename to consensus/state_processing/src/common/initiate_validator_exit.rs diff --git a/eth2/state_processing/src/common/mod.rs b/consensus/state_processing/src/common/mod.rs similarity index 100% rename from eth2/state_processing/src/common/mod.rs rename to consensus/state_processing/src/common/mod.rs diff --git a/eth2/state_processing/src/common/slash_validator.rs b/consensus/state_processing/src/common/slash_validator.rs similarity index 100% rename from eth2/state_processing/src/common/slash_validator.rs rename to consensus/state_processing/src/common/slash_validator.rs diff --git a/eth2/state_processing/src/genesis.rs b/consensus/state_processing/src/genesis.rs similarity index 100% rename from eth2/state_processing/src/genesis.rs rename to consensus/state_processing/src/genesis.rs diff --git a/eth2/state_processing/src/lib.rs b/consensus/state_processing/src/lib.rs similarity index 100% rename from eth2/state_processing/src/lib.rs rename to consensus/state_processing/src/lib.rs diff --git a/eth2/state_processing/src/macros.rs b/consensus/state_processing/src/macros.rs similarity index 100% rename from eth2/state_processing/src/macros.rs rename to consensus/state_processing/src/macros.rs diff --git a/eth2/state_processing/src/per_block_processing.rs b/consensus/state_processing/src/per_block_processing.rs similarity index 100% rename from eth2/state_processing/src/per_block_processing.rs rename to consensus/state_processing/src/per_block_processing.rs diff --git a/eth2/state_processing/src/per_block_processing/block_processing_builder.rs b/consensus/state_processing/src/per_block_processing/block_processing_builder.rs similarity index 100% rename from eth2/state_processing/src/per_block_processing/block_processing_builder.rs rename to consensus/state_processing/src/per_block_processing/block_processing_builder.rs diff --git a/eth2/state_processing/src/per_block_processing/block_signature_verifier.rs b/consensus/state_processing/src/per_block_processing/block_signature_verifier.rs similarity index 100% rename from eth2/state_processing/src/per_block_processing/block_signature_verifier.rs rename to consensus/state_processing/src/per_block_processing/block_signature_verifier.rs diff --git a/eth2/state_processing/src/per_block_processing/errors.rs b/consensus/state_processing/src/per_block_processing/errors.rs similarity index 100% rename from eth2/state_processing/src/per_block_processing/errors.rs rename to consensus/state_processing/src/per_block_processing/errors.rs diff --git a/eth2/state_processing/src/per_block_processing/is_valid_indexed_attestation.rs b/consensus/state_processing/src/per_block_processing/is_valid_indexed_attestation.rs similarity index 100% rename from eth2/state_processing/src/per_block_processing/is_valid_indexed_attestation.rs rename to consensus/state_processing/src/per_block_processing/is_valid_indexed_attestation.rs diff --git a/eth2/state_processing/src/per_block_processing/signature_sets.rs b/consensus/state_processing/src/per_block_processing/signature_sets.rs similarity index 100% rename from eth2/state_processing/src/per_block_processing/signature_sets.rs rename to consensus/state_processing/src/per_block_processing/signature_sets.rs diff --git a/eth2/state_processing/src/per_block_processing/tests.rs b/consensus/state_processing/src/per_block_processing/tests.rs similarity index 100% rename from eth2/state_processing/src/per_block_processing/tests.rs rename to consensus/state_processing/src/per_block_processing/tests.rs diff --git a/eth2/state_processing/src/per_block_processing/verify_attestation.rs b/consensus/state_processing/src/per_block_processing/verify_attestation.rs similarity index 100% rename from eth2/state_processing/src/per_block_processing/verify_attestation.rs rename to consensus/state_processing/src/per_block_processing/verify_attestation.rs diff --git a/eth2/state_processing/src/per_block_processing/verify_attester_slashing.rs b/consensus/state_processing/src/per_block_processing/verify_attester_slashing.rs similarity index 100% rename from eth2/state_processing/src/per_block_processing/verify_attester_slashing.rs rename to consensus/state_processing/src/per_block_processing/verify_attester_slashing.rs diff --git a/eth2/state_processing/src/per_block_processing/verify_deposit.rs b/consensus/state_processing/src/per_block_processing/verify_deposit.rs similarity index 100% rename from eth2/state_processing/src/per_block_processing/verify_deposit.rs rename to consensus/state_processing/src/per_block_processing/verify_deposit.rs diff --git a/eth2/state_processing/src/per_block_processing/verify_exit.rs b/consensus/state_processing/src/per_block_processing/verify_exit.rs similarity index 100% rename from eth2/state_processing/src/per_block_processing/verify_exit.rs rename to consensus/state_processing/src/per_block_processing/verify_exit.rs diff --git a/eth2/state_processing/src/per_block_processing/verify_proposer_slashing.rs b/consensus/state_processing/src/per_block_processing/verify_proposer_slashing.rs similarity index 100% rename from eth2/state_processing/src/per_block_processing/verify_proposer_slashing.rs rename to consensus/state_processing/src/per_block_processing/verify_proposer_slashing.rs diff --git a/eth2/state_processing/src/per_epoch_processing.rs b/consensus/state_processing/src/per_epoch_processing.rs similarity index 100% rename from eth2/state_processing/src/per_epoch_processing.rs rename to consensus/state_processing/src/per_epoch_processing.rs diff --git a/eth2/state_processing/src/per_epoch_processing/apply_rewards.rs b/consensus/state_processing/src/per_epoch_processing/apply_rewards.rs similarity index 100% rename from eth2/state_processing/src/per_epoch_processing/apply_rewards.rs rename to consensus/state_processing/src/per_epoch_processing/apply_rewards.rs diff --git a/eth2/state_processing/src/per_epoch_processing/errors.rs b/consensus/state_processing/src/per_epoch_processing/errors.rs similarity index 100% rename from eth2/state_processing/src/per_epoch_processing/errors.rs rename to consensus/state_processing/src/per_epoch_processing/errors.rs diff --git a/eth2/state_processing/src/per_epoch_processing/process_slashings.rs b/consensus/state_processing/src/per_epoch_processing/process_slashings.rs similarity index 100% rename from eth2/state_processing/src/per_epoch_processing/process_slashings.rs rename to consensus/state_processing/src/per_epoch_processing/process_slashings.rs diff --git a/eth2/state_processing/src/per_epoch_processing/registry_updates.rs b/consensus/state_processing/src/per_epoch_processing/registry_updates.rs similarity index 100% rename from eth2/state_processing/src/per_epoch_processing/registry_updates.rs rename to consensus/state_processing/src/per_epoch_processing/registry_updates.rs diff --git a/eth2/state_processing/src/per_epoch_processing/tests.rs b/consensus/state_processing/src/per_epoch_processing/tests.rs similarity index 100% rename from eth2/state_processing/src/per_epoch_processing/tests.rs rename to consensus/state_processing/src/per_epoch_processing/tests.rs diff --git a/eth2/state_processing/src/per_epoch_processing/validator_statuses.rs b/consensus/state_processing/src/per_epoch_processing/validator_statuses.rs similarity index 100% rename from eth2/state_processing/src/per_epoch_processing/validator_statuses.rs rename to consensus/state_processing/src/per_epoch_processing/validator_statuses.rs diff --git a/eth2/state_processing/src/per_slot_processing.rs b/consensus/state_processing/src/per_slot_processing.rs similarity index 100% rename from eth2/state_processing/src/per_slot_processing.rs rename to consensus/state_processing/src/per_slot_processing.rs diff --git a/eth2/state_processing/src/test_utils.rs b/consensus/state_processing/src/test_utils.rs similarity index 100% rename from eth2/state_processing/src/test_utils.rs rename to consensus/state_processing/src/test_utils.rs diff --git a/eth2/state_processing/tests/tests.rs b/consensus/state_processing/tests/tests.rs similarity index 100% rename from eth2/state_processing/tests/tests.rs rename to consensus/state_processing/tests/tests.rs diff --git a/eth2/utils/swap_or_not_shuffle/Cargo.toml b/consensus/swap_or_not_shuffle/Cargo.toml similarity index 100% rename from eth2/utils/swap_or_not_shuffle/Cargo.toml rename to consensus/swap_or_not_shuffle/Cargo.toml diff --git a/eth2/utils/swap_or_not_shuffle/benches/benches.rs b/consensus/swap_or_not_shuffle/benches/benches.rs similarity index 100% rename from eth2/utils/swap_or_not_shuffle/benches/benches.rs rename to consensus/swap_or_not_shuffle/benches/benches.rs diff --git a/eth2/utils/swap_or_not_shuffle/src/compute_shuffled_index.rs b/consensus/swap_or_not_shuffle/src/compute_shuffled_index.rs similarity index 100% rename from eth2/utils/swap_or_not_shuffle/src/compute_shuffled_index.rs rename to consensus/swap_or_not_shuffle/src/compute_shuffled_index.rs diff --git a/eth2/utils/swap_or_not_shuffle/src/lib.rs b/consensus/swap_or_not_shuffle/src/lib.rs similarity index 100% rename from eth2/utils/swap_or_not_shuffle/src/lib.rs rename to consensus/swap_or_not_shuffle/src/lib.rs diff --git a/eth2/utils/swap_or_not_shuffle/src/shuffle_list.rs b/consensus/swap_or_not_shuffle/src/shuffle_list.rs similarity index 100% rename from eth2/utils/swap_or_not_shuffle/src/shuffle_list.rs rename to consensus/swap_or_not_shuffle/src/shuffle_list.rs diff --git a/eth2/utils/tree_hash/Cargo.toml b/consensus/tree_hash/Cargo.toml similarity index 93% rename from eth2/utils/tree_hash/Cargo.toml rename to consensus/tree_hash/Cargo.toml index ff84952e6..4ebf31e29 100644 --- a/eth2/utils/tree_hash/Cargo.toml +++ b/consensus/tree_hash/Cargo.toml @@ -14,7 +14,7 @@ harness = false criterion = "0.3.2" rand = "0.7.3" tree_hash_derive = "0.2.0" -types = { path = "../../types" } +types = { path = "../types" } lazy_static = "1.4.0" [dependencies] diff --git a/eth2/utils/tree_hash/benches/benches.rs b/consensus/tree_hash/benches/benches.rs similarity index 100% rename from eth2/utils/tree_hash/benches/benches.rs rename to consensus/tree_hash/benches/benches.rs diff --git a/eth2/utils/tree_hash/examples/flamegraph_beacon_state.rs b/consensus/tree_hash/examples/flamegraph_beacon_state.rs similarity index 100% rename from eth2/utils/tree_hash/examples/flamegraph_beacon_state.rs rename to consensus/tree_hash/examples/flamegraph_beacon_state.rs diff --git a/eth2/utils/tree_hash/src/impls.rs b/consensus/tree_hash/src/impls.rs similarity index 100% rename from eth2/utils/tree_hash/src/impls.rs rename to consensus/tree_hash/src/impls.rs diff --git a/eth2/utils/tree_hash/src/lib.rs b/consensus/tree_hash/src/lib.rs similarity index 100% rename from eth2/utils/tree_hash/src/lib.rs rename to consensus/tree_hash/src/lib.rs diff --git a/eth2/utils/tree_hash/src/merkle_hasher.rs b/consensus/tree_hash/src/merkle_hasher.rs similarity index 100% rename from eth2/utils/tree_hash/src/merkle_hasher.rs rename to consensus/tree_hash/src/merkle_hasher.rs diff --git a/eth2/utils/tree_hash/src/merkleize_padded.rs b/consensus/tree_hash/src/merkleize_padded.rs similarity index 100% rename from eth2/utils/tree_hash/src/merkleize_padded.rs rename to consensus/tree_hash/src/merkleize_padded.rs diff --git a/eth2/utils/tree_hash/src/merkleize_standard.rs b/consensus/tree_hash/src/merkleize_standard.rs similarity index 100% rename from eth2/utils/tree_hash/src/merkleize_standard.rs rename to consensus/tree_hash/src/merkleize_standard.rs diff --git a/eth2/utils/tree_hash_derive/Cargo.toml b/consensus/tree_hash_derive/Cargo.toml similarity index 100% rename from eth2/utils/tree_hash_derive/Cargo.toml rename to consensus/tree_hash_derive/Cargo.toml diff --git a/eth2/utils/tree_hash_derive/src/lib.rs b/consensus/tree_hash_derive/src/lib.rs similarity index 100% rename from eth2/utils/tree_hash_derive/src/lib.rs rename to consensus/tree_hash_derive/src/lib.rs diff --git a/eth2/types/Cargo.toml b/consensus/types/Cargo.toml similarity index 64% rename from eth2/types/Cargo.toml rename to consensus/types/Cargo.toml index 206c0cc9b..3fc3619c4 100644 --- a/eth2/types/Cargo.toml +++ b/consensus/types/Cargo.toml @@ -9,33 +9,33 @@ name = "benches" harness = false [dependencies] -bls = { path = "../utils/bls" } -compare_fields = { path = "../utils/compare_fields" } -compare_fields_derive = { path = "../utils/compare_fields_derive" } +bls = { path = "../../crypto/bls" } +compare_fields = { path = "../../common/compare_fields" } +compare_fields_derive = { path = "../../common/compare_fields_derive" } dirs = "2.0.2" derivative = "2.1.1" -eth2_interop_keypairs = { path = "../utils/eth2_interop_keypairs" } +eth2_interop_keypairs = { path = "../../common/eth2_interop_keypairs" } ethereum-types = "0.9.1" eth2_hashing = "0.1.0" hex = "0.4.2" -int_to_bytes = { path = "../utils/int_to_bytes" } +int_to_bytes = { path = "../int_to_bytes" } log = "0.4.8" -merkle_proof = { path = "../utils/merkle_proof" } +merkle_proof = { path = "../merkle_proof" } rayon = "1.3.0" rand = "0.7.3" -safe_arith = { path = "../utils/safe_arith" } +safe_arith = { path = "../safe_arith" } serde = "1.0.110" serde_derive = "1.0.110" slog = "2.5.2" eth2_ssz = "0.1.2" eth2_ssz_derive = "0.1.0" -eth2_ssz_types = { path = "../utils/ssz_types" } -swap_or_not_shuffle = { path = "../utils/swap_or_not_shuffle" } -test_random_derive = { path = "../utils/test_random_derive" } +eth2_ssz_types = { path = "../ssz_types" } +swap_or_not_shuffle = { path = "../swap_or_not_shuffle" } +test_random_derive = { path = "../../common/test_random_derive" } tree_hash = "0.1.0" tree_hash_derive = "0.2.0" rand_xorshift = "0.2.0" -cached_tree_hash = { path = "../utils/cached_tree_hash" } +cached_tree_hash = { path = "../cached_tree_hash" } serde_yaml = "0.8.11" tempfile = "3.1.0" rusqlite = { version = "0.22.0", features = ["bundled"], optional = true } diff --git a/eth2/types/benches/benches.rs b/consensus/types/benches/benches.rs similarity index 100% rename from eth2/types/benches/benches.rs rename to consensus/types/benches/benches.rs diff --git a/eth2/types/examples/clone_state.rs b/consensus/types/examples/clone_state.rs similarity index 100% rename from eth2/types/examples/clone_state.rs rename to consensus/types/examples/clone_state.rs diff --git a/eth2/types/examples/ssz_encode_state.rs b/consensus/types/examples/ssz_encode_state.rs similarity index 100% rename from eth2/types/examples/ssz_encode_state.rs rename to consensus/types/examples/ssz_encode_state.rs diff --git a/eth2/types/examples/tree_hash_state.rs b/consensus/types/examples/tree_hash_state.rs similarity index 100% rename from eth2/types/examples/tree_hash_state.rs rename to consensus/types/examples/tree_hash_state.rs diff --git a/eth2/types/src/aggregate_and_proof.rs b/consensus/types/src/aggregate_and_proof.rs similarity index 100% rename from eth2/types/src/aggregate_and_proof.rs rename to consensus/types/src/aggregate_and_proof.rs diff --git a/eth2/types/src/attestation.rs b/consensus/types/src/attestation.rs similarity index 100% rename from eth2/types/src/attestation.rs rename to consensus/types/src/attestation.rs diff --git a/eth2/types/src/attestation_data.rs b/consensus/types/src/attestation_data.rs similarity index 100% rename from eth2/types/src/attestation_data.rs rename to consensus/types/src/attestation_data.rs diff --git a/eth2/types/src/attestation_duty.rs b/consensus/types/src/attestation_duty.rs similarity index 100% rename from eth2/types/src/attestation_duty.rs rename to consensus/types/src/attestation_duty.rs diff --git a/eth2/types/src/attester_slashing.rs b/consensus/types/src/attester_slashing.rs similarity index 100% rename from eth2/types/src/attester_slashing.rs rename to consensus/types/src/attester_slashing.rs diff --git a/eth2/types/src/beacon_block.rs b/consensus/types/src/beacon_block.rs similarity index 100% rename from eth2/types/src/beacon_block.rs rename to consensus/types/src/beacon_block.rs diff --git a/eth2/types/src/beacon_block_body.rs b/consensus/types/src/beacon_block_body.rs similarity index 100% rename from eth2/types/src/beacon_block_body.rs rename to consensus/types/src/beacon_block_body.rs diff --git a/eth2/types/src/beacon_block_header.rs b/consensus/types/src/beacon_block_header.rs similarity index 100% rename from eth2/types/src/beacon_block_header.rs rename to consensus/types/src/beacon_block_header.rs diff --git a/eth2/types/src/beacon_committee.rs b/consensus/types/src/beacon_committee.rs similarity index 100% rename from eth2/types/src/beacon_committee.rs rename to consensus/types/src/beacon_committee.rs diff --git a/eth2/types/src/beacon_state.rs b/consensus/types/src/beacon_state.rs similarity index 100% rename from eth2/types/src/beacon_state.rs rename to consensus/types/src/beacon_state.rs diff --git a/eth2/types/src/beacon_state/clone_config.rs b/consensus/types/src/beacon_state/clone_config.rs similarity index 100% rename from eth2/types/src/beacon_state/clone_config.rs rename to consensus/types/src/beacon_state/clone_config.rs diff --git a/eth2/types/src/beacon_state/committee_cache.rs b/consensus/types/src/beacon_state/committee_cache.rs similarity index 100% rename from eth2/types/src/beacon_state/committee_cache.rs rename to consensus/types/src/beacon_state/committee_cache.rs diff --git a/eth2/types/src/beacon_state/committee_cache/tests.rs b/consensus/types/src/beacon_state/committee_cache/tests.rs similarity index 100% rename from eth2/types/src/beacon_state/committee_cache/tests.rs rename to consensus/types/src/beacon_state/committee_cache/tests.rs diff --git a/eth2/types/src/beacon_state/exit_cache.rs b/consensus/types/src/beacon_state/exit_cache.rs similarity index 100% rename from eth2/types/src/beacon_state/exit_cache.rs rename to consensus/types/src/beacon_state/exit_cache.rs diff --git a/eth2/types/src/beacon_state/pubkey_cache.rs b/consensus/types/src/beacon_state/pubkey_cache.rs similarity index 100% rename from eth2/types/src/beacon_state/pubkey_cache.rs rename to consensus/types/src/beacon_state/pubkey_cache.rs diff --git a/eth2/types/src/beacon_state/tests.rs b/consensus/types/src/beacon_state/tests.rs similarity index 100% rename from eth2/types/src/beacon_state/tests.rs rename to consensus/types/src/beacon_state/tests.rs diff --git a/eth2/types/src/beacon_state/tree_hash_cache.rs b/consensus/types/src/beacon_state/tree_hash_cache.rs similarity index 100% rename from eth2/types/src/beacon_state/tree_hash_cache.rs rename to consensus/types/src/beacon_state/tree_hash_cache.rs diff --git a/eth2/types/src/chain_spec.rs b/consensus/types/src/chain_spec.rs similarity index 100% rename from eth2/types/src/chain_spec.rs rename to consensus/types/src/chain_spec.rs diff --git a/eth2/types/src/checkpoint.rs b/consensus/types/src/checkpoint.rs similarity index 100% rename from eth2/types/src/checkpoint.rs rename to consensus/types/src/checkpoint.rs diff --git a/eth2/types/src/deposit.rs b/consensus/types/src/deposit.rs similarity index 100% rename from eth2/types/src/deposit.rs rename to consensus/types/src/deposit.rs diff --git a/eth2/types/src/deposit_data.rs b/consensus/types/src/deposit_data.rs similarity index 100% rename from eth2/types/src/deposit_data.rs rename to consensus/types/src/deposit_data.rs diff --git a/eth2/types/src/deposit_message.rs b/consensus/types/src/deposit_message.rs similarity index 100% rename from eth2/types/src/deposit_message.rs rename to consensus/types/src/deposit_message.rs diff --git a/eth2/types/src/enr_fork_id.rs b/consensus/types/src/enr_fork_id.rs similarity index 100% rename from eth2/types/src/enr_fork_id.rs rename to consensus/types/src/enr_fork_id.rs diff --git a/eth2/types/src/eth1_data.rs b/consensus/types/src/eth1_data.rs similarity index 100% rename from eth2/types/src/eth1_data.rs rename to consensus/types/src/eth1_data.rs diff --git a/eth2/types/src/eth_spec.rs b/consensus/types/src/eth_spec.rs similarity index 100% rename from eth2/types/src/eth_spec.rs rename to consensus/types/src/eth_spec.rs diff --git a/eth2/types/src/fork.rs b/consensus/types/src/fork.rs similarity index 100% rename from eth2/types/src/fork.rs rename to consensus/types/src/fork.rs diff --git a/eth2/types/src/fork_data.rs b/consensus/types/src/fork_data.rs similarity index 100% rename from eth2/types/src/fork_data.rs rename to consensus/types/src/fork_data.rs diff --git a/eth2/types/src/free_attestation.rs b/consensus/types/src/free_attestation.rs similarity index 100% rename from eth2/types/src/free_attestation.rs rename to consensus/types/src/free_attestation.rs diff --git a/eth2/types/src/historical_batch.rs b/consensus/types/src/historical_batch.rs similarity index 100% rename from eth2/types/src/historical_batch.rs rename to consensus/types/src/historical_batch.rs diff --git a/eth2/types/src/indexed_attestation.rs b/consensus/types/src/indexed_attestation.rs similarity index 100% rename from eth2/types/src/indexed_attestation.rs rename to consensus/types/src/indexed_attestation.rs diff --git a/eth2/types/src/lib.rs b/consensus/types/src/lib.rs similarity index 100% rename from eth2/types/src/lib.rs rename to consensus/types/src/lib.rs diff --git a/eth2/types/src/pending_attestation.rs b/consensus/types/src/pending_attestation.rs similarity index 100% rename from eth2/types/src/pending_attestation.rs rename to consensus/types/src/pending_attestation.rs diff --git a/eth2/types/src/proposer_slashing.rs b/consensus/types/src/proposer_slashing.rs similarity index 100% rename from eth2/types/src/proposer_slashing.rs rename to consensus/types/src/proposer_slashing.rs diff --git a/eth2/types/src/relative_epoch.rs b/consensus/types/src/relative_epoch.rs similarity index 100% rename from eth2/types/src/relative_epoch.rs rename to consensus/types/src/relative_epoch.rs diff --git a/eth2/types/src/selection_proof.rs b/consensus/types/src/selection_proof.rs similarity index 100% rename from eth2/types/src/selection_proof.rs rename to consensus/types/src/selection_proof.rs diff --git a/eth2/types/src/signed_aggregate_and_proof.rs b/consensus/types/src/signed_aggregate_and_proof.rs similarity index 100% rename from eth2/types/src/signed_aggregate_and_proof.rs rename to consensus/types/src/signed_aggregate_and_proof.rs diff --git a/eth2/types/src/signed_beacon_block.rs b/consensus/types/src/signed_beacon_block.rs similarity index 100% rename from eth2/types/src/signed_beacon_block.rs rename to consensus/types/src/signed_beacon_block.rs diff --git a/eth2/types/src/signed_beacon_block_header.rs b/consensus/types/src/signed_beacon_block_header.rs similarity index 100% rename from eth2/types/src/signed_beacon_block_header.rs rename to consensus/types/src/signed_beacon_block_header.rs diff --git a/eth2/types/src/signed_voluntary_exit.rs b/consensus/types/src/signed_voluntary_exit.rs similarity index 100% rename from eth2/types/src/signed_voluntary_exit.rs rename to consensus/types/src/signed_voluntary_exit.rs diff --git a/eth2/types/src/signing_root.rs b/consensus/types/src/signing_root.rs similarity index 100% rename from eth2/types/src/signing_root.rs rename to consensus/types/src/signing_root.rs diff --git a/eth2/types/src/slot_epoch.rs b/consensus/types/src/slot_epoch.rs similarity index 100% rename from eth2/types/src/slot_epoch.rs rename to consensus/types/src/slot_epoch.rs diff --git a/eth2/types/src/slot_epoch_macros.rs b/consensus/types/src/slot_epoch_macros.rs similarity index 100% rename from eth2/types/src/slot_epoch_macros.rs rename to consensus/types/src/slot_epoch_macros.rs diff --git a/eth2/types/src/sqlite.rs b/consensus/types/src/sqlite.rs similarity index 100% rename from eth2/types/src/sqlite.rs rename to consensus/types/src/sqlite.rs diff --git a/eth2/types/src/subnet_id.rs b/consensus/types/src/subnet_id.rs similarity index 100% rename from eth2/types/src/subnet_id.rs rename to consensus/types/src/subnet_id.rs diff --git a/eth2/types/src/test_utils/builders.rs b/consensus/types/src/test_utils/builders.rs similarity index 100% rename from eth2/types/src/test_utils/builders.rs rename to consensus/types/src/test_utils/builders.rs diff --git a/eth2/types/src/test_utils/builders/testing_attestation_builder.rs b/consensus/types/src/test_utils/builders/testing_attestation_builder.rs similarity index 100% rename from eth2/types/src/test_utils/builders/testing_attestation_builder.rs rename to consensus/types/src/test_utils/builders/testing_attestation_builder.rs diff --git a/eth2/types/src/test_utils/builders/testing_attestation_data_builder.rs b/consensus/types/src/test_utils/builders/testing_attestation_data_builder.rs similarity index 100% rename from eth2/types/src/test_utils/builders/testing_attestation_data_builder.rs rename to consensus/types/src/test_utils/builders/testing_attestation_data_builder.rs diff --git a/eth2/types/src/test_utils/builders/testing_attester_slashing_builder.rs b/consensus/types/src/test_utils/builders/testing_attester_slashing_builder.rs similarity index 100% rename from eth2/types/src/test_utils/builders/testing_attester_slashing_builder.rs rename to consensus/types/src/test_utils/builders/testing_attester_slashing_builder.rs diff --git a/eth2/types/src/test_utils/builders/testing_beacon_block_builder.rs b/consensus/types/src/test_utils/builders/testing_beacon_block_builder.rs similarity index 100% rename from eth2/types/src/test_utils/builders/testing_beacon_block_builder.rs rename to consensus/types/src/test_utils/builders/testing_beacon_block_builder.rs diff --git a/eth2/types/src/test_utils/builders/testing_beacon_state_builder.rs b/consensus/types/src/test_utils/builders/testing_beacon_state_builder.rs similarity index 100% rename from eth2/types/src/test_utils/builders/testing_beacon_state_builder.rs rename to consensus/types/src/test_utils/builders/testing_beacon_state_builder.rs diff --git a/eth2/types/src/test_utils/builders/testing_deposit_builder.rs b/consensus/types/src/test_utils/builders/testing_deposit_builder.rs similarity index 100% rename from eth2/types/src/test_utils/builders/testing_deposit_builder.rs rename to consensus/types/src/test_utils/builders/testing_deposit_builder.rs diff --git a/eth2/types/src/test_utils/builders/testing_pending_attestation_builder.rs b/consensus/types/src/test_utils/builders/testing_pending_attestation_builder.rs similarity index 100% rename from eth2/types/src/test_utils/builders/testing_pending_attestation_builder.rs rename to consensus/types/src/test_utils/builders/testing_pending_attestation_builder.rs diff --git a/eth2/types/src/test_utils/builders/testing_proposer_slashing_builder.rs b/consensus/types/src/test_utils/builders/testing_proposer_slashing_builder.rs similarity index 100% rename from eth2/types/src/test_utils/builders/testing_proposer_slashing_builder.rs rename to consensus/types/src/test_utils/builders/testing_proposer_slashing_builder.rs diff --git a/eth2/types/src/test_utils/builders/testing_voluntary_exit_builder.rs b/consensus/types/src/test_utils/builders/testing_voluntary_exit_builder.rs similarity index 100% rename from eth2/types/src/test_utils/builders/testing_voluntary_exit_builder.rs rename to consensus/types/src/test_utils/builders/testing_voluntary_exit_builder.rs diff --git a/eth2/types/src/test_utils/generate_deterministic_keypairs.rs b/consensus/types/src/test_utils/generate_deterministic_keypairs.rs similarity index 100% rename from eth2/types/src/test_utils/generate_deterministic_keypairs.rs rename to consensus/types/src/test_utils/generate_deterministic_keypairs.rs diff --git a/eth2/types/src/test_utils/keypairs_file.rs b/consensus/types/src/test_utils/keypairs_file.rs similarity index 100% rename from eth2/types/src/test_utils/keypairs_file.rs rename to consensus/types/src/test_utils/keypairs_file.rs diff --git a/eth2/types/src/test_utils/macros.rs b/consensus/types/src/test_utils/macros.rs similarity index 100% rename from eth2/types/src/test_utils/macros.rs rename to consensus/types/src/test_utils/macros.rs diff --git a/eth2/types/src/test_utils/mod.rs b/consensus/types/src/test_utils/mod.rs similarity index 100% rename from eth2/types/src/test_utils/mod.rs rename to consensus/types/src/test_utils/mod.rs diff --git a/eth2/types/src/test_utils/test_random.rs b/consensus/types/src/test_utils/test_random.rs similarity index 100% rename from eth2/types/src/test_utils/test_random.rs rename to consensus/types/src/test_utils/test_random.rs diff --git a/eth2/types/src/test_utils/test_random/address.rs b/consensus/types/src/test_utils/test_random/address.rs similarity index 100% rename from eth2/types/src/test_utils/test_random/address.rs rename to consensus/types/src/test_utils/test_random/address.rs diff --git a/eth2/types/src/test_utils/test_random/aggregate_signature.rs b/consensus/types/src/test_utils/test_random/aggregate_signature.rs similarity index 100% rename from eth2/types/src/test_utils/test_random/aggregate_signature.rs rename to consensus/types/src/test_utils/test_random/aggregate_signature.rs diff --git a/eth2/types/src/test_utils/test_random/bitfield.rs b/consensus/types/src/test_utils/test_random/bitfield.rs similarity index 100% rename from eth2/types/src/test_utils/test_random/bitfield.rs rename to consensus/types/src/test_utils/test_random/bitfield.rs diff --git a/eth2/types/src/test_utils/test_random/hash256.rs b/consensus/types/src/test_utils/test_random/hash256.rs similarity index 100% rename from eth2/types/src/test_utils/test_random/hash256.rs rename to consensus/types/src/test_utils/test_random/hash256.rs diff --git a/eth2/types/src/test_utils/test_random/public_key.rs b/consensus/types/src/test_utils/test_random/public_key.rs similarity index 100% rename from eth2/types/src/test_utils/test_random/public_key.rs rename to consensus/types/src/test_utils/test_random/public_key.rs diff --git a/eth2/types/src/test_utils/test_random/public_key_bytes.rs b/consensus/types/src/test_utils/test_random/public_key_bytes.rs similarity index 100% rename from eth2/types/src/test_utils/test_random/public_key_bytes.rs rename to consensus/types/src/test_utils/test_random/public_key_bytes.rs diff --git a/eth2/types/src/test_utils/test_random/secret_key.rs b/consensus/types/src/test_utils/test_random/secret_key.rs similarity index 100% rename from eth2/types/src/test_utils/test_random/secret_key.rs rename to consensus/types/src/test_utils/test_random/secret_key.rs diff --git a/eth2/types/src/test_utils/test_random/signature.rs b/consensus/types/src/test_utils/test_random/signature.rs similarity index 100% rename from eth2/types/src/test_utils/test_random/signature.rs rename to consensus/types/src/test_utils/test_random/signature.rs diff --git a/eth2/types/src/test_utils/test_random/signature_bytes.rs b/consensus/types/src/test_utils/test_random/signature_bytes.rs similarity index 100% rename from eth2/types/src/test_utils/test_random/signature_bytes.rs rename to consensus/types/src/test_utils/test_random/signature_bytes.rs diff --git a/eth2/types/src/tree_hash_impls.rs b/consensus/types/src/tree_hash_impls.rs similarity index 100% rename from eth2/types/src/tree_hash_impls.rs rename to consensus/types/src/tree_hash_impls.rs diff --git a/eth2/types/src/utils.rs b/consensus/types/src/utils.rs similarity index 100% rename from eth2/types/src/utils.rs rename to consensus/types/src/utils.rs diff --git a/eth2/types/src/utils/serde_utils.rs b/consensus/types/src/utils/serde_utils.rs similarity index 100% rename from eth2/types/src/utils/serde_utils.rs rename to consensus/types/src/utils/serde_utils.rs diff --git a/eth2/types/src/validator.rs b/consensus/types/src/validator.rs similarity index 100% rename from eth2/types/src/validator.rs rename to consensus/types/src/validator.rs diff --git a/eth2/types/src/voluntary_exit.rs b/consensus/types/src/voluntary_exit.rs similarity index 100% rename from eth2/types/src/voluntary_exit.rs rename to consensus/types/src/voluntary_exit.rs diff --git a/eth2/utils/bls/Cargo.toml b/crypto/bls/Cargo.toml similarity index 80% rename from eth2/utils/bls/Cargo.toml rename to crypto/bls/Cargo.toml index ce9cbe02e..41e2a0558 100644 --- a/eth2/utils/bls/Cargo.toml +++ b/crypto/bls/Cargo.toml @@ -11,9 +11,9 @@ hex = "0.4.2" rand = "0.7.3" serde = "1.0.110" serde_derive = "1.0.110" -serde_hex = { path = "../serde_hex" } +serde_hex = { path = "../../consensus/serde_hex" } eth2_ssz = "0.1.2" -eth2_ssz_types = { path = "../ssz_types" } +eth2_ssz_types = { path = "../../consensus/ssz_types" } tree_hash = "0.1.0" arbitrary = { version = "0.4.4", features = ["derive"], optional = true } diff --git a/eth2/utils/bls/src/aggregate_public_key.rs b/crypto/bls/src/aggregate_public_key.rs similarity index 100% rename from eth2/utils/bls/src/aggregate_public_key.rs rename to crypto/bls/src/aggregate_public_key.rs diff --git a/eth2/utils/bls/src/aggregate_signature.rs b/crypto/bls/src/aggregate_signature.rs similarity index 100% rename from eth2/utils/bls/src/aggregate_signature.rs rename to crypto/bls/src/aggregate_signature.rs diff --git a/eth2/utils/bls/src/fake_aggregate_public_key.rs b/crypto/bls/src/fake_aggregate_public_key.rs similarity index 100% rename from eth2/utils/bls/src/fake_aggregate_public_key.rs rename to crypto/bls/src/fake_aggregate_public_key.rs diff --git a/eth2/utils/bls/src/fake_aggregate_signature.rs b/crypto/bls/src/fake_aggregate_signature.rs similarity index 100% rename from eth2/utils/bls/src/fake_aggregate_signature.rs rename to crypto/bls/src/fake_aggregate_signature.rs diff --git a/eth2/utils/bls/src/fake_public_key.rs b/crypto/bls/src/fake_public_key.rs similarity index 100% rename from eth2/utils/bls/src/fake_public_key.rs rename to crypto/bls/src/fake_public_key.rs diff --git a/eth2/utils/bls/src/fake_signature.rs b/crypto/bls/src/fake_signature.rs similarity index 100% rename from eth2/utils/bls/src/fake_signature.rs rename to crypto/bls/src/fake_signature.rs diff --git a/eth2/utils/bls/src/keypair.rs b/crypto/bls/src/keypair.rs similarity index 100% rename from eth2/utils/bls/src/keypair.rs rename to crypto/bls/src/keypair.rs diff --git a/eth2/utils/bls/src/lib.rs b/crypto/bls/src/lib.rs similarity index 100% rename from eth2/utils/bls/src/lib.rs rename to crypto/bls/src/lib.rs diff --git a/eth2/utils/bls/src/macros.rs b/crypto/bls/src/macros.rs similarity index 100% rename from eth2/utils/bls/src/macros.rs rename to crypto/bls/src/macros.rs diff --git a/eth2/utils/bls/src/public_key.rs b/crypto/bls/src/public_key.rs similarity index 100% rename from eth2/utils/bls/src/public_key.rs rename to crypto/bls/src/public_key.rs diff --git a/eth2/utils/bls/src/public_key_bytes.rs b/crypto/bls/src/public_key_bytes.rs similarity index 100% rename from eth2/utils/bls/src/public_key_bytes.rs rename to crypto/bls/src/public_key_bytes.rs diff --git a/eth2/utils/bls/src/secret_key.rs b/crypto/bls/src/secret_key.rs similarity index 100% rename from eth2/utils/bls/src/secret_key.rs rename to crypto/bls/src/secret_key.rs diff --git a/eth2/utils/bls/src/signature.rs b/crypto/bls/src/signature.rs similarity index 100% rename from eth2/utils/bls/src/signature.rs rename to crypto/bls/src/signature.rs diff --git a/eth2/utils/bls/src/signature_bytes.rs b/crypto/bls/src/signature_bytes.rs similarity index 100% rename from eth2/utils/bls/src/signature_bytes.rs rename to crypto/bls/src/signature_bytes.rs diff --git a/eth2/utils/bls/src/signature_set.rs b/crypto/bls/src/signature_set.rs similarity index 100% rename from eth2/utils/bls/src/signature_set.rs rename to crypto/bls/src/signature_set.rs diff --git a/eth2/utils/eth2_hashing/.cargo/config b/crypto/eth2_hashing/.cargo/config similarity index 100% rename from eth2/utils/eth2_hashing/.cargo/config rename to crypto/eth2_hashing/.cargo/config diff --git a/eth2/utils/eth2_hashing/Cargo.toml b/crypto/eth2_hashing/Cargo.toml similarity index 100% rename from eth2/utils/eth2_hashing/Cargo.toml rename to crypto/eth2_hashing/Cargo.toml diff --git a/eth2/utils/eth2_hashing/src/lib.rs b/crypto/eth2_hashing/src/lib.rs similarity index 100% rename from eth2/utils/eth2_hashing/src/lib.rs rename to crypto/eth2_hashing/src/lib.rs diff --git a/eth2/utils/eth2_key_derivation/Cargo.toml b/crypto/eth2_key_derivation/Cargo.toml similarity index 100% rename from eth2/utils/eth2_key_derivation/Cargo.toml rename to crypto/eth2_key_derivation/Cargo.toml diff --git a/eth2/utils/eth2_key_derivation/src/derived_key.rs b/crypto/eth2_key_derivation/src/derived_key.rs similarity index 100% rename from eth2/utils/eth2_key_derivation/src/derived_key.rs rename to crypto/eth2_key_derivation/src/derived_key.rs diff --git a/eth2/utils/eth2_key_derivation/src/lamport_secret_key.rs b/crypto/eth2_key_derivation/src/lamport_secret_key.rs similarity index 100% rename from eth2/utils/eth2_key_derivation/src/lamport_secret_key.rs rename to crypto/eth2_key_derivation/src/lamport_secret_key.rs diff --git a/eth2/utils/eth2_key_derivation/src/lib.rs b/crypto/eth2_key_derivation/src/lib.rs similarity index 100% rename from eth2/utils/eth2_key_derivation/src/lib.rs rename to crypto/eth2_key_derivation/src/lib.rs diff --git a/eth2/utils/eth2_key_derivation/src/path.rs b/crypto/eth2_key_derivation/src/path.rs similarity index 100% rename from eth2/utils/eth2_key_derivation/src/path.rs rename to crypto/eth2_key_derivation/src/path.rs diff --git a/eth2/utils/eth2_key_derivation/src/secret_bytes.rs b/crypto/eth2_key_derivation/src/secret_bytes.rs similarity index 100% rename from eth2/utils/eth2_key_derivation/src/secret_bytes.rs rename to crypto/eth2_key_derivation/src/secret_bytes.rs diff --git a/eth2/utils/eth2_key_derivation/src/secret_hash.rs b/crypto/eth2_key_derivation/src/secret_hash.rs similarity index 100% rename from eth2/utils/eth2_key_derivation/src/secret_hash.rs rename to crypto/eth2_key_derivation/src/secret_hash.rs diff --git a/eth2/utils/eth2_key_derivation/tests/eip2333_vectors.rs b/crypto/eth2_key_derivation/tests/eip2333_vectors.rs similarity index 100% rename from eth2/utils/eth2_key_derivation/tests/eip2333_vectors.rs rename to crypto/eth2_key_derivation/tests/eip2333_vectors.rs diff --git a/eth2/utils/eth2_key_derivation/tests/tests.rs b/crypto/eth2_key_derivation/tests/tests.rs similarity index 100% rename from eth2/utils/eth2_key_derivation/tests/tests.rs rename to crypto/eth2_key_derivation/tests/tests.rs diff --git a/eth2/utils/eth2_keystore/Cargo.toml b/crypto/eth2_keystore/Cargo.toml similarity index 92% rename from eth2/utils/eth2_keystore/Cargo.toml rename to crypto/eth2_keystore/Cargo.toml index e93b27208..89123379e 100644 --- a/eth2/utils/eth2_keystore/Cargo.toml +++ b/crypto/eth2_keystore/Cargo.toml @@ -15,7 +15,7 @@ serde = "1.0.110" serde_repr = "0.1" hex = "0.3" bls = { path = "../bls" } -eth2_ssz = { path = "../ssz" } +eth2_ssz = { path = "../../consensus/ssz" } serde_json = "1.0.41" [dev-dependencies] diff --git a/eth2/utils/eth2_keystore/src/derived_key.rs b/crypto/eth2_keystore/src/derived_key.rs similarity index 100% rename from eth2/utils/eth2_keystore/src/derived_key.rs rename to crypto/eth2_keystore/src/derived_key.rs diff --git a/eth2/utils/eth2_keystore/src/json_keystore/checksum_module.rs b/crypto/eth2_keystore/src/json_keystore/checksum_module.rs similarity index 100% rename from eth2/utils/eth2_keystore/src/json_keystore/checksum_module.rs rename to crypto/eth2_keystore/src/json_keystore/checksum_module.rs diff --git a/eth2/utils/eth2_keystore/src/json_keystore/cipher_module.rs b/crypto/eth2_keystore/src/json_keystore/cipher_module.rs similarity index 100% rename from eth2/utils/eth2_keystore/src/json_keystore/cipher_module.rs rename to crypto/eth2_keystore/src/json_keystore/cipher_module.rs diff --git a/eth2/utils/eth2_keystore/src/json_keystore/hex_bytes.rs b/crypto/eth2_keystore/src/json_keystore/hex_bytes.rs similarity index 100% rename from eth2/utils/eth2_keystore/src/json_keystore/hex_bytes.rs rename to crypto/eth2_keystore/src/json_keystore/hex_bytes.rs diff --git a/eth2/utils/eth2_keystore/src/json_keystore/kdf_module.rs b/crypto/eth2_keystore/src/json_keystore/kdf_module.rs similarity index 100% rename from eth2/utils/eth2_keystore/src/json_keystore/kdf_module.rs rename to crypto/eth2_keystore/src/json_keystore/kdf_module.rs diff --git a/eth2/utils/eth2_keystore/src/json_keystore/mod.rs b/crypto/eth2_keystore/src/json_keystore/mod.rs similarity index 100% rename from eth2/utils/eth2_keystore/src/json_keystore/mod.rs rename to crypto/eth2_keystore/src/json_keystore/mod.rs diff --git a/eth2/utils/eth2_keystore/src/keystore.rs b/crypto/eth2_keystore/src/keystore.rs similarity index 100% rename from eth2/utils/eth2_keystore/src/keystore.rs rename to crypto/eth2_keystore/src/keystore.rs diff --git a/eth2/utils/eth2_keystore/src/lib.rs b/crypto/eth2_keystore/src/lib.rs similarity index 100% rename from eth2/utils/eth2_keystore/src/lib.rs rename to crypto/eth2_keystore/src/lib.rs diff --git a/eth2/utils/eth2_keystore/src/plain_text.rs b/crypto/eth2_keystore/src/plain_text.rs similarity index 100% rename from eth2/utils/eth2_keystore/src/plain_text.rs rename to crypto/eth2_keystore/src/plain_text.rs diff --git a/eth2/utils/eth2_keystore/tests/eip2335_vectors.rs b/crypto/eth2_keystore/tests/eip2335_vectors.rs similarity index 100% rename from eth2/utils/eth2_keystore/tests/eip2335_vectors.rs rename to crypto/eth2_keystore/tests/eip2335_vectors.rs diff --git a/eth2/utils/eth2_keystore/tests/json.rs b/crypto/eth2_keystore/tests/json.rs similarity index 100% rename from eth2/utils/eth2_keystore/tests/json.rs rename to crypto/eth2_keystore/tests/json.rs diff --git a/eth2/utils/eth2_keystore/tests/params.rs b/crypto/eth2_keystore/tests/params.rs similarity index 100% rename from eth2/utils/eth2_keystore/tests/params.rs rename to crypto/eth2_keystore/tests/params.rs diff --git a/eth2/utils/eth2_keystore/tests/tests.rs b/crypto/eth2_keystore/tests/tests.rs similarity index 100% rename from eth2/utils/eth2_keystore/tests/tests.rs rename to crypto/eth2_keystore/tests/tests.rs diff --git a/eth2/utils/eth2_wallet/Cargo.toml b/crypto/eth2_wallet/Cargo.toml similarity index 92% rename from eth2/utils/eth2_wallet/Cargo.toml rename to crypto/eth2_wallet/Cargo.toml index a3fa8a1d5..e6098744b 100644 --- a/eth2/utils/eth2_wallet/Cargo.toml +++ b/crypto/eth2_wallet/Cargo.toml @@ -18,5 +18,5 @@ tiny-bip39 = "0.7.3" [dev-dependencies] hex = "0.3" -eth2_ssz = { path = "../ssz" } +eth2_ssz = { path = "../../consensus/ssz" } tempfile = "3.1.0" diff --git a/eth2/utils/eth2_wallet/src/json_wallet/mod.rs b/crypto/eth2_wallet/src/json_wallet/mod.rs similarity index 100% rename from eth2/utils/eth2_wallet/src/json_wallet/mod.rs rename to crypto/eth2_wallet/src/json_wallet/mod.rs diff --git a/eth2/utils/eth2_wallet/src/lib.rs b/crypto/eth2_wallet/src/lib.rs similarity index 100% rename from eth2/utils/eth2_wallet/src/lib.rs rename to crypto/eth2_wallet/src/lib.rs diff --git a/eth2/utils/eth2_wallet/src/validator_path.rs b/crypto/eth2_wallet/src/validator_path.rs similarity index 100% rename from eth2/utils/eth2_wallet/src/validator_path.rs rename to crypto/eth2_wallet/src/validator_path.rs diff --git a/eth2/utils/eth2_wallet/src/wallet.rs b/crypto/eth2_wallet/src/wallet.rs similarity index 100% rename from eth2/utils/eth2_wallet/src/wallet.rs rename to crypto/eth2_wallet/src/wallet.rs diff --git a/eth2/utils/eth2_wallet/tests/eip2386_vectors.rs b/crypto/eth2_wallet/tests/eip2386_vectors.rs similarity index 100% rename from eth2/utils/eth2_wallet/tests/eip2386_vectors.rs rename to crypto/eth2_wallet/tests/eip2386_vectors.rs diff --git a/eth2/utils/eth2_wallet/tests/json.rs b/crypto/eth2_wallet/tests/json.rs similarity index 100% rename from eth2/utils/eth2_wallet/tests/json.rs rename to crypto/eth2_wallet/tests/json.rs diff --git a/eth2/utils/eth2_wallet/tests/tests.rs b/crypto/eth2_wallet/tests/tests.rs similarity index 100% rename from eth2/utils/eth2_wallet/tests/tests.rs rename to crypto/eth2_wallet/tests/tests.rs diff --git a/eth2/utils/lighthouse_bootstrap/Cargo.toml b/eth2/utils/lighthouse_bootstrap/Cargo.toml deleted file mode 100644 index 460d12d85..000000000 --- a/eth2/utils/lighthouse_bootstrap/Cargo.toml +++ /dev/null @@ -1,16 +0,0 @@ -[package] -name = "lighthouse_bootstrap" -version = "0.2.0" -authors = ["Paul Hauner "] -edition = "2018" - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - -[dependencies] -eth2_config = { path = "../eth2_config" } -eth2-libp2p = { path = "../../../beacon_node/eth2-libp2p" } -reqwest = "0.9.22" -url = "1.2" -types = { path = "../../types" } -serde = "1.0.102" -slog = { version = "2.5.2", features = ["max_level_trace", "release_max_level_trace"] } diff --git a/lcli/Cargo.toml b/lcli/Cargo.toml index 38f0c722d..1fca695f0 100644 --- a/lcli/Cargo.toml +++ b/lcli/Cargo.toml @@ -14,22 +14,22 @@ log = "0.4.8" serde = "1.0.110" serde_yaml = "0.8.11" simple_logger = "1.6.0" -types = { path = "../eth2/types" } -state_processing = { path = "../eth2/state_processing" } +types = { path = "../consensus/types" } +state_processing = { path = "../consensus/state_processing" } eth2_ssz = "0.1.2" regex = "1.3.7" -eth1_test_rig = { path = "../tests/eth1_test_rig" } +eth1_test_rig = { path = "../testing/eth1_test_rig" } futures = { version = "0.3.5", features = ["compat"] } environment = { path = "../lighthouse/environment" } web3 = "0.10.0" -eth2_testnet_config = { path = "../eth2/utils/eth2_testnet_config" } +eth2_testnet_config = { path = "../common/eth2_testnet_config" } dirs = "2.0.2" genesis = { path = "../beacon_node/genesis" } -deposit_contract = { path = "../eth2/utils/deposit_contract" } +deposit_contract = { path = "../common/deposit_contract" } tree_hash = "0.1.0" tokio = { version = "0.2.20", features = ["full"] } -clap_utils = { path = "../eth2/utils/clap_utils" } +clap_utils = { path = "../common/clap_utils" } eth2-libp2p = { path = "../beacon_node/eth2-libp2p" } -validator_dir = { path = "../eth2/utils/validator_dir", features = ["unencrypted_keys"] } +validator_dir = { path = "../common/validator_dir", features = ["unencrypted_keys"] } rand = "0.7.2" -eth2_keystore = { path = "../eth2/utils/eth2_keystore" } +eth2_keystore = { path = "../crypto/eth2_keystore" } diff --git a/lighthouse/Cargo.toml b/lighthouse/Cargo.toml index d78c1c435..296162ce0 100644 --- a/lighthouse/Cargo.toml +++ b/lighthouse/Cargo.toml @@ -12,19 +12,19 @@ beacon_node = { "path" = "../beacon_node" } tokio = "0.2.20" slog = { version = "2.5.2", features = ["max_level_trace"] } sloggers = "1.0.0" -types = { "path" = "../eth2/types" } +types = { "path" = "../consensus/types" } clap = "2.33.0" env_logger = "0.7.1" -logging = { path = "../eth2/utils/logging" } +logging = { path = "../common/logging" } slog-term = "2.5.0" slog-async = "2.5.0" environment = { path = "./environment" } futures = "0.3.5" validator_client = { "path" = "../validator_client" } account_manager = { "path" = "../account_manager" } -clap_utils = { path = "../eth2/utils/clap_utils" } -eth2_testnet_config = { path = "../eth2/utils/eth2_testnet_config" } +clap_utils = { path = "../common/clap_utils" } +eth2_testnet_config = { path = "../common/eth2_testnet_config" } [dev-dependencies] tempfile = "3.1.0" -validator_dir = { path = "../eth2/utils/validator_dir" } +validator_dir = { path = "../common/validator_dir" } diff --git a/lighthouse/environment/Cargo.toml b/lighthouse/environment/Cargo.toml index c9093a15d..441f0e275 100644 --- a/lighthouse/environment/Cargo.toml +++ b/lighthouse/environment/Cargo.toml @@ -9,11 +9,11 @@ clap = "2.33.0" tokio = "0.2.20" slog = { version = "2.5.2", features = ["max_level_trace"] } sloggers = "1.0.0" -types = { "path" = "../../eth2/types" } -eth2_config = { "path" = "../../eth2/utils/eth2_config" } -eth2_testnet_config = { path = "../../eth2/utils/eth2_testnet_config" } +types = { "path" = "../../consensus/types" } +eth2_config = { "path" = "../../common/eth2_config" } +eth2_testnet_config = { path = "../../common/eth2_testnet_config" } env_logger = "0.7.1" -logging = { path = "../../eth2/utils/logging" } +logging = { path = "../../common/logging" } slog-term = "2.5.0" slog-async = "2.5.0" ctrlc = { version = "3.1.4", features = ["termination"] } diff --git a/tests/ef_tests/.gitignore b/testing/ef_tests/.gitignore similarity index 100% rename from tests/ef_tests/.gitignore rename to testing/ef_tests/.gitignore diff --git a/tests/ef_tests/Cargo.toml b/testing/ef_tests/Cargo.toml similarity index 59% rename from tests/ef_tests/Cargo.toml rename to testing/ef_tests/Cargo.toml index d399cba37..aef1a2222 100644 --- a/tests/ef_tests/Cargo.toml +++ b/testing/ef_tests/Cargo.toml @@ -10,8 +10,8 @@ ef_tests = [] fake_crypto = ["bls/fake_crypto"] [dependencies] -bls = { path = "../../eth2/utils/bls" } -compare_fields = { path = "../../eth2/utils/compare_fields" } +bls = { path = "../../crypto/bls" } +compare_fields = { path = "../../common/compare_fields" } ethereum-types = "0.9.1" hex = "0.4.2" rayon = "1.3.0" @@ -23,8 +23,8 @@ eth2_ssz = "0.1.2" eth2_ssz_derive = "0.1.0" tree_hash = "0.1.0" tree_hash_derive = "0.2.0" -cached_tree_hash = { path = "../../eth2/utils/cached_tree_hash" } -state_processing = { path = "../../eth2/state_processing" } -swap_or_not_shuffle = { path = "../../eth2/utils/swap_or_not_shuffle" } -types = { path = "../../eth2/types" } +cached_tree_hash = { path = "../../consensus/cached_tree_hash" } +state_processing = { path = "../../consensus/state_processing" } +swap_or_not_shuffle = { path = "../../consensus/swap_or_not_shuffle" } +types = { path = "../../consensus/types" } walkdir = "2.3.1" diff --git a/tests/ef_tests/Makefile b/testing/ef_tests/Makefile similarity index 100% rename from tests/ef_tests/Makefile rename to testing/ef_tests/Makefile diff --git a/tests/ef_tests/README.md b/testing/ef_tests/README.md similarity index 100% rename from tests/ef_tests/README.md rename to testing/ef_tests/README.md diff --git a/tests/ef_tests/src/bls_setting.rs b/testing/ef_tests/src/bls_setting.rs similarity index 100% rename from tests/ef_tests/src/bls_setting.rs rename to testing/ef_tests/src/bls_setting.rs diff --git a/tests/ef_tests/src/case_result.rs b/testing/ef_tests/src/case_result.rs similarity index 100% rename from tests/ef_tests/src/case_result.rs rename to testing/ef_tests/src/case_result.rs diff --git a/tests/ef_tests/src/cases.rs b/testing/ef_tests/src/cases.rs similarity index 100% rename from tests/ef_tests/src/cases.rs rename to testing/ef_tests/src/cases.rs diff --git a/tests/ef_tests/src/cases/bls_aggregate_sigs.rs b/testing/ef_tests/src/cases/bls_aggregate_sigs.rs similarity index 100% rename from tests/ef_tests/src/cases/bls_aggregate_sigs.rs rename to testing/ef_tests/src/cases/bls_aggregate_sigs.rs diff --git a/tests/ef_tests/src/cases/bls_aggregate_verify.rs b/testing/ef_tests/src/cases/bls_aggregate_verify.rs similarity index 100% rename from tests/ef_tests/src/cases/bls_aggregate_verify.rs rename to testing/ef_tests/src/cases/bls_aggregate_verify.rs diff --git a/tests/ef_tests/src/cases/bls_fast_aggregate_verify.rs b/testing/ef_tests/src/cases/bls_fast_aggregate_verify.rs similarity index 100% rename from tests/ef_tests/src/cases/bls_fast_aggregate_verify.rs rename to testing/ef_tests/src/cases/bls_fast_aggregate_verify.rs diff --git a/tests/ef_tests/src/cases/bls_sign_msg.rs b/testing/ef_tests/src/cases/bls_sign_msg.rs similarity index 100% rename from tests/ef_tests/src/cases/bls_sign_msg.rs rename to testing/ef_tests/src/cases/bls_sign_msg.rs diff --git a/tests/ef_tests/src/cases/bls_verify_msg.rs b/testing/ef_tests/src/cases/bls_verify_msg.rs similarity index 100% rename from tests/ef_tests/src/cases/bls_verify_msg.rs rename to testing/ef_tests/src/cases/bls_verify_msg.rs diff --git a/tests/ef_tests/src/cases/common.rs b/testing/ef_tests/src/cases/common.rs similarity index 100% rename from tests/ef_tests/src/cases/common.rs rename to testing/ef_tests/src/cases/common.rs diff --git a/tests/ef_tests/src/cases/epoch_processing.rs b/testing/ef_tests/src/cases/epoch_processing.rs similarity index 100% rename from tests/ef_tests/src/cases/epoch_processing.rs rename to testing/ef_tests/src/cases/epoch_processing.rs diff --git a/tests/ef_tests/src/cases/genesis_initialization.rs b/testing/ef_tests/src/cases/genesis_initialization.rs similarity index 100% rename from tests/ef_tests/src/cases/genesis_initialization.rs rename to testing/ef_tests/src/cases/genesis_initialization.rs diff --git a/tests/ef_tests/src/cases/genesis_validity.rs b/testing/ef_tests/src/cases/genesis_validity.rs similarity index 100% rename from tests/ef_tests/src/cases/genesis_validity.rs rename to testing/ef_tests/src/cases/genesis_validity.rs diff --git a/tests/ef_tests/src/cases/operations.rs b/testing/ef_tests/src/cases/operations.rs similarity index 100% rename from tests/ef_tests/src/cases/operations.rs rename to testing/ef_tests/src/cases/operations.rs diff --git a/tests/ef_tests/src/cases/sanity_blocks.rs b/testing/ef_tests/src/cases/sanity_blocks.rs similarity index 100% rename from tests/ef_tests/src/cases/sanity_blocks.rs rename to testing/ef_tests/src/cases/sanity_blocks.rs diff --git a/tests/ef_tests/src/cases/sanity_slots.rs b/testing/ef_tests/src/cases/sanity_slots.rs similarity index 100% rename from tests/ef_tests/src/cases/sanity_slots.rs rename to testing/ef_tests/src/cases/sanity_slots.rs diff --git a/tests/ef_tests/src/cases/shuffling.rs b/testing/ef_tests/src/cases/shuffling.rs similarity index 100% rename from tests/ef_tests/src/cases/shuffling.rs rename to testing/ef_tests/src/cases/shuffling.rs diff --git a/tests/ef_tests/src/cases/ssz_generic.rs b/testing/ef_tests/src/cases/ssz_generic.rs similarity index 100% rename from tests/ef_tests/src/cases/ssz_generic.rs rename to testing/ef_tests/src/cases/ssz_generic.rs diff --git a/tests/ef_tests/src/cases/ssz_static.rs b/testing/ef_tests/src/cases/ssz_static.rs similarity index 100% rename from tests/ef_tests/src/cases/ssz_static.rs rename to testing/ef_tests/src/cases/ssz_static.rs diff --git a/tests/ef_tests/src/decode.rs b/testing/ef_tests/src/decode.rs similarity index 100% rename from tests/ef_tests/src/decode.rs rename to testing/ef_tests/src/decode.rs diff --git a/tests/ef_tests/src/error.rs b/testing/ef_tests/src/error.rs similarity index 100% rename from tests/ef_tests/src/error.rs rename to testing/ef_tests/src/error.rs diff --git a/tests/ef_tests/src/handler.rs b/testing/ef_tests/src/handler.rs similarity index 100% rename from tests/ef_tests/src/handler.rs rename to testing/ef_tests/src/handler.rs diff --git a/tests/ef_tests/src/lib.rs b/testing/ef_tests/src/lib.rs similarity index 100% rename from tests/ef_tests/src/lib.rs rename to testing/ef_tests/src/lib.rs diff --git a/tests/ef_tests/src/results.rs b/testing/ef_tests/src/results.rs similarity index 100% rename from tests/ef_tests/src/results.rs rename to testing/ef_tests/src/results.rs diff --git a/tests/ef_tests/src/type_name.rs b/testing/ef_tests/src/type_name.rs similarity index 100% rename from tests/ef_tests/src/type_name.rs rename to testing/ef_tests/src/type_name.rs diff --git a/tests/ef_tests/tests/tests.rs b/testing/ef_tests/tests/tests.rs similarity index 100% rename from tests/ef_tests/tests/tests.rs rename to testing/ef_tests/tests/tests.rs diff --git a/tests/eth1_test_rig/.gitignore b/testing/eth1_test_rig/.gitignore similarity index 100% rename from tests/eth1_test_rig/.gitignore rename to testing/eth1_test_rig/.gitignore diff --git a/tests/eth1_test_rig/Cargo.toml b/testing/eth1_test_rig/Cargo.toml similarity index 72% rename from tests/eth1_test_rig/Cargo.toml rename to testing/eth1_test_rig/Cargo.toml index a3723ce26..e2f951e9b 100644 --- a/tests/eth1_test_rig/Cargo.toml +++ b/testing/eth1_test_rig/Cargo.toml @@ -8,6 +8,6 @@ edition = "2018" web3 = "0.10.0" tokio = { version = "0.2.20", features = ["time"] } futures = { version = "0.3.5", features = ["compat"] } -types = { path = "../../eth2/types"} +types = { path = "../../consensus/types"} serde_json = "1.0.52" -deposit_contract = { path = "../../eth2/utils/deposit_contract"} +deposit_contract = { path = "../../common/deposit_contract"} diff --git a/tests/eth1_test_rig/src/ganache.rs b/testing/eth1_test_rig/src/ganache.rs similarity index 100% rename from tests/eth1_test_rig/src/ganache.rs rename to testing/eth1_test_rig/src/ganache.rs diff --git a/tests/eth1_test_rig/src/lib.rs b/testing/eth1_test_rig/src/lib.rs similarity index 100% rename from tests/eth1_test_rig/src/lib.rs rename to testing/eth1_test_rig/src/lib.rs diff --git a/tests/node_test_rig/Cargo.toml b/testing/node_test_rig/Cargo.toml similarity index 62% rename from tests/node_test_rig/Cargo.toml rename to testing/node_test_rig/Cargo.toml index 373f5d876..dc46d2ba2 100644 --- a/tests/node_test_rig/Cargo.toml +++ b/testing/node_test_rig/Cargo.toml @@ -7,14 +7,14 @@ edition = "2018" [dependencies] environment = { path = "../../lighthouse/environment" } beacon_node = { path = "../../beacon_node" } -types = { path = "../../eth2/types" } -eth2_config = { path = "../../eth2/utils/eth2_config" } +types = { path = "../../consensus/types" } +eth2_config = { path = "../../common/eth2_config" } tempdir = "0.3.7" reqwest = "0.10.4" url = "2.1.1" serde = "1.0.110" futures = "0.3.5" genesis = { path = "../../beacon_node/genesis" } -remote_beacon_node = { path = "../../eth2/utils/remote_beacon_node" } +remote_beacon_node = { path = "../../common/remote_beacon_node" } validator_client = { path = "../../validator_client" } -validator_dir = { path = "../../eth2/utils/validator_dir", features = ["insecure_keys"] } +validator_dir = { path = "../../common/validator_dir", features = ["insecure_keys"] } diff --git a/tests/node_test_rig/src/lib.rs b/testing/node_test_rig/src/lib.rs similarity index 100% rename from tests/node_test_rig/src/lib.rs rename to testing/node_test_rig/src/lib.rs diff --git a/tests/simulator/Cargo.toml b/testing/simulator/Cargo.toml similarity index 91% rename from tests/simulator/Cargo.toml rename to testing/simulator/Cargo.toml index 9477a27aa..6874f935b 100644 --- a/tests/simulator/Cargo.toml +++ b/testing/simulator/Cargo.toml @@ -8,7 +8,7 @@ edition = "2018" [dependencies] node_test_rig = { path = "../node_test_rig" } -types = { path = "../../eth2/types" } +types = { path = "../../consensus/types" } validator_client = { path = "../../validator_client" } parking_lot = "0.10.2" futures = "0.3.5" diff --git a/tests/simulator/src/checks.rs b/testing/simulator/src/checks.rs similarity index 100% rename from tests/simulator/src/checks.rs rename to testing/simulator/src/checks.rs diff --git a/tests/simulator/src/cli.rs b/testing/simulator/src/cli.rs similarity index 100% rename from tests/simulator/src/cli.rs rename to testing/simulator/src/cli.rs diff --git a/tests/simulator/src/eth1_sim.rs b/testing/simulator/src/eth1_sim.rs similarity index 100% rename from tests/simulator/src/eth1_sim.rs rename to testing/simulator/src/eth1_sim.rs diff --git a/tests/simulator/src/local_network.rs b/testing/simulator/src/local_network.rs similarity index 100% rename from tests/simulator/src/local_network.rs rename to testing/simulator/src/local_network.rs diff --git a/tests/simulator/src/main.rs b/testing/simulator/src/main.rs similarity index 100% rename from tests/simulator/src/main.rs rename to testing/simulator/src/main.rs diff --git a/tests/simulator/src/no_eth1_sim.rs b/testing/simulator/src/no_eth1_sim.rs similarity index 100% rename from tests/simulator/src/no_eth1_sim.rs rename to testing/simulator/src/no_eth1_sim.rs diff --git a/tests/simulator/src/sync_sim.rs b/testing/simulator/src/sync_sim.rs similarity index 100% rename from tests/simulator/src/sync_sim.rs rename to testing/simulator/src/sync_sim.rs diff --git a/tests/state_transition_vectors/.gitignore b/testing/state_transition_vectors/.gitignore similarity index 100% rename from tests/state_transition_vectors/.gitignore rename to testing/state_transition_vectors/.gitignore diff --git a/tests/state_transition_vectors/Cargo.toml b/testing/state_transition_vectors/Cargo.toml similarity index 70% rename from tests/state_transition_vectors/Cargo.toml rename to testing/state_transition_vectors/Cargo.toml index b56bad5e8..fbe7c17bd 100644 --- a/tests/state_transition_vectors/Cargo.toml +++ b/testing/state_transition_vectors/Cargo.toml @@ -7,6 +7,6 @@ edition = "2018" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -state_processing = { path = "../../eth2/state_processing" } -types = { path = "../../eth2/types" } +state_processing = { path = "../../consensus/state_processing" } +types = { path = "../../consensus/types" } eth2_ssz = "0.1.2" diff --git a/tests/state_transition_vectors/Makefile b/testing/state_transition_vectors/Makefile similarity index 100% rename from tests/state_transition_vectors/Makefile rename to testing/state_transition_vectors/Makefile diff --git a/tests/state_transition_vectors/README.md b/testing/state_transition_vectors/README.md similarity index 100% rename from tests/state_transition_vectors/README.md rename to testing/state_transition_vectors/README.md diff --git a/tests/state_transition_vectors/src/exit.rs b/testing/state_transition_vectors/src/exit.rs similarity index 100% rename from tests/state_transition_vectors/src/exit.rs rename to testing/state_transition_vectors/src/exit.rs diff --git a/tests/state_transition_vectors/src/macros.rs b/testing/state_transition_vectors/src/macros.rs similarity index 100% rename from tests/state_transition_vectors/src/macros.rs rename to testing/state_transition_vectors/src/macros.rs diff --git a/tests/state_transition_vectors/src/main.rs b/testing/state_transition_vectors/src/main.rs similarity index 100% rename from tests/state_transition_vectors/src/main.rs rename to testing/state_transition_vectors/src/main.rs diff --git a/validator_client/Cargo.toml b/validator_client/Cargo.toml index dadb0958b..306dca6d8 100644 --- a/validator_client/Cargo.toml +++ b/validator_client/Cargo.toml @@ -13,14 +13,14 @@ tokio = {version = "0.2.20", features = ["time", "rt-threaded", "macros"]} [dependencies] eth2_ssz = "0.1.2" -eth2_config = { path = "../eth2/utils/eth2_config" } +eth2_config = { path = "../common/eth2_config" } tree_hash = "0.1.0" clap = "2.33.0" -eth2_interop_keypairs = { path = "../eth2/utils/eth2_interop_keypairs" } +eth2_interop_keypairs = { path = "../common/eth2_interop_keypairs" } slashing_protection = { path = "./slashing_protection" } -slot_clock = { path = "../eth2/utils/slot_clock" } -rest_types = { path = "../eth2/utils/rest_types" } -types = { path = "../eth2/types" } +slot_clock = { path = "../common/slot_clock" } +rest_types = { path = "../common/rest_types" } +types = { path = "../consensus/types" } serde = "1.0.110" serde_derive = "1.0.110" serde_json = "1.0.52" @@ -32,18 +32,18 @@ error-chain = "0.12.2" bincode = "1.2.1" futures = { version = "0.3.5", features = ["compat"] } dirs = "2.0.2" -logging = { path = "../eth2/utils/logging" } +logging = { path = "../common/logging" } environment = { path = "../lighthouse/environment" } parking_lot = "0.10.2" exit-future = "0.2.0" libc = "0.2.69" eth2_ssz_derive = "0.1.0" hex = "0.4.2" -deposit_contract = { path = "../eth2/utils/deposit_contract" } -bls = { path = "../eth2/utils/bls" } -remote_beacon_node = { path = "../eth2/utils/remote_beacon_node" } +deposit_contract = { path = "../common/deposit_contract" } +bls = { path = "../crypto/bls" } +remote_beacon_node = { path = "../common/remote_beacon_node" } tempdir = "0.3.7" rayon = "1.3.0" web3 = "0.10.0" -validator_dir = { path = "../eth2/utils/validator_dir" } -clap_utils = { path = "../eth2/utils/clap_utils" } +validator_dir = { path = "../common/validator_dir" } +clap_utils = { path = "../common/clap_utils" } diff --git a/validator_client/slashing_protection/Cargo.toml b/validator_client/slashing_protection/Cargo.toml index 92cd85f4f..65841aeab 100644 --- a/validator_client/slashing_protection/Cargo.toml +++ b/validator_client/slashing_protection/Cargo.toml @@ -6,8 +6,8 @@ edition = "2018" [dependencies] tempfile = "3.1.0" -types = { path = "../../eth2/types" } -tree_hash = { path = "../../eth2/utils/tree_hash" } +types = { path = "../../consensus/types" } +tree_hash = { path = "../../consensus/tree_hash" } rusqlite = { version = "0.22.0", features = ["bundled"] } r2d2 = "0.8.8" r2d2_sqlite = "0.15"