Skip to content

Conversation

@Sobeston
Copy link
Contributor

@Sobeston Sobeston commented Nov 24, 2025

This is for when you have a ledger from Sig, but want to cross-validate with Agave (or vice versa).

This tool will take in your Sig ledger directory, and a (new) agave ledger directory, and port the data over.

Usage:

  1. Make a new directory for your agave ledger
  2. Check out this branch, and build sig (recommend doing a release build)
  3. run sig agave-migration-tool -i sig-ledger-dir -o agave-ledger-dir
  4. copy the AccountsDB snapshots from sig to agave-ledger-dir/remote
  5. run agave with e.g. (the agave ledger tool will not work until the validator command is used first)
$bin/agave-validator --identity $identity --ledger $ledger --entrypoint entrypoint.testnet.solana.com:8001 --entrypoint entrypoint2.testnet.solana.com:8001 --entrypoint entrypoint3.testnet.solana.com:8001 --rpc-port 8899 --no-voting --no-snapshots   --no-snapshot-fetch --use-snapshot-archives-at-startup always --limit-ledger-size 50000000000000 

@github-project-automation github-project-automation bot moved this to 🏗 In progress in Sig Nov 24, 2025
@Sobeston Sobeston self-assigned this Nov 24, 2025
@dnut dnut requested a review from InKryption December 16, 2025 16:06
@Sobeston Sobeston force-pushed the sobe/agave-ledger-tool branch from 3668451 to 41ce8c5 Compare December 23, 2025 22:42
@Sobeston Sobeston force-pushed the sobe/agave-ledger-tool branch from 41ce8c5 to e5c0b80 Compare January 8, 2026 19:30
@Sobeston Sobeston marked this pull request as ready for review January 8, 2026 19:31
@Sobeston Sobeston requested review from dnut, ultd and yewman as code owners January 8, 2026 19:31
InKryption
InKryption previously approved these changes Jan 9, 2026
Copy link
Contributor

@InKryption InKryption left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just some basic naming nits, otherwise lgtm.

InKryption
InKryption previously approved these changes Jan 9, 2026
@codecov
Copy link

codecov bot commented Jan 9, 2026

Codecov Report

❌ Patch coverage is 98.38710% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/ledger/database/agave_migration.zig 97.56% 1 Missing ⚠️
Files with missing lines Coverage Δ
src/ledger/Ledger.zig 88.23% <100.00%> (ø)
src/ledger/Reader.zig 89.50% <100.00%> (ø)
src/ledger/database/hashmap.zig 86.15% <ø> (ø)
src/ledger/database/interface.zig 99.71% <100.00%> (ø)
src/ledger/database/rocksdb.zig 99.34% <ø> (ø)
src/ledger/tests.zig 90.05% <100.00%> (ø)
src/ledger/database/agave_migration.zig 97.56% <97.56%> (ø)

... and 4 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

dnut
dnut previously approved these changes Jan 28, 2026
Co-authored-by: Drew Nutter <dnut@users.noreply.github.com>

const cmd_info: cli.CommandInfo(@This()) = .{
.help = .{
.short = "Convert a between Sig and Agave ledger formats",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
.short = "Convert a between Sig and Agave ledger formats",
.short = "Convert between Sig and Agave ledger formats",

.help = .{
.short = "Convert a between Sig and Agave ledger formats",
.long =
\\Migrates to and from Sig's and Agave's RocksDb ledger formats.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add the full instruction list here as specified in the PR description? I would like to avoid any users getting confused if attempting to use the ledger tool directly before running Agave validator which fixes up the ledger after conversion

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

Labels

None yet

Projects

Status: 🏗 In progress

Development

Successfully merging this pull request may close these issues.

5 participants