From 6254520d13ca617ae4bb6a1567b35776acb6c659 Mon Sep 17 00:00:00 2001 From: "Daniel Porteous (dport)" Date: Tue, 6 Dec 2022 20:12:58 +0000 Subject: [PATCH] [crates] Rename accumulator to aptos-accumulator (#5785) --- Cargo.lock | 26 +++++++++---------- Cargo.toml | 2 +- storage/accumulator/Cargo.toml | 2 +- storage/aptosdb/Cargo.toml | 2 +- storage/aptosdb/src/event_store/mod.rs | 2 +- storage/aptosdb/src/ledger_store/mod.rs | 2 +- .../src/pruner/transaction_store/test.rs | 2 +- testsuite/aptos-fuzzer/Cargo.toml | 2 +- .../aptos-fuzzer/src/fuzz_targets/storage.rs | 2 +- 9 files changed, 21 insertions(+), 21 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f3e8ac5b8a380..f8564b001d8a3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -12,17 +12,6 @@ dependencies = [ "regex", ] -[[package]] -name = "accumulator" -version = "0.1.0" -dependencies = [ - "anyhow", - "aptos-crypto", - "aptos-types", - "proptest", - "rand 0.7.3", -] - [[package]] name = "addr2line" version = "0.17.0" @@ -197,6 +186,17 @@ dependencies = [ "walkdir", ] +[[package]] +name = "aptos-accumulator" +version = "0.1.0" +dependencies = [ + "anyhow", + "aptos-crypto", + "aptos-types", + "proptest", + "rand 0.7.3", +] + [[package]] name = "aptos-aggregator" version = "0.1.0" @@ -586,8 +586,8 @@ dependencies = [ name = "aptos-fuzzer" version = "0.1.0" dependencies = [ - "accumulator", "anyhow", + "aptos-accumulator", "aptos-crypto", "aptos-jellyfish-merkle", "aptos-mempool", @@ -1524,8 +1524,8 @@ dependencies = [ name = "aptosdb" version = "0.1.0" dependencies = [ - "accumulator", "anyhow", + "aptos-accumulator", "aptos-config", "aptos-crypto", "aptos-infallible", diff --git a/Cargo.toml b/Cargo.toml index 6af0c9de1c580..8aa832681369f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -166,8 +166,8 @@ rust-version = "1.64" [workspace.dependencies] # Internal crate dependencies. # Please do not add any test features here: they should be declared by the individual crate. -accumulator = { path = "storage/accumulator" } aptos = { path = "crates/aptos" } +aptos-accumulator = { path = "storage/accumulator" } aptos-aggregator = { path = "aptos-move/aptos-aggregator" } aptos-api = { path = "api" } aptos-api-test-context = { path = "api/test-context" } diff --git a/storage/accumulator/Cargo.toml b/storage/accumulator/Cargo.toml index 5f6906257057f..4cff52a1e8830 100644 --- a/storage/accumulator/Cargo.toml +++ b/storage/accumulator/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "accumulator" +name = "aptos-accumulator" description = "Aptos merkle tree accumulator" version = "0.1.0" diff --git a/storage/aptosdb/Cargo.toml b/storage/aptosdb/Cargo.toml index 1b56e98f6ba99..3c1202efd10df 100644 --- a/storage/aptosdb/Cargo.toml +++ b/storage/aptosdb/Cargo.toml @@ -13,8 +13,8 @@ repository = { workspace = true } rust-version = { workspace = true } [dependencies] -accumulator = { workspace = true } anyhow = { workspace = true } +aptos-accumulator = { workspace = true } aptos-config = { workspace = true } aptos-crypto = { workspace = true } aptos-infallible = { workspace = true } diff --git a/storage/aptosdb/src/event_store/mod.rs b/storage/aptosdb/src/event_store/mod.rs index e427b0d63201f..e1c277ffebd79 100644 --- a/storage/aptosdb/src/event_store/mod.rs +++ b/storage/aptosdb/src/event_store/mod.rs @@ -14,8 +14,8 @@ use crate::{ event_by_key::EventByKeySchema, event_by_version::EventByVersionSchema, }, }; -use accumulator::{HashReader, MerkleAccumulator}; use anyhow::{bail, ensure, format_err, Result}; +use aptos_accumulator::{HashReader, MerkleAccumulator}; use aptos_crypto::{ hash::{CryptoHash, EventAccumulatorHasher}, HashValue, diff --git a/storage/aptosdb/src/ledger_store/mod.rs b/storage/aptosdb/src/ledger_store/mod.rs index 00bfc2191ac37..e13c587043f08 100644 --- a/storage/aptosdb/src/ledger_store/mod.rs +++ b/storage/aptosdb/src/ledger_store/mod.rs @@ -13,8 +13,8 @@ use crate::{ transaction_info::TransactionInfoSchema, }, }; -use accumulator::{HashReader, MerkleAccumulator}; use anyhow::{ensure, format_err, Result}; +use aptos_accumulator::{HashReader, MerkleAccumulator}; use aptos_crypto::{ hash::{CryptoHash, TransactionAccumulatorHasher}, HashValue, diff --git a/storage/aptosdb/src/pruner/transaction_store/test.rs b/storage/aptosdb/src/pruner/transaction_store/test.rs index d416ed59740fa..d9a258e96a5cf 100644 --- a/storage/aptosdb/src/pruner/transaction_store/test.rs +++ b/storage/aptosdb/src/pruner/transaction_store/test.rs @@ -12,7 +12,7 @@ use aptos_types::{ transaction::{SignedTransaction, Transaction}, }; -use accumulator::HashReader; +use aptos_accumulator::HashReader; use aptos_config::config::LedgerPrunerConfig; use aptos_types::{ proof::position::Position, diff --git a/testsuite/aptos-fuzzer/Cargo.toml b/testsuite/aptos-fuzzer/Cargo.toml index 0b4d5c506de25..af9201aa1c801 100644 --- a/testsuite/aptos-fuzzer/Cargo.toml +++ b/testsuite/aptos-fuzzer/Cargo.toml @@ -13,8 +13,8 @@ repository = { workspace = true } rust-version = { workspace = true } [dependencies] -accumulator = { workspace = true, features = ["fuzzing"] } anyhow = { workspace = true } +aptos-accumulator = { workspace = true, features = ["fuzzing"] } aptos-crypto = { workspace = true, features = ["fuzzing"] } aptos-jellyfish-merkle = { workspace = true, features = ["fuzzing"] } aptos-mempool = { workspace = true } diff --git a/testsuite/aptos-fuzzer/src/fuzz_targets/storage.rs b/testsuite/aptos-fuzzer/src/fuzz_targets/storage.rs index 58c1fe00ad1c1..0ba5bc3eb2b2e 100644 --- a/testsuite/aptos-fuzzer/src/fuzz_targets/storage.rs +++ b/testsuite/aptos-fuzzer/src/fuzz_targets/storage.rs @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 use crate::{corpus_from_strategy, fuzz_data_to_value, FuzzTargetImpl}; -use accumulator::test_helpers::{ +use aptos_accumulator::test_helpers::{ arb_hash_batch, arb_list_of_hash_batches, arb_three_hash_batches, arb_two_hash_batches, test_append_empty_impl, test_append_many_impl, test_consistency_proof_impl, test_get_frozen_subtree_hashes_impl, test_proof_impl, test_range_proof_impl,