From 53be796c8f5566226db804a8514421bb70707070 Mon Sep 17 00:00:00 2001 From: iosh Date: Thu, 5 Dec 2024 22:25:11 +0800 Subject: [PATCH 1/3] chore: move pos related crates into a separate folder --- Cargo.lock | 16 ++- Cargo.toml | 110 ++++++++++++++++-- bins/conflux/Cargo.toml | 12 +- crates/cfxcore/core/Cargo.toml | 60 +++++----- .../src/pos/consensus/executor/Cargo.toml | 47 -------- .../src/pos/consensus/safety-rules/Cargo.toml | 56 --------- .../storage/cached-pos-ledger-db/Cargo.toml | 17 --- .../src/pos/storage/pos-ledger-db/Cargo.toml | 56 --------- crates/cfxcore/execute-helper/Cargo.toml | 2 +- crates/cfxcore/executor/Cargo.toml | 6 +- crates/client/Cargo.toml | 38 +++--- crates/network/Cargo.toml | 4 +- .../pos/common/bounded-executor/Cargo.toml | 0 .../pos/common/bounded-executor/src/lib.rs | 0 .../src => }/pos/common/channel/Cargo.toml | 6 +- .../channel/many-keys-stress-test/Cargo.toml | 0 .../channel/many-keys-stress-test/src/main.rs | 0 .../pos/common/channel/src/diem_channel.rs | 0 .../common/channel/src/diem_channel_test.rs | 0 .../src => }/pos/common/channel/src/lib.rs | 0 .../pos/common/channel/src/message_queues.rs | 0 .../common/channel/src/message_queues_test.rs | 0 .../src => }/pos/common/channel/src/test.rs | 0 .../pos/common/crash-handler/Cargo.toml | 2 +- .../pos/common/crash-handler/src/lib.rs | 0 .../src => }/pos/common/fallible/Cargo.toml | 0 .../common/fallible/src/copy_from_slice.rs | 0 .../src => }/pos/common/fallible/src/lib.rs | 0 .../src => }/pos/common/infallible/Cargo.toml | 0 .../src => }/pos/common/infallible/src/lib.rs | 0 .../pos/common/infallible/src/math.rs | 0 .../pos/common/infallible/src/mutex.rs | 0 .../pos/common/infallible/src/nonzero.rs | 0 .../pos/common/infallible/src/rwlock.rs | 0 .../pos/common/infallible/src/time.rs | 0 .../src => }/pos/common/logger/Cargo.toml | 2 +- .../pos/common/logger/derive/Cargo.toml | 0 .../pos/common/logger/derive/src/lib.rs | 0 .../pos/common/logger/src/counters.rs | 0 .../pos/common/logger/src/diem_logger.rs | 0 .../src => }/pos/common/logger/src/event.rs | 0 .../src => }/pos/common/logger/src/filter.rs | 0 .../pos/common/logger/src/json_log.rs | 0 .../core/src => }/pos/common/logger/src/kv.rs | 0 .../src => }/pos/common/logger/src/lib.rs | 0 .../src => }/pos/common/logger/src/logger.rs | 0 .../src => }/pos/common/logger/src/macros.rs | 0 .../pos/common/logger/src/metadata.rs | 0 .../src => }/pos/common/logger/src/sample.rs | 0 .../pos/common/logger/src/security.rs | 0 .../pos/common/logger/src/struct_log.rs | 0 .../pos/common/logger/tests/derive.rs | 0 .../pos/common/logger/tests/logger.rs | 0 .../logger/tests/logger_custom_format.rs | 0 .../pos/common/logger/tests/remote.rs | 0 .../pos/common/metrics-core/Cargo.toml | 0 .../pos/common/metrics-core/src/lib.rs | 0 .../src => }/pos/common/metrics/Cargo.toml | 4 +- .../core/src => }/pos/common/metrics/build.rs | 0 .../pos/common/metrics/src/json_encoder.rs | 0 .../pos/common/metrics/src/json_metrics.rs | 0 .../src => }/pos/common/metrics/src/lib.rs | 0 .../pos/common/metrics/src/metric_server.rs | 0 .../pos/common/metrics/src/op_counters.rs | 0 .../pos/common/metrics/src/public_metrics.rs | 0 .../common/metrics/src/unit_tests/lib_test.rs | 0 .../pos/common/metrics/src/unit_tests/mod.rs | 0 .../src => }/pos/common/nibble/Cargo.toml | 0 .../src => }/pos/common/nibble/src/lib.rs | 0 .../pos/common/num-variants/Cargo.toml | 0 .../pos/common/num-variants/src/lib.rs | 0 .../pos/common/num-variants/tests/basic.rs | 0 .../pos/common/proptest-helpers/Cargo.toml | 0 .../unit_tests/growing_subset_tests.txt | 0 .../unit_tests/repeat_vec_tests.txt | 0 .../proptest-helpers/src/growing_subset.rs | 0 .../pos/common/proptest-helpers/src/lib.rs | 0 .../common/proptest-helpers/src/repeat_vec.rs | 0 .../common/proptest-helpers/src/unit_tests.rs | 0 .../src/unit_tests/growing_subset_tests.rs | 0 .../src/unit_tests/pick_idx_tests.rs | 0 .../src/unit_tests/repeat_vec_tests.rs | 0 .../proptest-helpers/src/value_generator.rs | 0 .../core/src => }/pos/common/proxy/Cargo.toml | 0 .../core/src => }/pos/common/proxy/src/lib.rs | 0 .../pos/common/short-hex-str/Cargo.toml | 0 .../pos/common/short-hex-str/src/lib.rs | 0 .../common/subscription-service/Cargo.toml | 2 +- .../common/subscription-service/src/lib.rs | 0 .../src => }/pos/common/temppath/Cargo.toml | 0 .../src => }/pos/common/temppath/src/lib.rs | 0 .../pos/common/time-service/Cargo.toml | 8 +- .../pos/common/time-service/src/interval.rs | 0 .../pos/common/time-service/src/lib.rs | 0 .../pos/common/time-service/src/mock.rs | 0 .../pos/common/time-service/src/real.rs | 0 .../pos/common/time-service/src/timeout.rs | 0 .../core/src => }/pos/config/README.md | 0 .../src/pos => pos/config}/config/Cargo.toml | 20 ++-- .../config/data/metrics/prometheus.yml | 0 .../config/src/config/consensus_config.rs | 0 .../src/config/debug_interface_config.rs | 0 .../config}/config/src/config/error.rs | 0 .../config/src/config/execution_config.rs | 0 .../config/src/config/json_rpc_config.rs | 0 .../config/src/config/key_manager_config.rs | 0 .../config/src/config/logger_config.rs | 0 .../config/src/config/mempool_config.rs | 0 .../config/src/config/metrics_config.rs | 0 .../config}/config/src/config/mod.rs | 0 .../config/src/config/network_config.rs | 0 .../config/src/config/safety_rules_config.rs | 0 .../src/config/secure_backend_config.rs | 0 .../config/src/config/state_sync_config.rs | 0 .../config/src/config/storage_config.rs | 0 .../config}/config/src/config/test_config.rs | 0 .../config/test_data/public_full_node.yaml | 0 .../src/config/test_data/safety_rules.yaml | 0 .../src/config/test_data/validator.yaml | 0 .../config/test_data/validator_full_node.yaml | 0 .../config/src/config/upstream_config.rs | 0 .../config}/config/src/generator.rs | 0 .../src/pos => pos/config}/config/src/keys.rs | 0 .../src/pos => pos/config}/config/src/lib.rs | 0 .../config}/config/src/network_id.rs | 0 .../pos => pos/config}/config/src/utils.rs | 0 .../config}/consensus-types/Cargo.toml | 14 +-- .../config}/consensus-types/src/block.rs | 0 .../config}/consensus-types/src/block_data.rs | 0 .../consensus-types/src/block_retrieval.rs | 0 .../config}/consensus-types/src/block_test.rs | 0 .../consensus-types/src/block_test_utils.rs | 0 .../config}/consensus-types/src/common.rs | 0 .../config}/consensus-types/src/db.rs | 0 .../consensus-types/src/epoch_retrieval.rs | 0 .../consensus-types/src/executed_block.rs | 0 .../config}/consensus-types/src/lib.rs | 0 .../consensus-types/src/proposal_msg.rs | 0 .../consensus-types/src/quorum_cert.rs | 0 .../consensus-types/src/safety_data.rs | 0 .../config}/consensus-types/src/sync_info.rs | 0 .../config}/consensus-types/src/timeout.rs | 0 .../src/timeout_certificate.rs | 0 .../config}/consensus-types/src/vote.rs | 0 .../config}/consensus-types/src/vote_data.rs | 0 .../config}/consensus-types/src/vote_msg.rs | 0 .../consensus-types/src/vote_proposal.rs | 0 .../pos/config/generate-key/Cargo.toml | 4 +- .../pos/config/generate-key/src/lib.rs | 0 .../pos/config/generate-key/src/main.rs | 0 .../pos/config/global-constants/Cargo.toml | 0 .../pos/config/global-constants/src/lib.rs | 0 .../src => }/pos/config/management/Cargo.toml | 18 +-- .../src => }/pos/config/management/README.md | 0 .../pos/config/management/genesis/Cargo.toml | 28 ++--- .../pos/config/management/genesis/README.md | 0 .../config/management/genesis/src/command.rs | 0 .../management/genesis/src/config_builder.rs | 0 .../config/management/genesis/src/genesis.rs | 0 .../pos/config/management/genesis/src/key.rs | 0 .../config/management/genesis/src/layout.rs | 0 .../pos/config/management/genesis/src/lib.rs | 0 .../pos/config/management/genesis/src/main.rs | 0 .../management/genesis/src/storage_helper.rs | 0 .../management/genesis/src/swarm_config.rs | 0 .../genesis/src/validator_config.rs | 0 .../genesis/src/validator_operator.rs | 0 .../config/management/genesis/src/verify.rs | 0 .../config/management/genesis/src/waypoint.rs | 0 .../network-address-encryption/Cargo.toml | 10 +- .../network-address-encryption/src/lib.rs | 0 .../config/management/operational/Cargo.toml | 17 ++- .../config/management/operational/README.md | 0 .../operational/src/account_resource.rs | 0 .../operational/src/auto_validate.rs | 0 .../management/operational/src/command.rs | 0 .../management/operational/src/governance.rs | 0 .../management/operational/src/json_rpc.rs | 0 .../config/management/operational/src/keys.rs | 0 .../config/management/operational/src/lib.rs | 0 .../config/management/operational/src/main.rs | 0 .../operational/src/network_checker.rs | 0 .../management/operational/src/owner.rs | 0 .../management/operational/src/print.rs | 0 .../management/operational/src/test_helper.rs | 0 .../operational/src/validate_transaction.rs | 0 .../operational/src/validator_config.rs | 0 .../operational/src/validator_set.rs | 0 .../pos/config/management/src/config.rs | 0 .../pos/config/management/src/error.rs | 0 .../src => }/pos/config/management/src/lib.rs | 0 .../config/management/src/secure_backend.rs | 0 .../pos/config/management/src/storage.rs | 0 .../pos/config/management/src/transaction.rs | 0 .../config/management/src/validator_config.rs | 0 .../pos/config/management/src/waypoint.rs | 0 .../pos/config/seed-peer-generator/Cargo.toml | 16 +-- .../pos/config/seed-peer-generator/src/lib.rs | 0 .../config/seed-peer-generator/src/main.rs | 0 .../config/seed-peer-generator/src/utils.rs | 0 crates/pos/consensus/executor/Cargo.toml | 47 ++++++++ .../consensus/executor/src/db_bootstrapper.rs | 0 .../pos/consensus/executor/src/lib.rs | 0 .../pos/consensus/executor/src/logging.rs | 0 .../pos/consensus/executor/src/metrics.rs | 0 .../src => }/pos/consensus/executor/src/vm.rs | 0 crates/pos/consensus/safety-rules/Cargo.toml | 61 ++++++++++ .../safety-rules/benches/safety_rules.rs | 0 .../src/configurable_validator_signer.rs | 0 .../safety-rules/src/consensus_state.rs | 0 .../consensus/safety-rules/src/counters.rs | 0 .../pos/consensus/safety-rules/src/error.rs | 0 .../safety-rules/src/fuzzing_utils.rs | 0 .../pos/consensus/safety-rules/src/lib.rs | 0 .../safety-rules/src/local_client.rs | 0 .../pos/consensus/safety-rules/src/logging.rs | 0 .../pos/consensus/safety-rules/src/main.rs | 0 .../src/persistent_safety_storage.rs | 0 .../pos/consensus/safety-rules/src/process.rs | 0 .../safety-rules/src/remote_service.rs | 0 .../safety-rules/src/safety_rules.rs | 0 .../safety-rules/src/safety_rules_manager.rs | 0 .../consensus/safety-rules/src/serializer.rs | 0 .../safety-rules/src/t_safety_rules.rs | 0 .../consensus/safety-rules/src/test_utils.rs | 0 .../consensus/safety-rules/src/tests/local.rs | 0 .../consensus/safety-rules/src/tests/mod.rs | 0 .../safety-rules/src/tests/networking.rs | 0 .../safety-rules/src/tests/safety_rules.rs | 0 .../safety-rules/src/tests/serializer.rs | 0 .../consensus/safety-rules/src/tests/suite.rs | 0 .../safety-rules/src/tests/thread.rs | 0 .../consensus/safety-rules/src/tests/vault.rs | 0 .../pos/consensus/safety-rules/src/thread.rs | 0 .../consensus/safety-rules/tests/binary.rs | 0 .../pos/crypto/crypto-derive/Cargo.toml | 0 .../pos/crypto/crypto-derive/src/hasher.rs | 0 .../pos/crypto/crypto-derive/src/lib.rs | 0 .../pos/crypto/crypto-derive/src/unions.rs | 0 .../src => }/pos/crypto/crypto/Cargo.toml | 4 +- .../core/src => }/pos/crypto/crypto/README.md | 0 .../src => }/pos/crypto/crypto/benches/bls.rs | 0 .../pos/crypto/crypto/benches/ed25519.rs | 0 .../pos/crypto/crypto/benches/noise.rs | 0 .../src => }/pos/crypto/crypto/benches/vrf.rs | 0 .../src => }/pos/crypto/crypto/src/bls.rs | 0 .../src => }/pos/crypto/crypto/src/compat.rs | 0 .../src => }/pos/crypto/crypto/src/ec_vrf.rs | 0 .../src => }/pos/crypto/crypto/src/ed25519.rs | 0 .../src => }/pos/crypto/crypto/src/error.rs | 0 .../src => }/pos/crypto/crypto/src/hash.rs | 0 .../src => }/pos/crypto/crypto/src/hkdf.rs | 0 .../pos/crypto/crypto/src/key_file.rs | 0 .../src => }/pos/crypto/crypto/src/lib.rs | 0 .../pos/crypto/crypto/src/multi_bls.rs | 0 .../pos/crypto/crypto/src/multi_ed25519.rs | 0 .../src => }/pos/crypto/crypto/src/noise.rs | 0 .../pos/crypto/crypto/src/secp256k1.rs | 0 .../src => }/pos/crypto/crypto/src/tags.rs | 0 .../pos/crypto/crypto/src/test_utils.rs | 0 .../src => }/pos/crypto/crypto/src/traits.rs | 0 .../crypto/crypto/src/unit_tests/bcs_test.rs | 0 .../crypto/src/unit_tests/compat_test.rs | 0 .../src/unit_tests/compilation/cross_test.rs | 0 .../compilation/cross_test_trait_obj.rs | 0 .../compilation/cross_test_trait_obj_pub.rs | 0 .../compilation/cross_test_trait_obj_sig.rs | 0 .../src/unit_tests/compilation/small_kdf.rs | 0 .../crypto/src/unit_tests/cross_test.rs | 0 .../crypto/src/unit_tests/cryptohasher.rs | 0 .../crypto/src/unit_tests/ed25519_test.rs | 0 .../crypto/crypto/src/unit_tests/hash_test.rs | 0 .../crypto/crypto/src/unit_tests/hkdf_test.rs | 0 .../pos/crypto/crypto/src/unit_tests/mod.rs | 0 .../src/unit_tests/multi_ed25519_test.rs | 0 .../crypto/src/unit_tests/noise_test.rs | 0 .../crypto/src/unit_tests/secp256k1_test.rs | 0 .../pos/crypto/crypto/src/vdf_sha3.rs | 0 .../src => }/pos/crypto/crypto/src/x25519.rs | 0 .../crypto/test_vectors/noise_cacophony.txt | 0 .../core/src => }/pos/secure/net/Cargo.toml | 6 +- .../core/src => }/pos/secure/net/src/lib.rs | 0 .../pos/secure/push-metrics/Cargo.toml | 9 +- .../pos/secure/push-metrics/src/lib.rs | 0 .../src => }/pos/secure/storage/Cargo.toml | 16 +-- .../src => }/pos/secure/storage/README.md | 0 .../pos/secure/storage/github/Cargo.toml | 7 +- .../pos/secure/storage/github/src/lib.rs | 0 .../secure/storage/src/crypto_kv_storage.rs | 0 .../pos/secure/storage/src/crypto_storage.rs | 0 .../src => }/pos/secure/storage/src/error.rs | 0 .../src => }/pos/secure/storage/src/github.rs | 0 .../pos/secure/storage/src/in_memory.rs | 0 .../pos/secure/storage/src/kv_storage.rs | 0 .../src => }/pos/secure/storage/src/lib.rs | 0 .../secure/storage/src/namespaced_storage.rs | 0 .../pos/secure/storage/src/on_disk.rs | 0 .../src => }/pos/secure/storage/src/policy.rs | 0 .../pos/secure/storage/src/storage.rs | 0 .../pos/secure/storage/src/tests/github.rs | 0 .../pos/secure/storage/src/tests/in_memory.rs | 0 .../pos/secure/storage/src/tests/mod.rs | 0 .../pos/secure/storage/src/tests/on_disk.rs | 0 .../pos/secure/storage/src/tests/suite.rs | 0 .../pos/secure/storage/src/tests/vault.rs | 0 .../src => }/pos/secure/storage/src/vault.rs | 0 .../pos/secure/storage/vault/Cargo.toml | 15 ++- .../pos/secure/storage/vault/src/dev.rs | 0 .../pos/secure/storage/vault/src/fuzzing.rs | 0 .../pos/secure/storage/vault/src/lib.rs | 0 .../core/src => }/pos/storage/README.md | 0 .../pos/storage/accumulator/Cargo.toml | 6 +- .../pos/storage/accumulator/src/lib.rs | 0 .../storage/accumulator/src/test_helpers.rs | 0 .../pos/storage/accumulator/src/tests/mod.rs | 0 .../accumulator/src/tests/proof_test.rs | 0 .../accumulator/src/tests/write_test.rs | 0 .../pos/storage/backup/backup-cli/Cargo.toml | 34 +++--- .../utils/stream/futures_unordered_x.txt | 0 .../src/backup_types/epoch_ending/backup.rs | 0 .../src/backup_types/epoch_ending/manifest.rs | 0 .../src/backup_types/epoch_ending/mod.rs | 0 .../src/backup_types/epoch_ending/restore.rs | 0 .../src/backup_types/epoch_ending/tests.rs | 0 .../backup/backup-cli/src/backup_types/mod.rs | 0 .../src/backup_types/state_snapshot/backup.rs | 0 .../backup_types/state_snapshot/manifest.rs | 0 .../src/backup_types/state_snapshot/mod.rs | 0 .../backup_types/state_snapshot/restore.rs | 0 .../src/backup_types/state_snapshot/tests.rs | 0 .../backup-cli/src/backup_types/tests.rs | 0 .../src/backup_types/transaction/backup.rs | 0 .../src/backup_types/transaction/manifest.rs | 0 .../src/backup_types/transaction/mod.rs | 0 .../src/backup_types/transaction/restore.rs | 0 .../src/backup_types/transaction/tests.rs | 0 .../backup-cli/src/bin/db-backup-verify.rs | 0 .../backup/backup-cli/src/bin/db-backup.rs | 0 .../backup/backup-cli/src/bin/db-restore.rs | 0 .../backup-cli/src/coordinators/backup.rs | 0 .../backup/backup-cli/src/coordinators/mod.rs | 0 .../backup-cli/src/coordinators/restore.rs | 0 .../backup-cli/src/coordinators/verify.rs | 0 .../pos/storage/backup/backup-cli/src/lib.rs | 0 .../backup/backup-cli/src/metadata/cache.rs | 0 .../backup/backup-cli/src/metadata/mod.rs | 0 .../backup/backup-cli/src/metadata/view.rs | 0 .../backup/backup-cli/src/metrics/backup.rs | 0 .../backup/backup-cli/src/metrics/metadata.rs | 0 .../backup/backup-cli/src/metrics/mod.rs | 0 .../backup/backup-cli/src/metrics/restore.rs | 0 .../backup/backup-cli/src/metrics/verify.rs | 0 .../storage/command_adapter/azure.sample.toml | 0 .../src/storage/command_adapter/command.rs | 0 .../src/storage/command_adapter/config.rs | 0 .../storage/command_adapter/gcp.sample.toml | 0 .../command_adapter/local_folder.sample.toml | 0 .../src/storage/command_adapter/mod.rs | 0 .../storage/command_adapter/s3.sample.toml | 0 .../src/storage/command_adapter/tests.rs | 0 .../backup-cli/src/storage/local_fs/mod.rs | 0 .../backup-cli/src/storage/local_fs/tests.rs | 0 .../backup/backup-cli/src/storage/mod.rs | 0 .../backup-cli/src/storage/test_util.rs | 0 .../backup/backup-cli/src/storage/tests.rs | 0 .../src/utils/backup_service_client.rs | 0 .../backup-cli/src/utils/error_notes.rs | 0 .../backup/backup-cli/src/utils/mod.rs | 0 .../backup-cli/src/utils/read_record_bytes.rs | 0 .../backup-cli/src/utils/storage_ext.rs | 0 .../backup-cli/src/utils/stream/buffered_x.rs | 0 .../src/utils/stream/futures_ordered_x.rs | 0 .../src/utils/stream/futures_unordered_x.rs | 0 .../backup/backup-cli/src/utils/stream/mod.rs | 0 .../backup/backup-cli/src/utils/test_utils.rs | 0 .../storage/backup/backup-service/Cargo.toml | 23 ++-- .../backup/backup-service/src/handlers/mod.rs | 0 .../backup-service/src/handlers/utils.rs | 0 .../storage/backup/backup-service/src/lib.rs | 0 .../storage/cached-pos-ledger-db/Cargo.toml | 17 +++ .../storage/cached-pos-ledger-db/src/lib.rs | 0 .../cached-pos-ledger-db/src/logging.rs | 0 .../src/speculation_cache/mod.rs | 0 .../src/speculation_cache/test.rs | 0 .../core/src => }/pos/storage/data.png | Bin .../pos/storage/diemdb-benchmark/Cargo.toml | 10 +- .../pos/storage/diemdb-benchmark/src/lib.rs | 0 .../pos/storage/diemdb-benchmark/src/main.rs | 0 .../src => }/pos/storage/diemsum/Cargo.toml | 8 +- .../src => }/pos/storage/diemsum/src/main.rs | 0 .../src => }/pos/storage/inspector/Cargo.toml | 12 +- .../pos/storage/inspector/src/main.rs | 0 .../pos/storage/jellyfish-merkle/Cargo.toml | 27 +++-- .../restore/restore_test.txt | 0 .../src/iterator/iterator_test.rs | 0 .../jellyfish-merkle/src/iterator/mod.rs | 0 .../src/jellyfish_merkle_test.rs | 0 .../pos/storage/jellyfish-merkle/src/lib.rs | 0 .../storage/jellyfish-merkle/src/metrics.rs | 0 .../jellyfish-merkle/src/mock_tree_store.rs | 0 .../jellyfish-merkle/src/nibble_path/mod.rs | 0 .../src/nibble_path/nibble_path_test.rs | 0 .../jellyfish-merkle/src/node_type/mod.rs | 0 .../src/node_type/node_type_test.rs | 0 .../jellyfish-merkle/src/restore/mod.rs | 0 .../src/restore/restore_test.rs | 0 .../jellyfish-merkle/src/test_helper.rs | 0 .../jellyfish-merkle/src/tree_cache/mod.rs | 0 .../src/tree_cache/tree_cache_test.rs | 0 crates/pos/storage/pos-ledger-db/Cargo.toml | 64 ++++++++++ .../proptest-regressions/diemdb_test.txt | 0 .../ledger_store/ledger_info_test.txt | 0 .../src/backup/backup_handler.rs | 0 .../storage/pos-ledger-db/src/backup/mod.rs | 0 .../src/backup/restore_handler.rs | 0 .../storage/pos-ledger-db/src/backup/test.rs | 0 .../storage/pos-ledger-db/src/change_set.rs | 0 .../storage/pos-ledger-db/src/diemdb_test.rs | 0 .../storage/pos-ledger-db/src/diemsum/mod.rs | 0 .../pos/storage/pos-ledger-db/src/errors.rs | 0 .../pos-ledger-db/src/event_store/mod.rs | 0 .../pos-ledger-db/src/event_store/test.rs | 0 .../pos-ledger-db/src/ledger_counters/mod.rs | 0 .../pos-ledger-db/src/ledger_counters/test.rs | 0 .../src/ledger_store/ledger_info_test.rs | 0 .../pos-ledger-db/src/ledger_store/mod.rs | 0 .../src/ledger_store/transaction_info_test.rs | 0 .../pos/storage/pos-ledger-db/src/lib.rs | 0 .../pos/storage/pos-ledger-db/src/metrics.rs | 0 .../storage/pos-ledger-db/src/pruner/mod.rs | 0 .../storage/pos-ledger-db/src/pruner/test.rs | 0 .../schema/block_by_epoch_and_round/mod.rs | 0 .../src/schema/committed_block/mod.rs | 0 .../src/schema/committed_block_by_view/mod.rs | 0 .../src/schema/epoch_by_version/mod.rs | 0 .../src/schema/epoch_by_version/test.rs | 0 .../pos-ledger-db/src/schema/event/mod.rs | 0 .../pos-ledger-db/src/schema/event/test.rs | 0 .../src/schema/event_accumulator/mod.rs | 0 .../src/schema/event_accumulator/test.rs | 0 .../src/schema/event_by_key/mod.rs | 0 .../src/schema/event_by_key/test.rs | 0 .../src/schema/event_by_version/mod.rs | 0 .../src/schema/event_by_version/test.rs | 0 .../src/schema/jellyfish_merkle_node/mod.rs | 0 .../src/schema/jellyfish_merkle_node/test.rs | 0 .../src/schema/ledger_counters/mod.rs | 0 .../src/schema/ledger_counters/test.rs | 0 .../src/schema/ledger_info/mod.rs | 0 .../src/schema/ledger_info/test.rs | 0 .../src/schema/ledger_info_by_block/mod.rs | 0 .../src/schema/ledger_info_by_block/test.rs | 0 .../schema/ledger_info_by_voted_block/mod.rs | 0 .../storage/pos-ledger-db/src/schema/mod.rs | 0 .../pos-ledger-db/src/schema/pos_state/mod.rs | 0 .../src/schema/pos_state/test.rs | 0 .../src/schema/reward_event/mod.rs | 0 .../src/schema/stale_node_index/mod.rs | 0 .../src/schema/stale_node_index/test.rs | 0 .../src/schema/transaction/mod.rs | 0 .../src/schema/transaction/test.rs | 0 .../src/schema/transaction_accumulator/mod.rs | 0 .../schema/transaction_accumulator/test.rs | 0 .../src/schema/transaction_by_account/mod.rs | 0 .../src/schema/transaction_by_account/test.rs | 0 .../src/schema/transaction_info/mod.rs | 0 .../src/schema/transaction_info/test.rs | 0 .../pos-ledger-db/src/state_store/mod.rs | 0 .../src/state_store/state_store_test.rs | 0 .../pos-ledger-db/src/system_store/mod.rs | 0 .../pos-ledger-db/src/system_store/test.rs | 0 .../storage/pos-ledger-db/src/test_helper.rs | 0 .../src/transaction_store/mod.rs | 0 .../src/transaction_store/test.rs | 0 .../src => }/pos/storage/schemadb/Cargo.toml | 8 +- .../src => }/pos/storage/schemadb/src/lib.rs | 0 .../pos/storage/schemadb/src/metrics.rs | 0 .../pos/storage/schemadb/src/schema.rs | 0 .../src => }/pos/storage/schemadb/tests/db.rs | 0 .../pos/storage/schemadb/tests/iterator.rs | 0 .../pos/storage/scratchpad/Cargo.toml | 6 +- .../pos/storage/scratchpad/src/lib.rs | 0 .../scratchpad/src/sparse_merkle/mod.rs | 0 .../scratchpad/src/sparse_merkle/node.rs | 0 .../src/sparse_merkle/sparse_merkle_test.rs | 0 .../pos/storage/state-view/Cargo.toml | 4 +- .../pos/storage/state-view/src/lib.rs | 0 .../pos/storage/storage-client/Cargo.toml | 12 +- .../pos/storage/storage-client/src/lib.rs | 0 .../pos/storage/storage-interface/Cargo.toml | 12 +- .../pos/storage/storage-interface/src/lib.rs | 0 .../pos/storage/storage-interface/src/mock.rs | 0 .../storage-interface/src/state_view.rs | 0 .../pos/storage/storage-service/Cargo.toml | 24 ++-- .../storage_service_test.txt | 0 .../pos/storage/storage-service/src/lib.rs | 0 .../src/storage_service_test.rs | 0 .../pos/types/executor-types/Cargo.toml | 10 +- .../pos/types/executor-types/src/error.rs | 0 .../pos/types/executor-types/src/lib.rs | 0 .../executor-types/src/processed_vm_output.rs | 0 .../pos/types/move-core-types/Cargo.toml | 0 .../move-core-types/src/account_address.rs | 0 .../pos/types/move-core-types/src/effects.rs | 0 .../types/move-core-types/src/gas_schedule.rs | 0 .../types/move-core-types/src/identifier.rs | 0 .../move-core-types/src/language_storage.rs | 0 .../pos/types/move-core-types/src/lib.rs | 0 .../move-core-types/src/move_resource.rs | 0 .../pos/types/move-core-types/src/parser.rs | 0 .../move-core-types/src/proptest_types.rs | 0 .../src/transaction_argument.rs | 0 .../src/unit_tests/identifier_test.rs | 0 .../src/unit_tests/language_storage_test.rs | 0 .../move-core-types/src/unit_tests/mod.rs | 0 .../pos/types/move-core-types/src/value.rs | 0 .../types/move-core-types/src/vm_status.rs | 0 .../src => }/pos/types/pow-types/Cargo.toml | 0 .../src => }/pos/types/pow-types/src/lib.rs | 0 .../src/pos => pos/types}/types/Cargo.toml | 25 ++-- .../types}/types/src/access_path.rs | 0 .../types}/types/src/account_address.rs | 0 .../src/account_config/constants/account.rs | 0 .../src/account_config/constants/addresses.rs | 0 .../src/account_config/constants/coins.rs | 0 .../src/account_config/constants/diem.rs | 0 .../src/account_config/constants/event.rs | 0 .../types/src/account_config/constants/mod.rs | 0 .../types}/types/src/account_config/mod.rs | 0 .../src/account_config/resources/account.rs | 0 .../src/account_config/resources/balance.rs | 0 .../src/account_config/resources/chain_id.rs | 0 .../account_config/resources/currency_info.rs | 0 .../resources/designated_dealer.rs | 0 .../resources/dual_attestation.rs | 0 .../account_config/resources/freezing_bit.rs | 0 .../resources/key_rotation_capability.rs | 0 .../types/src/account_config/resources/mod.rs | 0 .../resources/preburn_balance.rs | 0 .../account_config/resources/preburn_queue.rs | 0 .../resources/preburn_with_metadata.rs | 0 .../src/account_config/resources/role.rs | 0 .../src/account_config/resources/role_id.rs | 0 .../src/account_config/resources/vasp.rs | 0 .../resources/withdraw_capability.rs | 0 .../types}/types/src/account_state.rs | 0 .../types}/types/src/account_state_blob.rs | 0 .../types}/types/src/bin/lock_status_tests.rs | 0 .../pos => pos/types}/types/src/block_info.rs | 0 .../types}/types/src/block_metadata.rs | 0 .../pos => pos/types}/types/src/chain_id.rs | 0 .../types}/types/src/committed_block.rs | 0 .../types}/types/src/contract_event.rs | 0 .../types}/types/src/diem_timestamp.rs | 0 .../types}/types/src/epoch_change.rs | 0 .../types}/types/src/epoch_state.rs | 0 .../src/pos => pos/types}/types/src/event.rs | 0 .../types}/types/src/ledger_info.rs | 0 .../src/pos => pos/types}/types/src/lib.rs | 0 .../types}/types/src/mempool_status.rs | 0 .../types}/types/src/move_resource.rs | 0 .../types/src/network_address/encrypted.rs | 0 .../types}/types/src/network_address/mod.rs | 0 .../types/src/on_chain_config/diem_version.rs | 0 .../types}/types/src/on_chain_config/mod.rs | 0 .../on_chain_config/registered_currencies.rs | 0 .../src/on_chain_config/validator_set.rs | 0 .../types/src/on_chain_config/vm_config.rs | 0 .../on_chain_config/vm_publishing_option.rs | 0 .../src/proof/accumulator/accumulator_test.rs | 0 .../types}/types/src/proof/accumulator/mod.rs | 0 .../types}/types/src/proof/definition.rs | 0 .../pos => pos/types}/types/src/proof/mod.rs | 0 .../types}/types/src/proof/position/mod.rs | 0 .../types/src/proof/position/position_test.rs | 0 .../types}/types/src/proof/proptest_proof.rs | 0 .../types}/types/src/proof/unit_tests/mod.rs | 0 .../proof/unit_tests/proof_conversion_test.rs | 0 .../types/src/proof/unit_tests/proof_test.rs | 0 .../types}/types/src/proptest_types.rs | 0 .../types/src/reward_distribution_event.rs | 0 .../types}/types/src/serde_helper/mod.rs | 0 .../types/src/serde_helper/vec_bytes.rs | 0 .../pos => pos/types}/types/src/term_state.rs | 0 .../types/src/term_state/lock_status.rs | 0 .../types/src/term_state/pos_state_config.rs | 0 .../types/src/test_helpers/empty_script.mv | Bin .../types}/types/src/test_helpers/mod.rs | 0 .../test_helpers/transaction_test_helpers.rs | 0 .../types/src/transaction/authenticator.rs | 0 .../types/src/transaction/change_set.rs | 0 .../types}/types/src/transaction/helpers.rs | 0 .../types}/types/src/transaction/metadata.rs | 0 .../types}/types/src/transaction/mod.rs | 0 .../types}/types/src/transaction/module.rs | 0 .../types}/types/src/transaction/script.rs | 0 .../src/transaction/transaction_argument.rs | 0 .../types}/types/src/trusted_state.rs | 0 .../types/src/unit_tests/access_path_test.rs | 0 .../src/unit_tests/block_metadata_test.rs | 0 .../canonical_serialization_examples.rs | 0 .../src/unit_tests/code_debug_fmt_test.rs | 0 .../src/unit_tests/contract_event_test.rs | 0 .../src/unit_tests/currency_code_test.rs | 0 .../types}/types/src/unit_tests/mod.rs | 0 .../types/src/unit_tests/transaction_test.rs | 0 .../src/unit_tests/trusted_state_test.rs | 0 .../src/unit_tests/validator_set_test.rs | 0 .../types/src/unit_tests/write_set_test.rs | 0 .../types}/types/src/validator_config.rs | 0 .../types}/types/src/validator_info.rs | 0 .../types}/types/src/validator_signer.rs | 0 .../types}/types/src/validator_verifier.rs | 0 .../pos => pos/types}/types/src/vm_status.rs | 0 .../pos => pos/types}/types/src/waypoint.rs | 0 .../pos => pos/types}/types/src/write_set.rs | 0 616 files changed, 591 insertions(+), 451 deletions(-) delete mode 100644 crates/cfxcore/core/src/pos/consensus/executor/Cargo.toml delete mode 100644 crates/cfxcore/core/src/pos/consensus/safety-rules/Cargo.toml delete mode 100644 crates/cfxcore/core/src/pos/storage/cached-pos-ledger-db/Cargo.toml delete mode 100644 crates/cfxcore/core/src/pos/storage/pos-ledger-db/Cargo.toml rename crates/{cfxcore/core/src => }/pos/common/bounded-executor/Cargo.toml (100%) rename crates/{cfxcore/core/src => }/pos/common/bounded-executor/src/lib.rs (100%) rename crates/{cfxcore/core/src => }/pos/common/channel/Cargo.toml (76%) rename crates/{cfxcore/core/src => }/pos/common/channel/many-keys-stress-test/Cargo.toml (100%) rename crates/{cfxcore/core/src => }/pos/common/channel/many-keys-stress-test/src/main.rs (100%) rename crates/{cfxcore/core/src => }/pos/common/channel/src/diem_channel.rs (100%) rename crates/{cfxcore/core/src => }/pos/common/channel/src/diem_channel_test.rs (100%) rename crates/{cfxcore/core/src => }/pos/common/channel/src/lib.rs (100%) rename crates/{cfxcore/core/src => }/pos/common/channel/src/message_queues.rs (100%) rename crates/{cfxcore/core/src => }/pos/common/channel/src/message_queues_test.rs (100%) rename crates/{cfxcore/core/src => }/pos/common/channel/src/test.rs (100%) rename crates/{cfxcore/core/src => }/pos/common/crash-handler/Cargo.toml (91%) rename crates/{cfxcore/core/src => }/pos/common/crash-handler/src/lib.rs (100%) rename crates/{cfxcore/core/src => }/pos/common/fallible/Cargo.toml (100%) rename crates/{cfxcore/core/src => }/pos/common/fallible/src/copy_from_slice.rs (100%) rename crates/{cfxcore/core/src => }/pos/common/fallible/src/lib.rs (100%) rename crates/{cfxcore/core/src => }/pos/common/infallible/Cargo.toml (100%) rename crates/{cfxcore/core/src => }/pos/common/infallible/src/lib.rs (100%) rename crates/{cfxcore/core/src => }/pos/common/infallible/src/math.rs (100%) rename crates/{cfxcore/core/src => }/pos/common/infallible/src/mutex.rs (100%) rename crates/{cfxcore/core/src => }/pos/common/infallible/src/nonzero.rs (100%) rename crates/{cfxcore/core/src => }/pos/common/infallible/src/rwlock.rs (100%) rename crates/{cfxcore/core/src => }/pos/common/infallible/src/time.rs (100%) rename crates/{cfxcore/core/src => }/pos/common/logger/Cargo.toml (95%) rename crates/{cfxcore/core/src => }/pos/common/logger/derive/Cargo.toml (100%) rename crates/{cfxcore/core/src => }/pos/common/logger/derive/src/lib.rs (100%) rename crates/{cfxcore/core/src => }/pos/common/logger/src/counters.rs (100%) rename crates/{cfxcore/core/src => }/pos/common/logger/src/diem_logger.rs (100%) rename crates/{cfxcore/core/src => }/pos/common/logger/src/event.rs (100%) rename crates/{cfxcore/core/src => }/pos/common/logger/src/filter.rs (100%) rename crates/{cfxcore/core/src => }/pos/common/logger/src/json_log.rs (100%) rename crates/{cfxcore/core/src => }/pos/common/logger/src/kv.rs (100%) rename crates/{cfxcore/core/src => }/pos/common/logger/src/lib.rs (100%) rename crates/{cfxcore/core/src => }/pos/common/logger/src/logger.rs (100%) rename crates/{cfxcore/core/src => }/pos/common/logger/src/macros.rs (100%) rename crates/{cfxcore/core/src => }/pos/common/logger/src/metadata.rs (100%) rename crates/{cfxcore/core/src => }/pos/common/logger/src/sample.rs (100%) rename crates/{cfxcore/core/src => }/pos/common/logger/src/security.rs (100%) rename crates/{cfxcore/core/src => }/pos/common/logger/src/struct_log.rs (100%) rename crates/{cfxcore/core/src => }/pos/common/logger/tests/derive.rs (100%) rename crates/{cfxcore/core/src => }/pos/common/logger/tests/logger.rs (100%) rename crates/{cfxcore/core/src => }/pos/common/logger/tests/logger_custom_format.rs (100%) rename crates/{cfxcore/core/src => }/pos/common/logger/tests/remote.rs (100%) rename crates/{cfxcore/core/src => }/pos/common/metrics-core/Cargo.toml (100%) rename crates/{cfxcore/core/src => }/pos/common/metrics-core/src/lib.rs (100%) rename crates/{cfxcore/core/src => }/pos/common/metrics/Cargo.toml (87%) rename crates/{cfxcore/core/src => }/pos/common/metrics/build.rs (100%) rename crates/{cfxcore/core/src => }/pos/common/metrics/src/json_encoder.rs (100%) rename crates/{cfxcore/core/src => }/pos/common/metrics/src/json_metrics.rs (100%) rename crates/{cfxcore/core/src => }/pos/common/metrics/src/lib.rs (100%) rename crates/{cfxcore/core/src => }/pos/common/metrics/src/metric_server.rs (100%) rename crates/{cfxcore/core/src => }/pos/common/metrics/src/op_counters.rs (100%) rename crates/{cfxcore/core/src => }/pos/common/metrics/src/public_metrics.rs (100%) rename crates/{cfxcore/core/src => }/pos/common/metrics/src/unit_tests/lib_test.rs (100%) rename crates/{cfxcore/core/src => }/pos/common/metrics/src/unit_tests/mod.rs (100%) rename crates/{cfxcore/core/src => }/pos/common/nibble/Cargo.toml (100%) rename crates/{cfxcore/core/src => }/pos/common/nibble/src/lib.rs (100%) rename crates/{cfxcore/core/src => }/pos/common/num-variants/Cargo.toml (100%) rename crates/{cfxcore/core/src => }/pos/common/num-variants/src/lib.rs (100%) rename crates/{cfxcore/core/src => }/pos/common/num-variants/tests/basic.rs (100%) rename crates/{cfxcore/core/src => }/pos/common/proptest-helpers/Cargo.toml (100%) rename crates/{cfxcore/core/src => }/pos/common/proptest-helpers/proptest-regressions/unit_tests/growing_subset_tests.txt (100%) rename crates/{cfxcore/core/src => }/pos/common/proptest-helpers/proptest-regressions/unit_tests/repeat_vec_tests.txt (100%) rename crates/{cfxcore/core/src => }/pos/common/proptest-helpers/src/growing_subset.rs (100%) rename crates/{cfxcore/core/src => }/pos/common/proptest-helpers/src/lib.rs (100%) rename crates/{cfxcore/core/src => }/pos/common/proptest-helpers/src/repeat_vec.rs (100%) rename crates/{cfxcore/core/src => }/pos/common/proptest-helpers/src/unit_tests.rs (100%) rename crates/{cfxcore/core/src => }/pos/common/proptest-helpers/src/unit_tests/growing_subset_tests.rs (100%) rename crates/{cfxcore/core/src => }/pos/common/proptest-helpers/src/unit_tests/pick_idx_tests.rs (100%) rename crates/{cfxcore/core/src => }/pos/common/proptest-helpers/src/unit_tests/repeat_vec_tests.rs (100%) rename crates/{cfxcore/core/src => }/pos/common/proptest-helpers/src/value_generator.rs (100%) rename crates/{cfxcore/core/src => }/pos/common/proxy/Cargo.toml (100%) rename crates/{cfxcore/core/src => }/pos/common/proxy/src/lib.rs (100%) rename crates/{cfxcore/core/src => }/pos/common/short-hex-str/Cargo.toml (100%) rename crates/{cfxcore/core/src => }/pos/common/short-hex-str/src/lib.rs (100%) rename crates/{cfxcore/core/src => }/pos/common/subscription-service/Cargo.toml (90%) rename crates/{cfxcore/core/src => }/pos/common/subscription-service/src/lib.rs (100%) rename crates/{cfxcore/core/src => }/pos/common/temppath/Cargo.toml (100%) rename crates/{cfxcore/core/src => }/pos/common/temppath/src/lib.rs (100%) rename crates/{cfxcore/core/src => }/pos/common/time-service/Cargo.toml (82%) rename crates/{cfxcore/core/src => }/pos/common/time-service/src/interval.rs (100%) rename crates/{cfxcore/core/src => }/pos/common/time-service/src/lib.rs (100%) rename crates/{cfxcore/core/src => }/pos/common/time-service/src/mock.rs (100%) rename crates/{cfxcore/core/src => }/pos/common/time-service/src/real.rs (100%) rename crates/{cfxcore/core/src => }/pos/common/time-service/src/timeout.rs (100%) rename crates/{cfxcore/core/src => }/pos/config/README.md (100%) rename crates/{cfxcore/core/src/pos => pos/config}/config/Cargo.toml (57%) rename crates/{cfxcore/core/src/pos => pos/config}/config/data/metrics/prometheus.yml (100%) rename crates/{cfxcore/core/src/pos => pos/config}/config/src/config/consensus_config.rs (100%) rename crates/{cfxcore/core/src/pos => pos/config}/config/src/config/debug_interface_config.rs (100%) rename crates/{cfxcore/core/src/pos => pos/config}/config/src/config/error.rs (100%) rename crates/{cfxcore/core/src/pos => pos/config}/config/src/config/execution_config.rs (100%) rename crates/{cfxcore/core/src/pos => pos/config}/config/src/config/json_rpc_config.rs (100%) rename crates/{cfxcore/core/src/pos => pos/config}/config/src/config/key_manager_config.rs (100%) rename crates/{cfxcore/core/src/pos => pos/config}/config/src/config/logger_config.rs (100%) rename crates/{cfxcore/core/src/pos => pos/config}/config/src/config/mempool_config.rs (100%) rename crates/{cfxcore/core/src/pos => pos/config}/config/src/config/metrics_config.rs (100%) rename crates/{cfxcore/core/src/pos => pos/config}/config/src/config/mod.rs (100%) rename crates/{cfxcore/core/src/pos => pos/config}/config/src/config/network_config.rs (100%) rename crates/{cfxcore/core/src/pos => pos/config}/config/src/config/safety_rules_config.rs (100%) rename crates/{cfxcore/core/src/pos => pos/config}/config/src/config/secure_backend_config.rs (100%) rename crates/{cfxcore/core/src/pos => pos/config}/config/src/config/state_sync_config.rs (100%) rename crates/{cfxcore/core/src/pos => pos/config}/config/src/config/storage_config.rs (100%) rename crates/{cfxcore/core/src/pos => pos/config}/config/src/config/test_config.rs (100%) rename crates/{cfxcore/core/src/pos => pos/config}/config/src/config/test_data/public_full_node.yaml (100%) rename crates/{cfxcore/core/src/pos => pos/config}/config/src/config/test_data/safety_rules.yaml (100%) rename crates/{cfxcore/core/src/pos => pos/config}/config/src/config/test_data/validator.yaml (100%) rename crates/{cfxcore/core/src/pos => pos/config}/config/src/config/test_data/validator_full_node.yaml (100%) rename crates/{cfxcore/core/src/pos => pos/config}/config/src/config/upstream_config.rs (100%) rename crates/{cfxcore/core/src/pos => pos/config}/config/src/generator.rs (100%) rename crates/{cfxcore/core/src/pos => pos/config}/config/src/keys.rs (100%) rename crates/{cfxcore/core/src/pos => pos/config}/config/src/lib.rs (100%) rename crates/{cfxcore/core/src/pos => pos/config}/config/src/network_id.rs (100%) rename crates/{cfxcore/core/src/pos => pos/config}/config/src/utils.rs (100%) rename crates/{cfxcore/core/src/pos/consensus => pos/config}/consensus-types/Cargo.toml (59%) rename crates/{cfxcore/core/src/pos/consensus => pos/config}/consensus-types/src/block.rs (100%) rename crates/{cfxcore/core/src/pos/consensus => pos/config}/consensus-types/src/block_data.rs (100%) rename crates/{cfxcore/core/src/pos/consensus => pos/config}/consensus-types/src/block_retrieval.rs (100%) rename crates/{cfxcore/core/src/pos/consensus => pos/config}/consensus-types/src/block_test.rs (100%) rename crates/{cfxcore/core/src/pos/consensus => pos/config}/consensus-types/src/block_test_utils.rs (100%) rename crates/{cfxcore/core/src/pos/consensus => pos/config}/consensus-types/src/common.rs (100%) rename crates/{cfxcore/core/src/pos/consensus => pos/config}/consensus-types/src/db.rs (100%) rename crates/{cfxcore/core/src/pos/consensus => pos/config}/consensus-types/src/epoch_retrieval.rs (100%) rename crates/{cfxcore/core/src/pos/consensus => pos/config}/consensus-types/src/executed_block.rs (100%) rename crates/{cfxcore/core/src/pos/consensus => pos/config}/consensus-types/src/lib.rs (100%) rename crates/{cfxcore/core/src/pos/consensus => pos/config}/consensus-types/src/proposal_msg.rs (100%) rename crates/{cfxcore/core/src/pos/consensus => pos/config}/consensus-types/src/quorum_cert.rs (100%) rename crates/{cfxcore/core/src/pos/consensus => pos/config}/consensus-types/src/safety_data.rs (100%) rename crates/{cfxcore/core/src/pos/consensus => pos/config}/consensus-types/src/sync_info.rs (100%) rename crates/{cfxcore/core/src/pos/consensus => pos/config}/consensus-types/src/timeout.rs (100%) rename crates/{cfxcore/core/src/pos/consensus => pos/config}/consensus-types/src/timeout_certificate.rs (100%) rename crates/{cfxcore/core/src/pos/consensus => pos/config}/consensus-types/src/vote.rs (100%) rename crates/{cfxcore/core/src/pos/consensus => pos/config}/consensus-types/src/vote_data.rs (100%) rename crates/{cfxcore/core/src/pos/consensus => pos/config}/consensus-types/src/vote_msg.rs (100%) rename crates/{cfxcore/core/src/pos/consensus => pos/config}/consensus-types/src/vote_proposal.rs (100%) rename crates/{cfxcore/core/src => }/pos/config/generate-key/Cargo.toml (76%) rename crates/{cfxcore/core/src => }/pos/config/generate-key/src/lib.rs (100%) rename crates/{cfxcore/core/src => }/pos/config/generate-key/src/main.rs (100%) rename crates/{cfxcore/core/src => }/pos/config/global-constants/Cargo.toml (100%) rename crates/{cfxcore/core/src => }/pos/config/global-constants/src/lib.rs (100%) rename crates/{cfxcore/core/src => }/pos/config/management/Cargo.toml (61%) rename crates/{cfxcore/core/src => }/pos/config/management/README.md (100%) rename crates/{cfxcore/core/src => }/pos/config/management/genesis/Cargo.toml (50%) rename crates/{cfxcore/core/src => }/pos/config/management/genesis/README.md (100%) rename crates/{cfxcore/core/src => }/pos/config/management/genesis/src/command.rs (100%) rename crates/{cfxcore/core/src => }/pos/config/management/genesis/src/config_builder.rs (100%) rename crates/{cfxcore/core/src => }/pos/config/management/genesis/src/genesis.rs (100%) rename crates/{cfxcore/core/src => }/pos/config/management/genesis/src/key.rs (100%) rename crates/{cfxcore/core/src => }/pos/config/management/genesis/src/layout.rs (100%) rename crates/{cfxcore/core/src => }/pos/config/management/genesis/src/lib.rs (100%) rename crates/{cfxcore/core/src => }/pos/config/management/genesis/src/main.rs (100%) rename crates/{cfxcore/core/src => }/pos/config/management/genesis/src/storage_helper.rs (100%) rename crates/{cfxcore/core/src => }/pos/config/management/genesis/src/swarm_config.rs (100%) rename crates/{cfxcore/core/src => }/pos/config/management/genesis/src/validator_config.rs (100%) rename crates/{cfxcore/core/src => }/pos/config/management/genesis/src/validator_operator.rs (100%) rename crates/{cfxcore/core/src => }/pos/config/management/genesis/src/verify.rs (100%) rename crates/{cfxcore/core/src => }/pos/config/management/genesis/src/waypoint.rs (100%) rename crates/{cfxcore/core/src => }/pos/config/management/network-address-encryption/Cargo.toml (64%) rename crates/{cfxcore/core/src => }/pos/config/management/network-address-encryption/src/lib.rs (100%) rename crates/{cfxcore/core/src => }/pos/config/management/operational/Cargo.toml (63%) rename crates/{cfxcore/core/src => }/pos/config/management/operational/README.md (100%) rename crates/{cfxcore/core/src => }/pos/config/management/operational/src/account_resource.rs (100%) rename crates/{cfxcore/core/src => }/pos/config/management/operational/src/auto_validate.rs (100%) rename crates/{cfxcore/core/src => }/pos/config/management/operational/src/command.rs (100%) rename crates/{cfxcore/core/src => }/pos/config/management/operational/src/governance.rs (100%) rename crates/{cfxcore/core/src => }/pos/config/management/operational/src/json_rpc.rs (100%) rename crates/{cfxcore/core/src => }/pos/config/management/operational/src/keys.rs (100%) rename crates/{cfxcore/core/src => }/pos/config/management/operational/src/lib.rs (100%) rename crates/{cfxcore/core/src => }/pos/config/management/operational/src/main.rs (100%) rename crates/{cfxcore/core/src => }/pos/config/management/operational/src/network_checker.rs (100%) rename crates/{cfxcore/core/src => }/pos/config/management/operational/src/owner.rs (100%) rename crates/{cfxcore/core/src => }/pos/config/management/operational/src/print.rs (100%) rename crates/{cfxcore/core/src => }/pos/config/management/operational/src/test_helper.rs (100%) rename crates/{cfxcore/core/src => }/pos/config/management/operational/src/validate_transaction.rs (100%) rename crates/{cfxcore/core/src => }/pos/config/management/operational/src/validator_config.rs (100%) rename crates/{cfxcore/core/src => }/pos/config/management/operational/src/validator_set.rs (100%) rename crates/{cfxcore/core/src => }/pos/config/management/src/config.rs (100%) rename crates/{cfxcore/core/src => }/pos/config/management/src/error.rs (100%) rename crates/{cfxcore/core/src => }/pos/config/management/src/lib.rs (100%) rename crates/{cfxcore/core/src => }/pos/config/management/src/secure_backend.rs (100%) rename crates/{cfxcore/core/src => }/pos/config/management/src/storage.rs (100%) rename crates/{cfxcore/core/src => }/pos/config/management/src/transaction.rs (100%) rename crates/{cfxcore/core/src => }/pos/config/management/src/validator_config.rs (100%) rename crates/{cfxcore/core/src => }/pos/config/management/src/waypoint.rs (100%) rename crates/{cfxcore/core/src => }/pos/config/seed-peer-generator/Cargo.toml (55%) rename crates/{cfxcore/core/src => }/pos/config/seed-peer-generator/src/lib.rs (100%) rename crates/{cfxcore/core/src => }/pos/config/seed-peer-generator/src/main.rs (100%) rename crates/{cfxcore/core/src => }/pos/config/seed-peer-generator/src/utils.rs (100%) create mode 100644 crates/pos/consensus/executor/Cargo.toml rename crates/{cfxcore/core/src => }/pos/consensus/executor/src/db_bootstrapper.rs (100%) rename crates/{cfxcore/core/src => }/pos/consensus/executor/src/lib.rs (100%) rename crates/{cfxcore/core/src => }/pos/consensus/executor/src/logging.rs (100%) rename crates/{cfxcore/core/src => }/pos/consensus/executor/src/metrics.rs (100%) rename crates/{cfxcore/core/src => }/pos/consensus/executor/src/vm.rs (100%) create mode 100644 crates/pos/consensus/safety-rules/Cargo.toml rename crates/{cfxcore/core/src => }/pos/consensus/safety-rules/benches/safety_rules.rs (100%) rename crates/{cfxcore/core/src => }/pos/consensus/safety-rules/src/configurable_validator_signer.rs (100%) rename crates/{cfxcore/core/src => }/pos/consensus/safety-rules/src/consensus_state.rs (100%) rename crates/{cfxcore/core/src => }/pos/consensus/safety-rules/src/counters.rs (100%) rename crates/{cfxcore/core/src => }/pos/consensus/safety-rules/src/error.rs (100%) rename crates/{cfxcore/core/src => }/pos/consensus/safety-rules/src/fuzzing_utils.rs (100%) rename crates/{cfxcore/core/src => }/pos/consensus/safety-rules/src/lib.rs (100%) rename crates/{cfxcore/core/src => }/pos/consensus/safety-rules/src/local_client.rs (100%) rename crates/{cfxcore/core/src => }/pos/consensus/safety-rules/src/logging.rs (100%) rename crates/{cfxcore/core/src => }/pos/consensus/safety-rules/src/main.rs (100%) rename crates/{cfxcore/core/src => }/pos/consensus/safety-rules/src/persistent_safety_storage.rs (100%) rename crates/{cfxcore/core/src => }/pos/consensus/safety-rules/src/process.rs (100%) rename crates/{cfxcore/core/src => }/pos/consensus/safety-rules/src/remote_service.rs (100%) rename crates/{cfxcore/core/src => }/pos/consensus/safety-rules/src/safety_rules.rs (100%) rename crates/{cfxcore/core/src => }/pos/consensus/safety-rules/src/safety_rules_manager.rs (100%) rename crates/{cfxcore/core/src => }/pos/consensus/safety-rules/src/serializer.rs (100%) rename crates/{cfxcore/core/src => }/pos/consensus/safety-rules/src/t_safety_rules.rs (100%) rename crates/{cfxcore/core/src => }/pos/consensus/safety-rules/src/test_utils.rs (100%) rename crates/{cfxcore/core/src => }/pos/consensus/safety-rules/src/tests/local.rs (100%) rename crates/{cfxcore/core/src => }/pos/consensus/safety-rules/src/tests/mod.rs (100%) rename crates/{cfxcore/core/src => }/pos/consensus/safety-rules/src/tests/networking.rs (100%) rename crates/{cfxcore/core/src => }/pos/consensus/safety-rules/src/tests/safety_rules.rs (100%) rename crates/{cfxcore/core/src => }/pos/consensus/safety-rules/src/tests/serializer.rs (100%) rename crates/{cfxcore/core/src => }/pos/consensus/safety-rules/src/tests/suite.rs (100%) rename crates/{cfxcore/core/src => }/pos/consensus/safety-rules/src/tests/thread.rs (100%) rename crates/{cfxcore/core/src => }/pos/consensus/safety-rules/src/tests/vault.rs (100%) rename crates/{cfxcore/core/src => }/pos/consensus/safety-rules/src/thread.rs (100%) rename crates/{cfxcore/core/src => }/pos/consensus/safety-rules/tests/binary.rs (100%) rename crates/{cfxcore/core/src => }/pos/crypto/crypto-derive/Cargo.toml (100%) rename crates/{cfxcore/core/src => }/pos/crypto/crypto-derive/src/hasher.rs (100%) rename crates/{cfxcore/core/src => }/pos/crypto/crypto-derive/src/lib.rs (100%) rename crates/{cfxcore/core/src => }/pos/crypto/crypto-derive/src/unions.rs (100%) rename crates/{cfxcore/core/src => }/pos/crypto/crypto/Cargo.toml (95%) rename crates/{cfxcore/core/src => }/pos/crypto/crypto/README.md (100%) rename crates/{cfxcore/core/src => }/pos/crypto/crypto/benches/bls.rs (100%) rename crates/{cfxcore/core/src => }/pos/crypto/crypto/benches/ed25519.rs (100%) rename crates/{cfxcore/core/src => }/pos/crypto/crypto/benches/noise.rs (100%) rename crates/{cfxcore/core/src => }/pos/crypto/crypto/benches/vrf.rs (100%) rename crates/{cfxcore/core/src => }/pos/crypto/crypto/src/bls.rs (100%) rename crates/{cfxcore/core/src => }/pos/crypto/crypto/src/compat.rs (100%) rename crates/{cfxcore/core/src => }/pos/crypto/crypto/src/ec_vrf.rs (100%) rename crates/{cfxcore/core/src => }/pos/crypto/crypto/src/ed25519.rs (100%) rename crates/{cfxcore/core/src => }/pos/crypto/crypto/src/error.rs (100%) rename crates/{cfxcore/core/src => }/pos/crypto/crypto/src/hash.rs (100%) rename crates/{cfxcore/core/src => }/pos/crypto/crypto/src/hkdf.rs (100%) rename crates/{cfxcore/core/src => }/pos/crypto/crypto/src/key_file.rs (100%) rename crates/{cfxcore/core/src => }/pos/crypto/crypto/src/lib.rs (100%) rename crates/{cfxcore/core/src => }/pos/crypto/crypto/src/multi_bls.rs (100%) rename crates/{cfxcore/core/src => }/pos/crypto/crypto/src/multi_ed25519.rs (100%) rename crates/{cfxcore/core/src => }/pos/crypto/crypto/src/noise.rs (100%) rename crates/{cfxcore/core/src => }/pos/crypto/crypto/src/secp256k1.rs (100%) rename crates/{cfxcore/core/src => }/pos/crypto/crypto/src/tags.rs (100%) rename crates/{cfxcore/core/src => }/pos/crypto/crypto/src/test_utils.rs (100%) rename crates/{cfxcore/core/src => }/pos/crypto/crypto/src/traits.rs (100%) rename crates/{cfxcore/core/src => }/pos/crypto/crypto/src/unit_tests/bcs_test.rs (100%) rename crates/{cfxcore/core/src => }/pos/crypto/crypto/src/unit_tests/compat_test.rs (100%) rename crates/{cfxcore/core/src => }/pos/crypto/crypto/src/unit_tests/compilation/cross_test.rs (100%) rename crates/{cfxcore/core/src => }/pos/crypto/crypto/src/unit_tests/compilation/cross_test_trait_obj.rs (100%) rename crates/{cfxcore/core/src => }/pos/crypto/crypto/src/unit_tests/compilation/cross_test_trait_obj_pub.rs (100%) rename crates/{cfxcore/core/src => }/pos/crypto/crypto/src/unit_tests/compilation/cross_test_trait_obj_sig.rs (100%) rename crates/{cfxcore/core/src => }/pos/crypto/crypto/src/unit_tests/compilation/small_kdf.rs (100%) rename crates/{cfxcore/core/src => }/pos/crypto/crypto/src/unit_tests/cross_test.rs (100%) rename crates/{cfxcore/core/src => }/pos/crypto/crypto/src/unit_tests/cryptohasher.rs (100%) rename crates/{cfxcore/core/src => }/pos/crypto/crypto/src/unit_tests/ed25519_test.rs (100%) rename crates/{cfxcore/core/src => }/pos/crypto/crypto/src/unit_tests/hash_test.rs (100%) rename crates/{cfxcore/core/src => }/pos/crypto/crypto/src/unit_tests/hkdf_test.rs (100%) rename crates/{cfxcore/core/src => }/pos/crypto/crypto/src/unit_tests/mod.rs (100%) rename crates/{cfxcore/core/src => }/pos/crypto/crypto/src/unit_tests/multi_ed25519_test.rs (100%) rename crates/{cfxcore/core/src => }/pos/crypto/crypto/src/unit_tests/noise_test.rs (100%) rename crates/{cfxcore/core/src => }/pos/crypto/crypto/src/unit_tests/secp256k1_test.rs (100%) rename crates/{cfxcore/core/src => }/pos/crypto/crypto/src/vdf_sha3.rs (100%) rename crates/{cfxcore/core/src => }/pos/crypto/crypto/src/x25519.rs (100%) rename crates/{cfxcore/core/src => }/pos/crypto/crypto/test_vectors/noise_cacophony.txt (100%) rename crates/{cfxcore/core/src => }/pos/secure/net/Cargo.toml (75%) rename crates/{cfxcore/core/src => }/pos/secure/net/src/lib.rs (100%) rename crates/{cfxcore/core/src => }/pos/secure/push-metrics/Cargo.toml (59%) rename crates/{cfxcore/core/src => }/pos/secure/push-metrics/src/lib.rs (100%) rename crates/{cfxcore/core/src => }/pos/secure/storage/Cargo.toml (62%) rename crates/{cfxcore/core/src => }/pos/secure/storage/README.md (100%) rename crates/{cfxcore/core/src => }/pos/secure/storage/github/Cargo.toml (77%) rename crates/{cfxcore/core/src => }/pos/secure/storage/github/src/lib.rs (100%) rename crates/{cfxcore/core/src => }/pos/secure/storage/src/crypto_kv_storage.rs (100%) rename crates/{cfxcore/core/src => }/pos/secure/storage/src/crypto_storage.rs (100%) rename crates/{cfxcore/core/src => }/pos/secure/storage/src/error.rs (100%) rename crates/{cfxcore/core/src => }/pos/secure/storage/src/github.rs (100%) rename crates/{cfxcore/core/src => }/pos/secure/storage/src/in_memory.rs (100%) rename crates/{cfxcore/core/src => }/pos/secure/storage/src/kv_storage.rs (100%) rename crates/{cfxcore/core/src => }/pos/secure/storage/src/lib.rs (100%) rename crates/{cfxcore/core/src => }/pos/secure/storage/src/namespaced_storage.rs (100%) rename crates/{cfxcore/core/src => }/pos/secure/storage/src/on_disk.rs (100%) rename crates/{cfxcore/core/src => }/pos/secure/storage/src/policy.rs (100%) rename crates/{cfxcore/core/src => }/pos/secure/storage/src/storage.rs (100%) rename crates/{cfxcore/core/src => }/pos/secure/storage/src/tests/github.rs (100%) rename crates/{cfxcore/core/src => }/pos/secure/storage/src/tests/in_memory.rs (100%) rename crates/{cfxcore/core/src => }/pos/secure/storage/src/tests/mod.rs (100%) rename crates/{cfxcore/core/src => }/pos/secure/storage/src/tests/on_disk.rs (100%) rename crates/{cfxcore/core/src => }/pos/secure/storage/src/tests/suite.rs (100%) rename crates/{cfxcore/core/src => }/pos/secure/storage/src/tests/vault.rs (100%) rename crates/{cfxcore/core/src => }/pos/secure/storage/src/vault.rs (100%) rename crates/{cfxcore/core/src => }/pos/secure/storage/vault/Cargo.toml (62%) rename crates/{cfxcore/core/src => }/pos/secure/storage/vault/src/dev.rs (100%) rename crates/{cfxcore/core/src => }/pos/secure/storage/vault/src/fuzzing.rs (100%) rename crates/{cfxcore/core/src => }/pos/secure/storage/vault/src/lib.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/README.md (100%) rename crates/{cfxcore/core/src => }/pos/storage/accumulator/Cargo.toml (77%) rename crates/{cfxcore/core/src => }/pos/storage/accumulator/src/lib.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/accumulator/src/test_helpers.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/accumulator/src/tests/mod.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/accumulator/src/tests/proof_test.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/accumulator/src/tests/write_test.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/backup/backup-cli/Cargo.toml (56%) rename crates/{cfxcore/core/src => }/pos/storage/backup/backup-cli/proptest-regressions/utils/stream/futures_unordered_x.txt (100%) rename crates/{cfxcore/core/src => }/pos/storage/backup/backup-cli/src/backup_types/epoch_ending/backup.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/backup/backup-cli/src/backup_types/epoch_ending/manifest.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/backup/backup-cli/src/backup_types/epoch_ending/mod.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/backup/backup-cli/src/backup_types/epoch_ending/restore.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/backup/backup-cli/src/backup_types/epoch_ending/tests.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/backup/backup-cli/src/backup_types/mod.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/backup/backup-cli/src/backup_types/state_snapshot/backup.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/backup/backup-cli/src/backup_types/state_snapshot/manifest.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/backup/backup-cli/src/backup_types/state_snapshot/mod.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/backup/backup-cli/src/backup_types/state_snapshot/restore.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/backup/backup-cli/src/backup_types/state_snapshot/tests.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/backup/backup-cli/src/backup_types/tests.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/backup/backup-cli/src/backup_types/transaction/backup.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/backup/backup-cli/src/backup_types/transaction/manifest.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/backup/backup-cli/src/backup_types/transaction/mod.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/backup/backup-cli/src/backup_types/transaction/restore.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/backup/backup-cli/src/backup_types/transaction/tests.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/backup/backup-cli/src/bin/db-backup-verify.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/backup/backup-cli/src/bin/db-backup.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/backup/backup-cli/src/bin/db-restore.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/backup/backup-cli/src/coordinators/backup.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/backup/backup-cli/src/coordinators/mod.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/backup/backup-cli/src/coordinators/restore.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/backup/backup-cli/src/coordinators/verify.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/backup/backup-cli/src/lib.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/backup/backup-cli/src/metadata/cache.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/backup/backup-cli/src/metadata/mod.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/backup/backup-cli/src/metadata/view.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/backup/backup-cli/src/metrics/backup.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/backup/backup-cli/src/metrics/metadata.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/backup/backup-cli/src/metrics/mod.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/backup/backup-cli/src/metrics/restore.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/backup/backup-cli/src/metrics/verify.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/backup/backup-cli/src/storage/command_adapter/azure.sample.toml (100%) rename crates/{cfxcore/core/src => }/pos/storage/backup/backup-cli/src/storage/command_adapter/command.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/backup/backup-cli/src/storage/command_adapter/config.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/backup/backup-cli/src/storage/command_adapter/gcp.sample.toml (100%) rename crates/{cfxcore/core/src => }/pos/storage/backup/backup-cli/src/storage/command_adapter/local_folder.sample.toml (100%) rename crates/{cfxcore/core/src => }/pos/storage/backup/backup-cli/src/storage/command_adapter/mod.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/backup/backup-cli/src/storage/command_adapter/s3.sample.toml (100%) rename crates/{cfxcore/core/src => }/pos/storage/backup/backup-cli/src/storage/command_adapter/tests.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/backup/backup-cli/src/storage/local_fs/mod.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/backup/backup-cli/src/storage/local_fs/tests.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/backup/backup-cli/src/storage/mod.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/backup/backup-cli/src/storage/test_util.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/backup/backup-cli/src/storage/tests.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/backup/backup-cli/src/utils/backup_service_client.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/backup/backup-cli/src/utils/error_notes.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/backup/backup-cli/src/utils/mod.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/backup/backup-cli/src/utils/read_record_bytes.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/backup/backup-cli/src/utils/storage_ext.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/backup/backup-cli/src/utils/stream/buffered_x.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/backup/backup-cli/src/utils/stream/futures_ordered_x.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/backup/backup-cli/src/utils/stream/futures_unordered_x.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/backup/backup-cli/src/utils/stream/mod.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/backup/backup-cli/src/utils/test_utils.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/backup/backup-service/Cargo.toml (50%) rename crates/{cfxcore/core/src => }/pos/storage/backup/backup-service/src/handlers/mod.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/backup/backup-service/src/handlers/utils.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/backup/backup-service/src/lib.rs (100%) create mode 100644 crates/pos/storage/cached-pos-ledger-db/Cargo.toml rename crates/{cfxcore/core/src => }/pos/storage/cached-pos-ledger-db/src/lib.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/cached-pos-ledger-db/src/logging.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/cached-pos-ledger-db/src/speculation_cache/mod.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/cached-pos-ledger-db/src/speculation_cache/test.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/data.png (100%) rename crates/{cfxcore/core/src => }/pos/storage/diemdb-benchmark/Cargo.toml (68%) rename crates/{cfxcore/core/src => }/pos/storage/diemdb-benchmark/src/lib.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/diemdb-benchmark/src/main.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/diemsum/Cargo.toml (65%) rename crates/{cfxcore/core/src => }/pos/storage/diemsum/src/main.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/inspector/Cargo.toml (58%) rename crates/{cfxcore/core/src => }/pos/storage/inspector/src/main.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/jellyfish-merkle/Cargo.toml (55%) rename crates/{cfxcore/core/src => }/pos/storage/jellyfish-merkle/proptest-regressions/restore/restore_test.txt (100%) rename crates/{cfxcore/core/src => }/pos/storage/jellyfish-merkle/src/iterator/iterator_test.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/jellyfish-merkle/src/iterator/mod.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/jellyfish-merkle/src/jellyfish_merkle_test.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/jellyfish-merkle/src/lib.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/jellyfish-merkle/src/metrics.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/jellyfish-merkle/src/mock_tree_store.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/jellyfish-merkle/src/nibble_path/mod.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/jellyfish-merkle/src/nibble_path/nibble_path_test.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/jellyfish-merkle/src/node_type/mod.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/jellyfish-merkle/src/node_type/node_type_test.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/jellyfish-merkle/src/restore/mod.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/jellyfish-merkle/src/restore/restore_test.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/jellyfish-merkle/src/test_helper.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/jellyfish-merkle/src/tree_cache/mod.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/jellyfish-merkle/src/tree_cache/tree_cache_test.rs (100%) create mode 100644 crates/pos/storage/pos-ledger-db/Cargo.toml rename crates/{cfxcore/core/src => }/pos/storage/pos-ledger-db/proptest-regressions/diemdb_test.txt (100%) rename crates/{cfxcore/core/src => }/pos/storage/pos-ledger-db/proptest-regressions/ledger_store/ledger_info_test.txt (100%) rename crates/{cfxcore/core/src => }/pos/storage/pos-ledger-db/src/backup/backup_handler.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/pos-ledger-db/src/backup/mod.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/pos-ledger-db/src/backup/restore_handler.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/pos-ledger-db/src/backup/test.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/pos-ledger-db/src/change_set.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/pos-ledger-db/src/diemdb_test.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/pos-ledger-db/src/diemsum/mod.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/pos-ledger-db/src/errors.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/pos-ledger-db/src/event_store/mod.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/pos-ledger-db/src/event_store/test.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/pos-ledger-db/src/ledger_counters/mod.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/pos-ledger-db/src/ledger_counters/test.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/pos-ledger-db/src/ledger_store/ledger_info_test.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/pos-ledger-db/src/ledger_store/mod.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/pos-ledger-db/src/ledger_store/transaction_info_test.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/pos-ledger-db/src/lib.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/pos-ledger-db/src/metrics.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/pos-ledger-db/src/pruner/mod.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/pos-ledger-db/src/pruner/test.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/pos-ledger-db/src/schema/block_by_epoch_and_round/mod.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/pos-ledger-db/src/schema/committed_block/mod.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/pos-ledger-db/src/schema/committed_block_by_view/mod.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/pos-ledger-db/src/schema/epoch_by_version/mod.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/pos-ledger-db/src/schema/epoch_by_version/test.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/pos-ledger-db/src/schema/event/mod.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/pos-ledger-db/src/schema/event/test.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/pos-ledger-db/src/schema/event_accumulator/mod.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/pos-ledger-db/src/schema/event_accumulator/test.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/pos-ledger-db/src/schema/event_by_key/mod.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/pos-ledger-db/src/schema/event_by_key/test.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/pos-ledger-db/src/schema/event_by_version/mod.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/pos-ledger-db/src/schema/event_by_version/test.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/pos-ledger-db/src/schema/jellyfish_merkle_node/mod.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/pos-ledger-db/src/schema/jellyfish_merkle_node/test.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/pos-ledger-db/src/schema/ledger_counters/mod.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/pos-ledger-db/src/schema/ledger_counters/test.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/pos-ledger-db/src/schema/ledger_info/mod.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/pos-ledger-db/src/schema/ledger_info/test.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/pos-ledger-db/src/schema/ledger_info_by_block/mod.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/pos-ledger-db/src/schema/ledger_info_by_block/test.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/pos-ledger-db/src/schema/ledger_info_by_voted_block/mod.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/pos-ledger-db/src/schema/mod.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/pos-ledger-db/src/schema/pos_state/mod.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/pos-ledger-db/src/schema/pos_state/test.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/pos-ledger-db/src/schema/reward_event/mod.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/pos-ledger-db/src/schema/stale_node_index/mod.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/pos-ledger-db/src/schema/stale_node_index/test.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/pos-ledger-db/src/schema/transaction/mod.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/pos-ledger-db/src/schema/transaction/test.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/pos-ledger-db/src/schema/transaction_accumulator/mod.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/pos-ledger-db/src/schema/transaction_accumulator/test.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/pos-ledger-db/src/schema/transaction_by_account/mod.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/pos-ledger-db/src/schema/transaction_by_account/test.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/pos-ledger-db/src/schema/transaction_info/mod.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/pos-ledger-db/src/schema/transaction_info/test.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/pos-ledger-db/src/state_store/mod.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/pos-ledger-db/src/state_store/state_store_test.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/pos-ledger-db/src/system_store/mod.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/pos-ledger-db/src/system_store/test.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/pos-ledger-db/src/test_helper.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/pos-ledger-db/src/transaction_store/mod.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/pos-ledger-db/src/transaction_store/test.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/schemadb/Cargo.toml (68%) rename crates/{cfxcore/core/src => }/pos/storage/schemadb/src/lib.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/schemadb/src/metrics.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/schemadb/src/schema.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/schemadb/tests/db.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/schemadb/tests/iterator.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/scratchpad/Cargo.toml (75%) rename crates/{cfxcore/core/src => }/pos/storage/scratchpad/src/lib.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/scratchpad/src/sparse_merkle/mod.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/scratchpad/src/sparse_merkle/node.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/scratchpad/src/sparse_merkle/sparse_merkle_test.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/state-view/Cargo.toml (80%) rename crates/{cfxcore/core/src => }/pos/storage/state-view/src/lib.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/storage-client/Cargo.toml (56%) rename crates/{cfxcore/core/src => }/pos/storage/storage-client/src/lib.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/storage-interface/Cargo.toml (65%) rename crates/{cfxcore/core/src => }/pos/storage/storage-interface/src/lib.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/storage-interface/src/mock.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/storage-interface/src/state_view.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/storage-service/Cargo.toml (51%) rename crates/{cfxcore/core/src => }/pos/storage/storage-service/proptest-regressions/storage_service_test.txt (100%) rename crates/{cfxcore/core/src => }/pos/storage/storage-service/src/lib.rs (100%) rename crates/{cfxcore/core/src => }/pos/storage/storage-service/src/storage_service_test.rs (100%) rename crates/{cfxcore/core/src => }/pos/types/executor-types/Cargo.toml (66%) rename crates/{cfxcore/core/src => }/pos/types/executor-types/src/error.rs (100%) rename crates/{cfxcore/core/src => }/pos/types/executor-types/src/lib.rs (100%) rename crates/{cfxcore/core/src => }/pos/types/executor-types/src/processed_vm_output.rs (100%) rename crates/{cfxcore/core/src => }/pos/types/move-core-types/Cargo.toml (100%) rename crates/{cfxcore/core/src => }/pos/types/move-core-types/src/account_address.rs (100%) rename crates/{cfxcore/core/src => }/pos/types/move-core-types/src/effects.rs (100%) rename crates/{cfxcore/core/src => }/pos/types/move-core-types/src/gas_schedule.rs (100%) rename crates/{cfxcore/core/src => }/pos/types/move-core-types/src/identifier.rs (100%) rename crates/{cfxcore/core/src => }/pos/types/move-core-types/src/language_storage.rs (100%) rename crates/{cfxcore/core/src => }/pos/types/move-core-types/src/lib.rs (100%) rename crates/{cfxcore/core/src => }/pos/types/move-core-types/src/move_resource.rs (100%) rename crates/{cfxcore/core/src => }/pos/types/move-core-types/src/parser.rs (100%) rename crates/{cfxcore/core/src => }/pos/types/move-core-types/src/proptest_types.rs (100%) rename crates/{cfxcore/core/src => }/pos/types/move-core-types/src/transaction_argument.rs (100%) rename crates/{cfxcore/core/src => }/pos/types/move-core-types/src/unit_tests/identifier_test.rs (100%) rename crates/{cfxcore/core/src => }/pos/types/move-core-types/src/unit_tests/language_storage_test.rs (100%) rename crates/{cfxcore/core/src => }/pos/types/move-core-types/src/unit_tests/mod.rs (100%) rename crates/{cfxcore/core/src => }/pos/types/move-core-types/src/value.rs (100%) rename crates/{cfxcore/core/src => }/pos/types/move-core-types/src/vm_status.rs (100%) rename crates/{cfxcore/core/src => }/pos/types/pow-types/Cargo.toml (100%) rename crates/{cfxcore/core/src => }/pos/types/pow-types/src/lib.rs (100%) rename crates/{cfxcore/core/src/pos => pos/types}/types/Cargo.toml (69%) rename crates/{cfxcore/core/src/pos => pos/types}/types/src/access_path.rs (100%) rename crates/{cfxcore/core/src/pos => pos/types}/types/src/account_address.rs (100%) rename crates/{cfxcore/core/src/pos => pos/types}/types/src/account_config/constants/account.rs (100%) rename crates/{cfxcore/core/src/pos => pos/types}/types/src/account_config/constants/addresses.rs (100%) rename crates/{cfxcore/core/src/pos => pos/types}/types/src/account_config/constants/coins.rs (100%) rename crates/{cfxcore/core/src/pos => pos/types}/types/src/account_config/constants/diem.rs (100%) rename crates/{cfxcore/core/src/pos => pos/types}/types/src/account_config/constants/event.rs (100%) rename crates/{cfxcore/core/src/pos => pos/types}/types/src/account_config/constants/mod.rs (100%) rename crates/{cfxcore/core/src/pos => pos/types}/types/src/account_config/mod.rs (100%) rename crates/{cfxcore/core/src/pos => pos/types}/types/src/account_config/resources/account.rs (100%) rename crates/{cfxcore/core/src/pos => pos/types}/types/src/account_config/resources/balance.rs (100%) rename crates/{cfxcore/core/src/pos => pos/types}/types/src/account_config/resources/chain_id.rs (100%) rename crates/{cfxcore/core/src/pos => pos/types}/types/src/account_config/resources/currency_info.rs (100%) rename crates/{cfxcore/core/src/pos => pos/types}/types/src/account_config/resources/designated_dealer.rs (100%) rename crates/{cfxcore/core/src/pos => pos/types}/types/src/account_config/resources/dual_attestation.rs (100%) rename crates/{cfxcore/core/src/pos => pos/types}/types/src/account_config/resources/freezing_bit.rs (100%) rename crates/{cfxcore/core/src/pos => pos/types}/types/src/account_config/resources/key_rotation_capability.rs (100%) rename crates/{cfxcore/core/src/pos => pos/types}/types/src/account_config/resources/mod.rs (100%) rename crates/{cfxcore/core/src/pos => pos/types}/types/src/account_config/resources/preburn_balance.rs (100%) rename crates/{cfxcore/core/src/pos => pos/types}/types/src/account_config/resources/preburn_queue.rs (100%) rename crates/{cfxcore/core/src/pos => pos/types}/types/src/account_config/resources/preburn_with_metadata.rs (100%) rename crates/{cfxcore/core/src/pos => pos/types}/types/src/account_config/resources/role.rs (100%) rename crates/{cfxcore/core/src/pos => pos/types}/types/src/account_config/resources/role_id.rs (100%) rename crates/{cfxcore/core/src/pos => pos/types}/types/src/account_config/resources/vasp.rs (100%) rename crates/{cfxcore/core/src/pos => pos/types}/types/src/account_config/resources/withdraw_capability.rs (100%) rename crates/{cfxcore/core/src/pos => pos/types}/types/src/account_state.rs (100%) rename crates/{cfxcore/core/src/pos => pos/types}/types/src/account_state_blob.rs (100%) rename crates/{cfxcore/core/src/pos => pos/types}/types/src/bin/lock_status_tests.rs (100%) rename crates/{cfxcore/core/src/pos => pos/types}/types/src/block_info.rs (100%) rename crates/{cfxcore/core/src/pos => pos/types}/types/src/block_metadata.rs (100%) rename crates/{cfxcore/core/src/pos => pos/types}/types/src/chain_id.rs (100%) rename crates/{cfxcore/core/src/pos => pos/types}/types/src/committed_block.rs (100%) rename crates/{cfxcore/core/src/pos => pos/types}/types/src/contract_event.rs (100%) rename crates/{cfxcore/core/src/pos => pos/types}/types/src/diem_timestamp.rs (100%) rename crates/{cfxcore/core/src/pos => pos/types}/types/src/epoch_change.rs (100%) rename crates/{cfxcore/core/src/pos => pos/types}/types/src/epoch_state.rs (100%) rename crates/{cfxcore/core/src/pos => pos/types}/types/src/event.rs (100%) rename crates/{cfxcore/core/src/pos => pos/types}/types/src/ledger_info.rs (100%) rename crates/{cfxcore/core/src/pos => pos/types}/types/src/lib.rs (100%) rename crates/{cfxcore/core/src/pos => pos/types}/types/src/mempool_status.rs (100%) rename crates/{cfxcore/core/src/pos => pos/types}/types/src/move_resource.rs (100%) rename crates/{cfxcore/core/src/pos => pos/types}/types/src/network_address/encrypted.rs (100%) rename crates/{cfxcore/core/src/pos => pos/types}/types/src/network_address/mod.rs (100%) rename crates/{cfxcore/core/src/pos => pos/types}/types/src/on_chain_config/diem_version.rs (100%) rename crates/{cfxcore/core/src/pos => pos/types}/types/src/on_chain_config/mod.rs (100%) rename crates/{cfxcore/core/src/pos => pos/types}/types/src/on_chain_config/registered_currencies.rs (100%) rename crates/{cfxcore/core/src/pos => pos/types}/types/src/on_chain_config/validator_set.rs (100%) rename crates/{cfxcore/core/src/pos => pos/types}/types/src/on_chain_config/vm_config.rs (100%) rename crates/{cfxcore/core/src/pos => pos/types}/types/src/on_chain_config/vm_publishing_option.rs (100%) rename crates/{cfxcore/core/src/pos => pos/types}/types/src/proof/accumulator/accumulator_test.rs (100%) rename crates/{cfxcore/core/src/pos => pos/types}/types/src/proof/accumulator/mod.rs (100%) rename crates/{cfxcore/core/src/pos => pos/types}/types/src/proof/definition.rs (100%) rename crates/{cfxcore/core/src/pos => pos/types}/types/src/proof/mod.rs (100%) rename crates/{cfxcore/core/src/pos => pos/types}/types/src/proof/position/mod.rs (100%) rename crates/{cfxcore/core/src/pos => pos/types}/types/src/proof/position/position_test.rs (100%) rename crates/{cfxcore/core/src/pos => pos/types}/types/src/proof/proptest_proof.rs (100%) rename crates/{cfxcore/core/src/pos => pos/types}/types/src/proof/unit_tests/mod.rs (100%) rename crates/{cfxcore/core/src/pos => pos/types}/types/src/proof/unit_tests/proof_conversion_test.rs (100%) rename crates/{cfxcore/core/src/pos => pos/types}/types/src/proof/unit_tests/proof_test.rs (100%) rename crates/{cfxcore/core/src/pos => pos/types}/types/src/proptest_types.rs (100%) rename crates/{cfxcore/core/src/pos => pos/types}/types/src/reward_distribution_event.rs (100%) rename crates/{cfxcore/core/src/pos => pos/types}/types/src/serde_helper/mod.rs (100%) rename crates/{cfxcore/core/src/pos => pos/types}/types/src/serde_helper/vec_bytes.rs (100%) rename crates/{cfxcore/core/src/pos => pos/types}/types/src/term_state.rs (100%) rename crates/{cfxcore/core/src/pos => pos/types}/types/src/term_state/lock_status.rs (100%) rename crates/{cfxcore/core/src/pos => pos/types}/types/src/term_state/pos_state_config.rs (100%) rename crates/{cfxcore/core/src/pos => pos/types}/types/src/test_helpers/empty_script.mv (100%) rename crates/{cfxcore/core/src/pos => pos/types}/types/src/test_helpers/mod.rs (100%) rename crates/{cfxcore/core/src/pos => pos/types}/types/src/test_helpers/transaction_test_helpers.rs (100%) rename crates/{cfxcore/core/src/pos => pos/types}/types/src/transaction/authenticator.rs (100%) rename crates/{cfxcore/core/src/pos => pos/types}/types/src/transaction/change_set.rs (100%) rename crates/{cfxcore/core/src/pos => pos/types}/types/src/transaction/helpers.rs (100%) rename crates/{cfxcore/core/src/pos => pos/types}/types/src/transaction/metadata.rs (100%) rename crates/{cfxcore/core/src/pos => pos/types}/types/src/transaction/mod.rs (100%) rename crates/{cfxcore/core/src/pos => pos/types}/types/src/transaction/module.rs (100%) rename crates/{cfxcore/core/src/pos => pos/types}/types/src/transaction/script.rs (100%) rename crates/{cfxcore/core/src/pos => pos/types}/types/src/transaction/transaction_argument.rs (100%) rename crates/{cfxcore/core/src/pos => pos/types}/types/src/trusted_state.rs (100%) rename crates/{cfxcore/core/src/pos => pos/types}/types/src/unit_tests/access_path_test.rs (100%) rename crates/{cfxcore/core/src/pos => pos/types}/types/src/unit_tests/block_metadata_test.rs (100%) rename crates/{cfxcore/core/src/pos => pos/types}/types/src/unit_tests/canonical_serialization_examples.rs (100%) rename crates/{cfxcore/core/src/pos => pos/types}/types/src/unit_tests/code_debug_fmt_test.rs (100%) rename crates/{cfxcore/core/src/pos => pos/types}/types/src/unit_tests/contract_event_test.rs (100%) rename crates/{cfxcore/core/src/pos => pos/types}/types/src/unit_tests/currency_code_test.rs (100%) rename crates/{cfxcore/core/src/pos => pos/types}/types/src/unit_tests/mod.rs (100%) rename crates/{cfxcore/core/src/pos => pos/types}/types/src/unit_tests/transaction_test.rs (100%) rename crates/{cfxcore/core/src/pos => pos/types}/types/src/unit_tests/trusted_state_test.rs (100%) rename crates/{cfxcore/core/src/pos => pos/types}/types/src/unit_tests/validator_set_test.rs (100%) rename crates/{cfxcore/core/src/pos => pos/types}/types/src/unit_tests/write_set_test.rs (100%) rename crates/{cfxcore/core/src/pos => pos/types}/types/src/validator_config.rs (100%) rename crates/{cfxcore/core/src/pos => pos/types}/types/src/validator_info.rs (100%) rename crates/{cfxcore/core/src/pos => pos/types}/types/src/validator_signer.rs (100%) rename crates/{cfxcore/core/src/pos => pos/types}/types/src/validator_verifier.rs (100%) rename crates/{cfxcore/core/src/pos => pos/types}/types/src/vm_status.rs (100%) rename crates/{cfxcore/core/src/pos => pos/types}/types/src/waypoint.rs (100%) rename crates/{cfxcore/core/src/pos => pos/types}/types/src/write_set.rs (100%) diff --git a/Cargo.lock b/Cargo.lock index b8ce6c04e7..9f24b3b6e4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -714,9 +714,9 @@ checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" [[package]] name = "base64" -version = "0.21.0" +version = "0.21.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4a4ddaa51a5bc52a6948f74c06d20aaaddb71924eab79b8c97a8c556e942d6a" +checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" [[package]] name = "base64" @@ -3796,6 +3796,16 @@ version = "0.3.55" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f5f3913fa0bfe7ee1fd8248b6b9f42a5af4b9d65ec2dd2c3c26132b950ecfc2" +[[package]] +name = "generate-key" +version = "0.1.0" +dependencies = [ + "bcs", + "diem-crypto", + "diem-temppath", + "rand 0.8.5", +] + [[package]] name = "generic-array" version = "0.12.4" @@ -7229,7 +7239,7 @@ version = "0.11.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ba30cc2c0cd02af1222ed216ba659cdb2f879dfe3181852fe7c50b1d0005949" dependencies = [ - "base64 0.21.0", + "base64 0.21.7", "bytes 1.9.0", "encoding_rs", "futures-core", diff --git a/Cargo.toml b/Cargo.toml index 99aed67117..aee95139ae 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -53,15 +53,54 @@ members = [ "crates/util/version", "crates/util/serde_utils", "crates/cfxcore/geth-tracer", - "crates/rpc/rpc-eth-types", + "crates/rpc/rpc-eth-types", "crates/rpc/rpc-primitives", - "crates/rpc/rpc-cfx-types", + "crates/rpc/rpc-cfx-types", "crates/rpc/rpc-eth-api", "crates/cfxcore/parity-trace-types", "crates/rpc/rpc", "crates/util/util-macros", "crates/rpc/rpc-utils", "crates/rpc/rpc-builder", + "crates/pos/common/bounded-executor", + "crates/pos/common/crash-handler", + "crates/pos/common/fallible", + "crates/pos/common/infallible", + "crates/pos/common/logger", + "crates/pos/common/metrics", + "crates/pos/common/metrics-core", + "crates/pos/common/nibble", + "crates/pos/common/num-variants", + "crates/pos/common/proptest-helpers", + "crates/pos/common/proxy", + "crates/pos/common/short-hex-str", + "crates/pos/common/subscription-service", + "crates/pos/common/temppath", + "crates/pos/common/time-service", + "crates/pos/config/generate-key", + "crates/pos/config/global-constants", + "crates/pos/config/consensus-types", + "crates/pos/config/config", + "crates/pos/consensus/executor", + "crates/pos/consensus/safety-rules", + "crates/pos/crypto/crypto", + "crates/pos/crypto/crypto-derive", + "crates/pos/secure/net", + "crates/pos/secure/push-metrics", + "crates/pos/secure/storage", + "crates/pos/storage/accumulator", + "crates/pos/storage/cached-pos-ledger-db", + "crates/pos/storage/jellyfish-merkle", + "crates/pos/storage/pos-ledger-db", + "crates/pos/storage/schemadb", + "crates/pos/storage/scratchpad", + "crates/pos/storage/state-view", + "crates/pos/storage/storage-interface", + "crates/pos/types/executor-types", + "crates/pos/types/move-core-types", + "crates/pos/types/pow-types", + "crates/pos/types/types", + "crates/pos/config/management/network-address-encryption", ] resolver = "2" @@ -152,12 +191,56 @@ cfx-util-macros = { path = "./crates/util/util-macros" } cfx-rpc = { path = "./crates/rpc/rpc" } cfx-rpc-utils = { path = "./crates/rpc/rpc-utils" } cfx-rpc-builder = { path = "./crates/rpc/rpc-builder" } - +bounded-executor = { path = "./crates/pos/common/bounded-executor" } +diem-channel = { path = "./crates/pos/common/channel", package = "channel" } +channel = { path = "./crates/pos/common/channel" } +crash-handler = { path = "./crates/pos/common/crash-handler" } +fallible = { path = "./crates/pos/common/fallible" } +diem-infallible = { path = "./crates/pos/common/infallible" } +diem-logger = { path = "./crates/pos/common/logger" } +diem-metrics = { path = "./crates/pos/common/metrics" } +diem-metrics-core = { path = "./crates/pos/common/metrics-core" } +diem-nibble = { path = "./crates/pos/common/nibble" } +num-variants = { path = "./crates/pos/common/num-variants" } +diem-proptest-helpers = { path = "./crates/pos/common/proptest-helpers" } +proxy = { path = "./crates/pos/common/proxy" } +short-hex-str = { path = "./crates/pos/common/short-hex-str" } +subscription-service = { path = "./crates/pos/common/subscription-service" } +diem-temppath = { path = "./crates/pos/common/temppath" } +diem-time-service = { path = "./crates/pos/common/time-service" } +generate-key = { path = "./crates/pos/config/generate-key" } +diem-global-constants = { path = "./crates/pos/config/global-constants" } +consensus-types = { path = "./crates/pos/config/consensus-types" } +diem-config = { path = "./crates/pos/config/config" } +executor = { path = "./crates/pos/consensus/executor" } +safety-rules = { path = "./crates/pos/consensus/safety-rules" } +diem-crypto = { path = "./crates/pos/crypto/crypto" } +diem-crypto-derive = { path = "./crates/pos/crypto/crypto-derive" } +diem-secure-net = { path = "./crates/pos/secure/net" } +diem-secure-push-metrics = { path = "./crates/pos/secure/push-metrics" } +diem-secure-storage = { path = "./crates/pos/secure/storage" } +accumulator = { path = "./crates/pos/storage/accumulator" } +cached-pos-ledger-db = { path = "./crates/pos/storage/cached-pos-ledger-db" } +diem-jellyfish-merkle = { path = "./crates/pos/storage/jellyfish-merkle" } +pos-ledger-db = { path = "./crates/pos/storage/pos-ledger-db" } +schemadb = { path = "./crates/pos/storage/schemadb" } +scratchpad = { path = "./crates/pos/storage/scratchpad" } +diem-state-view = { path = "./crates/pos/storage/state-view" } +storage-client = { path = "./crates/pos/storage/storage-client" } +storage-interface = { path = "./crates/pos/storage/storage-interface" } +executor-types = { path = "./crates/pos/types/executor-types" } +move-core-types = { path = "./crates/pos/types/move-core-types" } +pow-types = { path = "./crates/pos/types/pow-types" } +diem-types = { path = "./crates/pos/types/types" } +diem-network-address-encryption = { path = "./crates/pos/config/management/network-address-encryption" } # proc-macros proc-macro2 = "1.0" quote = "1.0" -serde = { version = "1.0", features = ["derive", "alloc"], default-features = false } +serde = { version = "1.0", features = [ + "derive", + "alloc", +], default-features = false } serde_json = { version = "1.0", default-features = false, features = ["alloc"] } serde_derive = { version = "1.0", default-features = false } hex = "0.4.3" @@ -217,13 +300,16 @@ reqwest = { version = "0.12", default-features = false } pin-project = "1.0.12" mio = "0.6.8" # old version tokio 0.2 -tokio02 = { version = "0.2", package="tokio", features = ["full"] } +tokio02 = { version = "0.2", package = "tokio", features = ["full"] } # crypto & hash fixed-hash = "0.5" keccak-hash = "0.5" tiny-keccak = "2.0.2" -bls-signatures = { git = "https://github.com/Conflux-Chain/bls-signatures.git", rev = "fb52187df92d27c365642cb7e7b2aaf60437cf9c", default-features = false, features = ["multicore", "blst"] } +bls-signatures = { git = "https://github.com/Conflux-Chain/bls-signatures.git", rev = "fb52187df92d27c365642cb7e7b2aaf60437cf9c", default-features = false, features = [ + "multicore", + "blst", +] } secp256k1 = "0.30.0" # misc @@ -263,15 +349,15 @@ rocksdb = { git = "https://github.com/Conflux-Chain/rust-rocksdb.git", rev = "37 # parity crates rlp = "0.4.0" -rlp_derive = { git = "https://github.com/Conflux-Chain/conflux-parity-deps.git", rev = "1597a9cab02343eb2322ca0ac58d39b64e3f42d1" } -panic_hook = { git = "https://github.com/Conflux-Chain/conflux-parity-deps.git", rev = "1597a9cab02343eb2322ca0ac58d39b64e3f42d1" } -dir = { git = "https://github.com/Conflux-Chain/conflux-parity-deps.git", rev = "1597a9cab02343eb2322ca0ac58d39b64e3f42d1" } -unexpected = { git = "https://github.com/Conflux-Chain/conflux-parity-deps.git", rev = "1597a9cab02343eb2322ca0ac58d39b64e3f42d1" } +rlp_derive = { git = "https://github.com/Conflux-Chain/conflux-parity-deps.git", rev = "1597a9cab02343eb2322ca0ac58d39b64e3f42d1" } +panic_hook = { git = "https://github.com/Conflux-Chain/conflux-parity-deps.git", rev = "1597a9cab02343eb2322ca0ac58d39b64e3f42d1" } +dir = { git = "https://github.com/Conflux-Chain/conflux-parity-deps.git", rev = "1597a9cab02343eb2322ca0ac58d39b64e3f42d1" } +unexpected = { git = "https://github.com/Conflux-Chain/conflux-parity-deps.git", rev = "1597a9cab02343eb2322ca0ac58d39b64e3f42d1" } ethereum-types = "0.9" parity-wordlist = "1.3.0" parity-crypto = "0.9.0" parity-path = "0.1" parity-util-mem = { version = "0.5", default-features = false } parity-secp256k1 = { git = "https://github.com/paritytech/rust-secp256k1.git" } -ctrlc = { git = "https://github.com/paritytech/rust-ctrlc.git", rev="b523017108bb2d571a7a69bd97bc406e63bc7a9d" } -substrate-bn = { git = "https://github.com/paritytech/bn", rev="63f8c587356a67b33c7396af98e065b66fca5dda", default-features = false } +ctrlc = { git = "https://github.com/paritytech/rust-ctrlc.git", rev = "b523017108bb2d571a7a69bd97bc406e63bc7a9d" } +substrate-bn = { git = "https://github.com/paritytech/bn", rev = "63f8c587356a67b33c7396af98e065b66fca5dda", default-features = false } diff --git a/bins/conflux/Cargo.toml b/bins/conflux/Cargo.toml index f8b79047c8..883ed771df 100644 --- a/bins/conflux/Cargo.toml +++ b/bins/conflux/Cargo.toml @@ -52,12 +52,12 @@ parity-wordlist = { workspace = true } rustc-hex = { workspace = true } env_logger = { workspace = true } malloc_size_of = { workspace = true } -diem-crypto = { path= "../../crates/cfxcore/core/src/pos/crypto/crypto" } -diem-types = { path= "../../crates/cfxcore/core/src/pos/types" } -pos-ledger-db = { path = "../../crates/cfxcore/core/src/pos/storage/pos-ledger-db" } -executor = { path = "../../crates/cfxcore/core/src/pos/consensus/executor" } # used by pos-genesis-tool -storage-interface = { path = "../../crates/cfxcore/core/src/pos/storage/storage-interface" } -move-core-types = { path = "../../crates/cfxcore/core/src/pos/types/move-core-types" } +diem-crypto = { workspace = true } +diem-types = { workspace = true } +pos-ledger-db = { workspace = true } +executor = { workspace = true } # used by pos-genesis-tool +storage-interface = { workspace = true } +move-core-types = { workspace = true } bcs = "0.1.3" tempdir = { workspace = true } hex = { workspace = true } diff --git a/crates/cfxcore/core/Cargo.toml b/crates/cfxcore/core/Cargo.toml index 0cec93f09e..3db542f991 100644 --- a/crates/cfxcore/core/Cargo.toml +++ b/crates/cfxcore/core/Cargo.toml @@ -24,7 +24,7 @@ cfx-vm-types = { workspace = true } cfx-vm-interpreter = { workspace = true } cfx-executor = { workspace = true } cfx-execute-helper = { workspace = true } -channel = { path = "src/pos/common/channel" } +channel = { workspace = true } clap = { workspace = true } dag = { workspace = true } derivative = "2.0.2" @@ -32,7 +32,7 @@ db = { workspace = true } either = "1.5.3" fallible-iterator = "0.2" fs_extra = "1.1.0" -futures = { workspace = true, features = ["compat"]} +futures = { workspace = true, features = ["compat"] } hashbrown = "0.7.1" hibitset = { workspace = true } itertools = { workspace = true } @@ -62,8 +62,8 @@ primitives = { workspace = true } priority-send-queue = { workspace = true } prometheus = { version = "0.7.0", default-features = false } rand = { workspace = true } -rand_08 = {package = "rand", version = "0.8"} -rand_xorshift="0.2" +rand_08 = { package = "rand", version = "0.8" } +rand_xorshift = "0.2" rangetools = "0.1.4" random-crash = { workspace = true } rayon = { workspace = true } @@ -95,41 +95,41 @@ strum = { workspace = true } strum_macros = { workspace = true } smart-default = "0.6.0" bls-signatures = { workspace = true } -tiny-keccak = { workspace = true, features = ["keccak"]} +tiny-keccak = { workspace = true, features = ["keccak"] } bcs = "0.1.2" async-trait = { workspace = true } num-derive = { version = "0.3.3", default-features = false } thiserror = { workspace = true } -fallible = { path = "src/pos/common/fallible" } +fallible = { workspace = true } mirai-annotations = { version = "1.10.1", default-features = false } -bounded-executor = { path = "src/pos/common/bounded-executor" } -diem-config = { path = "src/pos/config" } -diem-crypto = { path = "src/pos/crypto/crypto" } -diem-infallible = { path = "src/pos/common/infallible" } -diem-logger = { path = "src/pos/common/logger" } -diem-metrics = { path = "src/pos/common/metrics" } -diem-secure-storage = { path = "src/pos/secure/storage" } -diem-types = { path = "src/pos/types" } -executor-types = { path = "src/pos/types/executor-types" } -executor = {path = "src/pos/consensus/executor" } -consensus-types = { path = "src/pos/consensus/consensus-types" } -safety-rules = { path = "src/pos/consensus/safety-rules" } -pos-ledger-db = { path = "src/pos/storage/pos-ledger-db" } -cached-pos-ledger-db = { path = "src/pos/storage/cached-pos-ledger-db" } -schemadb = { path = "src/pos/storage/schemadb" } -storage-interface = { path = "src/pos/storage/storage-interface" } -short-hex-str = { path = "src/pos/common/short-hex-str" } -subscription-service = { path = "src/pos/common/subscription-service" } +bounded-executor = { workspace = true } +diem-config = { workspace = true } +diem-crypto = { workspace = true } +diem-infallible = { workspace = true } +diem-logger = { workspace = true } +diem-metrics = { workspace = true } +diem-secure-storage = { workspace = true } +diem-types = { workspace = true } +executor-types = { workspace = true } +executor = { workspace = true } +consensus-types = { workspace = true } +safety-rules = { workspace = true } +pos-ledger-db = { workspace = true } +cached-pos-ledger-db = { workspace = true } +schemadb = { workspace = true } +storage-interface = { workspace = true } +short-hex-str = { workspace = true } +subscription-service = { workspace = true } fail = { workspace = true } anyhow = { workspace = true } once_cell = { workspace = true } -move-core-types = { path = "src/pos/types/move-core-types" } -pow-types = {path = "src/pos/types/pow-types" } +move-core-types = { workspace = true } +pow-types = { workspace = true } async-oneshot = { workspace = true } proptest = { version = "1.0.0", optional = true } proptest-derive = { version = "0.3.0", optional = true } -diem-temppath = { path = "src/pos/common/temppath" } -crash-handler = { path = "src/pos/common/crash-handler" } +diem-temppath = { workspace = true } +crash-handler = { workspace = true } heap-map = { workspace = true } impl-trait-for-tuples = "^0.2" impl-tools = "^0.10" @@ -150,7 +150,7 @@ cfx-storage = { workspace = true, features = ["testonly_code"] } cfx-vm-types = { workspace = true, features = ["testonly_code"] } proptest = "1.0.0" proptest-derive = "0.3.0" -consensus-types = { path = "src/pos/consensus/consensus-types", features = ["fuzzing"] } +consensus-types = { workspace = true, features = ["fuzzing"] } [features] default = [] @@ -158,4 +158,4 @@ default = [] # we have to define a feature for test code. # https://users.rust-lang.org/t/cfg-test-doesnt-propagate-to-external-crates/13046 testonly_code = [] -fuzzing = ["proptest", "proptest-derive"] \ No newline at end of file +fuzzing = ["proptest", "proptest-derive"] diff --git a/crates/cfxcore/core/src/pos/consensus/executor/Cargo.toml b/crates/cfxcore/core/src/pos/consensus/executor/Cargo.toml deleted file mode 100644 index 6c9b1485fb..0000000000 --- a/crates/cfxcore/core/src/pos/consensus/executor/Cargo.toml +++ /dev/null @@ -1,47 +0,0 @@ -[package] -name = "executor" -version = "0.1.0" -authors = ["Diem Association "] -description = "Diem executor" -repository = "https://github.com/diem/diem" -homepage = "https://diem.com" -license = "Apache-2.0" -publish = false -edition = "2018" - -[dependencies] -anyhow = { workspace = true } -fail = { workspace = true } -itertools = { version = "0.10.0", default-features = false } -once_cell = { workspace = true } -serde_json = { workspace = true } -serde = { workspace = true, features = ["derive"] } - -consensus-types = { path = "../consensus-types" } -executor-types = { path = "../../types/executor-types" } -bcs = "0.1.2" -diem-crypto = { path = "../../crypto/crypto" } -diem-logger = { path = "../../common/logger" } -diem-metrics = { path = "../../common/metrics" } -diem-infallible = { path = "../../common/infallible" } -diem-secure-net = { path = "../../secure/net" } -diem-state-view = { path = "../../storage/state-view" } -cached-pos-ledger-db = { path = "../../storage/cached-pos-ledger-db" } -diem-types = { path = "../../types" } -move-core-types = { path = "../../types/move-core-types" } -scratchpad = { path = "../../storage/scratchpad" } -storage-interface = { path = "../../storage/storage-interface" } -subscription-service = { path = "../../common/subscription-service" } - -proptest = { version = "1.0.0", optional = true } -pow-types = { path = "../../types/pow-types" } -async-trait = { workspace = true } -cfx-types = { workspace = true } -futures = { workspace = true } - -[dev-dependencies] -proptest = "1.0.0" -rand = "0.8.3" - -[features] -default = [] diff --git a/crates/cfxcore/core/src/pos/consensus/safety-rules/Cargo.toml b/crates/cfxcore/core/src/pos/consensus/safety-rules/Cargo.toml deleted file mode 100644 index 95371550cb..0000000000 --- a/crates/cfxcore/core/src/pos/consensus/safety-rules/Cargo.toml +++ /dev/null @@ -1,56 +0,0 @@ -[package] -name = "safety-rules" -version = "0.1.0" -authors = ["Diem Association "] -license = "Apache-2.0" -publish = false -edition = "2018" - -[dependencies] -once_cell = "1.7.2" -rand = { version = "0.8.3", default-features = false } -proptest = { version = "1.0.0", optional = true } -rand_core = "0.6.2" - -crash-handler = { path = "../../common/crash-handler" } -consensus-types = { path = "../consensus-types" } -bcs = "0.1.2" -diem-config = { path = "../../config" } -diem-crypto = { path = "../../crypto/crypto" } -diem-global-constants = { path = "../../config/global-constants" } -diem-infallible = { path = "../../common/infallible" } -diem-logger = { path = "../../common/logger" } -diem-proptest-helpers = { path = "../../common/proptest-helpers", optional = true } -diem-secure-net = { path = "../../secure/net" } -diem-secure-push-metrics = { path = "../../secure/push-metrics" } -diem-secure-storage = { path = "../../secure/storage" } -diem-temppath = { path = "../../common/temppath" } -diem-types = { path = "../../types" } -diem-vault-client = { path = "../../secure/storage/vault" } -serde = { version = "1.0.124", default-features = false } -thiserror = "1.0.24" -log = { workspace = true } - -[dev-dependencies] -criterion = "0.3.4" -tempfile = "3.2.0" -proptest = "1.0.0" - -consensus-types = { path = "../consensus-types", features = ["fuzzing"] } -diem-config = { path = "../../config", features = ["fuzzing"] } -diem-proptest-helpers = { path = "../../common/proptest-helpers" } -diem-secure-storage = { path = "../../secure/storage", features = ["testing"] } - -[[bench]] -name = "safety_rules" -harness = false -required-features = ["testing"] - -[[test]] -name = "binary" -required-features = ["testing"] - -[features] -default = [] -fuzzing = ["consensus-types/fuzzing", "diem-config/fuzzing", "proptest", "diem-proptest-helpers"] -testing = ["diem-secure-storage/testing"] diff --git a/crates/cfxcore/core/src/pos/storage/cached-pos-ledger-db/Cargo.toml b/crates/cfxcore/core/src/pos/storage/cached-pos-ledger-db/Cargo.toml deleted file mode 100644 index 26afc16975..0000000000 --- a/crates/cfxcore/core/src/pos/storage/cached-pos-ledger-db/Cargo.toml +++ /dev/null @@ -1,17 +0,0 @@ -[package] -name = "cached-pos-ledger-db" -version = "0.1.0" -edition = "2018" - -[dependencies] -anyhow = "1.0.38" -serde = { version = "1.0.124", features = ["derive"] } - -consensus-types = { path = "../../consensus/consensus-types" } -pos-ledger-db = { path = "../pos-ledger-db" } -diem-crypto = { path = "../../crypto/crypto" } -diem-infallible = { path = "../../common/infallible" } -diem-logger = { path = "../../common/logger" } -diem-types = { path = "../../types" } -executor-types = { path = "../../types/executor-types" } -storage-interface = { path = "../storage-interface" } \ No newline at end of file diff --git a/crates/cfxcore/core/src/pos/storage/pos-ledger-db/Cargo.toml b/crates/cfxcore/core/src/pos/storage/pos-ledger-db/Cargo.toml deleted file mode 100644 index a15d7d739d..0000000000 --- a/crates/cfxcore/core/src/pos/storage/pos-ledger-db/Cargo.toml +++ /dev/null @@ -1,56 +0,0 @@ -[package] -name = "pos-ledger-db" -version = "0.1.0" -authors = ["Diem Association "] -description = "Diem diemdb" -repository = "https://github.com/diem/diem" -homepage = "https://diem.com" -license = "Apache-2.0" -publish = false -edition = "2018" - -[dependencies] -anyhow = { workspace = true } -arc-swap = "1.2.0" -byteorder = "1.4.3" -itertools = { workspace = true } -once_cell = { workspace = true } -num-derive = "0.3.3" -num-traits = "0.2.14" -proptest = { version = "1.0.0", optional = true } -proptest-derive = { version = "0.3.0", optional = true } -serde = { workspace = true } -thiserror = { workspace = true } - -accumulator = { path = "../accumulator" } -bcs = "0.1.2" -diem-config = { path = "../../config" } -diem-crypto = { path = "../../crypto/crypto" } -diem-jellyfish-merkle = { path = "../jellyfish-merkle" } -diem-logger = { path = "../../common/logger" } -diem-metrics = { path = "../../common/metrics" } -diem-infallible = { path = "../../common/infallible" } -diem-proptest-helpers = { path = "../../common/proptest-helpers", optional = true } -diem-temppath = { path = "../../common/temppath", optional = true } -diem-types = { path = "../../types" } -num-variants = { path = "../../common/num-variants" } -schemadb = { path = "../schemadb" } -storage-interface = { path = "../storage-interface" } -consensus-types = {path = "../../consensus/consensus-types" } -executor-types = {path = "../../types/executor-types" } - -[dev-dependencies] -proptest = "1.0.0" -proptest-derive = "0.3.0" -rand = "0.8.3" - -diem-jellyfish-merkle = { path = "../jellyfish-merkle", features = ["fuzzing"] } -diem-proptest-helpers = { path = "../../common/proptest-helpers" } -diem-temppath = { path = "../../common/temppath" } -diem-types = { path = "../../types", features = ["fuzzing"] } -move-core-types = { path = "../../types/move-core-types" } - -[features] -default = [] -diemsum = [] -fuzzing = ["proptest", "proptest-derive", "diem-proptest-helpers", "diem-temppath", "diem-crypto/fuzzing", "diem-jellyfish-merkle/fuzzing", "diem-types/fuzzing"] diff --git a/crates/cfxcore/execute-helper/Cargo.toml b/crates/cfxcore/execute-helper/Cargo.toml index b29c25324d..8ee5b9a374 100644 --- a/crates/cfxcore/execute-helper/Cargo.toml +++ b/crates/cfxcore/execute-helper/Cargo.toml @@ -29,7 +29,7 @@ serde_json = { workspace = true, default-features = false, features = [ ]} solidity-abi = { workspace = true } strum_macros = { workspace = true } -pow-types = { path = "../core/src/pos/types/pow-types" } +pow-types = { workspace = true } typemap = { package = "typemap-ors", version = "1.0"} alloy-primitives = { workspace = true } diff --git a/crates/cfxcore/executor/Cargo.toml b/crates/cfxcore/executor/Cargo.toml index 0b7ebbef07..c07adcf8ed 100644 --- a/crates/cfxcore/executor/Cargo.toml +++ b/crates/cfxcore/executor/Cargo.toml @@ -42,9 +42,9 @@ strum = { workspace = true } strum_macros = { workspace = true } bls-signatures = { workspace = true } tiny-keccak = { workspace = true, features = ["keccak"]} -diem-crypto = { path = "../core/src/pos/crypto/crypto" } -diem-types = { path = "../core/src/pos/types" } -pow-types = {path = "../core/src/pos/types/pow-types" } +diem-crypto = { workspace = true } +diem-types = { workspace = true } +pow-types = { workspace = true } impl-trait-for-tuples = "^0.2" impl-tools = "^0.10" typemap = { package = "typemap-ors", version = "1.0"} diff --git a/crates/client/Cargo.toml b/crates/client/Cargo.toml index fff4829f71..4fb6a69d57 100644 --- a/crates/client/Cargo.toml +++ b/crates/client/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "client" -version = {workspace = true} +version = { workspace = true } edition = "2021" [dependencies] @@ -51,7 +51,7 @@ log4rs = { workspace = true, features = ["background_rotation", "gzip"] } rlp = { workspace = true } keccak-hash = { workspace = true } rand = { workspace = true } -rand_08 = { package = "rand", version = "0.8.0"} +rand_08 = { package = "rand", version = "0.8.0" } kvdb-rocksdb = { workspace = true } tempdir = { workspace = true } rustc-hex = { workspace = true } @@ -74,23 +74,23 @@ random-crash = { workspace = true } cfx-parameters = { workspace = true } strum = { workspace = true } strum_macros = { workspace = true } -crash-handler = { path = "../cfxcore/core/src/pos/common/crash-handler" } -cached-pos-ledger-db = { path = "../cfxcore/core/src/pos/storage/cached-pos-ledger-db" } -pos-ledger-db = { path = "../cfxcore/core/src/pos/storage/pos-ledger-db" } -diem-channel = {path = "../cfxcore/core/src/pos/common/channel", package = "channel"} -diem-config = { path = "../cfxcore/core/src/pos/config" } -diem-crypto = { path = "../cfxcore/core/src/pos/crypto/crypto" } -diem-logger = { path = "../cfxcore/core/src/pos/common/logger" } -diem-metrics = { path = "../cfxcore/core/src/pos/common/metrics" } -diem-secure-storage = { path = "../cfxcore/core/src/pos/secure/storage" } -diem-temppath = { path = "../cfxcore/core/src/pos/common/temppath" } -diem-time-service = { path = "../cfxcore/core/src/pos/common/time-service" } -diem-types = { path = "../cfxcore/core/src/pos/types" } -pow-types = {path = "../cfxcore/core/src/pos/types/pow-types" } -executor-types = { path = "../cfxcore/core/src/pos/types/executor-types" } -executor = { path = "../cfxcore/core/src/pos/consensus/executor" } -storage-interface = { path = "../cfxcore/core/src/pos/storage/storage-interface" } -consensus-types = {path = "../cfxcore/core/src/pos/consensus/consensus-types" } +crash-handler = { workspace = true } +cached-pos-ledger-db = { workspace = true } +pos-ledger-db = { workspace = true } +diem-channel = { workspace = true } +diem-config = { workspace = true } +diem-crypto = { workspace = true } +diem-logger = { workspace = true } +diem-metrics = { workspace = true } +diem-secure-storage = { workspace = true } +diem-temppath = { workspace = true } +diem-time-service = { workspace = true } +diem-types = { workspace = true } +pow-types = { workspace = true } +executor-types = { workspace = true } +executor = { workspace = true } +storage-interface = { workspace = true } +consensus-types = { workspace = true } rpassword = { workspace = true } static_assertions = { workspace = true } parity-version = { workspace = true } diff --git a/crates/network/Cargo.toml b/crates/network/Cargo.toml index 0ae0a29bfb..f80413b4e9 100644 --- a/crates/network/Cargo.toml +++ b/crates/network/Cargo.toml @@ -36,7 +36,7 @@ metrics = { workspace = true } throttling = { workspace = true } natpmp = "0.2" malloc_size_of = { workspace = true } -diem-crypto = { path = "../cfxcore/core/src/pos/crypto/crypto" } -diem-types = { path = "../cfxcore/core/src/pos/types" } +diem-crypto = { workspace = true } +diem-types = { workspace = true } cfx-util-macros = { workspace = true } thiserror = { workspace = true } diff --git a/crates/cfxcore/core/src/pos/common/bounded-executor/Cargo.toml b/crates/pos/common/bounded-executor/Cargo.toml similarity index 100% rename from crates/cfxcore/core/src/pos/common/bounded-executor/Cargo.toml rename to crates/pos/common/bounded-executor/Cargo.toml diff --git a/crates/cfxcore/core/src/pos/common/bounded-executor/src/lib.rs b/crates/pos/common/bounded-executor/src/lib.rs similarity index 100% rename from crates/cfxcore/core/src/pos/common/bounded-executor/src/lib.rs rename to crates/pos/common/bounded-executor/src/lib.rs diff --git a/crates/cfxcore/core/src/pos/common/channel/Cargo.toml b/crates/pos/common/channel/Cargo.toml similarity index 76% rename from crates/cfxcore/core/src/pos/common/channel/Cargo.toml rename to crates/pos/common/channel/Cargo.toml index e8286280dc..7ee7764cff 100644 --- a/crates/cfxcore/core/src/pos/common/channel/Cargo.toml +++ b/crates/pos/common/channel/Cargo.toml @@ -12,9 +12,9 @@ edition = "2018" [dependencies] anyhow = "1.0.38" futures = { workspace = true } -diem-metrics = { path = "../metrics" } -diem-infallible = { path = "../infallible" } +diem-metrics = { workspace = true } +diem-infallible = { workspace = true } [dev-dependencies] -diem-types = { path = "../../types" } +diem-types = { workspace = true } tokio = { workspace = true, features = ["full"] } diff --git a/crates/cfxcore/core/src/pos/common/channel/many-keys-stress-test/Cargo.toml b/crates/pos/common/channel/many-keys-stress-test/Cargo.toml similarity index 100% rename from crates/cfxcore/core/src/pos/common/channel/many-keys-stress-test/Cargo.toml rename to crates/pos/common/channel/many-keys-stress-test/Cargo.toml diff --git a/crates/cfxcore/core/src/pos/common/channel/many-keys-stress-test/src/main.rs b/crates/pos/common/channel/many-keys-stress-test/src/main.rs similarity index 100% rename from crates/cfxcore/core/src/pos/common/channel/many-keys-stress-test/src/main.rs rename to crates/pos/common/channel/many-keys-stress-test/src/main.rs diff --git a/crates/cfxcore/core/src/pos/common/channel/src/diem_channel.rs b/crates/pos/common/channel/src/diem_channel.rs similarity index 100% rename from crates/cfxcore/core/src/pos/common/channel/src/diem_channel.rs rename to crates/pos/common/channel/src/diem_channel.rs diff --git a/crates/cfxcore/core/src/pos/common/channel/src/diem_channel_test.rs b/crates/pos/common/channel/src/diem_channel_test.rs similarity index 100% rename from crates/cfxcore/core/src/pos/common/channel/src/diem_channel_test.rs rename to crates/pos/common/channel/src/diem_channel_test.rs diff --git a/crates/cfxcore/core/src/pos/common/channel/src/lib.rs b/crates/pos/common/channel/src/lib.rs similarity index 100% rename from crates/cfxcore/core/src/pos/common/channel/src/lib.rs rename to crates/pos/common/channel/src/lib.rs diff --git a/crates/cfxcore/core/src/pos/common/channel/src/message_queues.rs b/crates/pos/common/channel/src/message_queues.rs similarity index 100% rename from crates/cfxcore/core/src/pos/common/channel/src/message_queues.rs rename to crates/pos/common/channel/src/message_queues.rs diff --git a/crates/cfxcore/core/src/pos/common/channel/src/message_queues_test.rs b/crates/pos/common/channel/src/message_queues_test.rs similarity index 100% rename from crates/cfxcore/core/src/pos/common/channel/src/message_queues_test.rs rename to crates/pos/common/channel/src/message_queues_test.rs diff --git a/crates/cfxcore/core/src/pos/common/channel/src/test.rs b/crates/pos/common/channel/src/test.rs similarity index 100% rename from crates/cfxcore/core/src/pos/common/channel/src/test.rs rename to crates/pos/common/channel/src/test.rs diff --git a/crates/cfxcore/core/src/pos/common/crash-handler/Cargo.toml b/crates/pos/common/crash-handler/Cargo.toml similarity index 91% rename from crates/cfxcore/core/src/pos/common/crash-handler/Cargo.toml rename to crates/pos/common/crash-handler/Cargo.toml index ae47bcb2ff..cf9ccd4e0f 100644 --- a/crates/cfxcore/core/src/pos/common/crash-handler/Cargo.toml +++ b/crates/pos/common/crash-handler/Cargo.toml @@ -13,5 +13,5 @@ edition = "2018" backtrace = "0.3.56" toml = "0.5.8" -diem-logger = { path = "../logger" } +diem-logger = { workspace = true } serde = { version = "1.0.124", features = ["derive"] } diff --git a/crates/cfxcore/core/src/pos/common/crash-handler/src/lib.rs b/crates/pos/common/crash-handler/src/lib.rs similarity index 100% rename from crates/cfxcore/core/src/pos/common/crash-handler/src/lib.rs rename to crates/pos/common/crash-handler/src/lib.rs diff --git a/crates/cfxcore/core/src/pos/common/fallible/Cargo.toml b/crates/pos/common/fallible/Cargo.toml similarity index 100% rename from crates/cfxcore/core/src/pos/common/fallible/Cargo.toml rename to crates/pos/common/fallible/Cargo.toml diff --git a/crates/cfxcore/core/src/pos/common/fallible/src/copy_from_slice.rs b/crates/pos/common/fallible/src/copy_from_slice.rs similarity index 100% rename from crates/cfxcore/core/src/pos/common/fallible/src/copy_from_slice.rs rename to crates/pos/common/fallible/src/copy_from_slice.rs diff --git a/crates/cfxcore/core/src/pos/common/fallible/src/lib.rs b/crates/pos/common/fallible/src/lib.rs similarity index 100% rename from crates/cfxcore/core/src/pos/common/fallible/src/lib.rs rename to crates/pos/common/fallible/src/lib.rs diff --git a/crates/cfxcore/core/src/pos/common/infallible/Cargo.toml b/crates/pos/common/infallible/Cargo.toml similarity index 100% rename from crates/cfxcore/core/src/pos/common/infallible/Cargo.toml rename to crates/pos/common/infallible/Cargo.toml diff --git a/crates/cfxcore/core/src/pos/common/infallible/src/lib.rs b/crates/pos/common/infallible/src/lib.rs similarity index 100% rename from crates/cfxcore/core/src/pos/common/infallible/src/lib.rs rename to crates/pos/common/infallible/src/lib.rs diff --git a/crates/cfxcore/core/src/pos/common/infallible/src/math.rs b/crates/pos/common/infallible/src/math.rs similarity index 100% rename from crates/cfxcore/core/src/pos/common/infallible/src/math.rs rename to crates/pos/common/infallible/src/math.rs diff --git a/crates/cfxcore/core/src/pos/common/infallible/src/mutex.rs b/crates/pos/common/infallible/src/mutex.rs similarity index 100% rename from crates/cfxcore/core/src/pos/common/infallible/src/mutex.rs rename to crates/pos/common/infallible/src/mutex.rs diff --git a/crates/cfxcore/core/src/pos/common/infallible/src/nonzero.rs b/crates/pos/common/infallible/src/nonzero.rs similarity index 100% rename from crates/cfxcore/core/src/pos/common/infallible/src/nonzero.rs rename to crates/pos/common/infallible/src/nonzero.rs diff --git a/crates/cfxcore/core/src/pos/common/infallible/src/rwlock.rs b/crates/pos/common/infallible/src/rwlock.rs similarity index 100% rename from crates/cfxcore/core/src/pos/common/infallible/src/rwlock.rs rename to crates/pos/common/infallible/src/rwlock.rs diff --git a/crates/cfxcore/core/src/pos/common/infallible/src/time.rs b/crates/pos/common/infallible/src/time.rs similarity index 100% rename from crates/cfxcore/core/src/pos/common/infallible/src/time.rs rename to crates/pos/common/infallible/src/time.rs diff --git a/crates/cfxcore/core/src/pos/common/logger/Cargo.toml b/crates/pos/common/logger/Cargo.toml similarity index 95% rename from crates/cfxcore/core/src/pos/common/logger/Cargo.toml rename to crates/pos/common/logger/Cargo.toml index f1ae8e2e9e..a4ee7a3a9a 100644 --- a/crates/cfxcore/core/src/pos/common/logger/Cargo.toml +++ b/crates/pos/common/logger/Cargo.toml @@ -17,7 +17,7 @@ chrono = { workspace = true } erased-serde = "0.3.13" hostname = "0.3.1" diem-log-derive = { path = "derive" } -diem-infallible = { path = "../infallible" } +diem-infallible = { workspace = true } once_cell = "1.7.2" serde = { version = "1.0.124", features = ["derive"] } serde_json = "1.0.64" diff --git a/crates/cfxcore/core/src/pos/common/logger/derive/Cargo.toml b/crates/pos/common/logger/derive/Cargo.toml similarity index 100% rename from crates/cfxcore/core/src/pos/common/logger/derive/Cargo.toml rename to crates/pos/common/logger/derive/Cargo.toml diff --git a/crates/cfxcore/core/src/pos/common/logger/derive/src/lib.rs b/crates/pos/common/logger/derive/src/lib.rs similarity index 100% rename from crates/cfxcore/core/src/pos/common/logger/derive/src/lib.rs rename to crates/pos/common/logger/derive/src/lib.rs diff --git a/crates/cfxcore/core/src/pos/common/logger/src/counters.rs b/crates/pos/common/logger/src/counters.rs similarity index 100% rename from crates/cfxcore/core/src/pos/common/logger/src/counters.rs rename to crates/pos/common/logger/src/counters.rs diff --git a/crates/cfxcore/core/src/pos/common/logger/src/diem_logger.rs b/crates/pos/common/logger/src/diem_logger.rs similarity index 100% rename from crates/cfxcore/core/src/pos/common/logger/src/diem_logger.rs rename to crates/pos/common/logger/src/diem_logger.rs diff --git a/crates/cfxcore/core/src/pos/common/logger/src/event.rs b/crates/pos/common/logger/src/event.rs similarity index 100% rename from crates/cfxcore/core/src/pos/common/logger/src/event.rs rename to crates/pos/common/logger/src/event.rs diff --git a/crates/cfxcore/core/src/pos/common/logger/src/filter.rs b/crates/pos/common/logger/src/filter.rs similarity index 100% rename from crates/cfxcore/core/src/pos/common/logger/src/filter.rs rename to crates/pos/common/logger/src/filter.rs diff --git a/crates/cfxcore/core/src/pos/common/logger/src/json_log.rs b/crates/pos/common/logger/src/json_log.rs similarity index 100% rename from crates/cfxcore/core/src/pos/common/logger/src/json_log.rs rename to crates/pos/common/logger/src/json_log.rs diff --git a/crates/cfxcore/core/src/pos/common/logger/src/kv.rs b/crates/pos/common/logger/src/kv.rs similarity index 100% rename from crates/cfxcore/core/src/pos/common/logger/src/kv.rs rename to crates/pos/common/logger/src/kv.rs diff --git a/crates/cfxcore/core/src/pos/common/logger/src/lib.rs b/crates/pos/common/logger/src/lib.rs similarity index 100% rename from crates/cfxcore/core/src/pos/common/logger/src/lib.rs rename to crates/pos/common/logger/src/lib.rs diff --git a/crates/cfxcore/core/src/pos/common/logger/src/logger.rs b/crates/pos/common/logger/src/logger.rs similarity index 100% rename from crates/cfxcore/core/src/pos/common/logger/src/logger.rs rename to crates/pos/common/logger/src/logger.rs diff --git a/crates/cfxcore/core/src/pos/common/logger/src/macros.rs b/crates/pos/common/logger/src/macros.rs similarity index 100% rename from crates/cfxcore/core/src/pos/common/logger/src/macros.rs rename to crates/pos/common/logger/src/macros.rs diff --git a/crates/cfxcore/core/src/pos/common/logger/src/metadata.rs b/crates/pos/common/logger/src/metadata.rs similarity index 100% rename from crates/cfxcore/core/src/pos/common/logger/src/metadata.rs rename to crates/pos/common/logger/src/metadata.rs diff --git a/crates/cfxcore/core/src/pos/common/logger/src/sample.rs b/crates/pos/common/logger/src/sample.rs similarity index 100% rename from crates/cfxcore/core/src/pos/common/logger/src/sample.rs rename to crates/pos/common/logger/src/sample.rs diff --git a/crates/cfxcore/core/src/pos/common/logger/src/security.rs b/crates/pos/common/logger/src/security.rs similarity index 100% rename from crates/cfxcore/core/src/pos/common/logger/src/security.rs rename to crates/pos/common/logger/src/security.rs diff --git a/crates/cfxcore/core/src/pos/common/logger/src/struct_log.rs b/crates/pos/common/logger/src/struct_log.rs similarity index 100% rename from crates/cfxcore/core/src/pos/common/logger/src/struct_log.rs rename to crates/pos/common/logger/src/struct_log.rs diff --git a/crates/cfxcore/core/src/pos/common/logger/tests/derive.rs b/crates/pos/common/logger/tests/derive.rs similarity index 100% rename from crates/cfxcore/core/src/pos/common/logger/tests/derive.rs rename to crates/pos/common/logger/tests/derive.rs diff --git a/crates/cfxcore/core/src/pos/common/logger/tests/logger.rs b/crates/pos/common/logger/tests/logger.rs similarity index 100% rename from crates/cfxcore/core/src/pos/common/logger/tests/logger.rs rename to crates/pos/common/logger/tests/logger.rs diff --git a/crates/cfxcore/core/src/pos/common/logger/tests/logger_custom_format.rs b/crates/pos/common/logger/tests/logger_custom_format.rs similarity index 100% rename from crates/cfxcore/core/src/pos/common/logger/tests/logger_custom_format.rs rename to crates/pos/common/logger/tests/logger_custom_format.rs diff --git a/crates/cfxcore/core/src/pos/common/logger/tests/remote.rs b/crates/pos/common/logger/tests/remote.rs similarity index 100% rename from crates/cfxcore/core/src/pos/common/logger/tests/remote.rs rename to crates/pos/common/logger/tests/remote.rs diff --git a/crates/cfxcore/core/src/pos/common/metrics-core/Cargo.toml b/crates/pos/common/metrics-core/Cargo.toml similarity index 100% rename from crates/cfxcore/core/src/pos/common/metrics-core/Cargo.toml rename to crates/pos/common/metrics-core/Cargo.toml diff --git a/crates/cfxcore/core/src/pos/common/metrics-core/src/lib.rs b/crates/pos/common/metrics-core/src/lib.rs similarity index 100% rename from crates/cfxcore/core/src/pos/common/metrics-core/src/lib.rs rename to crates/pos/common/metrics-core/src/lib.rs diff --git a/crates/cfxcore/core/src/pos/common/metrics/Cargo.toml b/crates/pos/common/metrics/Cargo.toml similarity index 87% rename from crates/cfxcore/core/src/pos/common/metrics/Cargo.toml rename to crates/pos/common/metrics/Cargo.toml index d58ca25259..64e13a97e3 100644 --- a/crates/cfxcore/core/src/pos/common/metrics/Cargo.toml +++ b/crates/pos/common/metrics/Cargo.toml @@ -18,8 +18,8 @@ prometheus = { version = "0.12.0", default-features = false } serde_json = "1.0.64" tokio = { workspace = true, features = ["full"] } -diem-logger = { path = "../logger" } -diem-metrics-core = { path = "../metrics-core" } +diem-logger = { workspace = true } +diem-metrics-core = { workspace = true } [dev-dependencies] rusty-fork = "0.3.0" diff --git a/crates/cfxcore/core/src/pos/common/metrics/build.rs b/crates/pos/common/metrics/build.rs similarity index 100% rename from crates/cfxcore/core/src/pos/common/metrics/build.rs rename to crates/pos/common/metrics/build.rs diff --git a/crates/cfxcore/core/src/pos/common/metrics/src/json_encoder.rs b/crates/pos/common/metrics/src/json_encoder.rs similarity index 100% rename from crates/cfxcore/core/src/pos/common/metrics/src/json_encoder.rs rename to crates/pos/common/metrics/src/json_encoder.rs diff --git a/crates/cfxcore/core/src/pos/common/metrics/src/json_metrics.rs b/crates/pos/common/metrics/src/json_metrics.rs similarity index 100% rename from crates/cfxcore/core/src/pos/common/metrics/src/json_metrics.rs rename to crates/pos/common/metrics/src/json_metrics.rs diff --git a/crates/cfxcore/core/src/pos/common/metrics/src/lib.rs b/crates/pos/common/metrics/src/lib.rs similarity index 100% rename from crates/cfxcore/core/src/pos/common/metrics/src/lib.rs rename to crates/pos/common/metrics/src/lib.rs diff --git a/crates/cfxcore/core/src/pos/common/metrics/src/metric_server.rs b/crates/pos/common/metrics/src/metric_server.rs similarity index 100% rename from crates/cfxcore/core/src/pos/common/metrics/src/metric_server.rs rename to crates/pos/common/metrics/src/metric_server.rs diff --git a/crates/cfxcore/core/src/pos/common/metrics/src/op_counters.rs b/crates/pos/common/metrics/src/op_counters.rs similarity index 100% rename from crates/cfxcore/core/src/pos/common/metrics/src/op_counters.rs rename to crates/pos/common/metrics/src/op_counters.rs diff --git a/crates/cfxcore/core/src/pos/common/metrics/src/public_metrics.rs b/crates/pos/common/metrics/src/public_metrics.rs similarity index 100% rename from crates/cfxcore/core/src/pos/common/metrics/src/public_metrics.rs rename to crates/pos/common/metrics/src/public_metrics.rs diff --git a/crates/cfxcore/core/src/pos/common/metrics/src/unit_tests/lib_test.rs b/crates/pos/common/metrics/src/unit_tests/lib_test.rs similarity index 100% rename from crates/cfxcore/core/src/pos/common/metrics/src/unit_tests/lib_test.rs rename to crates/pos/common/metrics/src/unit_tests/lib_test.rs diff --git a/crates/cfxcore/core/src/pos/common/metrics/src/unit_tests/mod.rs b/crates/pos/common/metrics/src/unit_tests/mod.rs similarity index 100% rename from crates/cfxcore/core/src/pos/common/metrics/src/unit_tests/mod.rs rename to crates/pos/common/metrics/src/unit_tests/mod.rs diff --git a/crates/cfxcore/core/src/pos/common/nibble/Cargo.toml b/crates/pos/common/nibble/Cargo.toml similarity index 100% rename from crates/cfxcore/core/src/pos/common/nibble/Cargo.toml rename to crates/pos/common/nibble/Cargo.toml diff --git a/crates/cfxcore/core/src/pos/common/nibble/src/lib.rs b/crates/pos/common/nibble/src/lib.rs similarity index 100% rename from crates/cfxcore/core/src/pos/common/nibble/src/lib.rs rename to crates/pos/common/nibble/src/lib.rs diff --git a/crates/cfxcore/core/src/pos/common/num-variants/Cargo.toml b/crates/pos/common/num-variants/Cargo.toml similarity index 100% rename from crates/cfxcore/core/src/pos/common/num-variants/Cargo.toml rename to crates/pos/common/num-variants/Cargo.toml diff --git a/crates/cfxcore/core/src/pos/common/num-variants/src/lib.rs b/crates/pos/common/num-variants/src/lib.rs similarity index 100% rename from crates/cfxcore/core/src/pos/common/num-variants/src/lib.rs rename to crates/pos/common/num-variants/src/lib.rs diff --git a/crates/cfxcore/core/src/pos/common/num-variants/tests/basic.rs b/crates/pos/common/num-variants/tests/basic.rs similarity index 100% rename from crates/cfxcore/core/src/pos/common/num-variants/tests/basic.rs rename to crates/pos/common/num-variants/tests/basic.rs diff --git a/crates/cfxcore/core/src/pos/common/proptest-helpers/Cargo.toml b/crates/pos/common/proptest-helpers/Cargo.toml similarity index 100% rename from crates/cfxcore/core/src/pos/common/proptest-helpers/Cargo.toml rename to crates/pos/common/proptest-helpers/Cargo.toml diff --git a/crates/cfxcore/core/src/pos/common/proptest-helpers/proptest-regressions/unit_tests/growing_subset_tests.txt b/crates/pos/common/proptest-helpers/proptest-regressions/unit_tests/growing_subset_tests.txt similarity index 100% rename from crates/cfxcore/core/src/pos/common/proptest-helpers/proptest-regressions/unit_tests/growing_subset_tests.txt rename to crates/pos/common/proptest-helpers/proptest-regressions/unit_tests/growing_subset_tests.txt diff --git a/crates/cfxcore/core/src/pos/common/proptest-helpers/proptest-regressions/unit_tests/repeat_vec_tests.txt b/crates/pos/common/proptest-helpers/proptest-regressions/unit_tests/repeat_vec_tests.txt similarity index 100% rename from crates/cfxcore/core/src/pos/common/proptest-helpers/proptest-regressions/unit_tests/repeat_vec_tests.txt rename to crates/pos/common/proptest-helpers/proptest-regressions/unit_tests/repeat_vec_tests.txt diff --git a/crates/cfxcore/core/src/pos/common/proptest-helpers/src/growing_subset.rs b/crates/pos/common/proptest-helpers/src/growing_subset.rs similarity index 100% rename from crates/cfxcore/core/src/pos/common/proptest-helpers/src/growing_subset.rs rename to crates/pos/common/proptest-helpers/src/growing_subset.rs diff --git a/crates/cfxcore/core/src/pos/common/proptest-helpers/src/lib.rs b/crates/pos/common/proptest-helpers/src/lib.rs similarity index 100% rename from crates/cfxcore/core/src/pos/common/proptest-helpers/src/lib.rs rename to crates/pos/common/proptest-helpers/src/lib.rs diff --git a/crates/cfxcore/core/src/pos/common/proptest-helpers/src/repeat_vec.rs b/crates/pos/common/proptest-helpers/src/repeat_vec.rs similarity index 100% rename from crates/cfxcore/core/src/pos/common/proptest-helpers/src/repeat_vec.rs rename to crates/pos/common/proptest-helpers/src/repeat_vec.rs diff --git a/crates/cfxcore/core/src/pos/common/proptest-helpers/src/unit_tests.rs b/crates/pos/common/proptest-helpers/src/unit_tests.rs similarity index 100% rename from crates/cfxcore/core/src/pos/common/proptest-helpers/src/unit_tests.rs rename to crates/pos/common/proptest-helpers/src/unit_tests.rs diff --git a/crates/cfxcore/core/src/pos/common/proptest-helpers/src/unit_tests/growing_subset_tests.rs b/crates/pos/common/proptest-helpers/src/unit_tests/growing_subset_tests.rs similarity index 100% rename from crates/cfxcore/core/src/pos/common/proptest-helpers/src/unit_tests/growing_subset_tests.rs rename to crates/pos/common/proptest-helpers/src/unit_tests/growing_subset_tests.rs diff --git a/crates/cfxcore/core/src/pos/common/proptest-helpers/src/unit_tests/pick_idx_tests.rs b/crates/pos/common/proptest-helpers/src/unit_tests/pick_idx_tests.rs similarity index 100% rename from crates/cfxcore/core/src/pos/common/proptest-helpers/src/unit_tests/pick_idx_tests.rs rename to crates/pos/common/proptest-helpers/src/unit_tests/pick_idx_tests.rs diff --git a/crates/cfxcore/core/src/pos/common/proptest-helpers/src/unit_tests/repeat_vec_tests.rs b/crates/pos/common/proptest-helpers/src/unit_tests/repeat_vec_tests.rs similarity index 100% rename from crates/cfxcore/core/src/pos/common/proptest-helpers/src/unit_tests/repeat_vec_tests.rs rename to crates/pos/common/proptest-helpers/src/unit_tests/repeat_vec_tests.rs diff --git a/crates/cfxcore/core/src/pos/common/proptest-helpers/src/value_generator.rs b/crates/pos/common/proptest-helpers/src/value_generator.rs similarity index 100% rename from crates/cfxcore/core/src/pos/common/proptest-helpers/src/value_generator.rs rename to crates/pos/common/proptest-helpers/src/value_generator.rs diff --git a/crates/cfxcore/core/src/pos/common/proxy/Cargo.toml b/crates/pos/common/proxy/Cargo.toml similarity index 100% rename from crates/cfxcore/core/src/pos/common/proxy/Cargo.toml rename to crates/pos/common/proxy/Cargo.toml diff --git a/crates/cfxcore/core/src/pos/common/proxy/src/lib.rs b/crates/pos/common/proxy/src/lib.rs similarity index 100% rename from crates/cfxcore/core/src/pos/common/proxy/src/lib.rs rename to crates/pos/common/proxy/src/lib.rs diff --git a/crates/cfxcore/core/src/pos/common/short-hex-str/Cargo.toml b/crates/pos/common/short-hex-str/Cargo.toml similarity index 100% rename from crates/cfxcore/core/src/pos/common/short-hex-str/Cargo.toml rename to crates/pos/common/short-hex-str/Cargo.toml diff --git a/crates/cfxcore/core/src/pos/common/short-hex-str/src/lib.rs b/crates/pos/common/short-hex-str/src/lib.rs similarity index 100% rename from crates/cfxcore/core/src/pos/common/short-hex-str/src/lib.rs rename to crates/pos/common/short-hex-str/src/lib.rs diff --git a/crates/cfxcore/core/src/pos/common/subscription-service/Cargo.toml b/crates/pos/common/subscription-service/Cargo.toml similarity index 90% rename from crates/cfxcore/core/src/pos/common/subscription-service/Cargo.toml rename to crates/pos/common/subscription-service/Cargo.toml index d65359f577..5d2179526e 100644 --- a/crates/cfxcore/core/src/pos/common/subscription-service/Cargo.toml +++ b/crates/pos/common/subscription-service/Cargo.toml @@ -12,5 +12,5 @@ edition = "2018" [dependencies] anyhow = "1.0.38" -diem-types = { path = "../../types" } +diem-types = { workspace = true } channel = { path = "../channel" } diff --git a/crates/cfxcore/core/src/pos/common/subscription-service/src/lib.rs b/crates/pos/common/subscription-service/src/lib.rs similarity index 100% rename from crates/cfxcore/core/src/pos/common/subscription-service/src/lib.rs rename to crates/pos/common/subscription-service/src/lib.rs diff --git a/crates/cfxcore/core/src/pos/common/temppath/Cargo.toml b/crates/pos/common/temppath/Cargo.toml similarity index 100% rename from crates/cfxcore/core/src/pos/common/temppath/Cargo.toml rename to crates/pos/common/temppath/Cargo.toml diff --git a/crates/cfxcore/core/src/pos/common/temppath/src/lib.rs b/crates/pos/common/temppath/src/lib.rs similarity index 100% rename from crates/cfxcore/core/src/pos/common/temppath/src/lib.rs rename to crates/pos/common/temppath/src/lib.rs diff --git a/crates/cfxcore/core/src/pos/common/time-service/Cargo.toml b/crates/pos/common/time-service/Cargo.toml similarity index 82% rename from crates/cfxcore/core/src/pos/common/time-service/Cargo.toml rename to crates/pos/common/time-service/Cargo.toml index 4dc5f00849..3058f42d38 100644 --- a/crates/cfxcore/core/src/pos/common/time-service/Cargo.toml +++ b/crates/pos/common/time-service/Cargo.toml @@ -14,9 +14,13 @@ enum_dispatch = "0.3.5" futures = { workspace = true, optional = true } pin-project = { version = "1.0.5", optional = true } thiserror = "1.0.24" -tokio = { workspace = true, features = ["macros", "rt-multi-thread", "time"], optional = true } +tokio = { workspace = true, features = [ + "macros", + "rt-multi-thread", + "time", +], optional = true } -diem-infallible = { path = "../infallible" } +diem-infallible = { workspace = true } [dev-dependencies] futures = { workspace = true } diff --git a/crates/cfxcore/core/src/pos/common/time-service/src/interval.rs b/crates/pos/common/time-service/src/interval.rs similarity index 100% rename from crates/cfxcore/core/src/pos/common/time-service/src/interval.rs rename to crates/pos/common/time-service/src/interval.rs diff --git a/crates/cfxcore/core/src/pos/common/time-service/src/lib.rs b/crates/pos/common/time-service/src/lib.rs similarity index 100% rename from crates/cfxcore/core/src/pos/common/time-service/src/lib.rs rename to crates/pos/common/time-service/src/lib.rs diff --git a/crates/cfxcore/core/src/pos/common/time-service/src/mock.rs b/crates/pos/common/time-service/src/mock.rs similarity index 100% rename from crates/cfxcore/core/src/pos/common/time-service/src/mock.rs rename to crates/pos/common/time-service/src/mock.rs diff --git a/crates/cfxcore/core/src/pos/common/time-service/src/real.rs b/crates/pos/common/time-service/src/real.rs similarity index 100% rename from crates/cfxcore/core/src/pos/common/time-service/src/real.rs rename to crates/pos/common/time-service/src/real.rs diff --git a/crates/cfxcore/core/src/pos/common/time-service/src/timeout.rs b/crates/pos/common/time-service/src/timeout.rs similarity index 100% rename from crates/cfxcore/core/src/pos/common/time-service/src/timeout.rs rename to crates/pos/common/time-service/src/timeout.rs diff --git a/crates/cfxcore/core/src/pos/config/README.md b/crates/pos/config/README.md similarity index 100% rename from crates/cfxcore/core/src/pos/config/README.md rename to crates/pos/config/README.md diff --git a/crates/cfxcore/core/src/pos/config/Cargo.toml b/crates/pos/config/config/Cargo.toml similarity index 57% rename from crates/cfxcore/core/src/pos/config/Cargo.toml rename to crates/pos/config/config/Cargo.toml index 5678adfc65..5ac12683be 100644 --- a/crates/cfxcore/core/src/pos/config/Cargo.toml +++ b/crates/pos/config/config/Cargo.toml @@ -19,19 +19,19 @@ serde_yaml = "0.8.17" thiserror = "1.0.24" bcs = "0.1.2" -diem-crypto = { path = "../crypto/crypto" } -diem-crypto-derive = { path = "../crypto/crypto-derive" } -diem-global-constants = { path = "global-constants" } -diem-logger = { path = "../common/logger" } -diem-network-address-encryption = { path = "management/network-address-encryption" } -diem-secure-storage = { path = "../secure/storage" } -diem-temppath = { path = "../common/temppath" } -diem-types = { path = "../types" } -short-hex-str = { path = "../common/short-hex-str" } +diem-crypto = { workspace = true } +diem-crypto-derive = { workspace = true } +diem-global-constants = { workspace = true } +diem-logger = { workspace = true } +diem-network-address-encryption = { workspace = true } +diem-secure-storage = { workspace = true } +diem-temppath = { workspace = true } +diem-types = { workspace = true } +short-hex-str = { workspace = true } cfx-types = { workspace = true } [dev-dependencies] -diem-crypto = { path = "../crypto/crypto", features = ["fuzzing"] } +diem-crypto = { workspace = true, features = ["fuzzing"] } [features] default = [] diff --git a/crates/cfxcore/core/src/pos/config/data/metrics/prometheus.yml b/crates/pos/config/config/data/metrics/prometheus.yml similarity index 100% rename from crates/cfxcore/core/src/pos/config/data/metrics/prometheus.yml rename to crates/pos/config/config/data/metrics/prometheus.yml diff --git a/crates/cfxcore/core/src/pos/config/src/config/consensus_config.rs b/crates/pos/config/config/src/config/consensus_config.rs similarity index 100% rename from crates/cfxcore/core/src/pos/config/src/config/consensus_config.rs rename to crates/pos/config/config/src/config/consensus_config.rs diff --git a/crates/cfxcore/core/src/pos/config/src/config/debug_interface_config.rs b/crates/pos/config/config/src/config/debug_interface_config.rs similarity index 100% rename from crates/cfxcore/core/src/pos/config/src/config/debug_interface_config.rs rename to crates/pos/config/config/src/config/debug_interface_config.rs diff --git a/crates/cfxcore/core/src/pos/config/src/config/error.rs b/crates/pos/config/config/src/config/error.rs similarity index 100% rename from crates/cfxcore/core/src/pos/config/src/config/error.rs rename to crates/pos/config/config/src/config/error.rs diff --git a/crates/cfxcore/core/src/pos/config/src/config/execution_config.rs b/crates/pos/config/config/src/config/execution_config.rs similarity index 100% rename from crates/cfxcore/core/src/pos/config/src/config/execution_config.rs rename to crates/pos/config/config/src/config/execution_config.rs diff --git a/crates/cfxcore/core/src/pos/config/src/config/json_rpc_config.rs b/crates/pos/config/config/src/config/json_rpc_config.rs similarity index 100% rename from crates/cfxcore/core/src/pos/config/src/config/json_rpc_config.rs rename to crates/pos/config/config/src/config/json_rpc_config.rs diff --git a/crates/cfxcore/core/src/pos/config/src/config/key_manager_config.rs b/crates/pos/config/config/src/config/key_manager_config.rs similarity index 100% rename from crates/cfxcore/core/src/pos/config/src/config/key_manager_config.rs rename to crates/pos/config/config/src/config/key_manager_config.rs diff --git a/crates/cfxcore/core/src/pos/config/src/config/logger_config.rs b/crates/pos/config/config/src/config/logger_config.rs similarity index 100% rename from crates/cfxcore/core/src/pos/config/src/config/logger_config.rs rename to crates/pos/config/config/src/config/logger_config.rs diff --git a/crates/cfxcore/core/src/pos/config/src/config/mempool_config.rs b/crates/pos/config/config/src/config/mempool_config.rs similarity index 100% rename from crates/cfxcore/core/src/pos/config/src/config/mempool_config.rs rename to crates/pos/config/config/src/config/mempool_config.rs diff --git a/crates/cfxcore/core/src/pos/config/src/config/metrics_config.rs b/crates/pos/config/config/src/config/metrics_config.rs similarity index 100% rename from crates/cfxcore/core/src/pos/config/src/config/metrics_config.rs rename to crates/pos/config/config/src/config/metrics_config.rs diff --git a/crates/cfxcore/core/src/pos/config/src/config/mod.rs b/crates/pos/config/config/src/config/mod.rs similarity index 100% rename from crates/cfxcore/core/src/pos/config/src/config/mod.rs rename to crates/pos/config/config/src/config/mod.rs diff --git a/crates/cfxcore/core/src/pos/config/src/config/network_config.rs b/crates/pos/config/config/src/config/network_config.rs similarity index 100% rename from crates/cfxcore/core/src/pos/config/src/config/network_config.rs rename to crates/pos/config/config/src/config/network_config.rs diff --git a/crates/cfxcore/core/src/pos/config/src/config/safety_rules_config.rs b/crates/pos/config/config/src/config/safety_rules_config.rs similarity index 100% rename from crates/cfxcore/core/src/pos/config/src/config/safety_rules_config.rs rename to crates/pos/config/config/src/config/safety_rules_config.rs diff --git a/crates/cfxcore/core/src/pos/config/src/config/secure_backend_config.rs b/crates/pos/config/config/src/config/secure_backend_config.rs similarity index 100% rename from crates/cfxcore/core/src/pos/config/src/config/secure_backend_config.rs rename to crates/pos/config/config/src/config/secure_backend_config.rs diff --git a/crates/cfxcore/core/src/pos/config/src/config/state_sync_config.rs b/crates/pos/config/config/src/config/state_sync_config.rs similarity index 100% rename from crates/cfxcore/core/src/pos/config/src/config/state_sync_config.rs rename to crates/pos/config/config/src/config/state_sync_config.rs diff --git a/crates/cfxcore/core/src/pos/config/src/config/storage_config.rs b/crates/pos/config/config/src/config/storage_config.rs similarity index 100% rename from crates/cfxcore/core/src/pos/config/src/config/storage_config.rs rename to crates/pos/config/config/src/config/storage_config.rs diff --git a/crates/cfxcore/core/src/pos/config/src/config/test_config.rs b/crates/pos/config/config/src/config/test_config.rs similarity index 100% rename from crates/cfxcore/core/src/pos/config/src/config/test_config.rs rename to crates/pos/config/config/src/config/test_config.rs diff --git a/crates/cfxcore/core/src/pos/config/src/config/test_data/public_full_node.yaml b/crates/pos/config/config/src/config/test_data/public_full_node.yaml similarity index 100% rename from crates/cfxcore/core/src/pos/config/src/config/test_data/public_full_node.yaml rename to crates/pos/config/config/src/config/test_data/public_full_node.yaml diff --git a/crates/cfxcore/core/src/pos/config/src/config/test_data/safety_rules.yaml b/crates/pos/config/config/src/config/test_data/safety_rules.yaml similarity index 100% rename from crates/cfxcore/core/src/pos/config/src/config/test_data/safety_rules.yaml rename to crates/pos/config/config/src/config/test_data/safety_rules.yaml diff --git a/crates/cfxcore/core/src/pos/config/src/config/test_data/validator.yaml b/crates/pos/config/config/src/config/test_data/validator.yaml similarity index 100% rename from crates/cfxcore/core/src/pos/config/src/config/test_data/validator.yaml rename to crates/pos/config/config/src/config/test_data/validator.yaml diff --git a/crates/cfxcore/core/src/pos/config/src/config/test_data/validator_full_node.yaml b/crates/pos/config/config/src/config/test_data/validator_full_node.yaml similarity index 100% rename from crates/cfxcore/core/src/pos/config/src/config/test_data/validator_full_node.yaml rename to crates/pos/config/config/src/config/test_data/validator_full_node.yaml diff --git a/crates/cfxcore/core/src/pos/config/src/config/upstream_config.rs b/crates/pos/config/config/src/config/upstream_config.rs similarity index 100% rename from crates/cfxcore/core/src/pos/config/src/config/upstream_config.rs rename to crates/pos/config/config/src/config/upstream_config.rs diff --git a/crates/cfxcore/core/src/pos/config/src/generator.rs b/crates/pos/config/config/src/generator.rs similarity index 100% rename from crates/cfxcore/core/src/pos/config/src/generator.rs rename to crates/pos/config/config/src/generator.rs diff --git a/crates/cfxcore/core/src/pos/config/src/keys.rs b/crates/pos/config/config/src/keys.rs similarity index 100% rename from crates/cfxcore/core/src/pos/config/src/keys.rs rename to crates/pos/config/config/src/keys.rs diff --git a/crates/cfxcore/core/src/pos/config/src/lib.rs b/crates/pos/config/config/src/lib.rs similarity index 100% rename from crates/cfxcore/core/src/pos/config/src/lib.rs rename to crates/pos/config/config/src/lib.rs diff --git a/crates/cfxcore/core/src/pos/config/src/network_id.rs b/crates/pos/config/config/src/network_id.rs similarity index 100% rename from crates/cfxcore/core/src/pos/config/src/network_id.rs rename to crates/pos/config/config/src/network_id.rs diff --git a/crates/cfxcore/core/src/pos/config/src/utils.rs b/crates/pos/config/config/src/utils.rs similarity index 100% rename from crates/cfxcore/core/src/pos/config/src/utils.rs rename to crates/pos/config/config/src/utils.rs diff --git a/crates/cfxcore/core/src/pos/consensus/consensus-types/Cargo.toml b/crates/pos/config/consensus-types/Cargo.toml similarity index 59% rename from crates/cfxcore/core/src/pos/consensus/consensus-types/Cargo.toml rename to crates/pos/config/consensus-types/Cargo.toml index 3afdf77978..8b5d5ae5f2 100644 --- a/crates/cfxcore/core/src/pos/consensus/consensus-types/Cargo.toml +++ b/crates/pos/config/consensus-types/Cargo.toml @@ -12,20 +12,20 @@ mirai-annotations = { version = "1.10.1", default-features = false } proptest = { version = "1.0.0", optional = true } serde = { version = "1.0.124", default-features = false } -executor-types = { path = "../../types/executor-types" } +executor-types = { workspace = true } bcs = "0.1.2" -diem-crypto = { path = "../../crypto/crypto" } -diem-crypto-derive = { path = "../../crypto/crypto-derive" } -diem-infallible = { path = "../../common/infallible" } -diem-types = { path = "../../types" } -short-hex-str = { path = "../../common/short-hex-str" } +diem-crypto = { workspace = true } +diem-crypto-derive = { workspace = true } +diem-infallible = { workspace = true } +diem-types = { workspace = true } +short-hex-str = { workspace = true } rustc-hex = { workspace = true } [dev-dependencies] proptest = "1.0.0" -diem-types = { path = "../../types", features = ["fuzzing"] } +diem-types = { workspace = true, features = ["fuzzing"] } [features] default = [] diff --git a/crates/cfxcore/core/src/pos/consensus/consensus-types/src/block.rs b/crates/pos/config/consensus-types/src/block.rs similarity index 100% rename from crates/cfxcore/core/src/pos/consensus/consensus-types/src/block.rs rename to crates/pos/config/consensus-types/src/block.rs diff --git a/crates/cfxcore/core/src/pos/consensus/consensus-types/src/block_data.rs b/crates/pos/config/consensus-types/src/block_data.rs similarity index 100% rename from crates/cfxcore/core/src/pos/consensus/consensus-types/src/block_data.rs rename to crates/pos/config/consensus-types/src/block_data.rs diff --git a/crates/cfxcore/core/src/pos/consensus/consensus-types/src/block_retrieval.rs b/crates/pos/config/consensus-types/src/block_retrieval.rs similarity index 100% rename from crates/cfxcore/core/src/pos/consensus/consensus-types/src/block_retrieval.rs rename to crates/pos/config/consensus-types/src/block_retrieval.rs diff --git a/crates/cfxcore/core/src/pos/consensus/consensus-types/src/block_test.rs b/crates/pos/config/consensus-types/src/block_test.rs similarity index 100% rename from crates/cfxcore/core/src/pos/consensus/consensus-types/src/block_test.rs rename to crates/pos/config/consensus-types/src/block_test.rs diff --git a/crates/cfxcore/core/src/pos/consensus/consensus-types/src/block_test_utils.rs b/crates/pos/config/consensus-types/src/block_test_utils.rs similarity index 100% rename from crates/cfxcore/core/src/pos/consensus/consensus-types/src/block_test_utils.rs rename to crates/pos/config/consensus-types/src/block_test_utils.rs diff --git a/crates/cfxcore/core/src/pos/consensus/consensus-types/src/common.rs b/crates/pos/config/consensus-types/src/common.rs similarity index 100% rename from crates/cfxcore/core/src/pos/consensus/consensus-types/src/common.rs rename to crates/pos/config/consensus-types/src/common.rs diff --git a/crates/cfxcore/core/src/pos/consensus/consensus-types/src/db.rs b/crates/pos/config/consensus-types/src/db.rs similarity index 100% rename from crates/cfxcore/core/src/pos/consensus/consensus-types/src/db.rs rename to crates/pos/config/consensus-types/src/db.rs diff --git a/crates/cfxcore/core/src/pos/consensus/consensus-types/src/epoch_retrieval.rs b/crates/pos/config/consensus-types/src/epoch_retrieval.rs similarity index 100% rename from crates/cfxcore/core/src/pos/consensus/consensus-types/src/epoch_retrieval.rs rename to crates/pos/config/consensus-types/src/epoch_retrieval.rs diff --git a/crates/cfxcore/core/src/pos/consensus/consensus-types/src/executed_block.rs b/crates/pos/config/consensus-types/src/executed_block.rs similarity index 100% rename from crates/cfxcore/core/src/pos/consensus/consensus-types/src/executed_block.rs rename to crates/pos/config/consensus-types/src/executed_block.rs diff --git a/crates/cfxcore/core/src/pos/consensus/consensus-types/src/lib.rs b/crates/pos/config/consensus-types/src/lib.rs similarity index 100% rename from crates/cfxcore/core/src/pos/consensus/consensus-types/src/lib.rs rename to crates/pos/config/consensus-types/src/lib.rs diff --git a/crates/cfxcore/core/src/pos/consensus/consensus-types/src/proposal_msg.rs b/crates/pos/config/consensus-types/src/proposal_msg.rs similarity index 100% rename from crates/cfxcore/core/src/pos/consensus/consensus-types/src/proposal_msg.rs rename to crates/pos/config/consensus-types/src/proposal_msg.rs diff --git a/crates/cfxcore/core/src/pos/consensus/consensus-types/src/quorum_cert.rs b/crates/pos/config/consensus-types/src/quorum_cert.rs similarity index 100% rename from crates/cfxcore/core/src/pos/consensus/consensus-types/src/quorum_cert.rs rename to crates/pos/config/consensus-types/src/quorum_cert.rs diff --git a/crates/cfxcore/core/src/pos/consensus/consensus-types/src/safety_data.rs b/crates/pos/config/consensus-types/src/safety_data.rs similarity index 100% rename from crates/cfxcore/core/src/pos/consensus/consensus-types/src/safety_data.rs rename to crates/pos/config/consensus-types/src/safety_data.rs diff --git a/crates/cfxcore/core/src/pos/consensus/consensus-types/src/sync_info.rs b/crates/pos/config/consensus-types/src/sync_info.rs similarity index 100% rename from crates/cfxcore/core/src/pos/consensus/consensus-types/src/sync_info.rs rename to crates/pos/config/consensus-types/src/sync_info.rs diff --git a/crates/cfxcore/core/src/pos/consensus/consensus-types/src/timeout.rs b/crates/pos/config/consensus-types/src/timeout.rs similarity index 100% rename from crates/cfxcore/core/src/pos/consensus/consensus-types/src/timeout.rs rename to crates/pos/config/consensus-types/src/timeout.rs diff --git a/crates/cfxcore/core/src/pos/consensus/consensus-types/src/timeout_certificate.rs b/crates/pos/config/consensus-types/src/timeout_certificate.rs similarity index 100% rename from crates/cfxcore/core/src/pos/consensus/consensus-types/src/timeout_certificate.rs rename to crates/pos/config/consensus-types/src/timeout_certificate.rs diff --git a/crates/cfxcore/core/src/pos/consensus/consensus-types/src/vote.rs b/crates/pos/config/consensus-types/src/vote.rs similarity index 100% rename from crates/cfxcore/core/src/pos/consensus/consensus-types/src/vote.rs rename to crates/pos/config/consensus-types/src/vote.rs diff --git a/crates/cfxcore/core/src/pos/consensus/consensus-types/src/vote_data.rs b/crates/pos/config/consensus-types/src/vote_data.rs similarity index 100% rename from crates/cfxcore/core/src/pos/consensus/consensus-types/src/vote_data.rs rename to crates/pos/config/consensus-types/src/vote_data.rs diff --git a/crates/cfxcore/core/src/pos/consensus/consensus-types/src/vote_msg.rs b/crates/pos/config/consensus-types/src/vote_msg.rs similarity index 100% rename from crates/cfxcore/core/src/pos/consensus/consensus-types/src/vote_msg.rs rename to crates/pos/config/consensus-types/src/vote_msg.rs diff --git a/crates/cfxcore/core/src/pos/consensus/consensus-types/src/vote_proposal.rs b/crates/pos/config/consensus-types/src/vote_proposal.rs similarity index 100% rename from crates/cfxcore/core/src/pos/consensus/consensus-types/src/vote_proposal.rs rename to crates/pos/config/consensus-types/src/vote_proposal.rs diff --git a/crates/cfxcore/core/src/pos/config/generate-key/Cargo.toml b/crates/pos/config/generate-key/Cargo.toml similarity index 76% rename from crates/cfxcore/core/src/pos/config/generate-key/Cargo.toml rename to crates/pos/config/generate-key/Cargo.toml index 34866e2f7b..7bab67f8e0 100644 --- a/crates/cfxcore/core/src/pos/config/generate-key/Cargo.toml +++ b/crates/pos/config/generate-key/Cargo.toml @@ -13,5 +13,5 @@ edition = "2018" rand = "0.8.3" bcs = "0.1.2" -diem-crypto = { path = "../../crypto/crypto/"} -diem-temppath = { path = "../../common/temppath" } +diem-crypto = { workspace = true } +diem-temppath = { workspace = true } diff --git a/crates/cfxcore/core/src/pos/config/generate-key/src/lib.rs b/crates/pos/config/generate-key/src/lib.rs similarity index 100% rename from crates/cfxcore/core/src/pos/config/generate-key/src/lib.rs rename to crates/pos/config/generate-key/src/lib.rs diff --git a/crates/cfxcore/core/src/pos/config/generate-key/src/main.rs b/crates/pos/config/generate-key/src/main.rs similarity index 100% rename from crates/cfxcore/core/src/pos/config/generate-key/src/main.rs rename to crates/pos/config/generate-key/src/main.rs diff --git a/crates/cfxcore/core/src/pos/config/global-constants/Cargo.toml b/crates/pos/config/global-constants/Cargo.toml similarity index 100% rename from crates/cfxcore/core/src/pos/config/global-constants/Cargo.toml rename to crates/pos/config/global-constants/Cargo.toml diff --git a/crates/cfxcore/core/src/pos/config/global-constants/src/lib.rs b/crates/pos/config/global-constants/src/lib.rs similarity index 100% rename from crates/cfxcore/core/src/pos/config/global-constants/src/lib.rs rename to crates/pos/config/global-constants/src/lib.rs diff --git a/crates/cfxcore/core/src/pos/config/management/Cargo.toml b/crates/pos/config/management/Cargo.toml similarity index 61% rename from crates/cfxcore/core/src/pos/config/management/Cargo.toml rename to crates/pos/config/management/Cargo.toml index 7051e39a2e..81349a4131 100644 --- a/crates/cfxcore/core/src/pos/config/management/Cargo.toml +++ b/crates/pos/config/management/Cargo.toml @@ -19,18 +19,18 @@ thiserror = "1.0.24" toml = { version = "0.5.8", default-features = false } bcs = "0.1.2" -diem-config = { path = ".." } -diem-crypto = { path = "../../crypto/crypto" } -diem-global-constants = { path = "../global-constants" } -diem-network-address-encryption = {path = "network-address-encryption" } -diem-secure-storage = { path = "../../secure/storage" } -diem-time-service = { path = "../../common/time-service" } -diem-types = { path = "../../types" } -diem-temppath = { path = "../../common/temppath" } +diem-config = { workspace = true } +diem-crypto = { workspace = true } +diem-global-constants = { workspace = true } +diem-network-address-encryption = { workspace = true } +diem-secure-storage = { workspace = true } +diem-time-service = { workspace = true } +diem-types = { workspace = true } +diem-temppath = { workspace = true } transaction-builder = { path = "../../language/transaction-builder" } [dev-dependencies] -diem-config = { path = "..", features = ["fuzzing"] } +diem-config = { workspace = true, features = ["fuzzing"] } [features] testing = [] diff --git a/crates/cfxcore/core/src/pos/config/management/README.md b/crates/pos/config/management/README.md similarity index 100% rename from crates/cfxcore/core/src/pos/config/management/README.md rename to crates/pos/config/management/README.md diff --git a/crates/cfxcore/core/src/pos/config/management/genesis/Cargo.toml b/crates/pos/config/management/genesis/Cargo.toml similarity index 50% rename from crates/cfxcore/core/src/pos/config/management/genesis/Cargo.toml rename to crates/pos/config/management/genesis/Cargo.toml index 8fbfbc78f2..d39b6bceb1 100644 --- a/crates/cfxcore/core/src/pos/config/management/genesis/Cargo.toml +++ b/crates/pos/config/management/genesis/Cargo.toml @@ -17,26 +17,26 @@ structopt = "0.3.21" thiserror = "1.0.24" toml = { version = "0.5.8", default-features = false } -consensus-types = { path = "../../../consensus/consensus-types" } -executor = { path = "../../../execution/executor" } -generate-key = { path = "../../generate-key" } +consensus-types = { workspace = true } +executor = { workspace = true } +generate-key = { workspace = true } bcs = "0.1.2" -diem-config = { path = "../.." } -diem-crypto = { path = "../../../crypto/crypto" } -diem-global-constants = { path = "../../global-constants" } -diem-management = { path = ".." } -diem-network-address-encryption = {path = "../network-address-encryption" } -diem-secure-storage = { path = "../../../secure/storage" } -diem-types = { path = "../../../types" } -diem-temppath = { path = "../../../common/temppath" } +diem-config = { workspace = true } +diem-crypto = { workspace = true } +diem-global-constants = { workspace = true } +diem-management = { path = "../"} +diem-network-address-encryption = { workspace = true } +diem-secure-storage = { workspace = true } +diem-types = { workspace = true } +diem-temppath = { workspace = true } diem-vm = { path = "../../../language/diem-vm" } -pos-ledger-db = { path = "../../../storage/pos-ledger-db" } -storage-interface = { path = "../../../storage/storage-interface" } +pos-ledger-db = { workspace = true } +storage-interface = { workspace = true } transaction-builder = { path = "../../../language/transaction-builder" } vm-genesis = { path = "../../../language/tools/vm-genesis" } [dev-dependencies] -diem-config = { path = "../..", features = ["fuzzing"]} +diem-config = { workspace = true, features = ["fuzzing"] } [features] testing = [] diff --git a/crates/cfxcore/core/src/pos/config/management/genesis/README.md b/crates/pos/config/management/genesis/README.md similarity index 100% rename from crates/cfxcore/core/src/pos/config/management/genesis/README.md rename to crates/pos/config/management/genesis/README.md diff --git a/crates/cfxcore/core/src/pos/config/management/genesis/src/command.rs b/crates/pos/config/management/genesis/src/command.rs similarity index 100% rename from crates/cfxcore/core/src/pos/config/management/genesis/src/command.rs rename to crates/pos/config/management/genesis/src/command.rs diff --git a/crates/cfxcore/core/src/pos/config/management/genesis/src/config_builder.rs b/crates/pos/config/management/genesis/src/config_builder.rs similarity index 100% rename from crates/cfxcore/core/src/pos/config/management/genesis/src/config_builder.rs rename to crates/pos/config/management/genesis/src/config_builder.rs diff --git a/crates/cfxcore/core/src/pos/config/management/genesis/src/genesis.rs b/crates/pos/config/management/genesis/src/genesis.rs similarity index 100% rename from crates/cfxcore/core/src/pos/config/management/genesis/src/genesis.rs rename to crates/pos/config/management/genesis/src/genesis.rs diff --git a/crates/cfxcore/core/src/pos/config/management/genesis/src/key.rs b/crates/pos/config/management/genesis/src/key.rs similarity index 100% rename from crates/cfxcore/core/src/pos/config/management/genesis/src/key.rs rename to crates/pos/config/management/genesis/src/key.rs diff --git a/crates/cfxcore/core/src/pos/config/management/genesis/src/layout.rs b/crates/pos/config/management/genesis/src/layout.rs similarity index 100% rename from crates/cfxcore/core/src/pos/config/management/genesis/src/layout.rs rename to crates/pos/config/management/genesis/src/layout.rs diff --git a/crates/cfxcore/core/src/pos/config/management/genesis/src/lib.rs b/crates/pos/config/management/genesis/src/lib.rs similarity index 100% rename from crates/cfxcore/core/src/pos/config/management/genesis/src/lib.rs rename to crates/pos/config/management/genesis/src/lib.rs diff --git a/crates/cfxcore/core/src/pos/config/management/genesis/src/main.rs b/crates/pos/config/management/genesis/src/main.rs similarity index 100% rename from crates/cfxcore/core/src/pos/config/management/genesis/src/main.rs rename to crates/pos/config/management/genesis/src/main.rs diff --git a/crates/cfxcore/core/src/pos/config/management/genesis/src/storage_helper.rs b/crates/pos/config/management/genesis/src/storage_helper.rs similarity index 100% rename from crates/cfxcore/core/src/pos/config/management/genesis/src/storage_helper.rs rename to crates/pos/config/management/genesis/src/storage_helper.rs diff --git a/crates/cfxcore/core/src/pos/config/management/genesis/src/swarm_config.rs b/crates/pos/config/management/genesis/src/swarm_config.rs similarity index 100% rename from crates/cfxcore/core/src/pos/config/management/genesis/src/swarm_config.rs rename to crates/pos/config/management/genesis/src/swarm_config.rs diff --git a/crates/cfxcore/core/src/pos/config/management/genesis/src/validator_config.rs b/crates/pos/config/management/genesis/src/validator_config.rs similarity index 100% rename from crates/cfxcore/core/src/pos/config/management/genesis/src/validator_config.rs rename to crates/pos/config/management/genesis/src/validator_config.rs diff --git a/crates/cfxcore/core/src/pos/config/management/genesis/src/validator_operator.rs b/crates/pos/config/management/genesis/src/validator_operator.rs similarity index 100% rename from crates/cfxcore/core/src/pos/config/management/genesis/src/validator_operator.rs rename to crates/pos/config/management/genesis/src/validator_operator.rs diff --git a/crates/cfxcore/core/src/pos/config/management/genesis/src/verify.rs b/crates/pos/config/management/genesis/src/verify.rs similarity index 100% rename from crates/cfxcore/core/src/pos/config/management/genesis/src/verify.rs rename to crates/pos/config/management/genesis/src/verify.rs diff --git a/crates/cfxcore/core/src/pos/config/management/genesis/src/waypoint.rs b/crates/pos/config/management/genesis/src/waypoint.rs similarity index 100% rename from crates/cfxcore/core/src/pos/config/management/genesis/src/waypoint.rs rename to crates/pos/config/management/genesis/src/waypoint.rs diff --git a/crates/cfxcore/core/src/pos/config/management/network-address-encryption/Cargo.toml b/crates/pos/config/management/network-address-encryption/Cargo.toml similarity index 64% rename from crates/cfxcore/core/src/pos/config/management/network-address-encryption/Cargo.toml rename to crates/pos/config/management/network-address-encryption/Cargo.toml index e857fde12e..357a65be90 100644 --- a/crates/cfxcore/core/src/pos/config/management/network-address-encryption/Cargo.toml +++ b/crates/pos/config/management/network-address-encryption/Cargo.toml @@ -15,11 +15,11 @@ serde = { version = "1.0.124", features = ["rc"], default-features = false } thiserror = "1.0.24" bcs = "0.1.2" -diem-global-constants = { path = "../../global-constants" } -diem-infallible = { path = "../../../common/infallible" } -diem-logger = { path = "../../../common/logger" } -diem-secure-storage = { path = "../../../secure/storage" } -diem-types = { path = "../../../types" } +diem-global-constants = { workspace = true } +diem-infallible = { workspace = true } +diem-logger = { workspace = true } +diem-secure-storage = { workspace = true } +diem-types = { workspace = true } [dev-dependencies] rand = "0.8.3" diff --git a/crates/cfxcore/core/src/pos/config/management/network-address-encryption/src/lib.rs b/crates/pos/config/management/network-address-encryption/src/lib.rs similarity index 100% rename from crates/cfxcore/core/src/pos/config/management/network-address-encryption/src/lib.rs rename to crates/pos/config/management/network-address-encryption/src/lib.rs diff --git a/crates/cfxcore/core/src/pos/config/management/operational/Cargo.toml b/crates/pos/config/management/operational/Cargo.toml similarity index 63% rename from crates/cfxcore/core/src/pos/config/management/operational/Cargo.toml rename to crates/pos/config/management/operational/Cargo.toml index c0a187cb2d..4f2a687cda 100644 --- a/crates/cfxcore/core/src/pos/config/management/operational/Cargo.toml +++ b/crates/pos/config/management/operational/Cargo.toml @@ -20,15 +20,14 @@ toml = { version = "0.5.8", default-features = false } bcs = "0.1.2" diem-client = { path = "../../../sdk/client", features = ["blocking"], default-features = false } -diem-config = { path = "../.." } -diem-crypto = { path = "../../../crypto/crypto" } -diem-global-constants = { path = "../../global-constants" } -diem-management = { path = ".." } -diem-network-address-encryption = {path = "../network-address-encryption" } -diem-secure-storage = { path = "../../../secure/storage" } -diem-types = { path = "../../../types" } -diem-temppath = { path = "../../../common/temppath" } -fallible = { path = "../../../common/fallible" } +diem-config = { workspace = true } +diem-crypto = { workspace = true } +diem-global-constants = { workspace = true } +diem-network-address-encryption = { workspace = true } +diem-secure-storage = { workspace = true } +diem-types = { workspace = true } +diem-temppath = { workspace = true } +fallible = { workspace = true } transaction-builder = { path = "../../../language/transaction-builder" } [features] diff --git a/crates/cfxcore/core/src/pos/config/management/operational/README.md b/crates/pos/config/management/operational/README.md similarity index 100% rename from crates/cfxcore/core/src/pos/config/management/operational/README.md rename to crates/pos/config/management/operational/README.md diff --git a/crates/cfxcore/core/src/pos/config/management/operational/src/account_resource.rs b/crates/pos/config/management/operational/src/account_resource.rs similarity index 100% rename from crates/cfxcore/core/src/pos/config/management/operational/src/account_resource.rs rename to crates/pos/config/management/operational/src/account_resource.rs diff --git a/crates/cfxcore/core/src/pos/config/management/operational/src/auto_validate.rs b/crates/pos/config/management/operational/src/auto_validate.rs similarity index 100% rename from crates/cfxcore/core/src/pos/config/management/operational/src/auto_validate.rs rename to crates/pos/config/management/operational/src/auto_validate.rs diff --git a/crates/cfxcore/core/src/pos/config/management/operational/src/command.rs b/crates/pos/config/management/operational/src/command.rs similarity index 100% rename from crates/cfxcore/core/src/pos/config/management/operational/src/command.rs rename to crates/pos/config/management/operational/src/command.rs diff --git a/crates/cfxcore/core/src/pos/config/management/operational/src/governance.rs b/crates/pos/config/management/operational/src/governance.rs similarity index 100% rename from crates/cfxcore/core/src/pos/config/management/operational/src/governance.rs rename to crates/pos/config/management/operational/src/governance.rs diff --git a/crates/cfxcore/core/src/pos/config/management/operational/src/json_rpc.rs b/crates/pos/config/management/operational/src/json_rpc.rs similarity index 100% rename from crates/cfxcore/core/src/pos/config/management/operational/src/json_rpc.rs rename to crates/pos/config/management/operational/src/json_rpc.rs diff --git a/crates/cfxcore/core/src/pos/config/management/operational/src/keys.rs b/crates/pos/config/management/operational/src/keys.rs similarity index 100% rename from crates/cfxcore/core/src/pos/config/management/operational/src/keys.rs rename to crates/pos/config/management/operational/src/keys.rs diff --git a/crates/cfxcore/core/src/pos/config/management/operational/src/lib.rs b/crates/pos/config/management/operational/src/lib.rs similarity index 100% rename from crates/cfxcore/core/src/pos/config/management/operational/src/lib.rs rename to crates/pos/config/management/operational/src/lib.rs diff --git a/crates/cfxcore/core/src/pos/config/management/operational/src/main.rs b/crates/pos/config/management/operational/src/main.rs similarity index 100% rename from crates/cfxcore/core/src/pos/config/management/operational/src/main.rs rename to crates/pos/config/management/operational/src/main.rs diff --git a/crates/cfxcore/core/src/pos/config/management/operational/src/network_checker.rs b/crates/pos/config/management/operational/src/network_checker.rs similarity index 100% rename from crates/cfxcore/core/src/pos/config/management/operational/src/network_checker.rs rename to crates/pos/config/management/operational/src/network_checker.rs diff --git a/crates/cfxcore/core/src/pos/config/management/operational/src/owner.rs b/crates/pos/config/management/operational/src/owner.rs similarity index 100% rename from crates/cfxcore/core/src/pos/config/management/operational/src/owner.rs rename to crates/pos/config/management/operational/src/owner.rs diff --git a/crates/cfxcore/core/src/pos/config/management/operational/src/print.rs b/crates/pos/config/management/operational/src/print.rs similarity index 100% rename from crates/cfxcore/core/src/pos/config/management/operational/src/print.rs rename to crates/pos/config/management/operational/src/print.rs diff --git a/crates/cfxcore/core/src/pos/config/management/operational/src/test_helper.rs b/crates/pos/config/management/operational/src/test_helper.rs similarity index 100% rename from crates/cfxcore/core/src/pos/config/management/operational/src/test_helper.rs rename to crates/pos/config/management/operational/src/test_helper.rs diff --git a/crates/cfxcore/core/src/pos/config/management/operational/src/validate_transaction.rs b/crates/pos/config/management/operational/src/validate_transaction.rs similarity index 100% rename from crates/cfxcore/core/src/pos/config/management/operational/src/validate_transaction.rs rename to crates/pos/config/management/operational/src/validate_transaction.rs diff --git a/crates/cfxcore/core/src/pos/config/management/operational/src/validator_config.rs b/crates/pos/config/management/operational/src/validator_config.rs similarity index 100% rename from crates/cfxcore/core/src/pos/config/management/operational/src/validator_config.rs rename to crates/pos/config/management/operational/src/validator_config.rs diff --git a/crates/cfxcore/core/src/pos/config/management/operational/src/validator_set.rs b/crates/pos/config/management/operational/src/validator_set.rs similarity index 100% rename from crates/cfxcore/core/src/pos/config/management/operational/src/validator_set.rs rename to crates/pos/config/management/operational/src/validator_set.rs diff --git a/crates/cfxcore/core/src/pos/config/management/src/config.rs b/crates/pos/config/management/src/config.rs similarity index 100% rename from crates/cfxcore/core/src/pos/config/management/src/config.rs rename to crates/pos/config/management/src/config.rs diff --git a/crates/cfxcore/core/src/pos/config/management/src/error.rs b/crates/pos/config/management/src/error.rs similarity index 100% rename from crates/cfxcore/core/src/pos/config/management/src/error.rs rename to crates/pos/config/management/src/error.rs diff --git a/crates/cfxcore/core/src/pos/config/management/src/lib.rs b/crates/pos/config/management/src/lib.rs similarity index 100% rename from crates/cfxcore/core/src/pos/config/management/src/lib.rs rename to crates/pos/config/management/src/lib.rs diff --git a/crates/cfxcore/core/src/pos/config/management/src/secure_backend.rs b/crates/pos/config/management/src/secure_backend.rs similarity index 100% rename from crates/cfxcore/core/src/pos/config/management/src/secure_backend.rs rename to crates/pos/config/management/src/secure_backend.rs diff --git a/crates/cfxcore/core/src/pos/config/management/src/storage.rs b/crates/pos/config/management/src/storage.rs similarity index 100% rename from crates/cfxcore/core/src/pos/config/management/src/storage.rs rename to crates/pos/config/management/src/storage.rs diff --git a/crates/cfxcore/core/src/pos/config/management/src/transaction.rs b/crates/pos/config/management/src/transaction.rs similarity index 100% rename from crates/cfxcore/core/src/pos/config/management/src/transaction.rs rename to crates/pos/config/management/src/transaction.rs diff --git a/crates/cfxcore/core/src/pos/config/management/src/validator_config.rs b/crates/pos/config/management/src/validator_config.rs similarity index 100% rename from crates/cfxcore/core/src/pos/config/management/src/validator_config.rs rename to crates/pos/config/management/src/validator_config.rs diff --git a/crates/cfxcore/core/src/pos/config/management/src/waypoint.rs b/crates/pos/config/management/src/waypoint.rs similarity index 100% rename from crates/cfxcore/core/src/pos/config/management/src/waypoint.rs rename to crates/pos/config/management/src/waypoint.rs diff --git a/crates/cfxcore/core/src/pos/config/seed-peer-generator/Cargo.toml b/crates/pos/config/seed-peer-generator/Cargo.toml similarity index 55% rename from crates/cfxcore/core/src/pos/config/seed-peer-generator/Cargo.toml rename to crates/pos/config/seed-peer-generator/Cargo.toml index 68ce464b06..8a3e9a12e3 100644 --- a/crates/cfxcore/core/src/pos/config/seed-peer-generator/Cargo.toml +++ b/crates/pos/config/seed-peer-generator/Cargo.toml @@ -18,15 +18,17 @@ structopt = "0.3.21" thiserror = "1.0.24" bcs = "0.1.2" -diem-config = { path = ".." } -diem-crypto = { path = "../../crypto/crypto" } -diem-client = { path = "../../sdk/client", features = ["blocking"], default-features = false } -diem-logger = { path = "../../common/logger" } -diem-temppath = { path = "../../common/temppath" } -diem-types = { path = "../../types" } +diem-config = { workspace = true } +diem-crypto = { workspace = true } +diem-client = { path = "../../sdk/client", features = [ + "blocking", +], default-features = false } +diem-logger = { workspace = true } +diem-temppath = { workspace = true } +diem-types = { workspace = true } [dev-dependencies] -diem-types = {path = "../../types", features = ["fuzzing"]} +diem-types = { workspace = true, features = ["fuzzing"] } [features] default = [] diff --git a/crates/cfxcore/core/src/pos/config/seed-peer-generator/src/lib.rs b/crates/pos/config/seed-peer-generator/src/lib.rs similarity index 100% rename from crates/cfxcore/core/src/pos/config/seed-peer-generator/src/lib.rs rename to crates/pos/config/seed-peer-generator/src/lib.rs diff --git a/crates/cfxcore/core/src/pos/config/seed-peer-generator/src/main.rs b/crates/pos/config/seed-peer-generator/src/main.rs similarity index 100% rename from crates/cfxcore/core/src/pos/config/seed-peer-generator/src/main.rs rename to crates/pos/config/seed-peer-generator/src/main.rs diff --git a/crates/cfxcore/core/src/pos/config/seed-peer-generator/src/utils.rs b/crates/pos/config/seed-peer-generator/src/utils.rs similarity index 100% rename from crates/cfxcore/core/src/pos/config/seed-peer-generator/src/utils.rs rename to crates/pos/config/seed-peer-generator/src/utils.rs diff --git a/crates/pos/consensus/executor/Cargo.toml b/crates/pos/consensus/executor/Cargo.toml new file mode 100644 index 0000000000..b46b7f1825 --- /dev/null +++ b/crates/pos/consensus/executor/Cargo.toml @@ -0,0 +1,47 @@ +[package] +name = "executor" +version = "0.1.0" +authors = ["Diem Association "] +description = "Diem executor" +repository = "https://github.com/diem/diem" +homepage = "https://diem.com" +license = "Apache-2.0" +publish = false +edition = "2018" + +[dependencies] +anyhow = { workspace = true } +fail = { workspace = true } +itertools = { version = "0.10.0", default-features = false } +once_cell = { workspace = true } +serde_json = { workspace = true } +serde = { workspace = true, features = ["derive"] } + +consensus-types = { workspace = true } +executor-types = { workspace = true } +bcs = "0.1.2" +diem-crypto = { workspace = true } +diem-logger = { workspace = true } +diem-metrics = { workspace = true } +diem-infallible = { workspace = true } +diem-secure-net = { workspace = true } +diem-state-view = { workspace = true } +cached-pos-ledger-db = { workspace = true } +diem-types = { workspace = true } +move-core-types = { workspace = true } +scratchpad = { workspace = true } +storage-interface = { workspace = true } +subscription-service = { workspace = true } + +proptest = { version = "1.0.0", optional = true } +pow-types = { workspace = true } +async-trait = { workspace = true } +cfx-types = { workspace = true } +futures = { workspace = true } + +[dev-dependencies] +proptest = "1.0.0" +rand = "0.8.3" + +[features] +default = [] diff --git a/crates/cfxcore/core/src/pos/consensus/executor/src/db_bootstrapper.rs b/crates/pos/consensus/executor/src/db_bootstrapper.rs similarity index 100% rename from crates/cfxcore/core/src/pos/consensus/executor/src/db_bootstrapper.rs rename to crates/pos/consensus/executor/src/db_bootstrapper.rs diff --git a/crates/cfxcore/core/src/pos/consensus/executor/src/lib.rs b/crates/pos/consensus/executor/src/lib.rs similarity index 100% rename from crates/cfxcore/core/src/pos/consensus/executor/src/lib.rs rename to crates/pos/consensus/executor/src/lib.rs diff --git a/crates/cfxcore/core/src/pos/consensus/executor/src/logging.rs b/crates/pos/consensus/executor/src/logging.rs similarity index 100% rename from crates/cfxcore/core/src/pos/consensus/executor/src/logging.rs rename to crates/pos/consensus/executor/src/logging.rs diff --git a/crates/cfxcore/core/src/pos/consensus/executor/src/metrics.rs b/crates/pos/consensus/executor/src/metrics.rs similarity index 100% rename from crates/cfxcore/core/src/pos/consensus/executor/src/metrics.rs rename to crates/pos/consensus/executor/src/metrics.rs diff --git a/crates/cfxcore/core/src/pos/consensus/executor/src/vm.rs b/crates/pos/consensus/executor/src/vm.rs similarity index 100% rename from crates/cfxcore/core/src/pos/consensus/executor/src/vm.rs rename to crates/pos/consensus/executor/src/vm.rs diff --git a/crates/pos/consensus/safety-rules/Cargo.toml b/crates/pos/consensus/safety-rules/Cargo.toml new file mode 100644 index 0000000000..21284260fc --- /dev/null +++ b/crates/pos/consensus/safety-rules/Cargo.toml @@ -0,0 +1,61 @@ +[package] +name = "safety-rules" +version = "0.1.0" +authors = ["Diem Association "] +license = "Apache-2.0" +publish = false +edition = "2018" + +[dependencies] +once_cell = "1.7.2" +rand = { version = "0.8.3", default-features = false } +proptest = { version = "1.0.0", optional = true } +rand_core = "0.6.2" + +crash-handler = { workspace = true } +consensus-types = { workspace = true } +bcs = "0.1.2" +diem-config = { workspace = true } +diem-crypto = { workspace = true } +diem-global-constants = { workspace = true } +diem-infallible = { workspace = true } +diem-logger = { workspace = true } +diem-proptest-helpers = { workspace = true, optional = true } +diem-secure-net = { workspace = true } +diem-secure-push-metrics = { workspace = true } +diem-secure-storage = { workspace = true } +diem-temppath = { workspace = true } +diem-types = { workspace = true } +diem-vault-client = { path = "../../secure/storage/vault" } +serde = { version = "1.0.124", default-features = false } +thiserror = "1.0.24" +log = { workspace = true } + +[dev-dependencies] +criterion = "0.3.4" +tempfile = "3.2.0" +proptest = "1.0.0" + +consensus-types = { workspace = true, features = ["fuzzing"] } +diem-config = { workspace = true, features = ["fuzzing"] } +diem-proptest-helpers = { workspace = true } +diem-secure-storage = { workspace = true, features = ["testing"] } + +[[bench]] +name = "safety_rules" +harness = false +required-features = ["testing"] + +[[test]] +name = "binary" +required-features = ["testing"] + +[features] +default = [] +fuzzing = [ + "consensus-types/fuzzing", + "diem-config/fuzzing", + "proptest", + "diem-proptest-helpers", +] +testing = ["diem-secure-storage/testing"] diff --git a/crates/cfxcore/core/src/pos/consensus/safety-rules/benches/safety_rules.rs b/crates/pos/consensus/safety-rules/benches/safety_rules.rs similarity index 100% rename from crates/cfxcore/core/src/pos/consensus/safety-rules/benches/safety_rules.rs rename to crates/pos/consensus/safety-rules/benches/safety_rules.rs diff --git a/crates/cfxcore/core/src/pos/consensus/safety-rules/src/configurable_validator_signer.rs b/crates/pos/consensus/safety-rules/src/configurable_validator_signer.rs similarity index 100% rename from crates/cfxcore/core/src/pos/consensus/safety-rules/src/configurable_validator_signer.rs rename to crates/pos/consensus/safety-rules/src/configurable_validator_signer.rs diff --git a/crates/cfxcore/core/src/pos/consensus/safety-rules/src/consensus_state.rs b/crates/pos/consensus/safety-rules/src/consensus_state.rs similarity index 100% rename from crates/cfxcore/core/src/pos/consensus/safety-rules/src/consensus_state.rs rename to crates/pos/consensus/safety-rules/src/consensus_state.rs diff --git a/crates/cfxcore/core/src/pos/consensus/safety-rules/src/counters.rs b/crates/pos/consensus/safety-rules/src/counters.rs similarity index 100% rename from crates/cfxcore/core/src/pos/consensus/safety-rules/src/counters.rs rename to crates/pos/consensus/safety-rules/src/counters.rs diff --git a/crates/cfxcore/core/src/pos/consensus/safety-rules/src/error.rs b/crates/pos/consensus/safety-rules/src/error.rs similarity index 100% rename from crates/cfxcore/core/src/pos/consensus/safety-rules/src/error.rs rename to crates/pos/consensus/safety-rules/src/error.rs diff --git a/crates/cfxcore/core/src/pos/consensus/safety-rules/src/fuzzing_utils.rs b/crates/pos/consensus/safety-rules/src/fuzzing_utils.rs similarity index 100% rename from crates/cfxcore/core/src/pos/consensus/safety-rules/src/fuzzing_utils.rs rename to crates/pos/consensus/safety-rules/src/fuzzing_utils.rs diff --git a/crates/cfxcore/core/src/pos/consensus/safety-rules/src/lib.rs b/crates/pos/consensus/safety-rules/src/lib.rs similarity index 100% rename from crates/cfxcore/core/src/pos/consensus/safety-rules/src/lib.rs rename to crates/pos/consensus/safety-rules/src/lib.rs diff --git a/crates/cfxcore/core/src/pos/consensus/safety-rules/src/local_client.rs b/crates/pos/consensus/safety-rules/src/local_client.rs similarity index 100% rename from crates/cfxcore/core/src/pos/consensus/safety-rules/src/local_client.rs rename to crates/pos/consensus/safety-rules/src/local_client.rs diff --git a/crates/cfxcore/core/src/pos/consensus/safety-rules/src/logging.rs b/crates/pos/consensus/safety-rules/src/logging.rs similarity index 100% rename from crates/cfxcore/core/src/pos/consensus/safety-rules/src/logging.rs rename to crates/pos/consensus/safety-rules/src/logging.rs diff --git a/crates/cfxcore/core/src/pos/consensus/safety-rules/src/main.rs b/crates/pos/consensus/safety-rules/src/main.rs similarity index 100% rename from crates/cfxcore/core/src/pos/consensus/safety-rules/src/main.rs rename to crates/pos/consensus/safety-rules/src/main.rs diff --git a/crates/cfxcore/core/src/pos/consensus/safety-rules/src/persistent_safety_storage.rs b/crates/pos/consensus/safety-rules/src/persistent_safety_storage.rs similarity index 100% rename from crates/cfxcore/core/src/pos/consensus/safety-rules/src/persistent_safety_storage.rs rename to crates/pos/consensus/safety-rules/src/persistent_safety_storage.rs diff --git a/crates/cfxcore/core/src/pos/consensus/safety-rules/src/process.rs b/crates/pos/consensus/safety-rules/src/process.rs similarity index 100% rename from crates/cfxcore/core/src/pos/consensus/safety-rules/src/process.rs rename to crates/pos/consensus/safety-rules/src/process.rs diff --git a/crates/cfxcore/core/src/pos/consensus/safety-rules/src/remote_service.rs b/crates/pos/consensus/safety-rules/src/remote_service.rs similarity index 100% rename from crates/cfxcore/core/src/pos/consensus/safety-rules/src/remote_service.rs rename to crates/pos/consensus/safety-rules/src/remote_service.rs diff --git a/crates/cfxcore/core/src/pos/consensus/safety-rules/src/safety_rules.rs b/crates/pos/consensus/safety-rules/src/safety_rules.rs similarity index 100% rename from crates/cfxcore/core/src/pos/consensus/safety-rules/src/safety_rules.rs rename to crates/pos/consensus/safety-rules/src/safety_rules.rs diff --git a/crates/cfxcore/core/src/pos/consensus/safety-rules/src/safety_rules_manager.rs b/crates/pos/consensus/safety-rules/src/safety_rules_manager.rs similarity index 100% rename from crates/cfxcore/core/src/pos/consensus/safety-rules/src/safety_rules_manager.rs rename to crates/pos/consensus/safety-rules/src/safety_rules_manager.rs diff --git a/crates/cfxcore/core/src/pos/consensus/safety-rules/src/serializer.rs b/crates/pos/consensus/safety-rules/src/serializer.rs similarity index 100% rename from crates/cfxcore/core/src/pos/consensus/safety-rules/src/serializer.rs rename to crates/pos/consensus/safety-rules/src/serializer.rs diff --git a/crates/cfxcore/core/src/pos/consensus/safety-rules/src/t_safety_rules.rs b/crates/pos/consensus/safety-rules/src/t_safety_rules.rs similarity index 100% rename from crates/cfxcore/core/src/pos/consensus/safety-rules/src/t_safety_rules.rs rename to crates/pos/consensus/safety-rules/src/t_safety_rules.rs diff --git a/crates/cfxcore/core/src/pos/consensus/safety-rules/src/test_utils.rs b/crates/pos/consensus/safety-rules/src/test_utils.rs similarity index 100% rename from crates/cfxcore/core/src/pos/consensus/safety-rules/src/test_utils.rs rename to crates/pos/consensus/safety-rules/src/test_utils.rs diff --git a/crates/cfxcore/core/src/pos/consensus/safety-rules/src/tests/local.rs b/crates/pos/consensus/safety-rules/src/tests/local.rs similarity index 100% rename from crates/cfxcore/core/src/pos/consensus/safety-rules/src/tests/local.rs rename to crates/pos/consensus/safety-rules/src/tests/local.rs diff --git a/crates/cfxcore/core/src/pos/consensus/safety-rules/src/tests/mod.rs b/crates/pos/consensus/safety-rules/src/tests/mod.rs similarity index 100% rename from crates/cfxcore/core/src/pos/consensus/safety-rules/src/tests/mod.rs rename to crates/pos/consensus/safety-rules/src/tests/mod.rs diff --git a/crates/cfxcore/core/src/pos/consensus/safety-rules/src/tests/networking.rs b/crates/pos/consensus/safety-rules/src/tests/networking.rs similarity index 100% rename from crates/cfxcore/core/src/pos/consensus/safety-rules/src/tests/networking.rs rename to crates/pos/consensus/safety-rules/src/tests/networking.rs diff --git a/crates/cfxcore/core/src/pos/consensus/safety-rules/src/tests/safety_rules.rs b/crates/pos/consensus/safety-rules/src/tests/safety_rules.rs similarity index 100% rename from crates/cfxcore/core/src/pos/consensus/safety-rules/src/tests/safety_rules.rs rename to crates/pos/consensus/safety-rules/src/tests/safety_rules.rs diff --git a/crates/cfxcore/core/src/pos/consensus/safety-rules/src/tests/serializer.rs b/crates/pos/consensus/safety-rules/src/tests/serializer.rs similarity index 100% rename from crates/cfxcore/core/src/pos/consensus/safety-rules/src/tests/serializer.rs rename to crates/pos/consensus/safety-rules/src/tests/serializer.rs diff --git a/crates/cfxcore/core/src/pos/consensus/safety-rules/src/tests/suite.rs b/crates/pos/consensus/safety-rules/src/tests/suite.rs similarity index 100% rename from crates/cfxcore/core/src/pos/consensus/safety-rules/src/tests/suite.rs rename to crates/pos/consensus/safety-rules/src/tests/suite.rs diff --git a/crates/cfxcore/core/src/pos/consensus/safety-rules/src/tests/thread.rs b/crates/pos/consensus/safety-rules/src/tests/thread.rs similarity index 100% rename from crates/cfxcore/core/src/pos/consensus/safety-rules/src/tests/thread.rs rename to crates/pos/consensus/safety-rules/src/tests/thread.rs diff --git a/crates/cfxcore/core/src/pos/consensus/safety-rules/src/tests/vault.rs b/crates/pos/consensus/safety-rules/src/tests/vault.rs similarity index 100% rename from crates/cfxcore/core/src/pos/consensus/safety-rules/src/tests/vault.rs rename to crates/pos/consensus/safety-rules/src/tests/vault.rs diff --git a/crates/cfxcore/core/src/pos/consensus/safety-rules/src/thread.rs b/crates/pos/consensus/safety-rules/src/thread.rs similarity index 100% rename from crates/cfxcore/core/src/pos/consensus/safety-rules/src/thread.rs rename to crates/pos/consensus/safety-rules/src/thread.rs diff --git a/crates/cfxcore/core/src/pos/consensus/safety-rules/tests/binary.rs b/crates/pos/consensus/safety-rules/tests/binary.rs similarity index 100% rename from crates/cfxcore/core/src/pos/consensus/safety-rules/tests/binary.rs rename to crates/pos/consensus/safety-rules/tests/binary.rs diff --git a/crates/cfxcore/core/src/pos/crypto/crypto-derive/Cargo.toml b/crates/pos/crypto/crypto-derive/Cargo.toml similarity index 100% rename from crates/cfxcore/core/src/pos/crypto/crypto-derive/Cargo.toml rename to crates/pos/crypto/crypto-derive/Cargo.toml diff --git a/crates/cfxcore/core/src/pos/crypto/crypto-derive/src/hasher.rs b/crates/pos/crypto/crypto-derive/src/hasher.rs similarity index 100% rename from crates/cfxcore/core/src/pos/crypto/crypto-derive/src/hasher.rs rename to crates/pos/crypto/crypto-derive/src/hasher.rs diff --git a/crates/cfxcore/core/src/pos/crypto/crypto-derive/src/lib.rs b/crates/pos/crypto/crypto-derive/src/lib.rs similarity index 100% rename from crates/cfxcore/core/src/pos/crypto/crypto-derive/src/lib.rs rename to crates/pos/crypto/crypto-derive/src/lib.rs diff --git a/crates/cfxcore/core/src/pos/crypto/crypto-derive/src/unions.rs b/crates/pos/crypto/crypto-derive/src/unions.rs similarity index 100% rename from crates/cfxcore/core/src/pos/crypto/crypto-derive/src/unions.rs rename to crates/pos/crypto/crypto-derive/src/unions.rs diff --git a/crates/cfxcore/core/src/pos/crypto/crypto/Cargo.toml b/crates/pos/crypto/crypto/Cargo.toml similarity index 95% rename from crates/cfxcore/core/src/pos/crypto/crypto/Cargo.toml rename to crates/pos/crypto/crypto/Cargo.toml index 2bfb718d19..244ff59b96 100644 --- a/crates/cfxcore/core/src/pos/crypto/crypto/Cargo.toml +++ b/crates/pos/crypto/crypto/Cargo.toml @@ -32,7 +32,7 @@ thiserror = "1.0.24" tiny-keccak = { workspace = true, features = ["sha3"] } x25519-dalek = { version = "0.1.0", package = "x25519-dalek-fiat", default-features = false, features = ["std"] } aes-gcm = "0.8.0" -diem-crypto-derive = { path = "../crypto-derive", version = "0.1.0" } +diem-crypto-derive = { workspace = true } bcs = "0.1.2" cfxkey = { workspace = true } cfx-types = { workspace = true } @@ -41,7 +41,7 @@ vrf = "0.2.2" lazy_static = { workspace = true } parking_lot = { workspace = true } openssl = "0.10" -diem-logger = {path = "../../common/logger" } +diem-logger = { workspace = true } pkcs8 = {version = "0.7.5", features = ["encryption", "std"]} diff --git a/crates/cfxcore/core/src/pos/crypto/crypto/README.md b/crates/pos/crypto/crypto/README.md similarity index 100% rename from crates/cfxcore/core/src/pos/crypto/crypto/README.md rename to crates/pos/crypto/crypto/README.md diff --git a/crates/cfxcore/core/src/pos/crypto/crypto/benches/bls.rs b/crates/pos/crypto/crypto/benches/bls.rs similarity index 100% rename from crates/cfxcore/core/src/pos/crypto/crypto/benches/bls.rs rename to crates/pos/crypto/crypto/benches/bls.rs diff --git a/crates/cfxcore/core/src/pos/crypto/crypto/benches/ed25519.rs b/crates/pos/crypto/crypto/benches/ed25519.rs similarity index 100% rename from crates/cfxcore/core/src/pos/crypto/crypto/benches/ed25519.rs rename to crates/pos/crypto/crypto/benches/ed25519.rs diff --git a/crates/cfxcore/core/src/pos/crypto/crypto/benches/noise.rs b/crates/pos/crypto/crypto/benches/noise.rs similarity index 100% rename from crates/cfxcore/core/src/pos/crypto/crypto/benches/noise.rs rename to crates/pos/crypto/crypto/benches/noise.rs diff --git a/crates/cfxcore/core/src/pos/crypto/crypto/benches/vrf.rs b/crates/pos/crypto/crypto/benches/vrf.rs similarity index 100% rename from crates/cfxcore/core/src/pos/crypto/crypto/benches/vrf.rs rename to crates/pos/crypto/crypto/benches/vrf.rs diff --git a/crates/cfxcore/core/src/pos/crypto/crypto/src/bls.rs b/crates/pos/crypto/crypto/src/bls.rs similarity index 100% rename from crates/cfxcore/core/src/pos/crypto/crypto/src/bls.rs rename to crates/pos/crypto/crypto/src/bls.rs diff --git a/crates/cfxcore/core/src/pos/crypto/crypto/src/compat.rs b/crates/pos/crypto/crypto/src/compat.rs similarity index 100% rename from crates/cfxcore/core/src/pos/crypto/crypto/src/compat.rs rename to crates/pos/crypto/crypto/src/compat.rs diff --git a/crates/cfxcore/core/src/pos/crypto/crypto/src/ec_vrf.rs b/crates/pos/crypto/crypto/src/ec_vrf.rs similarity index 100% rename from crates/cfxcore/core/src/pos/crypto/crypto/src/ec_vrf.rs rename to crates/pos/crypto/crypto/src/ec_vrf.rs diff --git a/crates/cfxcore/core/src/pos/crypto/crypto/src/ed25519.rs b/crates/pos/crypto/crypto/src/ed25519.rs similarity index 100% rename from crates/cfxcore/core/src/pos/crypto/crypto/src/ed25519.rs rename to crates/pos/crypto/crypto/src/ed25519.rs diff --git a/crates/cfxcore/core/src/pos/crypto/crypto/src/error.rs b/crates/pos/crypto/crypto/src/error.rs similarity index 100% rename from crates/cfxcore/core/src/pos/crypto/crypto/src/error.rs rename to crates/pos/crypto/crypto/src/error.rs diff --git a/crates/cfxcore/core/src/pos/crypto/crypto/src/hash.rs b/crates/pos/crypto/crypto/src/hash.rs similarity index 100% rename from crates/cfxcore/core/src/pos/crypto/crypto/src/hash.rs rename to crates/pos/crypto/crypto/src/hash.rs diff --git a/crates/cfxcore/core/src/pos/crypto/crypto/src/hkdf.rs b/crates/pos/crypto/crypto/src/hkdf.rs similarity index 100% rename from crates/cfxcore/core/src/pos/crypto/crypto/src/hkdf.rs rename to crates/pos/crypto/crypto/src/hkdf.rs diff --git a/crates/cfxcore/core/src/pos/crypto/crypto/src/key_file.rs b/crates/pos/crypto/crypto/src/key_file.rs similarity index 100% rename from crates/cfxcore/core/src/pos/crypto/crypto/src/key_file.rs rename to crates/pos/crypto/crypto/src/key_file.rs diff --git a/crates/cfxcore/core/src/pos/crypto/crypto/src/lib.rs b/crates/pos/crypto/crypto/src/lib.rs similarity index 100% rename from crates/cfxcore/core/src/pos/crypto/crypto/src/lib.rs rename to crates/pos/crypto/crypto/src/lib.rs diff --git a/crates/cfxcore/core/src/pos/crypto/crypto/src/multi_bls.rs b/crates/pos/crypto/crypto/src/multi_bls.rs similarity index 100% rename from crates/cfxcore/core/src/pos/crypto/crypto/src/multi_bls.rs rename to crates/pos/crypto/crypto/src/multi_bls.rs diff --git a/crates/cfxcore/core/src/pos/crypto/crypto/src/multi_ed25519.rs b/crates/pos/crypto/crypto/src/multi_ed25519.rs similarity index 100% rename from crates/cfxcore/core/src/pos/crypto/crypto/src/multi_ed25519.rs rename to crates/pos/crypto/crypto/src/multi_ed25519.rs diff --git a/crates/cfxcore/core/src/pos/crypto/crypto/src/noise.rs b/crates/pos/crypto/crypto/src/noise.rs similarity index 100% rename from crates/cfxcore/core/src/pos/crypto/crypto/src/noise.rs rename to crates/pos/crypto/crypto/src/noise.rs diff --git a/crates/cfxcore/core/src/pos/crypto/crypto/src/secp256k1.rs b/crates/pos/crypto/crypto/src/secp256k1.rs similarity index 100% rename from crates/cfxcore/core/src/pos/crypto/crypto/src/secp256k1.rs rename to crates/pos/crypto/crypto/src/secp256k1.rs diff --git a/crates/cfxcore/core/src/pos/crypto/crypto/src/tags.rs b/crates/pos/crypto/crypto/src/tags.rs similarity index 100% rename from crates/cfxcore/core/src/pos/crypto/crypto/src/tags.rs rename to crates/pos/crypto/crypto/src/tags.rs diff --git a/crates/cfxcore/core/src/pos/crypto/crypto/src/test_utils.rs b/crates/pos/crypto/crypto/src/test_utils.rs similarity index 100% rename from crates/cfxcore/core/src/pos/crypto/crypto/src/test_utils.rs rename to crates/pos/crypto/crypto/src/test_utils.rs diff --git a/crates/cfxcore/core/src/pos/crypto/crypto/src/traits.rs b/crates/pos/crypto/crypto/src/traits.rs similarity index 100% rename from crates/cfxcore/core/src/pos/crypto/crypto/src/traits.rs rename to crates/pos/crypto/crypto/src/traits.rs diff --git a/crates/cfxcore/core/src/pos/crypto/crypto/src/unit_tests/bcs_test.rs b/crates/pos/crypto/crypto/src/unit_tests/bcs_test.rs similarity index 100% rename from crates/cfxcore/core/src/pos/crypto/crypto/src/unit_tests/bcs_test.rs rename to crates/pos/crypto/crypto/src/unit_tests/bcs_test.rs diff --git a/crates/cfxcore/core/src/pos/crypto/crypto/src/unit_tests/compat_test.rs b/crates/pos/crypto/crypto/src/unit_tests/compat_test.rs similarity index 100% rename from crates/cfxcore/core/src/pos/crypto/crypto/src/unit_tests/compat_test.rs rename to crates/pos/crypto/crypto/src/unit_tests/compat_test.rs diff --git a/crates/cfxcore/core/src/pos/crypto/crypto/src/unit_tests/compilation/cross_test.rs b/crates/pos/crypto/crypto/src/unit_tests/compilation/cross_test.rs similarity index 100% rename from crates/cfxcore/core/src/pos/crypto/crypto/src/unit_tests/compilation/cross_test.rs rename to crates/pos/crypto/crypto/src/unit_tests/compilation/cross_test.rs diff --git a/crates/cfxcore/core/src/pos/crypto/crypto/src/unit_tests/compilation/cross_test_trait_obj.rs b/crates/pos/crypto/crypto/src/unit_tests/compilation/cross_test_trait_obj.rs similarity index 100% rename from crates/cfxcore/core/src/pos/crypto/crypto/src/unit_tests/compilation/cross_test_trait_obj.rs rename to crates/pos/crypto/crypto/src/unit_tests/compilation/cross_test_trait_obj.rs diff --git a/crates/cfxcore/core/src/pos/crypto/crypto/src/unit_tests/compilation/cross_test_trait_obj_pub.rs b/crates/pos/crypto/crypto/src/unit_tests/compilation/cross_test_trait_obj_pub.rs similarity index 100% rename from crates/cfxcore/core/src/pos/crypto/crypto/src/unit_tests/compilation/cross_test_trait_obj_pub.rs rename to crates/pos/crypto/crypto/src/unit_tests/compilation/cross_test_trait_obj_pub.rs diff --git a/crates/cfxcore/core/src/pos/crypto/crypto/src/unit_tests/compilation/cross_test_trait_obj_sig.rs b/crates/pos/crypto/crypto/src/unit_tests/compilation/cross_test_trait_obj_sig.rs similarity index 100% rename from crates/cfxcore/core/src/pos/crypto/crypto/src/unit_tests/compilation/cross_test_trait_obj_sig.rs rename to crates/pos/crypto/crypto/src/unit_tests/compilation/cross_test_trait_obj_sig.rs diff --git a/crates/cfxcore/core/src/pos/crypto/crypto/src/unit_tests/compilation/small_kdf.rs b/crates/pos/crypto/crypto/src/unit_tests/compilation/small_kdf.rs similarity index 100% rename from crates/cfxcore/core/src/pos/crypto/crypto/src/unit_tests/compilation/small_kdf.rs rename to crates/pos/crypto/crypto/src/unit_tests/compilation/small_kdf.rs diff --git a/crates/cfxcore/core/src/pos/crypto/crypto/src/unit_tests/cross_test.rs b/crates/pos/crypto/crypto/src/unit_tests/cross_test.rs similarity index 100% rename from crates/cfxcore/core/src/pos/crypto/crypto/src/unit_tests/cross_test.rs rename to crates/pos/crypto/crypto/src/unit_tests/cross_test.rs diff --git a/crates/cfxcore/core/src/pos/crypto/crypto/src/unit_tests/cryptohasher.rs b/crates/pos/crypto/crypto/src/unit_tests/cryptohasher.rs similarity index 100% rename from crates/cfxcore/core/src/pos/crypto/crypto/src/unit_tests/cryptohasher.rs rename to crates/pos/crypto/crypto/src/unit_tests/cryptohasher.rs diff --git a/crates/cfxcore/core/src/pos/crypto/crypto/src/unit_tests/ed25519_test.rs b/crates/pos/crypto/crypto/src/unit_tests/ed25519_test.rs similarity index 100% rename from crates/cfxcore/core/src/pos/crypto/crypto/src/unit_tests/ed25519_test.rs rename to crates/pos/crypto/crypto/src/unit_tests/ed25519_test.rs diff --git a/crates/cfxcore/core/src/pos/crypto/crypto/src/unit_tests/hash_test.rs b/crates/pos/crypto/crypto/src/unit_tests/hash_test.rs similarity index 100% rename from crates/cfxcore/core/src/pos/crypto/crypto/src/unit_tests/hash_test.rs rename to crates/pos/crypto/crypto/src/unit_tests/hash_test.rs diff --git a/crates/cfxcore/core/src/pos/crypto/crypto/src/unit_tests/hkdf_test.rs b/crates/pos/crypto/crypto/src/unit_tests/hkdf_test.rs similarity index 100% rename from crates/cfxcore/core/src/pos/crypto/crypto/src/unit_tests/hkdf_test.rs rename to crates/pos/crypto/crypto/src/unit_tests/hkdf_test.rs diff --git a/crates/cfxcore/core/src/pos/crypto/crypto/src/unit_tests/mod.rs b/crates/pos/crypto/crypto/src/unit_tests/mod.rs similarity index 100% rename from crates/cfxcore/core/src/pos/crypto/crypto/src/unit_tests/mod.rs rename to crates/pos/crypto/crypto/src/unit_tests/mod.rs diff --git a/crates/cfxcore/core/src/pos/crypto/crypto/src/unit_tests/multi_ed25519_test.rs b/crates/pos/crypto/crypto/src/unit_tests/multi_ed25519_test.rs similarity index 100% rename from crates/cfxcore/core/src/pos/crypto/crypto/src/unit_tests/multi_ed25519_test.rs rename to crates/pos/crypto/crypto/src/unit_tests/multi_ed25519_test.rs diff --git a/crates/cfxcore/core/src/pos/crypto/crypto/src/unit_tests/noise_test.rs b/crates/pos/crypto/crypto/src/unit_tests/noise_test.rs similarity index 100% rename from crates/cfxcore/core/src/pos/crypto/crypto/src/unit_tests/noise_test.rs rename to crates/pos/crypto/crypto/src/unit_tests/noise_test.rs diff --git a/crates/cfxcore/core/src/pos/crypto/crypto/src/unit_tests/secp256k1_test.rs b/crates/pos/crypto/crypto/src/unit_tests/secp256k1_test.rs similarity index 100% rename from crates/cfxcore/core/src/pos/crypto/crypto/src/unit_tests/secp256k1_test.rs rename to crates/pos/crypto/crypto/src/unit_tests/secp256k1_test.rs diff --git a/crates/cfxcore/core/src/pos/crypto/crypto/src/vdf_sha3.rs b/crates/pos/crypto/crypto/src/vdf_sha3.rs similarity index 100% rename from crates/cfxcore/core/src/pos/crypto/crypto/src/vdf_sha3.rs rename to crates/pos/crypto/crypto/src/vdf_sha3.rs diff --git a/crates/cfxcore/core/src/pos/crypto/crypto/src/x25519.rs b/crates/pos/crypto/crypto/src/x25519.rs similarity index 100% rename from crates/cfxcore/core/src/pos/crypto/crypto/src/x25519.rs rename to crates/pos/crypto/crypto/src/x25519.rs diff --git a/crates/cfxcore/core/src/pos/crypto/crypto/test_vectors/noise_cacophony.txt b/crates/pos/crypto/crypto/test_vectors/noise_cacophony.txt similarity index 100% rename from crates/cfxcore/core/src/pos/crypto/crypto/test_vectors/noise_cacophony.txt rename to crates/pos/crypto/crypto/test_vectors/noise_cacophony.txt diff --git a/crates/cfxcore/core/src/pos/secure/net/Cargo.toml b/crates/pos/secure/net/Cargo.toml similarity index 75% rename from crates/cfxcore/core/src/pos/secure/net/Cargo.toml rename to crates/pos/secure/net/Cargo.toml index d16b9247d9..fc375c0b61 100644 --- a/crates/cfxcore/core/src/pos/secure/net/Cargo.toml +++ b/crates/pos/secure/net/Cargo.toml @@ -14,8 +14,8 @@ once_cell = "1.7.2" serde = { version = "1.0.124", features = ["rc"], default-features = false } thiserror = "1.0.24" -diem-logger = { path = "../../common/logger" } -diem-secure-push-metrics = { path = "../push-metrics" } +diem-logger = { workspace = true } +diem-secure-push-metrics = { workspace = true } [dev-dependencies] -diem-config = { path = "../../config" } +diem-config = { workspace = true } diff --git a/crates/cfxcore/core/src/pos/secure/net/src/lib.rs b/crates/pos/secure/net/src/lib.rs similarity index 100% rename from crates/cfxcore/core/src/pos/secure/net/src/lib.rs rename to crates/pos/secure/net/src/lib.rs diff --git a/crates/cfxcore/core/src/pos/secure/push-metrics/Cargo.toml b/crates/pos/secure/push-metrics/Cargo.toml similarity index 59% rename from crates/cfxcore/core/src/pos/secure/push-metrics/Cargo.toml rename to crates/pos/secure/push-metrics/Cargo.toml index f724cec4a9..8731e6aa76 100644 --- a/crates/cfxcore/core/src/pos/secure/push-metrics/Cargo.toml +++ b/crates/pos/secure/push-metrics/Cargo.toml @@ -10,6 +10,9 @@ publish = false edition = "2018" [dependencies] -ureq = { version = "1.5.4", features = ["json", "native-tls"], default-features = false } -diem-logger = { path = "../../common/logger" } -diem-metrics-core = { path = "../../common/metrics-core" } +ureq = { version = "1.5.4", features = [ + "json", + "native-tls", +], default-features = false } +diem-logger = { workspace = true } +diem-metrics-core = { workspace = true } diff --git a/crates/cfxcore/core/src/pos/secure/push-metrics/src/lib.rs b/crates/pos/secure/push-metrics/src/lib.rs similarity index 100% rename from crates/cfxcore/core/src/pos/secure/push-metrics/src/lib.rs rename to crates/pos/secure/push-metrics/src/lib.rs diff --git a/crates/cfxcore/core/src/pos/secure/storage/Cargo.toml b/crates/pos/secure/storage/Cargo.toml similarity index 62% rename from crates/cfxcore/core/src/pos/secure/storage/Cargo.toml rename to crates/pos/secure/storage/Cargo.toml index f1a296ba19..283fc7f98e 100644 --- a/crates/cfxcore/core/src/pos/secure/storage/Cargo.toml +++ b/crates/pos/secure/storage/Cargo.toml @@ -19,18 +19,18 @@ serde_json = "1.0.64" thiserror = "1.0.24" bcs = "0.1.2" -diem-crypto = { path = "../../crypto/crypto" } +diem-crypto = { workspace = true } diem-github-client = { path = "github" } -diem-infallible = { path = "../../common/infallible" } -diem-logger = { path = "../../common/logger" } -diem-temppath = { path = "../../common/temppath" } -diem-time-service = { path = "../../common/time-service" } +diem-infallible = { workspace = true } +diem-logger = { workspace = true } +diem-temppath = { workspace = true } +diem-time-service = { workspace = true } diem-vault-client = { path = "vault" } -diem-types = {path = "../../types" } +diem-types = { workspace = true } [dev-dependencies] -diem-crypto = { path = "../../crypto/crypto", features = ["fuzzing"] } -diem-crypto-derive = { path = "../../crypto/crypto-derive" } +diem-crypto = { workspace = true, features = ["fuzzing"] } +diem-crypto-derive = { workspace = true } rand = "0.8.3" [features] diff --git a/crates/cfxcore/core/src/pos/secure/storage/README.md b/crates/pos/secure/storage/README.md similarity index 100% rename from crates/cfxcore/core/src/pos/secure/storage/README.md rename to crates/pos/secure/storage/README.md diff --git a/crates/cfxcore/core/src/pos/secure/storage/github/Cargo.toml b/crates/pos/secure/storage/github/Cargo.toml similarity index 77% rename from crates/cfxcore/core/src/pos/secure/storage/github/Cargo.toml rename to crates/pos/secure/storage/github/Cargo.toml index 23cd36b2c3..9dd7a1c68e 100644 --- a/crates/cfxcore/core/src/pos/secure/storage/github/Cargo.toml +++ b/crates/pos/secure/storage/github/Cargo.toml @@ -13,9 +13,12 @@ edition = "2018" serde = { version = "1.0.124", features = ["derive"], default-features = false } serde_json = "1.0.64" thiserror = "1.0.24" -ureq = { version = "1.5.4", features = ["json", "native-tls"], default-features = false } +ureq = { version = "1.5.4", features = [ + "json", + "native-tls", +], default-features = false } -proxy = { path = "../../../common/proxy" } +proxy = { workspace = true } [dev-dependencies] base64 = "0.13.0" diff --git a/crates/cfxcore/core/src/pos/secure/storage/github/src/lib.rs b/crates/pos/secure/storage/github/src/lib.rs similarity index 100% rename from crates/cfxcore/core/src/pos/secure/storage/github/src/lib.rs rename to crates/pos/secure/storage/github/src/lib.rs diff --git a/crates/cfxcore/core/src/pos/secure/storage/src/crypto_kv_storage.rs b/crates/pos/secure/storage/src/crypto_kv_storage.rs similarity index 100% rename from crates/cfxcore/core/src/pos/secure/storage/src/crypto_kv_storage.rs rename to crates/pos/secure/storage/src/crypto_kv_storage.rs diff --git a/crates/cfxcore/core/src/pos/secure/storage/src/crypto_storage.rs b/crates/pos/secure/storage/src/crypto_storage.rs similarity index 100% rename from crates/cfxcore/core/src/pos/secure/storage/src/crypto_storage.rs rename to crates/pos/secure/storage/src/crypto_storage.rs diff --git a/crates/cfxcore/core/src/pos/secure/storage/src/error.rs b/crates/pos/secure/storage/src/error.rs similarity index 100% rename from crates/cfxcore/core/src/pos/secure/storage/src/error.rs rename to crates/pos/secure/storage/src/error.rs diff --git a/crates/cfxcore/core/src/pos/secure/storage/src/github.rs b/crates/pos/secure/storage/src/github.rs similarity index 100% rename from crates/cfxcore/core/src/pos/secure/storage/src/github.rs rename to crates/pos/secure/storage/src/github.rs diff --git a/crates/cfxcore/core/src/pos/secure/storage/src/in_memory.rs b/crates/pos/secure/storage/src/in_memory.rs similarity index 100% rename from crates/cfxcore/core/src/pos/secure/storage/src/in_memory.rs rename to crates/pos/secure/storage/src/in_memory.rs diff --git a/crates/cfxcore/core/src/pos/secure/storage/src/kv_storage.rs b/crates/pos/secure/storage/src/kv_storage.rs similarity index 100% rename from crates/cfxcore/core/src/pos/secure/storage/src/kv_storage.rs rename to crates/pos/secure/storage/src/kv_storage.rs diff --git a/crates/cfxcore/core/src/pos/secure/storage/src/lib.rs b/crates/pos/secure/storage/src/lib.rs similarity index 100% rename from crates/cfxcore/core/src/pos/secure/storage/src/lib.rs rename to crates/pos/secure/storage/src/lib.rs diff --git a/crates/cfxcore/core/src/pos/secure/storage/src/namespaced_storage.rs b/crates/pos/secure/storage/src/namespaced_storage.rs similarity index 100% rename from crates/cfxcore/core/src/pos/secure/storage/src/namespaced_storage.rs rename to crates/pos/secure/storage/src/namespaced_storage.rs diff --git a/crates/cfxcore/core/src/pos/secure/storage/src/on_disk.rs b/crates/pos/secure/storage/src/on_disk.rs similarity index 100% rename from crates/cfxcore/core/src/pos/secure/storage/src/on_disk.rs rename to crates/pos/secure/storage/src/on_disk.rs diff --git a/crates/cfxcore/core/src/pos/secure/storage/src/policy.rs b/crates/pos/secure/storage/src/policy.rs similarity index 100% rename from crates/cfxcore/core/src/pos/secure/storage/src/policy.rs rename to crates/pos/secure/storage/src/policy.rs diff --git a/crates/cfxcore/core/src/pos/secure/storage/src/storage.rs b/crates/pos/secure/storage/src/storage.rs similarity index 100% rename from crates/cfxcore/core/src/pos/secure/storage/src/storage.rs rename to crates/pos/secure/storage/src/storage.rs diff --git a/crates/cfxcore/core/src/pos/secure/storage/src/tests/github.rs b/crates/pos/secure/storage/src/tests/github.rs similarity index 100% rename from crates/cfxcore/core/src/pos/secure/storage/src/tests/github.rs rename to crates/pos/secure/storage/src/tests/github.rs diff --git a/crates/cfxcore/core/src/pos/secure/storage/src/tests/in_memory.rs b/crates/pos/secure/storage/src/tests/in_memory.rs similarity index 100% rename from crates/cfxcore/core/src/pos/secure/storage/src/tests/in_memory.rs rename to crates/pos/secure/storage/src/tests/in_memory.rs diff --git a/crates/cfxcore/core/src/pos/secure/storage/src/tests/mod.rs b/crates/pos/secure/storage/src/tests/mod.rs similarity index 100% rename from crates/cfxcore/core/src/pos/secure/storage/src/tests/mod.rs rename to crates/pos/secure/storage/src/tests/mod.rs diff --git a/crates/cfxcore/core/src/pos/secure/storage/src/tests/on_disk.rs b/crates/pos/secure/storage/src/tests/on_disk.rs similarity index 100% rename from crates/cfxcore/core/src/pos/secure/storage/src/tests/on_disk.rs rename to crates/pos/secure/storage/src/tests/on_disk.rs diff --git a/crates/cfxcore/core/src/pos/secure/storage/src/tests/suite.rs b/crates/pos/secure/storage/src/tests/suite.rs similarity index 100% rename from crates/cfxcore/core/src/pos/secure/storage/src/tests/suite.rs rename to crates/pos/secure/storage/src/tests/suite.rs diff --git a/crates/cfxcore/core/src/pos/secure/storage/src/tests/vault.rs b/crates/pos/secure/storage/src/tests/vault.rs similarity index 100% rename from crates/cfxcore/core/src/pos/secure/storage/src/tests/vault.rs rename to crates/pos/secure/storage/src/tests/vault.rs diff --git a/crates/cfxcore/core/src/pos/secure/storage/src/vault.rs b/crates/pos/secure/storage/src/vault.rs similarity index 100% rename from crates/cfxcore/core/src/pos/secure/storage/src/vault.rs rename to crates/pos/secure/storage/src/vault.rs diff --git a/crates/cfxcore/core/src/pos/secure/storage/vault/Cargo.toml b/crates/pos/secure/storage/vault/Cargo.toml similarity index 62% rename from crates/cfxcore/core/src/pos/secure/storage/vault/Cargo.toml rename to crates/pos/secure/storage/vault/Cargo.toml index ea86560b9f..c153c8561d 100644 --- a/crates/cfxcore/core/src/pos/secure/storage/vault/Cargo.toml +++ b/crates/pos/secure/storage/vault/Cargo.toml @@ -18,17 +18,20 @@ native-tls = "0.2.7" serde = { version = "1.0.124", features = ["derive"], default-features = false } serde_json = "1.0.64" thiserror = "1.0.24" -ureq = { version = "1.5.4", features = ["json", "native-tls"], default-features = false } +ureq = { version = "1.5.4", features = [ + "json", + "native-tls", +], default-features = false } -diem-crypto = { path = "../../../crypto/crypto" } -diem-proptest-helpers = { path = "../../../common/proptest-helpers", optional = true } -diem-types = { path = "../../../types" } +diem-crypto = { workspace = true } +diem-proptest-helpers = { workspace = true, optional = true } +diem-types = { workspace = true } [dev-dependencies] proptest = "1.0.0" -diem-proptest-helpers = { path = "../../../common/proptest-helpers" } -diem-types = { path = "../../../types", features = ["fuzzing"] } +diem-proptest-helpers = { workspace = true } +diem-types = { workspace = true, features = ["fuzzing"] } [features] fuzzing = ["proptest", "diem-proptest-helpers"] diff --git a/crates/cfxcore/core/src/pos/secure/storage/vault/src/dev.rs b/crates/pos/secure/storage/vault/src/dev.rs similarity index 100% rename from crates/cfxcore/core/src/pos/secure/storage/vault/src/dev.rs rename to crates/pos/secure/storage/vault/src/dev.rs diff --git a/crates/cfxcore/core/src/pos/secure/storage/vault/src/fuzzing.rs b/crates/pos/secure/storage/vault/src/fuzzing.rs similarity index 100% rename from crates/cfxcore/core/src/pos/secure/storage/vault/src/fuzzing.rs rename to crates/pos/secure/storage/vault/src/fuzzing.rs diff --git a/crates/cfxcore/core/src/pos/secure/storage/vault/src/lib.rs b/crates/pos/secure/storage/vault/src/lib.rs similarity index 100% rename from crates/cfxcore/core/src/pos/secure/storage/vault/src/lib.rs rename to crates/pos/secure/storage/vault/src/lib.rs diff --git a/crates/cfxcore/core/src/pos/storage/README.md b/crates/pos/storage/README.md similarity index 100% rename from crates/cfxcore/core/src/pos/storage/README.md rename to crates/pos/storage/README.md diff --git a/crates/cfxcore/core/src/pos/storage/accumulator/Cargo.toml b/crates/pos/storage/accumulator/Cargo.toml similarity index 77% rename from crates/cfxcore/core/src/pos/storage/accumulator/Cargo.toml rename to crates/pos/storage/accumulator/Cargo.toml index 1f0778274f..21b159d003 100644 --- a/crates/cfxcore/core/src/pos/storage/accumulator/Cargo.toml +++ b/crates/pos/storage/accumulator/Cargo.toml @@ -11,16 +11,16 @@ edition = "2018" [dependencies] anyhow = "1.0.38" -diem-crypto = { path = "../../crypto/crypto" } +diem-crypto = { workspace = true } mirai-annotations = "1.10.1" -diem-types = { path = "../../types" } +diem-types = { workspace = true } proptest = { version = "1.0.0", optional = true } [dev-dependencies] rand = "0.8.3" proptest = "1.0.0" -diem-crypto = { path = "../../crypto/crypto", features = ["fuzzing"] } +diem-crypto = { workspace = true, features = ["fuzzing"] } [features] default = [] diff --git a/crates/cfxcore/core/src/pos/storage/accumulator/src/lib.rs b/crates/pos/storage/accumulator/src/lib.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/accumulator/src/lib.rs rename to crates/pos/storage/accumulator/src/lib.rs diff --git a/crates/cfxcore/core/src/pos/storage/accumulator/src/test_helpers.rs b/crates/pos/storage/accumulator/src/test_helpers.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/accumulator/src/test_helpers.rs rename to crates/pos/storage/accumulator/src/test_helpers.rs diff --git a/crates/cfxcore/core/src/pos/storage/accumulator/src/tests/mod.rs b/crates/pos/storage/accumulator/src/tests/mod.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/accumulator/src/tests/mod.rs rename to crates/pos/storage/accumulator/src/tests/mod.rs diff --git a/crates/cfxcore/core/src/pos/storage/accumulator/src/tests/proof_test.rs b/crates/pos/storage/accumulator/src/tests/proof_test.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/accumulator/src/tests/proof_test.rs rename to crates/pos/storage/accumulator/src/tests/proof_test.rs diff --git a/crates/cfxcore/core/src/pos/storage/accumulator/src/tests/write_test.rs b/crates/pos/storage/accumulator/src/tests/write_test.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/accumulator/src/tests/write_test.rs rename to crates/pos/storage/accumulator/src/tests/write_test.rs diff --git a/crates/cfxcore/core/src/pos/storage/backup/backup-cli/Cargo.toml b/crates/pos/storage/backup/backup-cli/Cargo.toml similarity index 56% rename from crates/cfxcore/core/src/pos/storage/backup/backup-cli/Cargo.toml rename to crates/pos/storage/backup/backup-cli/Cargo.toml index 88b0f6804d..446877f548 100644 --- a/crates/cfxcore/core/src/pos/storage/backup/backup-cli/Cargo.toml +++ b/crates/pos/storage/backup/backup-cli/Cargo.toml @@ -27,24 +27,24 @@ serde_json = "1.0.64" structopt = "0.3.21" toml = "0.5.8" tokio = { workspace = true, features = ["full"] } -tokio-stream = { workspace = true} +tokio-stream = { workspace = true } tokio-util = { workspace = true, features = ["compat"] } -executor = { path = "../../../execution/executor" } +executor = { workspace = true } executor-test-helpers = { path = "../../../execution/executor-test-helpers", optional = true } -executor-types = { path = "../../../execution/executor-types" } -diem-jellyfish-merkle = { path = "../../jellyfish-merkle" } +executor-types = { workspace = true } +diem-jellyfish-merkle = { workspace = true } bcs = "0.1.2" -diem-config = { path = "../../../config" } -diem-crypto = { path = "../../../crypto/crypto" } -diem-infallible = { path = "../../../common/infallible" } -diem-logger = { path = "../../../common/logger" } -diem-secure-push-metrics = { path = "../../../secure/push-metrics" } -diem-temppath = { path = "../../../common/temppath" } -diem-types = { path = "../../../types" } +diem-config = { workspace = true } +diem-crypto = { workspace = true } +diem-infallible = { workspace = true } +diem-logger = { workspace = true } +diem-secure-push-metrics = { workspace = true } +diem-temppath = { workspace = true } +diem-types = { workspace = true } diem-vm = { path = "../../../language/diem-vm" } -pos-ledger-db = { path = "../../pos-ledger-db" } -storage-interface = { path = "../../storage-interface" } +pos-ledger-db = { workspace = true } +storage-interface = { workspace = true } [dev-dependencies] proptest = "1.0.0" @@ -52,10 +52,10 @@ warp = "0.3.0" backup-service = { path = "../backup-service" } executor-test-helpers = { path = "../../../execution/executor-test-helpers" } -pos-ledger-db = { path = "../../pos-ledger-db", features = ["fuzzing"] } -diem-config = { path = "../../../config" } -diem-proptest-helpers = { path = "../../../common/proptest-helpers" } -storage-interface = { path = "../../storage-interface" } +pos-ledger-db = { workspace = true, features = ["fuzzing"] } +diem-config = { workspace = true } +diem-proptest-helpers = { workspace = true } +storage-interface = { workspace = true } [features] fuzzing = ["pos-ledger-db/fuzzing"] diff --git a/crates/cfxcore/core/src/pos/storage/backup/backup-cli/proptest-regressions/utils/stream/futures_unordered_x.txt b/crates/pos/storage/backup/backup-cli/proptest-regressions/utils/stream/futures_unordered_x.txt similarity index 100% rename from crates/cfxcore/core/src/pos/storage/backup/backup-cli/proptest-regressions/utils/stream/futures_unordered_x.txt rename to crates/pos/storage/backup/backup-cli/proptest-regressions/utils/stream/futures_unordered_x.txt diff --git a/crates/cfxcore/core/src/pos/storage/backup/backup-cli/src/backup_types/epoch_ending/backup.rs b/crates/pos/storage/backup/backup-cli/src/backup_types/epoch_ending/backup.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/backup/backup-cli/src/backup_types/epoch_ending/backup.rs rename to crates/pos/storage/backup/backup-cli/src/backup_types/epoch_ending/backup.rs diff --git a/crates/cfxcore/core/src/pos/storage/backup/backup-cli/src/backup_types/epoch_ending/manifest.rs b/crates/pos/storage/backup/backup-cli/src/backup_types/epoch_ending/manifest.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/backup/backup-cli/src/backup_types/epoch_ending/manifest.rs rename to crates/pos/storage/backup/backup-cli/src/backup_types/epoch_ending/manifest.rs diff --git a/crates/cfxcore/core/src/pos/storage/backup/backup-cli/src/backup_types/epoch_ending/mod.rs b/crates/pos/storage/backup/backup-cli/src/backup_types/epoch_ending/mod.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/backup/backup-cli/src/backup_types/epoch_ending/mod.rs rename to crates/pos/storage/backup/backup-cli/src/backup_types/epoch_ending/mod.rs diff --git a/crates/cfxcore/core/src/pos/storage/backup/backup-cli/src/backup_types/epoch_ending/restore.rs b/crates/pos/storage/backup/backup-cli/src/backup_types/epoch_ending/restore.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/backup/backup-cli/src/backup_types/epoch_ending/restore.rs rename to crates/pos/storage/backup/backup-cli/src/backup_types/epoch_ending/restore.rs diff --git a/crates/cfxcore/core/src/pos/storage/backup/backup-cli/src/backup_types/epoch_ending/tests.rs b/crates/pos/storage/backup/backup-cli/src/backup_types/epoch_ending/tests.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/backup/backup-cli/src/backup_types/epoch_ending/tests.rs rename to crates/pos/storage/backup/backup-cli/src/backup_types/epoch_ending/tests.rs diff --git a/crates/cfxcore/core/src/pos/storage/backup/backup-cli/src/backup_types/mod.rs b/crates/pos/storage/backup/backup-cli/src/backup_types/mod.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/backup/backup-cli/src/backup_types/mod.rs rename to crates/pos/storage/backup/backup-cli/src/backup_types/mod.rs diff --git a/crates/cfxcore/core/src/pos/storage/backup/backup-cli/src/backup_types/state_snapshot/backup.rs b/crates/pos/storage/backup/backup-cli/src/backup_types/state_snapshot/backup.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/backup/backup-cli/src/backup_types/state_snapshot/backup.rs rename to crates/pos/storage/backup/backup-cli/src/backup_types/state_snapshot/backup.rs diff --git a/crates/cfxcore/core/src/pos/storage/backup/backup-cli/src/backup_types/state_snapshot/manifest.rs b/crates/pos/storage/backup/backup-cli/src/backup_types/state_snapshot/manifest.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/backup/backup-cli/src/backup_types/state_snapshot/manifest.rs rename to crates/pos/storage/backup/backup-cli/src/backup_types/state_snapshot/manifest.rs diff --git a/crates/cfxcore/core/src/pos/storage/backup/backup-cli/src/backup_types/state_snapshot/mod.rs b/crates/pos/storage/backup/backup-cli/src/backup_types/state_snapshot/mod.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/backup/backup-cli/src/backup_types/state_snapshot/mod.rs rename to crates/pos/storage/backup/backup-cli/src/backup_types/state_snapshot/mod.rs diff --git a/crates/cfxcore/core/src/pos/storage/backup/backup-cli/src/backup_types/state_snapshot/restore.rs b/crates/pos/storage/backup/backup-cli/src/backup_types/state_snapshot/restore.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/backup/backup-cli/src/backup_types/state_snapshot/restore.rs rename to crates/pos/storage/backup/backup-cli/src/backup_types/state_snapshot/restore.rs diff --git a/crates/cfxcore/core/src/pos/storage/backup/backup-cli/src/backup_types/state_snapshot/tests.rs b/crates/pos/storage/backup/backup-cli/src/backup_types/state_snapshot/tests.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/backup/backup-cli/src/backup_types/state_snapshot/tests.rs rename to crates/pos/storage/backup/backup-cli/src/backup_types/state_snapshot/tests.rs diff --git a/crates/cfxcore/core/src/pos/storage/backup/backup-cli/src/backup_types/tests.rs b/crates/pos/storage/backup/backup-cli/src/backup_types/tests.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/backup/backup-cli/src/backup_types/tests.rs rename to crates/pos/storage/backup/backup-cli/src/backup_types/tests.rs diff --git a/crates/cfxcore/core/src/pos/storage/backup/backup-cli/src/backup_types/transaction/backup.rs b/crates/pos/storage/backup/backup-cli/src/backup_types/transaction/backup.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/backup/backup-cli/src/backup_types/transaction/backup.rs rename to crates/pos/storage/backup/backup-cli/src/backup_types/transaction/backup.rs diff --git a/crates/cfxcore/core/src/pos/storage/backup/backup-cli/src/backup_types/transaction/manifest.rs b/crates/pos/storage/backup/backup-cli/src/backup_types/transaction/manifest.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/backup/backup-cli/src/backup_types/transaction/manifest.rs rename to crates/pos/storage/backup/backup-cli/src/backup_types/transaction/manifest.rs diff --git a/crates/cfxcore/core/src/pos/storage/backup/backup-cli/src/backup_types/transaction/mod.rs b/crates/pos/storage/backup/backup-cli/src/backup_types/transaction/mod.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/backup/backup-cli/src/backup_types/transaction/mod.rs rename to crates/pos/storage/backup/backup-cli/src/backup_types/transaction/mod.rs diff --git a/crates/cfxcore/core/src/pos/storage/backup/backup-cli/src/backup_types/transaction/restore.rs b/crates/pos/storage/backup/backup-cli/src/backup_types/transaction/restore.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/backup/backup-cli/src/backup_types/transaction/restore.rs rename to crates/pos/storage/backup/backup-cli/src/backup_types/transaction/restore.rs diff --git a/crates/cfxcore/core/src/pos/storage/backup/backup-cli/src/backup_types/transaction/tests.rs b/crates/pos/storage/backup/backup-cli/src/backup_types/transaction/tests.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/backup/backup-cli/src/backup_types/transaction/tests.rs rename to crates/pos/storage/backup/backup-cli/src/backup_types/transaction/tests.rs diff --git a/crates/cfxcore/core/src/pos/storage/backup/backup-cli/src/bin/db-backup-verify.rs b/crates/pos/storage/backup/backup-cli/src/bin/db-backup-verify.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/backup/backup-cli/src/bin/db-backup-verify.rs rename to crates/pos/storage/backup/backup-cli/src/bin/db-backup-verify.rs diff --git a/crates/cfxcore/core/src/pos/storage/backup/backup-cli/src/bin/db-backup.rs b/crates/pos/storage/backup/backup-cli/src/bin/db-backup.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/backup/backup-cli/src/bin/db-backup.rs rename to crates/pos/storage/backup/backup-cli/src/bin/db-backup.rs diff --git a/crates/cfxcore/core/src/pos/storage/backup/backup-cli/src/bin/db-restore.rs b/crates/pos/storage/backup/backup-cli/src/bin/db-restore.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/backup/backup-cli/src/bin/db-restore.rs rename to crates/pos/storage/backup/backup-cli/src/bin/db-restore.rs diff --git a/crates/cfxcore/core/src/pos/storage/backup/backup-cli/src/coordinators/backup.rs b/crates/pos/storage/backup/backup-cli/src/coordinators/backup.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/backup/backup-cli/src/coordinators/backup.rs rename to crates/pos/storage/backup/backup-cli/src/coordinators/backup.rs diff --git a/crates/cfxcore/core/src/pos/storage/backup/backup-cli/src/coordinators/mod.rs b/crates/pos/storage/backup/backup-cli/src/coordinators/mod.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/backup/backup-cli/src/coordinators/mod.rs rename to crates/pos/storage/backup/backup-cli/src/coordinators/mod.rs diff --git a/crates/cfxcore/core/src/pos/storage/backup/backup-cli/src/coordinators/restore.rs b/crates/pos/storage/backup/backup-cli/src/coordinators/restore.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/backup/backup-cli/src/coordinators/restore.rs rename to crates/pos/storage/backup/backup-cli/src/coordinators/restore.rs diff --git a/crates/cfxcore/core/src/pos/storage/backup/backup-cli/src/coordinators/verify.rs b/crates/pos/storage/backup/backup-cli/src/coordinators/verify.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/backup/backup-cli/src/coordinators/verify.rs rename to crates/pos/storage/backup/backup-cli/src/coordinators/verify.rs diff --git a/crates/cfxcore/core/src/pos/storage/backup/backup-cli/src/lib.rs b/crates/pos/storage/backup/backup-cli/src/lib.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/backup/backup-cli/src/lib.rs rename to crates/pos/storage/backup/backup-cli/src/lib.rs diff --git a/crates/cfxcore/core/src/pos/storage/backup/backup-cli/src/metadata/cache.rs b/crates/pos/storage/backup/backup-cli/src/metadata/cache.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/backup/backup-cli/src/metadata/cache.rs rename to crates/pos/storage/backup/backup-cli/src/metadata/cache.rs diff --git a/crates/cfxcore/core/src/pos/storage/backup/backup-cli/src/metadata/mod.rs b/crates/pos/storage/backup/backup-cli/src/metadata/mod.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/backup/backup-cli/src/metadata/mod.rs rename to crates/pos/storage/backup/backup-cli/src/metadata/mod.rs diff --git a/crates/cfxcore/core/src/pos/storage/backup/backup-cli/src/metadata/view.rs b/crates/pos/storage/backup/backup-cli/src/metadata/view.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/backup/backup-cli/src/metadata/view.rs rename to crates/pos/storage/backup/backup-cli/src/metadata/view.rs diff --git a/crates/cfxcore/core/src/pos/storage/backup/backup-cli/src/metrics/backup.rs b/crates/pos/storage/backup/backup-cli/src/metrics/backup.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/backup/backup-cli/src/metrics/backup.rs rename to crates/pos/storage/backup/backup-cli/src/metrics/backup.rs diff --git a/crates/cfxcore/core/src/pos/storage/backup/backup-cli/src/metrics/metadata.rs b/crates/pos/storage/backup/backup-cli/src/metrics/metadata.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/backup/backup-cli/src/metrics/metadata.rs rename to crates/pos/storage/backup/backup-cli/src/metrics/metadata.rs diff --git a/crates/cfxcore/core/src/pos/storage/backup/backup-cli/src/metrics/mod.rs b/crates/pos/storage/backup/backup-cli/src/metrics/mod.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/backup/backup-cli/src/metrics/mod.rs rename to crates/pos/storage/backup/backup-cli/src/metrics/mod.rs diff --git a/crates/cfxcore/core/src/pos/storage/backup/backup-cli/src/metrics/restore.rs b/crates/pos/storage/backup/backup-cli/src/metrics/restore.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/backup/backup-cli/src/metrics/restore.rs rename to crates/pos/storage/backup/backup-cli/src/metrics/restore.rs diff --git a/crates/cfxcore/core/src/pos/storage/backup/backup-cli/src/metrics/verify.rs b/crates/pos/storage/backup/backup-cli/src/metrics/verify.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/backup/backup-cli/src/metrics/verify.rs rename to crates/pos/storage/backup/backup-cli/src/metrics/verify.rs diff --git a/crates/cfxcore/core/src/pos/storage/backup/backup-cli/src/storage/command_adapter/azure.sample.toml b/crates/pos/storage/backup/backup-cli/src/storage/command_adapter/azure.sample.toml similarity index 100% rename from crates/cfxcore/core/src/pos/storage/backup/backup-cli/src/storage/command_adapter/azure.sample.toml rename to crates/pos/storage/backup/backup-cli/src/storage/command_adapter/azure.sample.toml diff --git a/crates/cfxcore/core/src/pos/storage/backup/backup-cli/src/storage/command_adapter/command.rs b/crates/pos/storage/backup/backup-cli/src/storage/command_adapter/command.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/backup/backup-cli/src/storage/command_adapter/command.rs rename to crates/pos/storage/backup/backup-cli/src/storage/command_adapter/command.rs diff --git a/crates/cfxcore/core/src/pos/storage/backup/backup-cli/src/storage/command_adapter/config.rs b/crates/pos/storage/backup/backup-cli/src/storage/command_adapter/config.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/backup/backup-cli/src/storage/command_adapter/config.rs rename to crates/pos/storage/backup/backup-cli/src/storage/command_adapter/config.rs diff --git a/crates/cfxcore/core/src/pos/storage/backup/backup-cli/src/storage/command_adapter/gcp.sample.toml b/crates/pos/storage/backup/backup-cli/src/storage/command_adapter/gcp.sample.toml similarity index 100% rename from crates/cfxcore/core/src/pos/storage/backup/backup-cli/src/storage/command_adapter/gcp.sample.toml rename to crates/pos/storage/backup/backup-cli/src/storage/command_adapter/gcp.sample.toml diff --git a/crates/cfxcore/core/src/pos/storage/backup/backup-cli/src/storage/command_adapter/local_folder.sample.toml b/crates/pos/storage/backup/backup-cli/src/storage/command_adapter/local_folder.sample.toml similarity index 100% rename from crates/cfxcore/core/src/pos/storage/backup/backup-cli/src/storage/command_adapter/local_folder.sample.toml rename to crates/pos/storage/backup/backup-cli/src/storage/command_adapter/local_folder.sample.toml diff --git a/crates/cfxcore/core/src/pos/storage/backup/backup-cli/src/storage/command_adapter/mod.rs b/crates/pos/storage/backup/backup-cli/src/storage/command_adapter/mod.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/backup/backup-cli/src/storage/command_adapter/mod.rs rename to crates/pos/storage/backup/backup-cli/src/storage/command_adapter/mod.rs diff --git a/crates/cfxcore/core/src/pos/storage/backup/backup-cli/src/storage/command_adapter/s3.sample.toml b/crates/pos/storage/backup/backup-cli/src/storage/command_adapter/s3.sample.toml similarity index 100% rename from crates/cfxcore/core/src/pos/storage/backup/backup-cli/src/storage/command_adapter/s3.sample.toml rename to crates/pos/storage/backup/backup-cli/src/storage/command_adapter/s3.sample.toml diff --git a/crates/cfxcore/core/src/pos/storage/backup/backup-cli/src/storage/command_adapter/tests.rs b/crates/pos/storage/backup/backup-cli/src/storage/command_adapter/tests.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/backup/backup-cli/src/storage/command_adapter/tests.rs rename to crates/pos/storage/backup/backup-cli/src/storage/command_adapter/tests.rs diff --git a/crates/cfxcore/core/src/pos/storage/backup/backup-cli/src/storage/local_fs/mod.rs b/crates/pos/storage/backup/backup-cli/src/storage/local_fs/mod.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/backup/backup-cli/src/storage/local_fs/mod.rs rename to crates/pos/storage/backup/backup-cli/src/storage/local_fs/mod.rs diff --git a/crates/cfxcore/core/src/pos/storage/backup/backup-cli/src/storage/local_fs/tests.rs b/crates/pos/storage/backup/backup-cli/src/storage/local_fs/tests.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/backup/backup-cli/src/storage/local_fs/tests.rs rename to crates/pos/storage/backup/backup-cli/src/storage/local_fs/tests.rs diff --git a/crates/cfxcore/core/src/pos/storage/backup/backup-cli/src/storage/mod.rs b/crates/pos/storage/backup/backup-cli/src/storage/mod.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/backup/backup-cli/src/storage/mod.rs rename to crates/pos/storage/backup/backup-cli/src/storage/mod.rs diff --git a/crates/cfxcore/core/src/pos/storage/backup/backup-cli/src/storage/test_util.rs b/crates/pos/storage/backup/backup-cli/src/storage/test_util.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/backup/backup-cli/src/storage/test_util.rs rename to crates/pos/storage/backup/backup-cli/src/storage/test_util.rs diff --git a/crates/cfxcore/core/src/pos/storage/backup/backup-cli/src/storage/tests.rs b/crates/pos/storage/backup/backup-cli/src/storage/tests.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/backup/backup-cli/src/storage/tests.rs rename to crates/pos/storage/backup/backup-cli/src/storage/tests.rs diff --git a/crates/cfxcore/core/src/pos/storage/backup/backup-cli/src/utils/backup_service_client.rs b/crates/pos/storage/backup/backup-cli/src/utils/backup_service_client.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/backup/backup-cli/src/utils/backup_service_client.rs rename to crates/pos/storage/backup/backup-cli/src/utils/backup_service_client.rs diff --git a/crates/cfxcore/core/src/pos/storage/backup/backup-cli/src/utils/error_notes.rs b/crates/pos/storage/backup/backup-cli/src/utils/error_notes.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/backup/backup-cli/src/utils/error_notes.rs rename to crates/pos/storage/backup/backup-cli/src/utils/error_notes.rs diff --git a/crates/cfxcore/core/src/pos/storage/backup/backup-cli/src/utils/mod.rs b/crates/pos/storage/backup/backup-cli/src/utils/mod.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/backup/backup-cli/src/utils/mod.rs rename to crates/pos/storage/backup/backup-cli/src/utils/mod.rs diff --git a/crates/cfxcore/core/src/pos/storage/backup/backup-cli/src/utils/read_record_bytes.rs b/crates/pos/storage/backup/backup-cli/src/utils/read_record_bytes.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/backup/backup-cli/src/utils/read_record_bytes.rs rename to crates/pos/storage/backup/backup-cli/src/utils/read_record_bytes.rs diff --git a/crates/cfxcore/core/src/pos/storage/backup/backup-cli/src/utils/storage_ext.rs b/crates/pos/storage/backup/backup-cli/src/utils/storage_ext.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/backup/backup-cli/src/utils/storage_ext.rs rename to crates/pos/storage/backup/backup-cli/src/utils/storage_ext.rs diff --git a/crates/cfxcore/core/src/pos/storage/backup/backup-cli/src/utils/stream/buffered_x.rs b/crates/pos/storage/backup/backup-cli/src/utils/stream/buffered_x.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/backup/backup-cli/src/utils/stream/buffered_x.rs rename to crates/pos/storage/backup/backup-cli/src/utils/stream/buffered_x.rs diff --git a/crates/cfxcore/core/src/pos/storage/backup/backup-cli/src/utils/stream/futures_ordered_x.rs b/crates/pos/storage/backup/backup-cli/src/utils/stream/futures_ordered_x.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/backup/backup-cli/src/utils/stream/futures_ordered_x.rs rename to crates/pos/storage/backup/backup-cli/src/utils/stream/futures_ordered_x.rs diff --git a/crates/cfxcore/core/src/pos/storage/backup/backup-cli/src/utils/stream/futures_unordered_x.rs b/crates/pos/storage/backup/backup-cli/src/utils/stream/futures_unordered_x.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/backup/backup-cli/src/utils/stream/futures_unordered_x.rs rename to crates/pos/storage/backup/backup-cli/src/utils/stream/futures_unordered_x.rs diff --git a/crates/cfxcore/core/src/pos/storage/backup/backup-cli/src/utils/stream/mod.rs b/crates/pos/storage/backup/backup-cli/src/utils/stream/mod.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/backup/backup-cli/src/utils/stream/mod.rs rename to crates/pos/storage/backup/backup-cli/src/utils/stream/mod.rs diff --git a/crates/cfxcore/core/src/pos/storage/backup/backup-cli/src/utils/test_utils.rs b/crates/pos/storage/backup/backup-cli/src/utils/test_utils.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/backup/backup-cli/src/utils/test_utils.rs rename to crates/pos/storage/backup/backup-cli/src/utils/test_utils.rs diff --git a/crates/cfxcore/core/src/pos/storage/backup/backup-service/Cargo.toml b/crates/pos/storage/backup/backup-service/Cargo.toml similarity index 50% rename from crates/cfxcore/core/src/pos/storage/backup/backup-service/Cargo.toml rename to crates/pos/storage/backup/backup-service/Cargo.toml index c90cd0420d..c420a8aef3 100644 --- a/crates/cfxcore/core/src/pos/storage/backup/backup-service/Cargo.toml +++ b/crates/pos/storage/backup/backup-service/Cargo.toml @@ -19,19 +19,22 @@ tokio = { workspace = true, features = ["full"] } warp = "0.3.0" bcs = "0.1.2" -diem-crypto = { path = "../../../crypto/crypto" } -diem-logger = { path = "../../../common/logger" } -diem-metrics = { path = "../../../common/metrics" } -diem-types = { path = "../../../types" } -pos-ledger-db = { path = "../../pos-ledger-db" } -storage-interface = { path = "../../storage-interface" } +diem-crypto = { workspace = true } +diem-logger = { workspace = true } +diem-metrics = { workspace = true } +diem-types = { workspace = true } +pos-ledger-db = { workspace = true } +storage-interface = { workspace = true } [dev-dependencies] -pos-ledger-db = { path = "../../pos-ledger-db", features = ["fuzzing"] } -diem-config = { path = "../../../config" } -diem-temppath = { path = "../../../common/temppath" } +pos-ledger-db = { workspace = true, features = ["fuzzing"] } +diem-config = { workspace = true } +diem-temppath = { workspace = true } -reqwest = { workspace = true, features = ["blocking", "json"], default_features = false } +reqwest = { workspace = true, features = [ + "blocking", + "json", +], default_features = false } [features] fuzzing = ["pos-ledger-db/fuzzing"] diff --git a/crates/cfxcore/core/src/pos/storage/backup/backup-service/src/handlers/mod.rs b/crates/pos/storage/backup/backup-service/src/handlers/mod.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/backup/backup-service/src/handlers/mod.rs rename to crates/pos/storage/backup/backup-service/src/handlers/mod.rs diff --git a/crates/cfxcore/core/src/pos/storage/backup/backup-service/src/handlers/utils.rs b/crates/pos/storage/backup/backup-service/src/handlers/utils.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/backup/backup-service/src/handlers/utils.rs rename to crates/pos/storage/backup/backup-service/src/handlers/utils.rs diff --git a/crates/cfxcore/core/src/pos/storage/backup/backup-service/src/lib.rs b/crates/pos/storage/backup/backup-service/src/lib.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/backup/backup-service/src/lib.rs rename to crates/pos/storage/backup/backup-service/src/lib.rs diff --git a/crates/pos/storage/cached-pos-ledger-db/Cargo.toml b/crates/pos/storage/cached-pos-ledger-db/Cargo.toml new file mode 100644 index 0000000000..8b1c1cf6d2 --- /dev/null +++ b/crates/pos/storage/cached-pos-ledger-db/Cargo.toml @@ -0,0 +1,17 @@ +[package] +name = "cached-pos-ledger-db" +version = "0.1.0" +edition = "2018" + +[dependencies] +anyhow = "1.0.38" +serde = { version = "1.0.124", features = ["derive"] } + +consensus-types = { workspace = true } +pos-ledger-db = { workspace = true } +diem-crypto = { workspace = true } +diem-infallible = { workspace = true } +diem-logger = { workspace = true } +diem-types = { workspace = true } +executor-types = { workspace = true } +storage-interface = { workspace = true } \ No newline at end of file diff --git a/crates/cfxcore/core/src/pos/storage/cached-pos-ledger-db/src/lib.rs b/crates/pos/storage/cached-pos-ledger-db/src/lib.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/cached-pos-ledger-db/src/lib.rs rename to crates/pos/storage/cached-pos-ledger-db/src/lib.rs diff --git a/crates/cfxcore/core/src/pos/storage/cached-pos-ledger-db/src/logging.rs b/crates/pos/storage/cached-pos-ledger-db/src/logging.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/cached-pos-ledger-db/src/logging.rs rename to crates/pos/storage/cached-pos-ledger-db/src/logging.rs diff --git a/crates/cfxcore/core/src/pos/storage/cached-pos-ledger-db/src/speculation_cache/mod.rs b/crates/pos/storage/cached-pos-ledger-db/src/speculation_cache/mod.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/cached-pos-ledger-db/src/speculation_cache/mod.rs rename to crates/pos/storage/cached-pos-ledger-db/src/speculation_cache/mod.rs diff --git a/crates/cfxcore/core/src/pos/storage/cached-pos-ledger-db/src/speculation_cache/test.rs b/crates/pos/storage/cached-pos-ledger-db/src/speculation_cache/test.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/cached-pos-ledger-db/src/speculation_cache/test.rs rename to crates/pos/storage/cached-pos-ledger-db/src/speculation_cache/test.rs diff --git a/crates/cfxcore/core/src/pos/storage/data.png b/crates/pos/storage/data.png similarity index 100% rename from crates/cfxcore/core/src/pos/storage/data.png rename to crates/pos/storage/data.png diff --git a/crates/cfxcore/core/src/pos/storage/diemdb-benchmark/Cargo.toml b/crates/pos/storage/diemdb-benchmark/Cargo.toml similarity index 68% rename from crates/cfxcore/core/src/pos/storage/diemdb-benchmark/Cargo.toml rename to crates/pos/storage/diemdb-benchmark/Cargo.toml index 93ff72de57..7df1d648b9 100644 --- a/crates/cfxcore/core/src/pos/storage/diemdb-benchmark/Cargo.toml +++ b/crates/pos/storage/diemdb-benchmark/Cargo.toml @@ -17,11 +17,11 @@ itertools = { version = "0.10.0", default-features = false } rand = "0.8.3" structopt = "0.3.21" -pos-ledger-db = { path = "../pos-ledger-db" } -diem-jellyfish-merkle = { path = "../jellyfish-merkle" } -diem-config = { path = "../../config" } -diem-types = { path = "../../types" } -storage-interface = { path = "../storage-interface" } +pos-ledger-db = { workspace = true } +diem-jellyfish-merkle = { workspace = true } +diem-config = { workspace = true } +diem-types = { workspace = true } +storage-interface = { workspace = true } [features] default = [] diff --git a/crates/cfxcore/core/src/pos/storage/diemdb-benchmark/src/lib.rs b/crates/pos/storage/diemdb-benchmark/src/lib.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/diemdb-benchmark/src/lib.rs rename to crates/pos/storage/diemdb-benchmark/src/lib.rs diff --git a/crates/cfxcore/core/src/pos/storage/diemdb-benchmark/src/main.rs b/crates/pos/storage/diemdb-benchmark/src/main.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/diemdb-benchmark/src/main.rs rename to crates/pos/storage/diemdb-benchmark/src/main.rs diff --git a/crates/cfxcore/core/src/pos/storage/diemsum/Cargo.toml b/crates/pos/storage/diemsum/Cargo.toml similarity index 65% rename from crates/cfxcore/core/src/pos/storage/diemsum/Cargo.toml rename to crates/pos/storage/diemsum/Cargo.toml index 01db13a61b..0ca4ad7104 100644 --- a/crates/cfxcore/core/src/pos/storage/diemsum/Cargo.toml +++ b/crates/pos/storage/diemsum/Cargo.toml @@ -15,7 +15,7 @@ structopt = "0.3.21" serde = "1.0.124" serde_json = "1.0.64" -pos-ledger-db = { path = "../pos-ledger-db", features = ["diemsum"] } -diem-crypto = { path = "../../crypto/crypto" } -diem-types = { path = "../../types" } -storage-interface = { path = "../storage-interface" } +pos-ledger-db = { workspace = true, features = ["diemsum"] } +diem-crypto = { workspace = true } +diem-types = { workspace = true } +storage-interface = { workspace = true } diff --git a/crates/cfxcore/core/src/pos/storage/diemsum/src/main.rs b/crates/pos/storage/diemsum/src/main.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/diemsum/src/main.rs rename to crates/pos/storage/diemsum/src/main.rs diff --git a/crates/cfxcore/core/src/pos/storage/inspector/Cargo.toml b/crates/pos/storage/inspector/Cargo.toml similarity index 58% rename from crates/cfxcore/core/src/pos/storage/inspector/Cargo.toml rename to crates/pos/storage/inspector/Cargo.toml index 245d7a4b4e..d867686fdb 100644 --- a/crates/cfxcore/core/src/pos/storage/inspector/Cargo.toml +++ b/crates/pos/storage/inspector/Cargo.toml @@ -14,9 +14,9 @@ structopt = "0.3.21" tempfile = "3.2.0" compiled-stdlib = { path = "../../language/diem-framework/compiled" } -pos-ledger-db = { path = "../pos-ledger-db" } -diem-config = { path = "../../config" } -diem-crypto = { path = "../../crypto/crypto" } -diem-types = { path = "../../types" } -diem-logger = { path = "../../common/logger" } -storage-interface = { path = "../storage-interface" } +pos-ledger-db = { workspace = true } +diem-config = { workspace = true } +diem-crypto = { workspace = true } +diem-types = { workspace = true } +diem-logger = { workspace = true } +storage-interface = { workspace = true } \ No newline at end of file diff --git a/crates/cfxcore/core/src/pos/storage/inspector/src/main.rs b/crates/pos/storage/inspector/src/main.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/inspector/src/main.rs rename to crates/pos/storage/inspector/src/main.rs diff --git a/crates/cfxcore/core/src/pos/storage/jellyfish-merkle/Cargo.toml b/crates/pos/storage/jellyfish-merkle/Cargo.toml similarity index 55% rename from crates/cfxcore/core/src/pos/storage/jellyfish-merkle/Cargo.toml rename to crates/pos/storage/jellyfish-merkle/Cargo.toml index 937ebd1016..585b04c566 100644 --- a/crates/cfxcore/core/src/pos/storage/jellyfish-merkle/Cargo.toml +++ b/crates/pos/storage/jellyfish-merkle/Cargo.toml @@ -23,22 +23,29 @@ serde = { version = "1.0.124", features = ["derive"] } thiserror = "1.0.24" bcs = "0.1.2" -diem-crypto = { path = "../../crypto/crypto" } -diem-crypto-derive = { path = "../../crypto/crypto-derive" } -diem-infallible = { path = "../../common/infallible" } -diem-metrics = { path = "../../common/metrics" } -diem-nibble = { path = "../../common/nibble" } -diem-types = { path = "../../types" } +diem-crypto = { workspace = true } +diem-crypto-derive = { workspace = true } +diem-infallible = { workspace = true } +diem-metrics = { workspace = true } +diem-nibble = { workspace = true } +diem-types = { workspace = true } [dev-dependencies] rand = "0.8.3" proptest = "1.0.0" proptest-derive = "0.3.0" -diem-crypto = { path = "../../crypto/crypto", features = ["fuzzing"] } -diem-nibble = { path = "../../common/nibble", features = ["fuzzing"] } -diem-types = { path = "../../types", features = ["fuzzing"] } +diem-crypto = { workspace = true, features = ["fuzzing"] } +diem-nibble = { workspace = true, features = ["fuzzing"] } +diem-types = { workspace = true, features = ["fuzzing"] } [features] default = [] -fuzzing = ["proptest", "rand", "proptest-derive", "diem-crypto/fuzzing", "diem-types/fuzzing", "diem-nibble/fuzzing"] +fuzzing = [ + "proptest", + "rand", + "proptest-derive", + "diem-crypto/fuzzing", + "diem-types/fuzzing", + "diem-nibble/fuzzing", +] diff --git a/crates/cfxcore/core/src/pos/storage/jellyfish-merkle/proptest-regressions/restore/restore_test.txt b/crates/pos/storage/jellyfish-merkle/proptest-regressions/restore/restore_test.txt similarity index 100% rename from crates/cfxcore/core/src/pos/storage/jellyfish-merkle/proptest-regressions/restore/restore_test.txt rename to crates/pos/storage/jellyfish-merkle/proptest-regressions/restore/restore_test.txt diff --git a/crates/cfxcore/core/src/pos/storage/jellyfish-merkle/src/iterator/iterator_test.rs b/crates/pos/storage/jellyfish-merkle/src/iterator/iterator_test.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/jellyfish-merkle/src/iterator/iterator_test.rs rename to crates/pos/storage/jellyfish-merkle/src/iterator/iterator_test.rs diff --git a/crates/cfxcore/core/src/pos/storage/jellyfish-merkle/src/iterator/mod.rs b/crates/pos/storage/jellyfish-merkle/src/iterator/mod.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/jellyfish-merkle/src/iterator/mod.rs rename to crates/pos/storage/jellyfish-merkle/src/iterator/mod.rs diff --git a/crates/cfxcore/core/src/pos/storage/jellyfish-merkle/src/jellyfish_merkle_test.rs b/crates/pos/storage/jellyfish-merkle/src/jellyfish_merkle_test.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/jellyfish-merkle/src/jellyfish_merkle_test.rs rename to crates/pos/storage/jellyfish-merkle/src/jellyfish_merkle_test.rs diff --git a/crates/cfxcore/core/src/pos/storage/jellyfish-merkle/src/lib.rs b/crates/pos/storage/jellyfish-merkle/src/lib.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/jellyfish-merkle/src/lib.rs rename to crates/pos/storage/jellyfish-merkle/src/lib.rs diff --git a/crates/cfxcore/core/src/pos/storage/jellyfish-merkle/src/metrics.rs b/crates/pos/storage/jellyfish-merkle/src/metrics.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/jellyfish-merkle/src/metrics.rs rename to crates/pos/storage/jellyfish-merkle/src/metrics.rs diff --git a/crates/cfxcore/core/src/pos/storage/jellyfish-merkle/src/mock_tree_store.rs b/crates/pos/storage/jellyfish-merkle/src/mock_tree_store.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/jellyfish-merkle/src/mock_tree_store.rs rename to crates/pos/storage/jellyfish-merkle/src/mock_tree_store.rs diff --git a/crates/cfxcore/core/src/pos/storage/jellyfish-merkle/src/nibble_path/mod.rs b/crates/pos/storage/jellyfish-merkle/src/nibble_path/mod.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/jellyfish-merkle/src/nibble_path/mod.rs rename to crates/pos/storage/jellyfish-merkle/src/nibble_path/mod.rs diff --git a/crates/cfxcore/core/src/pos/storage/jellyfish-merkle/src/nibble_path/nibble_path_test.rs b/crates/pos/storage/jellyfish-merkle/src/nibble_path/nibble_path_test.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/jellyfish-merkle/src/nibble_path/nibble_path_test.rs rename to crates/pos/storage/jellyfish-merkle/src/nibble_path/nibble_path_test.rs diff --git a/crates/cfxcore/core/src/pos/storage/jellyfish-merkle/src/node_type/mod.rs b/crates/pos/storage/jellyfish-merkle/src/node_type/mod.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/jellyfish-merkle/src/node_type/mod.rs rename to crates/pos/storage/jellyfish-merkle/src/node_type/mod.rs diff --git a/crates/cfxcore/core/src/pos/storage/jellyfish-merkle/src/node_type/node_type_test.rs b/crates/pos/storage/jellyfish-merkle/src/node_type/node_type_test.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/jellyfish-merkle/src/node_type/node_type_test.rs rename to crates/pos/storage/jellyfish-merkle/src/node_type/node_type_test.rs diff --git a/crates/cfxcore/core/src/pos/storage/jellyfish-merkle/src/restore/mod.rs b/crates/pos/storage/jellyfish-merkle/src/restore/mod.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/jellyfish-merkle/src/restore/mod.rs rename to crates/pos/storage/jellyfish-merkle/src/restore/mod.rs diff --git a/crates/cfxcore/core/src/pos/storage/jellyfish-merkle/src/restore/restore_test.rs b/crates/pos/storage/jellyfish-merkle/src/restore/restore_test.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/jellyfish-merkle/src/restore/restore_test.rs rename to crates/pos/storage/jellyfish-merkle/src/restore/restore_test.rs diff --git a/crates/cfxcore/core/src/pos/storage/jellyfish-merkle/src/test_helper.rs b/crates/pos/storage/jellyfish-merkle/src/test_helper.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/jellyfish-merkle/src/test_helper.rs rename to crates/pos/storage/jellyfish-merkle/src/test_helper.rs diff --git a/crates/cfxcore/core/src/pos/storage/jellyfish-merkle/src/tree_cache/mod.rs b/crates/pos/storage/jellyfish-merkle/src/tree_cache/mod.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/jellyfish-merkle/src/tree_cache/mod.rs rename to crates/pos/storage/jellyfish-merkle/src/tree_cache/mod.rs diff --git a/crates/cfxcore/core/src/pos/storage/jellyfish-merkle/src/tree_cache/tree_cache_test.rs b/crates/pos/storage/jellyfish-merkle/src/tree_cache/tree_cache_test.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/jellyfish-merkle/src/tree_cache/tree_cache_test.rs rename to crates/pos/storage/jellyfish-merkle/src/tree_cache/tree_cache_test.rs diff --git a/crates/pos/storage/pos-ledger-db/Cargo.toml b/crates/pos/storage/pos-ledger-db/Cargo.toml new file mode 100644 index 0000000000..fce7259559 --- /dev/null +++ b/crates/pos/storage/pos-ledger-db/Cargo.toml @@ -0,0 +1,64 @@ +[package] +name = "pos-ledger-db" +version = "0.1.0" +authors = ["Diem Association "] +description = "Diem diemdb" +repository = "https://github.com/diem/diem" +homepage = "https://diem.com" +license = "Apache-2.0" +publish = false +edition = "2018" + +[dependencies] +anyhow = { workspace = true } +arc-swap = "1.2.0" +byteorder = "1.4.3" +itertools = { workspace = true } +once_cell = { workspace = true } +num-derive = "0.3.3" +num-traits = "0.2.14" +proptest = { version = "1.0.0", optional = true } +proptest-derive = { version = "0.3.0", optional = true } +serde = { workspace = true } +thiserror = { workspace = true } + +accumulator = { workspace = true } +bcs = "0.1.2" +diem-config = { workspace = true } +diem-crypto = { workspace = true } +diem-jellyfish-merkle = { workspace = true } +diem-logger = { workspace = true } +diem-metrics = { workspace = true } +diem-infallible = { workspace = true } +diem-proptest-helpers = { workspace = true, optional = true } +diem-temppath = { workspace = true, optional = true } +diem-types = { workspace = true } +num-variants = { workspace = true } +schemadb = { workspace = true } +storage-interface = { workspace = true } +consensus-types = { workspace = true } +executor-types = { workspace = true } + +[dev-dependencies] +proptest = "1.0.0" +proptest-derive = "0.3.0" +rand = "0.8.3" + +diem-jellyfish-merkle = { workspace = true, features = ["fuzzing"] } +diem-proptest-helpers = { workspace = true } +diem-temppath = { workspace = true } +diem-types = { workspace = true, features = ["fuzzing"] } +move-core-types = { workspace = true } + +[features] +default = [] +diemsum = [] +fuzzing = [ + "proptest", + "proptest-derive", + "diem-proptest-helpers", + "diem-temppath", + "diem-crypto/fuzzing", + "diem-jellyfish-merkle/fuzzing", + "diem-types/fuzzing", +] diff --git a/crates/cfxcore/core/src/pos/storage/pos-ledger-db/proptest-regressions/diemdb_test.txt b/crates/pos/storage/pos-ledger-db/proptest-regressions/diemdb_test.txt similarity index 100% rename from crates/cfxcore/core/src/pos/storage/pos-ledger-db/proptest-regressions/diemdb_test.txt rename to crates/pos/storage/pos-ledger-db/proptest-regressions/diemdb_test.txt diff --git a/crates/cfxcore/core/src/pos/storage/pos-ledger-db/proptest-regressions/ledger_store/ledger_info_test.txt b/crates/pos/storage/pos-ledger-db/proptest-regressions/ledger_store/ledger_info_test.txt similarity index 100% rename from crates/cfxcore/core/src/pos/storage/pos-ledger-db/proptest-regressions/ledger_store/ledger_info_test.txt rename to crates/pos/storage/pos-ledger-db/proptest-regressions/ledger_store/ledger_info_test.txt diff --git a/crates/cfxcore/core/src/pos/storage/pos-ledger-db/src/backup/backup_handler.rs b/crates/pos/storage/pos-ledger-db/src/backup/backup_handler.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/pos-ledger-db/src/backup/backup_handler.rs rename to crates/pos/storage/pos-ledger-db/src/backup/backup_handler.rs diff --git a/crates/cfxcore/core/src/pos/storage/pos-ledger-db/src/backup/mod.rs b/crates/pos/storage/pos-ledger-db/src/backup/mod.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/pos-ledger-db/src/backup/mod.rs rename to crates/pos/storage/pos-ledger-db/src/backup/mod.rs diff --git a/crates/cfxcore/core/src/pos/storage/pos-ledger-db/src/backup/restore_handler.rs b/crates/pos/storage/pos-ledger-db/src/backup/restore_handler.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/pos-ledger-db/src/backup/restore_handler.rs rename to crates/pos/storage/pos-ledger-db/src/backup/restore_handler.rs diff --git a/crates/cfxcore/core/src/pos/storage/pos-ledger-db/src/backup/test.rs b/crates/pos/storage/pos-ledger-db/src/backup/test.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/pos-ledger-db/src/backup/test.rs rename to crates/pos/storage/pos-ledger-db/src/backup/test.rs diff --git a/crates/cfxcore/core/src/pos/storage/pos-ledger-db/src/change_set.rs b/crates/pos/storage/pos-ledger-db/src/change_set.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/pos-ledger-db/src/change_set.rs rename to crates/pos/storage/pos-ledger-db/src/change_set.rs diff --git a/crates/cfxcore/core/src/pos/storage/pos-ledger-db/src/diemdb_test.rs b/crates/pos/storage/pos-ledger-db/src/diemdb_test.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/pos-ledger-db/src/diemdb_test.rs rename to crates/pos/storage/pos-ledger-db/src/diemdb_test.rs diff --git a/crates/cfxcore/core/src/pos/storage/pos-ledger-db/src/diemsum/mod.rs b/crates/pos/storage/pos-ledger-db/src/diemsum/mod.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/pos-ledger-db/src/diemsum/mod.rs rename to crates/pos/storage/pos-ledger-db/src/diemsum/mod.rs diff --git a/crates/cfxcore/core/src/pos/storage/pos-ledger-db/src/errors.rs b/crates/pos/storage/pos-ledger-db/src/errors.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/pos-ledger-db/src/errors.rs rename to crates/pos/storage/pos-ledger-db/src/errors.rs diff --git a/crates/cfxcore/core/src/pos/storage/pos-ledger-db/src/event_store/mod.rs b/crates/pos/storage/pos-ledger-db/src/event_store/mod.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/pos-ledger-db/src/event_store/mod.rs rename to crates/pos/storage/pos-ledger-db/src/event_store/mod.rs diff --git a/crates/cfxcore/core/src/pos/storage/pos-ledger-db/src/event_store/test.rs b/crates/pos/storage/pos-ledger-db/src/event_store/test.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/pos-ledger-db/src/event_store/test.rs rename to crates/pos/storage/pos-ledger-db/src/event_store/test.rs diff --git a/crates/cfxcore/core/src/pos/storage/pos-ledger-db/src/ledger_counters/mod.rs b/crates/pos/storage/pos-ledger-db/src/ledger_counters/mod.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/pos-ledger-db/src/ledger_counters/mod.rs rename to crates/pos/storage/pos-ledger-db/src/ledger_counters/mod.rs diff --git a/crates/cfxcore/core/src/pos/storage/pos-ledger-db/src/ledger_counters/test.rs b/crates/pos/storage/pos-ledger-db/src/ledger_counters/test.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/pos-ledger-db/src/ledger_counters/test.rs rename to crates/pos/storage/pos-ledger-db/src/ledger_counters/test.rs diff --git a/crates/cfxcore/core/src/pos/storage/pos-ledger-db/src/ledger_store/ledger_info_test.rs b/crates/pos/storage/pos-ledger-db/src/ledger_store/ledger_info_test.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/pos-ledger-db/src/ledger_store/ledger_info_test.rs rename to crates/pos/storage/pos-ledger-db/src/ledger_store/ledger_info_test.rs diff --git a/crates/cfxcore/core/src/pos/storage/pos-ledger-db/src/ledger_store/mod.rs b/crates/pos/storage/pos-ledger-db/src/ledger_store/mod.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/pos-ledger-db/src/ledger_store/mod.rs rename to crates/pos/storage/pos-ledger-db/src/ledger_store/mod.rs diff --git a/crates/cfxcore/core/src/pos/storage/pos-ledger-db/src/ledger_store/transaction_info_test.rs b/crates/pos/storage/pos-ledger-db/src/ledger_store/transaction_info_test.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/pos-ledger-db/src/ledger_store/transaction_info_test.rs rename to crates/pos/storage/pos-ledger-db/src/ledger_store/transaction_info_test.rs diff --git a/crates/cfxcore/core/src/pos/storage/pos-ledger-db/src/lib.rs b/crates/pos/storage/pos-ledger-db/src/lib.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/pos-ledger-db/src/lib.rs rename to crates/pos/storage/pos-ledger-db/src/lib.rs diff --git a/crates/cfxcore/core/src/pos/storage/pos-ledger-db/src/metrics.rs b/crates/pos/storage/pos-ledger-db/src/metrics.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/pos-ledger-db/src/metrics.rs rename to crates/pos/storage/pos-ledger-db/src/metrics.rs diff --git a/crates/cfxcore/core/src/pos/storage/pos-ledger-db/src/pruner/mod.rs b/crates/pos/storage/pos-ledger-db/src/pruner/mod.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/pos-ledger-db/src/pruner/mod.rs rename to crates/pos/storage/pos-ledger-db/src/pruner/mod.rs diff --git a/crates/cfxcore/core/src/pos/storage/pos-ledger-db/src/pruner/test.rs b/crates/pos/storage/pos-ledger-db/src/pruner/test.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/pos-ledger-db/src/pruner/test.rs rename to crates/pos/storage/pos-ledger-db/src/pruner/test.rs diff --git a/crates/cfxcore/core/src/pos/storage/pos-ledger-db/src/schema/block_by_epoch_and_round/mod.rs b/crates/pos/storage/pos-ledger-db/src/schema/block_by_epoch_and_round/mod.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/pos-ledger-db/src/schema/block_by_epoch_and_round/mod.rs rename to crates/pos/storage/pos-ledger-db/src/schema/block_by_epoch_and_round/mod.rs diff --git a/crates/cfxcore/core/src/pos/storage/pos-ledger-db/src/schema/committed_block/mod.rs b/crates/pos/storage/pos-ledger-db/src/schema/committed_block/mod.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/pos-ledger-db/src/schema/committed_block/mod.rs rename to crates/pos/storage/pos-ledger-db/src/schema/committed_block/mod.rs diff --git a/crates/cfxcore/core/src/pos/storage/pos-ledger-db/src/schema/committed_block_by_view/mod.rs b/crates/pos/storage/pos-ledger-db/src/schema/committed_block_by_view/mod.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/pos-ledger-db/src/schema/committed_block_by_view/mod.rs rename to crates/pos/storage/pos-ledger-db/src/schema/committed_block_by_view/mod.rs diff --git a/crates/cfxcore/core/src/pos/storage/pos-ledger-db/src/schema/epoch_by_version/mod.rs b/crates/pos/storage/pos-ledger-db/src/schema/epoch_by_version/mod.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/pos-ledger-db/src/schema/epoch_by_version/mod.rs rename to crates/pos/storage/pos-ledger-db/src/schema/epoch_by_version/mod.rs diff --git a/crates/cfxcore/core/src/pos/storage/pos-ledger-db/src/schema/epoch_by_version/test.rs b/crates/pos/storage/pos-ledger-db/src/schema/epoch_by_version/test.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/pos-ledger-db/src/schema/epoch_by_version/test.rs rename to crates/pos/storage/pos-ledger-db/src/schema/epoch_by_version/test.rs diff --git a/crates/cfxcore/core/src/pos/storage/pos-ledger-db/src/schema/event/mod.rs b/crates/pos/storage/pos-ledger-db/src/schema/event/mod.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/pos-ledger-db/src/schema/event/mod.rs rename to crates/pos/storage/pos-ledger-db/src/schema/event/mod.rs diff --git a/crates/cfxcore/core/src/pos/storage/pos-ledger-db/src/schema/event/test.rs b/crates/pos/storage/pos-ledger-db/src/schema/event/test.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/pos-ledger-db/src/schema/event/test.rs rename to crates/pos/storage/pos-ledger-db/src/schema/event/test.rs diff --git a/crates/cfxcore/core/src/pos/storage/pos-ledger-db/src/schema/event_accumulator/mod.rs b/crates/pos/storage/pos-ledger-db/src/schema/event_accumulator/mod.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/pos-ledger-db/src/schema/event_accumulator/mod.rs rename to crates/pos/storage/pos-ledger-db/src/schema/event_accumulator/mod.rs diff --git a/crates/cfxcore/core/src/pos/storage/pos-ledger-db/src/schema/event_accumulator/test.rs b/crates/pos/storage/pos-ledger-db/src/schema/event_accumulator/test.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/pos-ledger-db/src/schema/event_accumulator/test.rs rename to crates/pos/storage/pos-ledger-db/src/schema/event_accumulator/test.rs diff --git a/crates/cfxcore/core/src/pos/storage/pos-ledger-db/src/schema/event_by_key/mod.rs b/crates/pos/storage/pos-ledger-db/src/schema/event_by_key/mod.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/pos-ledger-db/src/schema/event_by_key/mod.rs rename to crates/pos/storage/pos-ledger-db/src/schema/event_by_key/mod.rs diff --git a/crates/cfxcore/core/src/pos/storage/pos-ledger-db/src/schema/event_by_key/test.rs b/crates/pos/storage/pos-ledger-db/src/schema/event_by_key/test.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/pos-ledger-db/src/schema/event_by_key/test.rs rename to crates/pos/storage/pos-ledger-db/src/schema/event_by_key/test.rs diff --git a/crates/cfxcore/core/src/pos/storage/pos-ledger-db/src/schema/event_by_version/mod.rs b/crates/pos/storage/pos-ledger-db/src/schema/event_by_version/mod.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/pos-ledger-db/src/schema/event_by_version/mod.rs rename to crates/pos/storage/pos-ledger-db/src/schema/event_by_version/mod.rs diff --git a/crates/cfxcore/core/src/pos/storage/pos-ledger-db/src/schema/event_by_version/test.rs b/crates/pos/storage/pos-ledger-db/src/schema/event_by_version/test.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/pos-ledger-db/src/schema/event_by_version/test.rs rename to crates/pos/storage/pos-ledger-db/src/schema/event_by_version/test.rs diff --git a/crates/cfxcore/core/src/pos/storage/pos-ledger-db/src/schema/jellyfish_merkle_node/mod.rs b/crates/pos/storage/pos-ledger-db/src/schema/jellyfish_merkle_node/mod.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/pos-ledger-db/src/schema/jellyfish_merkle_node/mod.rs rename to crates/pos/storage/pos-ledger-db/src/schema/jellyfish_merkle_node/mod.rs diff --git a/crates/cfxcore/core/src/pos/storage/pos-ledger-db/src/schema/jellyfish_merkle_node/test.rs b/crates/pos/storage/pos-ledger-db/src/schema/jellyfish_merkle_node/test.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/pos-ledger-db/src/schema/jellyfish_merkle_node/test.rs rename to crates/pos/storage/pos-ledger-db/src/schema/jellyfish_merkle_node/test.rs diff --git a/crates/cfxcore/core/src/pos/storage/pos-ledger-db/src/schema/ledger_counters/mod.rs b/crates/pos/storage/pos-ledger-db/src/schema/ledger_counters/mod.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/pos-ledger-db/src/schema/ledger_counters/mod.rs rename to crates/pos/storage/pos-ledger-db/src/schema/ledger_counters/mod.rs diff --git a/crates/cfxcore/core/src/pos/storage/pos-ledger-db/src/schema/ledger_counters/test.rs b/crates/pos/storage/pos-ledger-db/src/schema/ledger_counters/test.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/pos-ledger-db/src/schema/ledger_counters/test.rs rename to crates/pos/storage/pos-ledger-db/src/schema/ledger_counters/test.rs diff --git a/crates/cfxcore/core/src/pos/storage/pos-ledger-db/src/schema/ledger_info/mod.rs b/crates/pos/storage/pos-ledger-db/src/schema/ledger_info/mod.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/pos-ledger-db/src/schema/ledger_info/mod.rs rename to crates/pos/storage/pos-ledger-db/src/schema/ledger_info/mod.rs diff --git a/crates/cfxcore/core/src/pos/storage/pos-ledger-db/src/schema/ledger_info/test.rs b/crates/pos/storage/pos-ledger-db/src/schema/ledger_info/test.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/pos-ledger-db/src/schema/ledger_info/test.rs rename to crates/pos/storage/pos-ledger-db/src/schema/ledger_info/test.rs diff --git a/crates/cfxcore/core/src/pos/storage/pos-ledger-db/src/schema/ledger_info_by_block/mod.rs b/crates/pos/storage/pos-ledger-db/src/schema/ledger_info_by_block/mod.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/pos-ledger-db/src/schema/ledger_info_by_block/mod.rs rename to crates/pos/storage/pos-ledger-db/src/schema/ledger_info_by_block/mod.rs diff --git a/crates/cfxcore/core/src/pos/storage/pos-ledger-db/src/schema/ledger_info_by_block/test.rs b/crates/pos/storage/pos-ledger-db/src/schema/ledger_info_by_block/test.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/pos-ledger-db/src/schema/ledger_info_by_block/test.rs rename to crates/pos/storage/pos-ledger-db/src/schema/ledger_info_by_block/test.rs diff --git a/crates/cfxcore/core/src/pos/storage/pos-ledger-db/src/schema/ledger_info_by_voted_block/mod.rs b/crates/pos/storage/pos-ledger-db/src/schema/ledger_info_by_voted_block/mod.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/pos-ledger-db/src/schema/ledger_info_by_voted_block/mod.rs rename to crates/pos/storage/pos-ledger-db/src/schema/ledger_info_by_voted_block/mod.rs diff --git a/crates/cfxcore/core/src/pos/storage/pos-ledger-db/src/schema/mod.rs b/crates/pos/storage/pos-ledger-db/src/schema/mod.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/pos-ledger-db/src/schema/mod.rs rename to crates/pos/storage/pos-ledger-db/src/schema/mod.rs diff --git a/crates/cfxcore/core/src/pos/storage/pos-ledger-db/src/schema/pos_state/mod.rs b/crates/pos/storage/pos-ledger-db/src/schema/pos_state/mod.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/pos-ledger-db/src/schema/pos_state/mod.rs rename to crates/pos/storage/pos-ledger-db/src/schema/pos_state/mod.rs diff --git a/crates/cfxcore/core/src/pos/storage/pos-ledger-db/src/schema/pos_state/test.rs b/crates/pos/storage/pos-ledger-db/src/schema/pos_state/test.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/pos-ledger-db/src/schema/pos_state/test.rs rename to crates/pos/storage/pos-ledger-db/src/schema/pos_state/test.rs diff --git a/crates/cfxcore/core/src/pos/storage/pos-ledger-db/src/schema/reward_event/mod.rs b/crates/pos/storage/pos-ledger-db/src/schema/reward_event/mod.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/pos-ledger-db/src/schema/reward_event/mod.rs rename to crates/pos/storage/pos-ledger-db/src/schema/reward_event/mod.rs diff --git a/crates/cfxcore/core/src/pos/storage/pos-ledger-db/src/schema/stale_node_index/mod.rs b/crates/pos/storage/pos-ledger-db/src/schema/stale_node_index/mod.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/pos-ledger-db/src/schema/stale_node_index/mod.rs rename to crates/pos/storage/pos-ledger-db/src/schema/stale_node_index/mod.rs diff --git a/crates/cfxcore/core/src/pos/storage/pos-ledger-db/src/schema/stale_node_index/test.rs b/crates/pos/storage/pos-ledger-db/src/schema/stale_node_index/test.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/pos-ledger-db/src/schema/stale_node_index/test.rs rename to crates/pos/storage/pos-ledger-db/src/schema/stale_node_index/test.rs diff --git a/crates/cfxcore/core/src/pos/storage/pos-ledger-db/src/schema/transaction/mod.rs b/crates/pos/storage/pos-ledger-db/src/schema/transaction/mod.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/pos-ledger-db/src/schema/transaction/mod.rs rename to crates/pos/storage/pos-ledger-db/src/schema/transaction/mod.rs diff --git a/crates/cfxcore/core/src/pos/storage/pos-ledger-db/src/schema/transaction/test.rs b/crates/pos/storage/pos-ledger-db/src/schema/transaction/test.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/pos-ledger-db/src/schema/transaction/test.rs rename to crates/pos/storage/pos-ledger-db/src/schema/transaction/test.rs diff --git a/crates/cfxcore/core/src/pos/storage/pos-ledger-db/src/schema/transaction_accumulator/mod.rs b/crates/pos/storage/pos-ledger-db/src/schema/transaction_accumulator/mod.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/pos-ledger-db/src/schema/transaction_accumulator/mod.rs rename to crates/pos/storage/pos-ledger-db/src/schema/transaction_accumulator/mod.rs diff --git a/crates/cfxcore/core/src/pos/storage/pos-ledger-db/src/schema/transaction_accumulator/test.rs b/crates/pos/storage/pos-ledger-db/src/schema/transaction_accumulator/test.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/pos-ledger-db/src/schema/transaction_accumulator/test.rs rename to crates/pos/storage/pos-ledger-db/src/schema/transaction_accumulator/test.rs diff --git a/crates/cfxcore/core/src/pos/storage/pos-ledger-db/src/schema/transaction_by_account/mod.rs b/crates/pos/storage/pos-ledger-db/src/schema/transaction_by_account/mod.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/pos-ledger-db/src/schema/transaction_by_account/mod.rs rename to crates/pos/storage/pos-ledger-db/src/schema/transaction_by_account/mod.rs diff --git a/crates/cfxcore/core/src/pos/storage/pos-ledger-db/src/schema/transaction_by_account/test.rs b/crates/pos/storage/pos-ledger-db/src/schema/transaction_by_account/test.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/pos-ledger-db/src/schema/transaction_by_account/test.rs rename to crates/pos/storage/pos-ledger-db/src/schema/transaction_by_account/test.rs diff --git a/crates/cfxcore/core/src/pos/storage/pos-ledger-db/src/schema/transaction_info/mod.rs b/crates/pos/storage/pos-ledger-db/src/schema/transaction_info/mod.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/pos-ledger-db/src/schema/transaction_info/mod.rs rename to crates/pos/storage/pos-ledger-db/src/schema/transaction_info/mod.rs diff --git a/crates/cfxcore/core/src/pos/storage/pos-ledger-db/src/schema/transaction_info/test.rs b/crates/pos/storage/pos-ledger-db/src/schema/transaction_info/test.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/pos-ledger-db/src/schema/transaction_info/test.rs rename to crates/pos/storage/pos-ledger-db/src/schema/transaction_info/test.rs diff --git a/crates/cfxcore/core/src/pos/storage/pos-ledger-db/src/state_store/mod.rs b/crates/pos/storage/pos-ledger-db/src/state_store/mod.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/pos-ledger-db/src/state_store/mod.rs rename to crates/pos/storage/pos-ledger-db/src/state_store/mod.rs diff --git a/crates/cfxcore/core/src/pos/storage/pos-ledger-db/src/state_store/state_store_test.rs b/crates/pos/storage/pos-ledger-db/src/state_store/state_store_test.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/pos-ledger-db/src/state_store/state_store_test.rs rename to crates/pos/storage/pos-ledger-db/src/state_store/state_store_test.rs diff --git a/crates/cfxcore/core/src/pos/storage/pos-ledger-db/src/system_store/mod.rs b/crates/pos/storage/pos-ledger-db/src/system_store/mod.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/pos-ledger-db/src/system_store/mod.rs rename to crates/pos/storage/pos-ledger-db/src/system_store/mod.rs diff --git a/crates/cfxcore/core/src/pos/storage/pos-ledger-db/src/system_store/test.rs b/crates/pos/storage/pos-ledger-db/src/system_store/test.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/pos-ledger-db/src/system_store/test.rs rename to crates/pos/storage/pos-ledger-db/src/system_store/test.rs diff --git a/crates/cfxcore/core/src/pos/storage/pos-ledger-db/src/test_helper.rs b/crates/pos/storage/pos-ledger-db/src/test_helper.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/pos-ledger-db/src/test_helper.rs rename to crates/pos/storage/pos-ledger-db/src/test_helper.rs diff --git a/crates/cfxcore/core/src/pos/storage/pos-ledger-db/src/transaction_store/mod.rs b/crates/pos/storage/pos-ledger-db/src/transaction_store/mod.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/pos-ledger-db/src/transaction_store/mod.rs rename to crates/pos/storage/pos-ledger-db/src/transaction_store/mod.rs diff --git a/crates/cfxcore/core/src/pos/storage/pos-ledger-db/src/transaction_store/test.rs b/crates/pos/storage/pos-ledger-db/src/transaction_store/test.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/pos-ledger-db/src/transaction_store/test.rs rename to crates/pos/storage/pos-ledger-db/src/transaction_store/test.rs diff --git a/crates/cfxcore/core/src/pos/storage/schemadb/Cargo.toml b/crates/pos/storage/schemadb/Cargo.toml similarity index 68% rename from crates/cfxcore/core/src/pos/storage/schemadb/Cargo.toml rename to crates/pos/storage/schemadb/Cargo.toml index 787c403099..a4f79aa898 100644 --- a/crates/cfxcore/core/src/pos/storage/schemadb/Cargo.toml +++ b/crates/pos/storage/schemadb/Cargo.toml @@ -12,12 +12,12 @@ edition = "2018" [dependencies] anyhow = "1.0.38" once_cell = "1.7.2" -diem-config = { path = "../../config" } -diem-logger = { path = "../../common/logger" } -diem-metrics = { path = "../../common/metrics" } +diem-config = { workspace = true } +diem-logger = { workspace = true } +diem-metrics = { workspace = true } rocksdb = { workspace = true } [dev-dependencies] byteorder = "1.4.3" proptest = "1.0.0" -diem-temppath = { path = "../../common/temppath" } +diem-temppath = { workspace = true } diff --git a/crates/cfxcore/core/src/pos/storage/schemadb/src/lib.rs b/crates/pos/storage/schemadb/src/lib.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/schemadb/src/lib.rs rename to crates/pos/storage/schemadb/src/lib.rs diff --git a/crates/cfxcore/core/src/pos/storage/schemadb/src/metrics.rs b/crates/pos/storage/schemadb/src/metrics.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/schemadb/src/metrics.rs rename to crates/pos/storage/schemadb/src/metrics.rs diff --git a/crates/cfxcore/core/src/pos/storage/schemadb/src/schema.rs b/crates/pos/storage/schemadb/src/schema.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/schemadb/src/schema.rs rename to crates/pos/storage/schemadb/src/schema.rs diff --git a/crates/cfxcore/core/src/pos/storage/schemadb/tests/db.rs b/crates/pos/storage/schemadb/tests/db.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/schemadb/tests/db.rs rename to crates/pos/storage/schemadb/tests/db.rs diff --git a/crates/cfxcore/core/src/pos/storage/schemadb/tests/iterator.rs b/crates/pos/storage/schemadb/tests/iterator.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/schemadb/tests/iterator.rs rename to crates/pos/storage/schemadb/tests/iterator.rs diff --git a/crates/cfxcore/core/src/pos/storage/scratchpad/Cargo.toml b/crates/pos/storage/scratchpad/Cargo.toml similarity index 75% rename from crates/cfxcore/core/src/pos/storage/scratchpad/Cargo.toml rename to crates/pos/storage/scratchpad/Cargo.toml index 0e471ade16..970dd0f492 100644 --- a/crates/cfxcore/core/src/pos/storage/scratchpad/Cargo.toml +++ b/crates/pos/storage/scratchpad/Cargo.toml @@ -13,9 +13,9 @@ edition = "2018" arc-swap = "1.2.0" itertools = { workspace = true } -diem-crypto = { path = "../../crypto/crypto" } -diem-infallible = { path = "../../common/infallible" } -diem-types = { path = "../../types" } +diem-crypto = { workspace = true } +diem-infallible = { workspace = true } +diem-types = { workspace = true } [dev-dependencies] proptest = "1.0.0" diff --git a/crates/cfxcore/core/src/pos/storage/scratchpad/src/lib.rs b/crates/pos/storage/scratchpad/src/lib.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/scratchpad/src/lib.rs rename to crates/pos/storage/scratchpad/src/lib.rs diff --git a/crates/cfxcore/core/src/pos/storage/scratchpad/src/sparse_merkle/mod.rs b/crates/pos/storage/scratchpad/src/sparse_merkle/mod.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/scratchpad/src/sparse_merkle/mod.rs rename to crates/pos/storage/scratchpad/src/sparse_merkle/mod.rs diff --git a/crates/cfxcore/core/src/pos/storage/scratchpad/src/sparse_merkle/node.rs b/crates/pos/storage/scratchpad/src/sparse_merkle/node.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/scratchpad/src/sparse_merkle/node.rs rename to crates/pos/storage/scratchpad/src/sparse_merkle/node.rs diff --git a/crates/cfxcore/core/src/pos/storage/scratchpad/src/sparse_merkle/sparse_merkle_test.rs b/crates/pos/storage/scratchpad/src/sparse_merkle/sparse_merkle_test.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/scratchpad/src/sparse_merkle/sparse_merkle_test.rs rename to crates/pos/storage/scratchpad/src/sparse_merkle/sparse_merkle_test.rs diff --git a/crates/cfxcore/core/src/pos/storage/state-view/Cargo.toml b/crates/pos/storage/state-view/Cargo.toml similarity index 80% rename from crates/cfxcore/core/src/pos/storage/state-view/Cargo.toml rename to crates/pos/storage/state-view/Cargo.toml index ddcb764505..2b88632883 100644 --- a/crates/cfxcore/core/src/pos/storage/state-view/Cargo.toml +++ b/crates/pos/storage/state-view/Cargo.toml @@ -11,8 +11,8 @@ edition = "2018" [dependencies] anyhow = "1.0.38" -diem-crypto = { path = "../../crypto/crypto" } -diem-types = { path = "../../types" } +diem-crypto = { workspace = true } +diem-types = { workspace = true } [features] default = [] diff --git a/crates/cfxcore/core/src/pos/storage/state-view/src/lib.rs b/crates/pos/storage/state-view/src/lib.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/state-view/src/lib.rs rename to crates/pos/storage/state-view/src/lib.rs diff --git a/crates/cfxcore/core/src/pos/storage/storage-client/Cargo.toml b/crates/pos/storage/storage-client/Cargo.toml similarity index 56% rename from crates/cfxcore/core/src/pos/storage/storage-client/Cargo.toml rename to crates/pos/storage/storage-client/Cargo.toml index a15a37dc38..f212411092 100644 --- a/crates/cfxcore/core/src/pos/storage/storage-client/Cargo.toml +++ b/crates/pos/storage/storage-client/Cargo.toml @@ -14,12 +14,12 @@ anyhow = "1.0.38" serde = { workspace = true } bcs = "0.1.2" -diem-crypto = { path = "../../crypto/crypto" } -diem-logger = { path = "../../common/logger" } -diem-infallible = { path = "../../common/infallible" } -diem-secure-net = { path = "../../secure/net" } -diem-types = { path = "../../types" } -storage-interface = { path = "../storage-interface" } +diem-crypto = { workspace = true } +diem-logger = { workspace = true } +diem-infallible = { workspace = true } +diem-secure-net = { workspace = true } +diem-types = { workspace = true } +storage-interface = { workspace = true } [features] default = [] diff --git a/crates/cfxcore/core/src/pos/storage/storage-client/src/lib.rs b/crates/pos/storage/storage-client/src/lib.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/storage-client/src/lib.rs rename to crates/pos/storage/storage-client/src/lib.rs diff --git a/crates/cfxcore/core/src/pos/storage/storage-interface/Cargo.toml b/crates/pos/storage/storage-interface/Cargo.toml similarity index 65% rename from crates/cfxcore/core/src/pos/storage/storage-interface/Cargo.toml rename to crates/pos/storage/storage-interface/Cargo.toml index 728ba361e2..a1f7db8db7 100644 --- a/crates/cfxcore/core/src/pos/storage/storage-interface/Cargo.toml +++ b/crates/pos/storage/storage-interface/Cargo.toml @@ -17,12 +17,12 @@ thiserror = "1.0.24" parking_lot = "0.11.1" bcs = "0.1.2" -diem-crypto = { path = "../../crypto/crypto" } -diem-secure-net = { path = "../../secure/net" } -diem-state-view = { path = "../state-view" } -diem-types = { path = "../../types" } -scratchpad = { path = "../scratchpad" } -move-core-types = { path = "../../types/move-core-types" } +diem-crypto = { workspace = true } +diem-secure-net = { workspace = true } +diem-state-view = { workspace = true } +diem-types = { workspace = true } +scratchpad = { workspace = true } +move-core-types = { workspace = true } [features] default = [] diff --git a/crates/cfxcore/core/src/pos/storage/storage-interface/src/lib.rs b/crates/pos/storage/storage-interface/src/lib.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/storage-interface/src/lib.rs rename to crates/pos/storage/storage-interface/src/lib.rs diff --git a/crates/cfxcore/core/src/pos/storage/storage-interface/src/mock.rs b/crates/pos/storage/storage-interface/src/mock.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/storage-interface/src/mock.rs rename to crates/pos/storage/storage-interface/src/mock.rs diff --git a/crates/cfxcore/core/src/pos/storage/storage-interface/src/state_view.rs b/crates/pos/storage/storage-interface/src/state_view.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/storage-interface/src/state_view.rs rename to crates/pos/storage/storage-interface/src/state_view.rs diff --git a/crates/cfxcore/core/src/pos/storage/storage-service/Cargo.toml b/crates/pos/storage/storage-service/Cargo.toml similarity index 51% rename from crates/cfxcore/core/src/pos/storage/storage-service/Cargo.toml rename to crates/pos/storage/storage-service/Cargo.toml index b98d977250..4d92d877b4 100644 --- a/crates/cfxcore/core/src/pos/storage/storage-service/Cargo.toml +++ b/crates/pos/storage/storage-service/Cargo.toml @@ -15,24 +15,24 @@ tokio = { workspace = true, features = ["full"] } futures = { workspace = true } bcs = "0.1.2" -diem-config = { path = "../../config" } -diem-crypto = { path = "../../crypto/crypto" } -pos-ledger-db = { path = "../pos-ledger-db" } -diem-logger = { path = "../../common/logger" } -diem-metrics = { path = "../../common/metrics" } -diem-secure-net = { path = "../../secure/net" } -storage-interface = { path = "../storage-interface" } -diem-types = { path = "../../types" } +diem-config = { workspace = true } +diem-crypto = { workspace = true } +pos-ledger-db = { workspace = true } +diem-logger = { workspace = true } +diem-metrics = { workspace = true } +diem-secure-net = { workspace = true } +storage-interface = { workspace = true } +diem-types = { workspace = true } rand = { version = "0.8.3", optional = true } -storage-client = { path = "../storage-client", optional = true } +storage-client = { workspace = true, optional = true } proptest = { version = "1.0.0", optional = true } [dev-dependencies] itertools = { workspace = true } -pos-ledger-db = { path = "../pos-ledger-db", features = ["fuzzing"] } -diem-temppath = { path = "../../common/temppath" } +pos-ledger-db = { workspace = true, features = ["fuzzing"] } +diem-temppath = { workspace = true } proptest = "1.0.0" -storage-client = { path = "../storage-client" } +storage-client = { workspace = true } [features] default = [] diff --git a/crates/cfxcore/core/src/pos/storage/storage-service/proptest-regressions/storage_service_test.txt b/crates/pos/storage/storage-service/proptest-regressions/storage_service_test.txt similarity index 100% rename from crates/cfxcore/core/src/pos/storage/storage-service/proptest-regressions/storage_service_test.txt rename to crates/pos/storage/storage-service/proptest-regressions/storage_service_test.txt diff --git a/crates/cfxcore/core/src/pos/storage/storage-service/src/lib.rs b/crates/pos/storage/storage-service/src/lib.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/storage-service/src/lib.rs rename to crates/pos/storage/storage-service/src/lib.rs diff --git a/crates/cfxcore/core/src/pos/storage/storage-service/src/storage_service_test.rs b/crates/pos/storage/storage-service/src/storage_service_test.rs similarity index 100% rename from crates/cfxcore/core/src/pos/storage/storage-service/src/storage_service_test.rs rename to crates/pos/storage/storage-service/src/storage_service_test.rs diff --git a/crates/cfxcore/core/src/pos/types/executor-types/Cargo.toml b/crates/pos/types/executor-types/Cargo.toml similarity index 66% rename from crates/cfxcore/core/src/pos/types/executor-types/Cargo.toml rename to crates/pos/types/executor-types/Cargo.toml index 2cd0bd92b5..de7f375a67 100644 --- a/crates/cfxcore/core/src/pos/types/executor-types/Cargo.toml +++ b/crates/pos/types/executor-types/Cargo.toml @@ -15,11 +15,11 @@ serde = { workspace = true, default-features = false } thiserror = "1.0.24" bcs = "0.1.2" -diem-crypto = { path = "../../crypto/crypto" } -diem-secure-net = { path = "../../secure/net" } -diem-types = { path = ".." } -scratchpad = { path = "../../storage/scratchpad" } -storage-interface = { path = "../../storage/storage-interface" } +diem-crypto = { workspace = true } +diem-secure-net = { workspace = true } +diem-types = { workspace = true } +scratchpad = { workspace = true } +storage-interface = { workspace = true } [features] default = [] diff --git a/crates/cfxcore/core/src/pos/types/executor-types/src/error.rs b/crates/pos/types/executor-types/src/error.rs similarity index 100% rename from crates/cfxcore/core/src/pos/types/executor-types/src/error.rs rename to crates/pos/types/executor-types/src/error.rs diff --git a/crates/cfxcore/core/src/pos/types/executor-types/src/lib.rs b/crates/pos/types/executor-types/src/lib.rs similarity index 100% rename from crates/cfxcore/core/src/pos/types/executor-types/src/lib.rs rename to crates/pos/types/executor-types/src/lib.rs diff --git a/crates/cfxcore/core/src/pos/types/executor-types/src/processed_vm_output.rs b/crates/pos/types/executor-types/src/processed_vm_output.rs similarity index 100% rename from crates/cfxcore/core/src/pos/types/executor-types/src/processed_vm_output.rs rename to crates/pos/types/executor-types/src/processed_vm_output.rs diff --git a/crates/cfxcore/core/src/pos/types/move-core-types/Cargo.toml b/crates/pos/types/move-core-types/Cargo.toml similarity index 100% rename from crates/cfxcore/core/src/pos/types/move-core-types/Cargo.toml rename to crates/pos/types/move-core-types/Cargo.toml diff --git a/crates/cfxcore/core/src/pos/types/move-core-types/src/account_address.rs b/crates/pos/types/move-core-types/src/account_address.rs similarity index 100% rename from crates/cfxcore/core/src/pos/types/move-core-types/src/account_address.rs rename to crates/pos/types/move-core-types/src/account_address.rs diff --git a/crates/cfxcore/core/src/pos/types/move-core-types/src/effects.rs b/crates/pos/types/move-core-types/src/effects.rs similarity index 100% rename from crates/cfxcore/core/src/pos/types/move-core-types/src/effects.rs rename to crates/pos/types/move-core-types/src/effects.rs diff --git a/crates/cfxcore/core/src/pos/types/move-core-types/src/gas_schedule.rs b/crates/pos/types/move-core-types/src/gas_schedule.rs similarity index 100% rename from crates/cfxcore/core/src/pos/types/move-core-types/src/gas_schedule.rs rename to crates/pos/types/move-core-types/src/gas_schedule.rs diff --git a/crates/cfxcore/core/src/pos/types/move-core-types/src/identifier.rs b/crates/pos/types/move-core-types/src/identifier.rs similarity index 100% rename from crates/cfxcore/core/src/pos/types/move-core-types/src/identifier.rs rename to crates/pos/types/move-core-types/src/identifier.rs diff --git a/crates/cfxcore/core/src/pos/types/move-core-types/src/language_storage.rs b/crates/pos/types/move-core-types/src/language_storage.rs similarity index 100% rename from crates/cfxcore/core/src/pos/types/move-core-types/src/language_storage.rs rename to crates/pos/types/move-core-types/src/language_storage.rs diff --git a/crates/cfxcore/core/src/pos/types/move-core-types/src/lib.rs b/crates/pos/types/move-core-types/src/lib.rs similarity index 100% rename from crates/cfxcore/core/src/pos/types/move-core-types/src/lib.rs rename to crates/pos/types/move-core-types/src/lib.rs diff --git a/crates/cfxcore/core/src/pos/types/move-core-types/src/move_resource.rs b/crates/pos/types/move-core-types/src/move_resource.rs similarity index 100% rename from crates/cfxcore/core/src/pos/types/move-core-types/src/move_resource.rs rename to crates/pos/types/move-core-types/src/move_resource.rs diff --git a/crates/cfxcore/core/src/pos/types/move-core-types/src/parser.rs b/crates/pos/types/move-core-types/src/parser.rs similarity index 100% rename from crates/cfxcore/core/src/pos/types/move-core-types/src/parser.rs rename to crates/pos/types/move-core-types/src/parser.rs diff --git a/crates/cfxcore/core/src/pos/types/move-core-types/src/proptest_types.rs b/crates/pos/types/move-core-types/src/proptest_types.rs similarity index 100% rename from crates/cfxcore/core/src/pos/types/move-core-types/src/proptest_types.rs rename to crates/pos/types/move-core-types/src/proptest_types.rs diff --git a/crates/cfxcore/core/src/pos/types/move-core-types/src/transaction_argument.rs b/crates/pos/types/move-core-types/src/transaction_argument.rs similarity index 100% rename from crates/cfxcore/core/src/pos/types/move-core-types/src/transaction_argument.rs rename to crates/pos/types/move-core-types/src/transaction_argument.rs diff --git a/crates/cfxcore/core/src/pos/types/move-core-types/src/unit_tests/identifier_test.rs b/crates/pos/types/move-core-types/src/unit_tests/identifier_test.rs similarity index 100% rename from crates/cfxcore/core/src/pos/types/move-core-types/src/unit_tests/identifier_test.rs rename to crates/pos/types/move-core-types/src/unit_tests/identifier_test.rs diff --git a/crates/cfxcore/core/src/pos/types/move-core-types/src/unit_tests/language_storage_test.rs b/crates/pos/types/move-core-types/src/unit_tests/language_storage_test.rs similarity index 100% rename from crates/cfxcore/core/src/pos/types/move-core-types/src/unit_tests/language_storage_test.rs rename to crates/pos/types/move-core-types/src/unit_tests/language_storage_test.rs diff --git a/crates/cfxcore/core/src/pos/types/move-core-types/src/unit_tests/mod.rs b/crates/pos/types/move-core-types/src/unit_tests/mod.rs similarity index 100% rename from crates/cfxcore/core/src/pos/types/move-core-types/src/unit_tests/mod.rs rename to crates/pos/types/move-core-types/src/unit_tests/mod.rs diff --git a/crates/cfxcore/core/src/pos/types/move-core-types/src/value.rs b/crates/pos/types/move-core-types/src/value.rs similarity index 100% rename from crates/cfxcore/core/src/pos/types/move-core-types/src/value.rs rename to crates/pos/types/move-core-types/src/value.rs diff --git a/crates/cfxcore/core/src/pos/types/move-core-types/src/vm_status.rs b/crates/pos/types/move-core-types/src/vm_status.rs similarity index 100% rename from crates/cfxcore/core/src/pos/types/move-core-types/src/vm_status.rs rename to crates/pos/types/move-core-types/src/vm_status.rs diff --git a/crates/cfxcore/core/src/pos/types/pow-types/Cargo.toml b/crates/pos/types/pow-types/Cargo.toml similarity index 100% rename from crates/cfxcore/core/src/pos/types/pow-types/Cargo.toml rename to crates/pos/types/pow-types/Cargo.toml diff --git a/crates/cfxcore/core/src/pos/types/pow-types/src/lib.rs b/crates/pos/types/pow-types/src/lib.rs similarity index 100% rename from crates/cfxcore/core/src/pos/types/pow-types/src/lib.rs rename to crates/pos/types/pow-types/src/lib.rs diff --git a/crates/cfxcore/core/src/pos/types/Cargo.toml b/crates/pos/types/types/Cargo.toml similarity index 69% rename from crates/cfxcore/core/src/pos/types/Cargo.toml rename to crates/pos/types/types/Cargo.toml index a8c97bf0ef..becc72c819 100644 --- a/crates/cfxcore/core/src/pos/types/Cargo.toml +++ b/crates/pos/types/types/Cargo.toml @@ -25,16 +25,18 @@ serde = { workspace = true, default-features = false } serde_json = "1.0.64" serde_bytes = "0.11.5" thiserror = "1.0.24" -tiny-keccak = { version = "2.0.2", default-features = false, features = ["sha3"] } +tiny-keccak = { version = "2.0.2", default-features = false, features = [ + "sha3", +] } static_assertions = "1.1.0" bcs = "0.1.2" -diem-crypto = { path = "../crypto/crypto" } -diem-crypto-derive = { path = "../crypto/crypto-derive" } -move-core-types = { path = "move-core-types" } +diem-crypto = { workspace = true } +diem-crypto-derive = { workspace = true } +move-core-types = { workspace = true } cfx-types = { workspace = true } -pow-types = {path = "pow-types" } -diem-logger = {path = "../common/logger" } +pow-types = { workspace = true } +diem-logger = { workspace = true } [dev-dependencies] regex = "1.4.3" @@ -42,9 +44,14 @@ proptest = "1.0.0" proptest-derive = "0.3.0" serde_json = "1.0.64" -diem-crypto = { path = "../crypto/crypto", features = ["fuzzing"] } -move-core-types = { path = "move-core-types", features = ["fuzzing"] } +diem-crypto = { workspace = true, features = ["fuzzing"] } +move-core-types = { workspace = true, features = ["fuzzing"] } [features] default = [] -fuzzing = ["proptest", "proptest-derive", "diem-crypto/fuzzing", "move-core-types/fuzzing"] +fuzzing = [ + "proptest", + "proptest-derive", + "diem-crypto/fuzzing", + "move-core-types/fuzzing", +] diff --git a/crates/cfxcore/core/src/pos/types/src/access_path.rs b/crates/pos/types/types/src/access_path.rs similarity index 100% rename from crates/cfxcore/core/src/pos/types/src/access_path.rs rename to crates/pos/types/types/src/access_path.rs diff --git a/crates/cfxcore/core/src/pos/types/src/account_address.rs b/crates/pos/types/types/src/account_address.rs similarity index 100% rename from crates/cfxcore/core/src/pos/types/src/account_address.rs rename to crates/pos/types/types/src/account_address.rs diff --git a/crates/cfxcore/core/src/pos/types/src/account_config/constants/account.rs b/crates/pos/types/types/src/account_config/constants/account.rs similarity index 100% rename from crates/cfxcore/core/src/pos/types/src/account_config/constants/account.rs rename to crates/pos/types/types/src/account_config/constants/account.rs diff --git a/crates/cfxcore/core/src/pos/types/src/account_config/constants/addresses.rs b/crates/pos/types/types/src/account_config/constants/addresses.rs similarity index 100% rename from crates/cfxcore/core/src/pos/types/src/account_config/constants/addresses.rs rename to crates/pos/types/types/src/account_config/constants/addresses.rs diff --git a/crates/cfxcore/core/src/pos/types/src/account_config/constants/coins.rs b/crates/pos/types/types/src/account_config/constants/coins.rs similarity index 100% rename from crates/cfxcore/core/src/pos/types/src/account_config/constants/coins.rs rename to crates/pos/types/types/src/account_config/constants/coins.rs diff --git a/crates/cfxcore/core/src/pos/types/src/account_config/constants/diem.rs b/crates/pos/types/types/src/account_config/constants/diem.rs similarity index 100% rename from crates/cfxcore/core/src/pos/types/src/account_config/constants/diem.rs rename to crates/pos/types/types/src/account_config/constants/diem.rs diff --git a/crates/cfxcore/core/src/pos/types/src/account_config/constants/event.rs b/crates/pos/types/types/src/account_config/constants/event.rs similarity index 100% rename from crates/cfxcore/core/src/pos/types/src/account_config/constants/event.rs rename to crates/pos/types/types/src/account_config/constants/event.rs diff --git a/crates/cfxcore/core/src/pos/types/src/account_config/constants/mod.rs b/crates/pos/types/types/src/account_config/constants/mod.rs similarity index 100% rename from crates/cfxcore/core/src/pos/types/src/account_config/constants/mod.rs rename to crates/pos/types/types/src/account_config/constants/mod.rs diff --git a/crates/cfxcore/core/src/pos/types/src/account_config/mod.rs b/crates/pos/types/types/src/account_config/mod.rs similarity index 100% rename from crates/cfxcore/core/src/pos/types/src/account_config/mod.rs rename to crates/pos/types/types/src/account_config/mod.rs diff --git a/crates/cfxcore/core/src/pos/types/src/account_config/resources/account.rs b/crates/pos/types/types/src/account_config/resources/account.rs similarity index 100% rename from crates/cfxcore/core/src/pos/types/src/account_config/resources/account.rs rename to crates/pos/types/types/src/account_config/resources/account.rs diff --git a/crates/cfxcore/core/src/pos/types/src/account_config/resources/balance.rs b/crates/pos/types/types/src/account_config/resources/balance.rs similarity index 100% rename from crates/cfxcore/core/src/pos/types/src/account_config/resources/balance.rs rename to crates/pos/types/types/src/account_config/resources/balance.rs diff --git a/crates/cfxcore/core/src/pos/types/src/account_config/resources/chain_id.rs b/crates/pos/types/types/src/account_config/resources/chain_id.rs similarity index 100% rename from crates/cfxcore/core/src/pos/types/src/account_config/resources/chain_id.rs rename to crates/pos/types/types/src/account_config/resources/chain_id.rs diff --git a/crates/cfxcore/core/src/pos/types/src/account_config/resources/currency_info.rs b/crates/pos/types/types/src/account_config/resources/currency_info.rs similarity index 100% rename from crates/cfxcore/core/src/pos/types/src/account_config/resources/currency_info.rs rename to crates/pos/types/types/src/account_config/resources/currency_info.rs diff --git a/crates/cfxcore/core/src/pos/types/src/account_config/resources/designated_dealer.rs b/crates/pos/types/types/src/account_config/resources/designated_dealer.rs similarity index 100% rename from crates/cfxcore/core/src/pos/types/src/account_config/resources/designated_dealer.rs rename to crates/pos/types/types/src/account_config/resources/designated_dealer.rs diff --git a/crates/cfxcore/core/src/pos/types/src/account_config/resources/dual_attestation.rs b/crates/pos/types/types/src/account_config/resources/dual_attestation.rs similarity index 100% rename from crates/cfxcore/core/src/pos/types/src/account_config/resources/dual_attestation.rs rename to crates/pos/types/types/src/account_config/resources/dual_attestation.rs diff --git a/crates/cfxcore/core/src/pos/types/src/account_config/resources/freezing_bit.rs b/crates/pos/types/types/src/account_config/resources/freezing_bit.rs similarity index 100% rename from crates/cfxcore/core/src/pos/types/src/account_config/resources/freezing_bit.rs rename to crates/pos/types/types/src/account_config/resources/freezing_bit.rs diff --git a/crates/cfxcore/core/src/pos/types/src/account_config/resources/key_rotation_capability.rs b/crates/pos/types/types/src/account_config/resources/key_rotation_capability.rs similarity index 100% rename from crates/cfxcore/core/src/pos/types/src/account_config/resources/key_rotation_capability.rs rename to crates/pos/types/types/src/account_config/resources/key_rotation_capability.rs diff --git a/crates/cfxcore/core/src/pos/types/src/account_config/resources/mod.rs b/crates/pos/types/types/src/account_config/resources/mod.rs similarity index 100% rename from crates/cfxcore/core/src/pos/types/src/account_config/resources/mod.rs rename to crates/pos/types/types/src/account_config/resources/mod.rs diff --git a/crates/cfxcore/core/src/pos/types/src/account_config/resources/preburn_balance.rs b/crates/pos/types/types/src/account_config/resources/preburn_balance.rs similarity index 100% rename from crates/cfxcore/core/src/pos/types/src/account_config/resources/preburn_balance.rs rename to crates/pos/types/types/src/account_config/resources/preburn_balance.rs diff --git a/crates/cfxcore/core/src/pos/types/src/account_config/resources/preburn_queue.rs b/crates/pos/types/types/src/account_config/resources/preburn_queue.rs similarity index 100% rename from crates/cfxcore/core/src/pos/types/src/account_config/resources/preburn_queue.rs rename to crates/pos/types/types/src/account_config/resources/preburn_queue.rs diff --git a/crates/cfxcore/core/src/pos/types/src/account_config/resources/preburn_with_metadata.rs b/crates/pos/types/types/src/account_config/resources/preburn_with_metadata.rs similarity index 100% rename from crates/cfxcore/core/src/pos/types/src/account_config/resources/preburn_with_metadata.rs rename to crates/pos/types/types/src/account_config/resources/preburn_with_metadata.rs diff --git a/crates/cfxcore/core/src/pos/types/src/account_config/resources/role.rs b/crates/pos/types/types/src/account_config/resources/role.rs similarity index 100% rename from crates/cfxcore/core/src/pos/types/src/account_config/resources/role.rs rename to crates/pos/types/types/src/account_config/resources/role.rs diff --git a/crates/cfxcore/core/src/pos/types/src/account_config/resources/role_id.rs b/crates/pos/types/types/src/account_config/resources/role_id.rs similarity index 100% rename from crates/cfxcore/core/src/pos/types/src/account_config/resources/role_id.rs rename to crates/pos/types/types/src/account_config/resources/role_id.rs diff --git a/crates/cfxcore/core/src/pos/types/src/account_config/resources/vasp.rs b/crates/pos/types/types/src/account_config/resources/vasp.rs similarity index 100% rename from crates/cfxcore/core/src/pos/types/src/account_config/resources/vasp.rs rename to crates/pos/types/types/src/account_config/resources/vasp.rs diff --git a/crates/cfxcore/core/src/pos/types/src/account_config/resources/withdraw_capability.rs b/crates/pos/types/types/src/account_config/resources/withdraw_capability.rs similarity index 100% rename from crates/cfxcore/core/src/pos/types/src/account_config/resources/withdraw_capability.rs rename to crates/pos/types/types/src/account_config/resources/withdraw_capability.rs diff --git a/crates/cfxcore/core/src/pos/types/src/account_state.rs b/crates/pos/types/types/src/account_state.rs similarity index 100% rename from crates/cfxcore/core/src/pos/types/src/account_state.rs rename to crates/pos/types/types/src/account_state.rs diff --git a/crates/cfxcore/core/src/pos/types/src/account_state_blob.rs b/crates/pos/types/types/src/account_state_blob.rs similarity index 100% rename from crates/cfxcore/core/src/pos/types/src/account_state_blob.rs rename to crates/pos/types/types/src/account_state_blob.rs diff --git a/crates/cfxcore/core/src/pos/types/src/bin/lock_status_tests.rs b/crates/pos/types/types/src/bin/lock_status_tests.rs similarity index 100% rename from crates/cfxcore/core/src/pos/types/src/bin/lock_status_tests.rs rename to crates/pos/types/types/src/bin/lock_status_tests.rs diff --git a/crates/cfxcore/core/src/pos/types/src/block_info.rs b/crates/pos/types/types/src/block_info.rs similarity index 100% rename from crates/cfxcore/core/src/pos/types/src/block_info.rs rename to crates/pos/types/types/src/block_info.rs diff --git a/crates/cfxcore/core/src/pos/types/src/block_metadata.rs b/crates/pos/types/types/src/block_metadata.rs similarity index 100% rename from crates/cfxcore/core/src/pos/types/src/block_metadata.rs rename to crates/pos/types/types/src/block_metadata.rs diff --git a/crates/cfxcore/core/src/pos/types/src/chain_id.rs b/crates/pos/types/types/src/chain_id.rs similarity index 100% rename from crates/cfxcore/core/src/pos/types/src/chain_id.rs rename to crates/pos/types/types/src/chain_id.rs diff --git a/crates/cfxcore/core/src/pos/types/src/committed_block.rs b/crates/pos/types/types/src/committed_block.rs similarity index 100% rename from crates/cfxcore/core/src/pos/types/src/committed_block.rs rename to crates/pos/types/types/src/committed_block.rs diff --git a/crates/cfxcore/core/src/pos/types/src/contract_event.rs b/crates/pos/types/types/src/contract_event.rs similarity index 100% rename from crates/cfxcore/core/src/pos/types/src/contract_event.rs rename to crates/pos/types/types/src/contract_event.rs diff --git a/crates/cfxcore/core/src/pos/types/src/diem_timestamp.rs b/crates/pos/types/types/src/diem_timestamp.rs similarity index 100% rename from crates/cfxcore/core/src/pos/types/src/diem_timestamp.rs rename to crates/pos/types/types/src/diem_timestamp.rs diff --git a/crates/cfxcore/core/src/pos/types/src/epoch_change.rs b/crates/pos/types/types/src/epoch_change.rs similarity index 100% rename from crates/cfxcore/core/src/pos/types/src/epoch_change.rs rename to crates/pos/types/types/src/epoch_change.rs diff --git a/crates/cfxcore/core/src/pos/types/src/epoch_state.rs b/crates/pos/types/types/src/epoch_state.rs similarity index 100% rename from crates/cfxcore/core/src/pos/types/src/epoch_state.rs rename to crates/pos/types/types/src/epoch_state.rs diff --git a/crates/cfxcore/core/src/pos/types/src/event.rs b/crates/pos/types/types/src/event.rs similarity index 100% rename from crates/cfxcore/core/src/pos/types/src/event.rs rename to crates/pos/types/types/src/event.rs diff --git a/crates/cfxcore/core/src/pos/types/src/ledger_info.rs b/crates/pos/types/types/src/ledger_info.rs similarity index 100% rename from crates/cfxcore/core/src/pos/types/src/ledger_info.rs rename to crates/pos/types/types/src/ledger_info.rs diff --git a/crates/cfxcore/core/src/pos/types/src/lib.rs b/crates/pos/types/types/src/lib.rs similarity index 100% rename from crates/cfxcore/core/src/pos/types/src/lib.rs rename to crates/pos/types/types/src/lib.rs diff --git a/crates/cfxcore/core/src/pos/types/src/mempool_status.rs b/crates/pos/types/types/src/mempool_status.rs similarity index 100% rename from crates/cfxcore/core/src/pos/types/src/mempool_status.rs rename to crates/pos/types/types/src/mempool_status.rs diff --git a/crates/cfxcore/core/src/pos/types/src/move_resource.rs b/crates/pos/types/types/src/move_resource.rs similarity index 100% rename from crates/cfxcore/core/src/pos/types/src/move_resource.rs rename to crates/pos/types/types/src/move_resource.rs diff --git a/crates/cfxcore/core/src/pos/types/src/network_address/encrypted.rs b/crates/pos/types/types/src/network_address/encrypted.rs similarity index 100% rename from crates/cfxcore/core/src/pos/types/src/network_address/encrypted.rs rename to crates/pos/types/types/src/network_address/encrypted.rs diff --git a/crates/cfxcore/core/src/pos/types/src/network_address/mod.rs b/crates/pos/types/types/src/network_address/mod.rs similarity index 100% rename from crates/cfxcore/core/src/pos/types/src/network_address/mod.rs rename to crates/pos/types/types/src/network_address/mod.rs diff --git a/crates/cfxcore/core/src/pos/types/src/on_chain_config/diem_version.rs b/crates/pos/types/types/src/on_chain_config/diem_version.rs similarity index 100% rename from crates/cfxcore/core/src/pos/types/src/on_chain_config/diem_version.rs rename to crates/pos/types/types/src/on_chain_config/diem_version.rs diff --git a/crates/cfxcore/core/src/pos/types/src/on_chain_config/mod.rs b/crates/pos/types/types/src/on_chain_config/mod.rs similarity index 100% rename from crates/cfxcore/core/src/pos/types/src/on_chain_config/mod.rs rename to crates/pos/types/types/src/on_chain_config/mod.rs diff --git a/crates/cfxcore/core/src/pos/types/src/on_chain_config/registered_currencies.rs b/crates/pos/types/types/src/on_chain_config/registered_currencies.rs similarity index 100% rename from crates/cfxcore/core/src/pos/types/src/on_chain_config/registered_currencies.rs rename to crates/pos/types/types/src/on_chain_config/registered_currencies.rs diff --git a/crates/cfxcore/core/src/pos/types/src/on_chain_config/validator_set.rs b/crates/pos/types/types/src/on_chain_config/validator_set.rs similarity index 100% rename from crates/cfxcore/core/src/pos/types/src/on_chain_config/validator_set.rs rename to crates/pos/types/types/src/on_chain_config/validator_set.rs diff --git a/crates/cfxcore/core/src/pos/types/src/on_chain_config/vm_config.rs b/crates/pos/types/types/src/on_chain_config/vm_config.rs similarity index 100% rename from crates/cfxcore/core/src/pos/types/src/on_chain_config/vm_config.rs rename to crates/pos/types/types/src/on_chain_config/vm_config.rs diff --git a/crates/cfxcore/core/src/pos/types/src/on_chain_config/vm_publishing_option.rs b/crates/pos/types/types/src/on_chain_config/vm_publishing_option.rs similarity index 100% rename from crates/cfxcore/core/src/pos/types/src/on_chain_config/vm_publishing_option.rs rename to crates/pos/types/types/src/on_chain_config/vm_publishing_option.rs diff --git a/crates/cfxcore/core/src/pos/types/src/proof/accumulator/accumulator_test.rs b/crates/pos/types/types/src/proof/accumulator/accumulator_test.rs similarity index 100% rename from crates/cfxcore/core/src/pos/types/src/proof/accumulator/accumulator_test.rs rename to crates/pos/types/types/src/proof/accumulator/accumulator_test.rs diff --git a/crates/cfxcore/core/src/pos/types/src/proof/accumulator/mod.rs b/crates/pos/types/types/src/proof/accumulator/mod.rs similarity index 100% rename from crates/cfxcore/core/src/pos/types/src/proof/accumulator/mod.rs rename to crates/pos/types/types/src/proof/accumulator/mod.rs diff --git a/crates/cfxcore/core/src/pos/types/src/proof/definition.rs b/crates/pos/types/types/src/proof/definition.rs similarity index 100% rename from crates/cfxcore/core/src/pos/types/src/proof/definition.rs rename to crates/pos/types/types/src/proof/definition.rs diff --git a/crates/cfxcore/core/src/pos/types/src/proof/mod.rs b/crates/pos/types/types/src/proof/mod.rs similarity index 100% rename from crates/cfxcore/core/src/pos/types/src/proof/mod.rs rename to crates/pos/types/types/src/proof/mod.rs diff --git a/crates/cfxcore/core/src/pos/types/src/proof/position/mod.rs b/crates/pos/types/types/src/proof/position/mod.rs similarity index 100% rename from crates/cfxcore/core/src/pos/types/src/proof/position/mod.rs rename to crates/pos/types/types/src/proof/position/mod.rs diff --git a/crates/cfxcore/core/src/pos/types/src/proof/position/position_test.rs b/crates/pos/types/types/src/proof/position/position_test.rs similarity index 100% rename from crates/cfxcore/core/src/pos/types/src/proof/position/position_test.rs rename to crates/pos/types/types/src/proof/position/position_test.rs diff --git a/crates/cfxcore/core/src/pos/types/src/proof/proptest_proof.rs b/crates/pos/types/types/src/proof/proptest_proof.rs similarity index 100% rename from crates/cfxcore/core/src/pos/types/src/proof/proptest_proof.rs rename to crates/pos/types/types/src/proof/proptest_proof.rs diff --git a/crates/cfxcore/core/src/pos/types/src/proof/unit_tests/mod.rs b/crates/pos/types/types/src/proof/unit_tests/mod.rs similarity index 100% rename from crates/cfxcore/core/src/pos/types/src/proof/unit_tests/mod.rs rename to crates/pos/types/types/src/proof/unit_tests/mod.rs diff --git a/crates/cfxcore/core/src/pos/types/src/proof/unit_tests/proof_conversion_test.rs b/crates/pos/types/types/src/proof/unit_tests/proof_conversion_test.rs similarity index 100% rename from crates/cfxcore/core/src/pos/types/src/proof/unit_tests/proof_conversion_test.rs rename to crates/pos/types/types/src/proof/unit_tests/proof_conversion_test.rs diff --git a/crates/cfxcore/core/src/pos/types/src/proof/unit_tests/proof_test.rs b/crates/pos/types/types/src/proof/unit_tests/proof_test.rs similarity index 100% rename from crates/cfxcore/core/src/pos/types/src/proof/unit_tests/proof_test.rs rename to crates/pos/types/types/src/proof/unit_tests/proof_test.rs diff --git a/crates/cfxcore/core/src/pos/types/src/proptest_types.rs b/crates/pos/types/types/src/proptest_types.rs similarity index 100% rename from crates/cfxcore/core/src/pos/types/src/proptest_types.rs rename to crates/pos/types/types/src/proptest_types.rs diff --git a/crates/cfxcore/core/src/pos/types/src/reward_distribution_event.rs b/crates/pos/types/types/src/reward_distribution_event.rs similarity index 100% rename from crates/cfxcore/core/src/pos/types/src/reward_distribution_event.rs rename to crates/pos/types/types/src/reward_distribution_event.rs diff --git a/crates/cfxcore/core/src/pos/types/src/serde_helper/mod.rs b/crates/pos/types/types/src/serde_helper/mod.rs similarity index 100% rename from crates/cfxcore/core/src/pos/types/src/serde_helper/mod.rs rename to crates/pos/types/types/src/serde_helper/mod.rs diff --git a/crates/cfxcore/core/src/pos/types/src/serde_helper/vec_bytes.rs b/crates/pos/types/types/src/serde_helper/vec_bytes.rs similarity index 100% rename from crates/cfxcore/core/src/pos/types/src/serde_helper/vec_bytes.rs rename to crates/pos/types/types/src/serde_helper/vec_bytes.rs diff --git a/crates/cfxcore/core/src/pos/types/src/term_state.rs b/crates/pos/types/types/src/term_state.rs similarity index 100% rename from crates/cfxcore/core/src/pos/types/src/term_state.rs rename to crates/pos/types/types/src/term_state.rs diff --git a/crates/cfxcore/core/src/pos/types/src/term_state/lock_status.rs b/crates/pos/types/types/src/term_state/lock_status.rs similarity index 100% rename from crates/cfxcore/core/src/pos/types/src/term_state/lock_status.rs rename to crates/pos/types/types/src/term_state/lock_status.rs diff --git a/crates/cfxcore/core/src/pos/types/src/term_state/pos_state_config.rs b/crates/pos/types/types/src/term_state/pos_state_config.rs similarity index 100% rename from crates/cfxcore/core/src/pos/types/src/term_state/pos_state_config.rs rename to crates/pos/types/types/src/term_state/pos_state_config.rs diff --git a/crates/cfxcore/core/src/pos/types/src/test_helpers/empty_script.mv b/crates/pos/types/types/src/test_helpers/empty_script.mv similarity index 100% rename from crates/cfxcore/core/src/pos/types/src/test_helpers/empty_script.mv rename to crates/pos/types/types/src/test_helpers/empty_script.mv diff --git a/crates/cfxcore/core/src/pos/types/src/test_helpers/mod.rs b/crates/pos/types/types/src/test_helpers/mod.rs similarity index 100% rename from crates/cfxcore/core/src/pos/types/src/test_helpers/mod.rs rename to crates/pos/types/types/src/test_helpers/mod.rs diff --git a/crates/cfxcore/core/src/pos/types/src/test_helpers/transaction_test_helpers.rs b/crates/pos/types/types/src/test_helpers/transaction_test_helpers.rs similarity index 100% rename from crates/cfxcore/core/src/pos/types/src/test_helpers/transaction_test_helpers.rs rename to crates/pos/types/types/src/test_helpers/transaction_test_helpers.rs diff --git a/crates/cfxcore/core/src/pos/types/src/transaction/authenticator.rs b/crates/pos/types/types/src/transaction/authenticator.rs similarity index 100% rename from crates/cfxcore/core/src/pos/types/src/transaction/authenticator.rs rename to crates/pos/types/types/src/transaction/authenticator.rs diff --git a/crates/cfxcore/core/src/pos/types/src/transaction/change_set.rs b/crates/pos/types/types/src/transaction/change_set.rs similarity index 100% rename from crates/cfxcore/core/src/pos/types/src/transaction/change_set.rs rename to crates/pos/types/types/src/transaction/change_set.rs diff --git a/crates/cfxcore/core/src/pos/types/src/transaction/helpers.rs b/crates/pos/types/types/src/transaction/helpers.rs similarity index 100% rename from crates/cfxcore/core/src/pos/types/src/transaction/helpers.rs rename to crates/pos/types/types/src/transaction/helpers.rs diff --git a/crates/cfxcore/core/src/pos/types/src/transaction/metadata.rs b/crates/pos/types/types/src/transaction/metadata.rs similarity index 100% rename from crates/cfxcore/core/src/pos/types/src/transaction/metadata.rs rename to crates/pos/types/types/src/transaction/metadata.rs diff --git a/crates/cfxcore/core/src/pos/types/src/transaction/mod.rs b/crates/pos/types/types/src/transaction/mod.rs similarity index 100% rename from crates/cfxcore/core/src/pos/types/src/transaction/mod.rs rename to crates/pos/types/types/src/transaction/mod.rs diff --git a/crates/cfxcore/core/src/pos/types/src/transaction/module.rs b/crates/pos/types/types/src/transaction/module.rs similarity index 100% rename from crates/cfxcore/core/src/pos/types/src/transaction/module.rs rename to crates/pos/types/types/src/transaction/module.rs diff --git a/crates/cfxcore/core/src/pos/types/src/transaction/script.rs b/crates/pos/types/types/src/transaction/script.rs similarity index 100% rename from crates/cfxcore/core/src/pos/types/src/transaction/script.rs rename to crates/pos/types/types/src/transaction/script.rs diff --git a/crates/cfxcore/core/src/pos/types/src/transaction/transaction_argument.rs b/crates/pos/types/types/src/transaction/transaction_argument.rs similarity index 100% rename from crates/cfxcore/core/src/pos/types/src/transaction/transaction_argument.rs rename to crates/pos/types/types/src/transaction/transaction_argument.rs diff --git a/crates/cfxcore/core/src/pos/types/src/trusted_state.rs b/crates/pos/types/types/src/trusted_state.rs similarity index 100% rename from crates/cfxcore/core/src/pos/types/src/trusted_state.rs rename to crates/pos/types/types/src/trusted_state.rs diff --git a/crates/cfxcore/core/src/pos/types/src/unit_tests/access_path_test.rs b/crates/pos/types/types/src/unit_tests/access_path_test.rs similarity index 100% rename from crates/cfxcore/core/src/pos/types/src/unit_tests/access_path_test.rs rename to crates/pos/types/types/src/unit_tests/access_path_test.rs diff --git a/crates/cfxcore/core/src/pos/types/src/unit_tests/block_metadata_test.rs b/crates/pos/types/types/src/unit_tests/block_metadata_test.rs similarity index 100% rename from crates/cfxcore/core/src/pos/types/src/unit_tests/block_metadata_test.rs rename to crates/pos/types/types/src/unit_tests/block_metadata_test.rs diff --git a/crates/cfxcore/core/src/pos/types/src/unit_tests/canonical_serialization_examples.rs b/crates/pos/types/types/src/unit_tests/canonical_serialization_examples.rs similarity index 100% rename from crates/cfxcore/core/src/pos/types/src/unit_tests/canonical_serialization_examples.rs rename to crates/pos/types/types/src/unit_tests/canonical_serialization_examples.rs diff --git a/crates/cfxcore/core/src/pos/types/src/unit_tests/code_debug_fmt_test.rs b/crates/pos/types/types/src/unit_tests/code_debug_fmt_test.rs similarity index 100% rename from crates/cfxcore/core/src/pos/types/src/unit_tests/code_debug_fmt_test.rs rename to crates/pos/types/types/src/unit_tests/code_debug_fmt_test.rs diff --git a/crates/cfxcore/core/src/pos/types/src/unit_tests/contract_event_test.rs b/crates/pos/types/types/src/unit_tests/contract_event_test.rs similarity index 100% rename from crates/cfxcore/core/src/pos/types/src/unit_tests/contract_event_test.rs rename to crates/pos/types/types/src/unit_tests/contract_event_test.rs diff --git a/crates/cfxcore/core/src/pos/types/src/unit_tests/currency_code_test.rs b/crates/pos/types/types/src/unit_tests/currency_code_test.rs similarity index 100% rename from crates/cfxcore/core/src/pos/types/src/unit_tests/currency_code_test.rs rename to crates/pos/types/types/src/unit_tests/currency_code_test.rs diff --git a/crates/cfxcore/core/src/pos/types/src/unit_tests/mod.rs b/crates/pos/types/types/src/unit_tests/mod.rs similarity index 100% rename from crates/cfxcore/core/src/pos/types/src/unit_tests/mod.rs rename to crates/pos/types/types/src/unit_tests/mod.rs diff --git a/crates/cfxcore/core/src/pos/types/src/unit_tests/transaction_test.rs b/crates/pos/types/types/src/unit_tests/transaction_test.rs similarity index 100% rename from crates/cfxcore/core/src/pos/types/src/unit_tests/transaction_test.rs rename to crates/pos/types/types/src/unit_tests/transaction_test.rs diff --git a/crates/cfxcore/core/src/pos/types/src/unit_tests/trusted_state_test.rs b/crates/pos/types/types/src/unit_tests/trusted_state_test.rs similarity index 100% rename from crates/cfxcore/core/src/pos/types/src/unit_tests/trusted_state_test.rs rename to crates/pos/types/types/src/unit_tests/trusted_state_test.rs diff --git a/crates/cfxcore/core/src/pos/types/src/unit_tests/validator_set_test.rs b/crates/pos/types/types/src/unit_tests/validator_set_test.rs similarity index 100% rename from crates/cfxcore/core/src/pos/types/src/unit_tests/validator_set_test.rs rename to crates/pos/types/types/src/unit_tests/validator_set_test.rs diff --git a/crates/cfxcore/core/src/pos/types/src/unit_tests/write_set_test.rs b/crates/pos/types/types/src/unit_tests/write_set_test.rs similarity index 100% rename from crates/cfxcore/core/src/pos/types/src/unit_tests/write_set_test.rs rename to crates/pos/types/types/src/unit_tests/write_set_test.rs diff --git a/crates/cfxcore/core/src/pos/types/src/validator_config.rs b/crates/pos/types/types/src/validator_config.rs similarity index 100% rename from crates/cfxcore/core/src/pos/types/src/validator_config.rs rename to crates/pos/types/types/src/validator_config.rs diff --git a/crates/cfxcore/core/src/pos/types/src/validator_info.rs b/crates/pos/types/types/src/validator_info.rs similarity index 100% rename from crates/cfxcore/core/src/pos/types/src/validator_info.rs rename to crates/pos/types/types/src/validator_info.rs diff --git a/crates/cfxcore/core/src/pos/types/src/validator_signer.rs b/crates/pos/types/types/src/validator_signer.rs similarity index 100% rename from crates/cfxcore/core/src/pos/types/src/validator_signer.rs rename to crates/pos/types/types/src/validator_signer.rs diff --git a/crates/cfxcore/core/src/pos/types/src/validator_verifier.rs b/crates/pos/types/types/src/validator_verifier.rs similarity index 100% rename from crates/cfxcore/core/src/pos/types/src/validator_verifier.rs rename to crates/pos/types/types/src/validator_verifier.rs diff --git a/crates/cfxcore/core/src/pos/types/src/vm_status.rs b/crates/pos/types/types/src/vm_status.rs similarity index 100% rename from crates/cfxcore/core/src/pos/types/src/vm_status.rs rename to crates/pos/types/types/src/vm_status.rs diff --git a/crates/cfxcore/core/src/pos/types/src/waypoint.rs b/crates/pos/types/types/src/waypoint.rs similarity index 100% rename from crates/cfxcore/core/src/pos/types/src/waypoint.rs rename to crates/pos/types/types/src/waypoint.rs diff --git a/crates/cfxcore/core/src/pos/types/src/write_set.rs b/crates/pos/types/types/src/write_set.rs similarity index 100% rename from crates/cfxcore/core/src/pos/types/src/write_set.rs rename to crates/pos/types/types/src/write_set.rs From d3139d229db6399adce0cdceaa8d7e5ba75e4f25 Mon Sep 17 00:00:00 2001 From: iosh Date: Fri, 6 Dec 2024 09:23:05 +0800 Subject: [PATCH 2/3] chore: format code and move consensus-types crate --- Cargo.toml | 4 ++-- crates/pos/config/generate-key/src/lib.rs | 15 ++++++++++----- .../consensus-types/Cargo.toml | 0 .../consensus-types/src/block.rs | 0 .../consensus-types/src/block_data.rs | 0 .../consensus-types/src/block_retrieval.rs | 0 .../consensus-types/src/block_test.rs | 0 .../consensus-types/src/block_test_utils.rs | 0 .../consensus-types/src/common.rs | 0 .../consensus-types/src/db.rs | 0 .../consensus-types/src/epoch_retrieval.rs | 0 .../consensus-types/src/executed_block.rs | 0 .../consensus-types/src/lib.rs | 0 .../consensus-types/src/proposal_msg.rs | 0 .../consensus-types/src/quorum_cert.rs | 0 .../consensus-types/src/safety_data.rs | 0 .../consensus-types/src/sync_info.rs | 0 .../consensus-types/src/timeout.rs | 0 .../consensus-types/src/timeout_certificate.rs | 0 .../consensus-types/src/vote.rs | 0 .../consensus-types/src/vote_data.rs | 0 .../consensus-types/src/vote_msg.rs | 0 .../consensus-types/src/vote_proposal.rs | 0 23 files changed, 12 insertions(+), 7 deletions(-) rename crates/pos/{config => consensus}/consensus-types/Cargo.toml (100%) rename crates/pos/{config => consensus}/consensus-types/src/block.rs (100%) rename crates/pos/{config => consensus}/consensus-types/src/block_data.rs (100%) rename crates/pos/{config => consensus}/consensus-types/src/block_retrieval.rs (100%) rename crates/pos/{config => consensus}/consensus-types/src/block_test.rs (100%) rename crates/pos/{config => consensus}/consensus-types/src/block_test_utils.rs (100%) rename crates/pos/{config => consensus}/consensus-types/src/common.rs (100%) rename crates/pos/{config => consensus}/consensus-types/src/db.rs (100%) rename crates/pos/{config => consensus}/consensus-types/src/epoch_retrieval.rs (100%) rename crates/pos/{config => consensus}/consensus-types/src/executed_block.rs (100%) rename crates/pos/{config => consensus}/consensus-types/src/lib.rs (100%) rename crates/pos/{config => consensus}/consensus-types/src/proposal_msg.rs (100%) rename crates/pos/{config => consensus}/consensus-types/src/quorum_cert.rs (100%) rename crates/pos/{config => consensus}/consensus-types/src/safety_data.rs (100%) rename crates/pos/{config => consensus}/consensus-types/src/sync_info.rs (100%) rename crates/pos/{config => consensus}/consensus-types/src/timeout.rs (100%) rename crates/pos/{config => consensus}/consensus-types/src/timeout_certificate.rs (100%) rename crates/pos/{config => consensus}/consensus-types/src/vote.rs (100%) rename crates/pos/{config => consensus}/consensus-types/src/vote_data.rs (100%) rename crates/pos/{config => consensus}/consensus-types/src/vote_msg.rs (100%) rename crates/pos/{config => consensus}/consensus-types/src/vote_proposal.rs (100%) diff --git a/Cargo.toml b/Cargo.toml index aee95139ae..c003fea290 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -79,7 +79,7 @@ members = [ "crates/pos/common/time-service", "crates/pos/config/generate-key", "crates/pos/config/global-constants", - "crates/pos/config/consensus-types", + "crates/pos/consensus/consensus-types", "crates/pos/config/config", "crates/pos/consensus/executor", "crates/pos/consensus/safety-rules", @@ -210,8 +210,8 @@ diem-temppath = { path = "./crates/pos/common/temppath" } diem-time-service = { path = "./crates/pos/common/time-service" } generate-key = { path = "./crates/pos/config/generate-key" } diem-global-constants = { path = "./crates/pos/config/global-constants" } -consensus-types = { path = "./crates/pos/config/consensus-types" } diem-config = { path = "./crates/pos/config/config" } +consensus-types = { path = "./crates/pos/consensus/consensus-types" } executor = { path = "./crates/pos/consensus/executor" } safety-rules = { path = "./crates/pos/consensus/safety-rules" } diem-crypto = { path = "./crates/pos/crypto/crypto" } diff --git a/crates/pos/config/generate-key/src/lib.rs b/crates/pos/config/generate-key/src/lib.rs index 2fff7505aa..f61c793d84 100644 --- a/crates/pos/config/generate-key/src/lib.rs +++ b/crates/pos/config/generate-key/src/lib.rs @@ -21,20 +21,24 @@ pub fn generate_key() -> Ed25519PrivateKey { Ed25519PrivateKey::generate(&mut rng) } -pub fn generate_and_save_key>(output_file: P) -> Ed25519PrivateKey { +pub fn generate_and_save_key>( + output_file: P, +) -> Ed25519PrivateKey { let key = generate_key(); save_key(key, output_file) } -pub fn save_key>(key: Ed25519PrivateKey, output_file: P) -> Ed25519PrivateKey { +pub fn save_key>( + key: Ed25519PrivateKey, output_file: P, +) -> Ed25519PrivateKey { let output_file_path = output_file.as_ref(); if output_file_path.exists() && !output_file_path.is_file() { panic!("Specified output file path is a directory"); } let encoded = bcs::to_bytes(&key).expect("Unable to serialize keys"); - let mut file = - File::create(output_file_path).expect("Unable to create/truncate file at specified path"); + let mut file = File::create(output_file_path) + .expect("Unable to create/truncate file at specified path"); file.write_all(&encoded) .expect("Unable to write key to file at specified path"); key @@ -42,7 +46,8 @@ pub fn save_key>(key: Ed25519PrivateKey, output_file: P) -> Ed255 pub fn load_key>(input_file: P) -> Ed25519PrivateKey { let input_file_path = input_file.as_ref(); - let data = fs::read(input_file_path).expect("Unable to read key at the specified path"); + let data = fs::read(input_file_path) + .expect("Unable to read key at the specified path"); bcs::from_bytes(&data).expect("Unable to parse key") } diff --git a/crates/pos/config/consensus-types/Cargo.toml b/crates/pos/consensus/consensus-types/Cargo.toml similarity index 100% rename from crates/pos/config/consensus-types/Cargo.toml rename to crates/pos/consensus/consensus-types/Cargo.toml diff --git a/crates/pos/config/consensus-types/src/block.rs b/crates/pos/consensus/consensus-types/src/block.rs similarity index 100% rename from crates/pos/config/consensus-types/src/block.rs rename to crates/pos/consensus/consensus-types/src/block.rs diff --git a/crates/pos/config/consensus-types/src/block_data.rs b/crates/pos/consensus/consensus-types/src/block_data.rs similarity index 100% rename from crates/pos/config/consensus-types/src/block_data.rs rename to crates/pos/consensus/consensus-types/src/block_data.rs diff --git a/crates/pos/config/consensus-types/src/block_retrieval.rs b/crates/pos/consensus/consensus-types/src/block_retrieval.rs similarity index 100% rename from crates/pos/config/consensus-types/src/block_retrieval.rs rename to crates/pos/consensus/consensus-types/src/block_retrieval.rs diff --git a/crates/pos/config/consensus-types/src/block_test.rs b/crates/pos/consensus/consensus-types/src/block_test.rs similarity index 100% rename from crates/pos/config/consensus-types/src/block_test.rs rename to crates/pos/consensus/consensus-types/src/block_test.rs diff --git a/crates/pos/config/consensus-types/src/block_test_utils.rs b/crates/pos/consensus/consensus-types/src/block_test_utils.rs similarity index 100% rename from crates/pos/config/consensus-types/src/block_test_utils.rs rename to crates/pos/consensus/consensus-types/src/block_test_utils.rs diff --git a/crates/pos/config/consensus-types/src/common.rs b/crates/pos/consensus/consensus-types/src/common.rs similarity index 100% rename from crates/pos/config/consensus-types/src/common.rs rename to crates/pos/consensus/consensus-types/src/common.rs diff --git a/crates/pos/config/consensus-types/src/db.rs b/crates/pos/consensus/consensus-types/src/db.rs similarity index 100% rename from crates/pos/config/consensus-types/src/db.rs rename to crates/pos/consensus/consensus-types/src/db.rs diff --git a/crates/pos/config/consensus-types/src/epoch_retrieval.rs b/crates/pos/consensus/consensus-types/src/epoch_retrieval.rs similarity index 100% rename from crates/pos/config/consensus-types/src/epoch_retrieval.rs rename to crates/pos/consensus/consensus-types/src/epoch_retrieval.rs diff --git a/crates/pos/config/consensus-types/src/executed_block.rs b/crates/pos/consensus/consensus-types/src/executed_block.rs similarity index 100% rename from crates/pos/config/consensus-types/src/executed_block.rs rename to crates/pos/consensus/consensus-types/src/executed_block.rs diff --git a/crates/pos/config/consensus-types/src/lib.rs b/crates/pos/consensus/consensus-types/src/lib.rs similarity index 100% rename from crates/pos/config/consensus-types/src/lib.rs rename to crates/pos/consensus/consensus-types/src/lib.rs diff --git a/crates/pos/config/consensus-types/src/proposal_msg.rs b/crates/pos/consensus/consensus-types/src/proposal_msg.rs similarity index 100% rename from crates/pos/config/consensus-types/src/proposal_msg.rs rename to crates/pos/consensus/consensus-types/src/proposal_msg.rs diff --git a/crates/pos/config/consensus-types/src/quorum_cert.rs b/crates/pos/consensus/consensus-types/src/quorum_cert.rs similarity index 100% rename from crates/pos/config/consensus-types/src/quorum_cert.rs rename to crates/pos/consensus/consensus-types/src/quorum_cert.rs diff --git a/crates/pos/config/consensus-types/src/safety_data.rs b/crates/pos/consensus/consensus-types/src/safety_data.rs similarity index 100% rename from crates/pos/config/consensus-types/src/safety_data.rs rename to crates/pos/consensus/consensus-types/src/safety_data.rs diff --git a/crates/pos/config/consensus-types/src/sync_info.rs b/crates/pos/consensus/consensus-types/src/sync_info.rs similarity index 100% rename from crates/pos/config/consensus-types/src/sync_info.rs rename to crates/pos/consensus/consensus-types/src/sync_info.rs diff --git a/crates/pos/config/consensus-types/src/timeout.rs b/crates/pos/consensus/consensus-types/src/timeout.rs similarity index 100% rename from crates/pos/config/consensus-types/src/timeout.rs rename to crates/pos/consensus/consensus-types/src/timeout.rs diff --git a/crates/pos/config/consensus-types/src/timeout_certificate.rs b/crates/pos/consensus/consensus-types/src/timeout_certificate.rs similarity index 100% rename from crates/pos/config/consensus-types/src/timeout_certificate.rs rename to crates/pos/consensus/consensus-types/src/timeout_certificate.rs diff --git a/crates/pos/config/consensus-types/src/vote.rs b/crates/pos/consensus/consensus-types/src/vote.rs similarity index 100% rename from crates/pos/config/consensus-types/src/vote.rs rename to crates/pos/consensus/consensus-types/src/vote.rs diff --git a/crates/pos/config/consensus-types/src/vote_data.rs b/crates/pos/consensus/consensus-types/src/vote_data.rs similarity index 100% rename from crates/pos/config/consensus-types/src/vote_data.rs rename to crates/pos/consensus/consensus-types/src/vote_data.rs diff --git a/crates/pos/config/consensus-types/src/vote_msg.rs b/crates/pos/consensus/consensus-types/src/vote_msg.rs similarity index 100% rename from crates/pos/config/consensus-types/src/vote_msg.rs rename to crates/pos/consensus/consensus-types/src/vote_msg.rs diff --git a/crates/pos/config/consensus-types/src/vote_proposal.rs b/crates/pos/consensus/consensus-types/src/vote_proposal.rs similarity index 100% rename from crates/pos/config/consensus-types/src/vote_proposal.rs rename to crates/pos/consensus/consensus-types/src/vote_proposal.rs From 1b052679a5f9bd11acc8ded69884527ba15963eb Mon Sep 17 00:00:00 2001 From: iosh Date: Fri, 6 Dec 2024 11:02:55 +0800 Subject: [PATCH 3/3] chore: remove non-existent crate --- crates/pos/config/management/Cargo.toml | 1 - crates/pos/config/management/genesis/Cargo.toml | 4 ---- crates/pos/config/management/operational/Cargo.toml | 2 -- crates/pos/config/seed-peer-generator/Cargo.toml | 3 --- crates/pos/storage/backup/backup-cli/Cargo.toml | 3 --- crates/pos/storage/inspector/Cargo.toml | 1 - 6 files changed, 14 deletions(-) diff --git a/crates/pos/config/management/Cargo.toml b/crates/pos/config/management/Cargo.toml index 81349a4131..565b29f054 100644 --- a/crates/pos/config/management/Cargo.toml +++ b/crates/pos/config/management/Cargo.toml @@ -27,7 +27,6 @@ diem-secure-storage = { workspace = true } diem-time-service = { workspace = true } diem-types = { workspace = true } diem-temppath = { workspace = true } -transaction-builder = { path = "../../language/transaction-builder" } [dev-dependencies] diem-config = { workspace = true, features = ["fuzzing"] } diff --git a/crates/pos/config/management/genesis/Cargo.toml b/crates/pos/config/management/genesis/Cargo.toml index d39b6bceb1..1421265d9b 100644 --- a/crates/pos/config/management/genesis/Cargo.toml +++ b/crates/pos/config/management/genesis/Cargo.toml @@ -29,12 +29,8 @@ diem-network-address-encryption = { workspace = true } diem-secure-storage = { workspace = true } diem-types = { workspace = true } diem-temppath = { workspace = true } -diem-vm = { path = "../../../language/diem-vm" } pos-ledger-db = { workspace = true } storage-interface = { workspace = true } -transaction-builder = { path = "../../../language/transaction-builder" } -vm-genesis = { path = "../../../language/tools/vm-genesis" } - [dev-dependencies] diem-config = { workspace = true, features = ["fuzzing"] } diff --git a/crates/pos/config/management/operational/Cargo.toml b/crates/pos/config/management/operational/Cargo.toml index 4f2a687cda..091f665d4d 100644 --- a/crates/pos/config/management/operational/Cargo.toml +++ b/crates/pos/config/management/operational/Cargo.toml @@ -19,7 +19,6 @@ thiserror = "1.0.24" toml = { version = "0.5.8", default-features = false } bcs = "0.1.2" -diem-client = { path = "../../../sdk/client", features = ["blocking"], default-features = false } diem-config = { workspace = true } diem-crypto = { workspace = true } diem-global-constants = { workspace = true } @@ -28,7 +27,6 @@ diem-secure-storage = { workspace = true } diem-types = { workspace = true } diem-temppath = { workspace = true } fallible = { workspace = true } -transaction-builder = { path = "../../../language/transaction-builder" } [features] testing = [] diff --git a/crates/pos/config/seed-peer-generator/Cargo.toml b/crates/pos/config/seed-peer-generator/Cargo.toml index 8a3e9a12e3..a24777ffba 100644 --- a/crates/pos/config/seed-peer-generator/Cargo.toml +++ b/crates/pos/config/seed-peer-generator/Cargo.toml @@ -20,9 +20,6 @@ thiserror = "1.0.24" bcs = "0.1.2" diem-config = { workspace = true } diem-crypto = { workspace = true } -diem-client = { path = "../../sdk/client", features = [ - "blocking", -], default-features = false } diem-logger = { workspace = true } diem-temppath = { workspace = true } diem-types = { workspace = true } diff --git a/crates/pos/storage/backup/backup-cli/Cargo.toml b/crates/pos/storage/backup/backup-cli/Cargo.toml index 446877f548..3c4218ee9b 100644 --- a/crates/pos/storage/backup/backup-cli/Cargo.toml +++ b/crates/pos/storage/backup/backup-cli/Cargo.toml @@ -31,7 +31,6 @@ tokio-stream = { workspace = true } tokio-util = { workspace = true, features = ["compat"] } executor = { workspace = true } -executor-test-helpers = { path = "../../../execution/executor-test-helpers", optional = true } executor-types = { workspace = true } diem-jellyfish-merkle = { workspace = true } bcs = "0.1.2" @@ -42,7 +41,6 @@ diem-logger = { workspace = true } diem-secure-push-metrics = { workspace = true } diem-temppath = { workspace = true } diem-types = { workspace = true } -diem-vm = { path = "../../../language/diem-vm" } pos-ledger-db = { workspace = true } storage-interface = { workspace = true } @@ -51,7 +49,6 @@ proptest = "1.0.0" warp = "0.3.0" backup-service = { path = "../backup-service" } -executor-test-helpers = { path = "../../../execution/executor-test-helpers" } pos-ledger-db = { workspace = true, features = ["fuzzing"] } diem-config = { workspace = true } diem-proptest-helpers = { workspace = true } diff --git a/crates/pos/storage/inspector/Cargo.toml b/crates/pos/storage/inspector/Cargo.toml index d867686fdb..97afaaaca6 100644 --- a/crates/pos/storage/inspector/Cargo.toml +++ b/crates/pos/storage/inspector/Cargo.toml @@ -13,7 +13,6 @@ anyhow = "1.0.38" structopt = "0.3.21" tempfile = "3.2.0" -compiled-stdlib = { path = "../../language/diem-framework/compiled" } pos-ledger-db = { workspace = true } diem-config = { workspace = true } diem-crypto = { workspace = true }