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

ledger-tool: The snapshot is being created in a different folder than expected #3117

Closed
diman-io opened this issue Oct 9, 2024 · 4 comments · Fixed by #3148
Closed

ledger-tool: The snapshot is being created in a different folder than expected #3117

diman-io opened this issue Oct 9, 2024 · 4 comments · Fixed by #3148

Comments

@diman-io
Copy link

diman-io commented Oct 9, 2024

Problem

If the positional argument output_directory is omitted, the snapshot will be created in the --ledger directory. However, according to

agave/ledger-tool/src/main.rs

Lines 1723 to 1745 in 4cc7b90

let output_directory = value_t!(arg_matches, "output_directory", PathBuf)
.unwrap_or_else(|_| {
let snapshot_archive_path = value_t!(matches, "snapshots", String)
.ok()
.map(PathBuf::from);
let incremental_snapshot_archive_path =
value_t!(matches, "incremental_snapshot_archive_path", String)
.ok()
.map(PathBuf::from);
match (
is_incremental,
&snapshot_archive_path,
&incremental_snapshot_archive_path,
) {
(true, _, Some(incremental_snapshot_archive_path)) => {
incremental_snapshot_archive_path.clone()
}
(_, Some(snapshot_archive_path), _) => {
snapshot_archive_path.clone()
}
(_, _, _) => ledger_path.clone(),
}
});
it was expected to be placed in the --incremental-snapshot-archive-path directory.

And I recall the same behavior during the previous restart - a full snapshot was created, and it was also placed in the ledger folder.

Everything was fine before (maybe about a year ago).

Proposed Solution

@steviez
Copy link

steviez commented Oct 11, 2024

Can you please share the full set of arguments you passed to ledger-tool ? Can you also confirm which version you were running with; I assume this was encountered for the planned testnet restart and that you were running v2.0.x

@diman-io
Copy link
Author

Sure

agave-ledger-tool -l /mnt/disk2/ledger create-snapshot --incremental --snapshot-archive-path /mnt/disk3/validator/snapshots/ --incremental-snapshot-archive-path /mnt/disk3/validator/incremental_snapshots/ --hard-fork 296876255 --deactivate-feature-gate 9bn2vTJUsUcnpiZWbu2woSKtTGW3ErZC9ERv88SDqQjK ed9tNscbWLYBooxWA7FE2B5KHWs8A6sxfY8EzezEcoo EenyoWx9UMXYKpR8mW5Jmfmy2fRjzUtM7NduYMY8bx33 --remove-account SysvarEpochRewards1111111111111111111111111 --enable-capitalization-change --accounts /mnt/disk3/validator/accounts --accounts-index-path /mnt/disk3/validator/accounts_index/ --accounts-hash-cache-path /mnt/disk3/validator/accounts_hash_cache/ -- 296876255

@diman-io
Copy link
Author

yes, it was 2.0.13

@steviez
Copy link

steviez commented Oct 11, 2024

Thanks @diman-io, there is indeed a bug that I introduced 😬 . The issue was first introduced in v2.0 branch, so I'll likely try to backport the patch there

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants