Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[crates] Rename backup-cli to aptos-backup-cli #5787

Merged
merged 1 commit into from
Dec 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
92 changes: 46 additions & 46 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ aptos-aggregator = { path = "aptos-move/aptos-aggregator" }
aptos-api = { path = "api" }
aptos-api-test-context = { path = "api/test-context" }
aptos-api-types = { path = "api/types" }
aptos-backup-cli = { path = "storage/backup/backup-cli" }
aptos-block-executor = { path = "aptos-move/block-executor" }
aptos-bitvec = { path = "crates/aptos-bitvec" }
aptos-build-info = { path = "crates/aptos-build-info" }
Expand Down Expand Up @@ -229,7 +230,6 @@ aptos-vm = { path = "aptos-move/aptos-vm" }
aptos-warp-webserver = { path = "crates/aptos-warp-webserver" }
aptos-writeset-generator = { path = "aptos-move/writeset-transaction-generator" }
aptosdb = { path = "storage/aptosdb" }
backup-cli = { path = "storage/backup/backup-cli" }
backup-service = { path = "storage/backup/backup-service" }
bounded-executor = { path = "crates/bounded-executor" }
cached-packages = { path = "aptos-move/framework/cached-packages" }
Expand Down
2 changes: 1 addition & 1 deletion crates/aptos/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ rust-version = { workspace = true }

[dependencies]
anyhow = { workspace = true }
aptos-backup-cli = { workspace = true }
aptos-bitvec = { workspace = true }
aptos-build-info = { workspace = true }
aptos-config = { workspace = true }
Expand All @@ -35,7 +36,6 @@ aptos-transactional-test-harness = { workspace = true }
aptos-types = { workspace = true }
aptos-vm = { workspace = true, features = ["testing"] }
async-trait = { workspace = true }
backup-cli = { workspace = true }
base64 = { workspace = true }
bcs = { workspace = true }
cached-packages = { workspace = true }
Expand Down
12 changes: 6 additions & 6 deletions crates/aptos/src/node/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ use crate::{
},
genesis::git::from_yaml,
};
use aptos_backup_cli::coordinators::restore::{RestoreCoordinator, RestoreCoordinatorOpt};
use aptos_backup_cli::metadata::cache::MetadataCacheOpt;
use aptos_backup_cli::storage::command_adapter::{config::CommandAdapterConfig, CommandAdapter};
use aptos_backup_cli::utils::{
ConcurrentDownloadsOpt, GlobalRestoreOpt, ReplayConcurrencyLevelOpt, RocksdbOpt,
};
use aptos_config::config::NodeConfig;
use aptos_crypto::bls12381::PublicKey;
use aptos_crypto::{bls12381, x25519, ValidCryptoMaterialStringExt};
Expand All @@ -38,12 +44,6 @@ use aptos_types::validator_performances::ValidatorPerformances;
use aptos_types::vesting::VestingAdminStore;
use aptos_types::{account_address::AccountAddress, account_config::CORE_CODE_ADDRESS};
use async_trait::async_trait;
use backup_cli::coordinators::restore::{RestoreCoordinator, RestoreCoordinatorOpt};
use backup_cli::metadata::cache::MetadataCacheOpt;
use backup_cli::storage::command_adapter::{config::CommandAdapterConfig, CommandAdapter};
use backup_cli::utils::{
ConcurrentDownloadsOpt, GlobalRestoreOpt, ReplayConcurrencyLevelOpt, RocksdbOpt,
};
use bcs::Result;
use cached_packages::aptos_stdlib;
use chrono::{DateTime, NaiveDateTime, Utc};
Expand Down
4 changes: 2 additions & 2 deletions docker/build-rust-all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ echo "FEATURES: $FEATURES"
# Build all the rust binaries
cargo build --locked --profile=$PROFILE \
-p aptos \
-p aptos-backup-cli \
-p aptos-faucet \
-p aptos-fn-check-client \
-p aptos-node-checker \
-p aptos-openapi-spec-generator \
-p aptos-telemetry-service \
-p aptos-fn-check-client \
-p backup-cli \
-p db-bootstrapper \
-p forge-cli \
-p transaction-emitter \
Expand Down
8 changes: 4 additions & 4 deletions storage/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ https://github.com/aptos-labs/aptos-core/tree/main/storage/backup/backup-cli/src


```bash
$ cargo run -p backup-cli --bin db-backup coordinator run
$ cargo run -p aptos-backup-cli --bin db-backup coordinator run
Finished dev [unoptimized + debuginfo] target(s) in 0.52s
Running `target/debug/db-backup coordinator run`
db-backup-coordinator-run
Expand Down Expand Up @@ -235,7 +235,7 @@ SUBCOMMANDS:

Example command:
```
$ cargo run -p backup-cli --bin db-backup -- \
$ cargo run -p aptos-backup-cli --bin db-backup -- \
coordinator run \
--metadata-cache-dir ./mc \
--state-snapshot-interval-epochs 1 \
Expand Down Expand Up @@ -303,7 +303,7 @@ RUST_LOG=info ./aptos \
```

This is basically the same functionality with
the "auto" mode of `cargo run -p backup-cli --bin db-restore`, but with more
the "auto" mode of `cargo run -p aptos-backup-cli --bin db-restore`, but with more
limited options. The `db-restore` tool mentioned has the ability to manually
hack a local DB and is highly experimental. It's not recommended is be used if
you are not 100% aware of what you are doing.
you are not 100% aware of what you are doing.
2 changes: 1 addition & 1 deletion storage/backup/backup-cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "backup-cli"
name = "aptos-backup-cli"
description = "Backup CLI"
version = "0.1.0"

Expand Down
6 changes: 3 additions & 3 deletions storage/backup/backup-cli/src/bin/db-backup-verify.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
// SPDX-License-Identifier: Apache-2.0

use anyhow::Result;
use aptos_logger::{prelude::*, Level, Logger};
use aptos_push_metrics::MetricsPusher;
use backup_cli::{
use aptos_backup_cli::{
coordinators::verify::VerifyCoordinator,
metadata::cache::MetadataCacheOpt,
storage::StorageOpt,
utils::{ConcurrentDownloadsOpt, TrustedWaypointOpt},
};
use aptos_logger::{prelude::*, Level, Logger};
use aptos_push_metrics::MetricsPusher;
use clap::Parser;

#[derive(Parser)]
Expand Down
6 changes: 3 additions & 3 deletions storage/backup/backup-cli/src/bin/db-backup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@ use std::sync::Arc;
use anyhow::Result;
use clap::Parser;

use aptos_logger::{prelude::*, Level, Logger};
use aptos_push_metrics::MetricsPusher;
use backup_cli::{
use aptos_backup_cli::{
backup_types::{
epoch_ending::backup::{EpochEndingBackupController, EpochEndingBackupOpt},
state_snapshot::backup::{StateSnapshotBackupController, StateSnapshotBackupOpt},
Expand All @@ -22,6 +20,8 @@ use backup_cli::{
ConcurrentDownloadsOpt, GlobalBackupOpt,
},
};
use aptos_logger::{prelude::*, Level, Logger};
use aptos_push_metrics::MetricsPusher;

#[derive(Parser)]
#[clap(about = "Ledger backup tool.")]
Expand Down
6 changes: 3 additions & 3 deletions storage/backup/backup-cli/src/bin/db-restore.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
// SPDX-License-Identifier: Apache-2.0

use anyhow::Result;
use aptos_logger::{prelude::*, Level, Logger};
use aptos_push_metrics::MetricsPusher;
use backup_cli::{
use aptos_backup_cli::{
backup_types::{
epoch_ending::restore::{EpochEndingRestoreController, EpochEndingRestoreOpt},
state_snapshot::restore::{StateSnapshotRestoreController, StateSnapshotRestoreOpt},
Expand All @@ -14,6 +12,8 @@ use backup_cli::{
storage::StorageOpt,
utils::{GlobalRestoreOpt, GlobalRestoreOptions},
};
use aptos_logger::{prelude::*, Level, Logger};
use aptos_push_metrics::MetricsPusher;
use clap::Parser;
use std::convert::TryInto;

Expand Down
14 changes: 7 additions & 7 deletions storage/backup/backup-cli/src/bin/replay-verify.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@
// SPDX-License-Identifier: Apache-2.0

use anyhow::Result;
use aptos_backup_cli::utils::ReplayConcurrencyLevelOpt;
use aptos_backup_cli::{
coordinators::replay_verify::ReplayVerifyCoordinator,
metadata::cache::MetadataCacheOpt,
storage::StorageOpt,
utils::{ConcurrentDownloadsOpt, RocksdbOpt, TrustedWaypointOpt},
};
use aptos_config::config::{
BUFFERED_STATE_TARGET_ITEMS, DEFAULT_MAX_NUM_NODES_PER_LRU_CACHE_SHARD,
NO_OP_STORAGE_PRUNER_CONFIG,
};
use aptos_logger::{prelude::*, Level, Logger};
use aptos_types::transaction::Version;
use aptosdb::{AptosDB, GetRestoreHandler};
use backup_cli::utils::ReplayConcurrencyLevelOpt;
use backup_cli::{
coordinators::replay_verify::ReplayVerifyCoordinator,
metadata::cache::MetadataCacheOpt,
storage::StorageOpt,
utils::{ConcurrentDownloadsOpt, RocksdbOpt, TrustedWaypointOpt},
};
use clap::Parser;
use std::{path::PathBuf, sync::Arc};

Expand Down
2 changes: 1 addition & 1 deletion testsuite/smoke-test/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,14 @@ serde_json = { workspace = true }
tokio = { workspace = true }

[dev-dependencies]
aptos-backup-cli = { workspace = true }
aptos-genesis = { workspace = true }
aptos-infallible = { workspace = true }
aptos-logger = { workspace = true }
aptos-secure-storage = { workspace = true }
aptos-time-service = { workspace = true }
aptos-vault-client = { workspace = true }
aptos-writeset-generator = { workspace = true }
backup-cli = { workspace = true }
base64 = { workspace = true }
futures = { workspace = true }
num_cpus = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion testsuite/smoke-test/src/storage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ use crate::{
workspace_builder::workspace_root,
};
use anyhow::{bail, Result};
use aptos_backup_cli::metadata::view::BackupStorageState;
use aptos_logger::info;
use aptos_temppath::TempPath;
use aptos_types::{transaction::Version, waypoint::Waypoint};
use backup_cli::metadata::view::BackupStorageState;
use forge::{reconfig, NodeExt, Swarm, SwarmExt};
use std::{
fs,
Expand Down