Skip to content
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
28 changes: 26 additions & 2 deletions Cargo.lock

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

1 change: 1 addition & 0 deletions blockzilla/cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ blockzilla-primitives = { path = "../../crates/blockzilla-primitives", default-f
blockzilla-program-logs = { path = "../../crates/parser/blockzilla-program-logs", default-features = false, version = "0.3.0" }
blockzilla-registry = { path = "../../crates/compact-v2/blockzilla-registry", default-features = false, version = "0.3.0" }
anyhow = "1.0.104"
blake3 = "1.8.5"
# Allocation-free base58 and integer text for dump rows.
five8 = "1.0.0"
itoa = "1.0.18"
Expand Down
14 changes: 13 additions & 1 deletion blockzilla/cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ The core command tree contains:
| `token-dump` | Export recorded token balances as JSON Lines. |
| `wallet-dump` | Export transactions that one wallet signed. |
| `program-dump` | Export recorded outer and inner calls of one program. |
| `superbank-ingest` | Load or benchmark Superbank ClickHouse `RowBinary` tables (`transactions`, `blocks_metadata`, `entries`). |
| `inspect` | Show an archive's admitted identity and range. |
| `compare-sdk-rpc` | Compare a saved SDK capture with finalized RPC blocks. |
| `build-direct-agave-compact` | Build compact blocks from a complete native callback batch. |
Expand All @@ -22,6 +23,8 @@ blockzilla token-dump --epoch 200 --max-blocks 20 --mint EPjFWdd5AufqSSqeM2qN1xz
blockzilla token-dump --archive-url https://pub-97348740d6ef467aa2f1b4b62daa98dc.r2.dev/compact-v2/blockzilla-20261004/epoch-1094 --epoch 1094 --mint EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
blockzilla wallet-dump --epoch 1094 --key WALLET
blockzilla program-dump --epoch 1094 --key PROGRAM
blockzilla superbank-ingest --epoch 1094 --max-blocks 100 --benchmark-only
blockzilla superbank-ingest --epoch 1094 --max-blocks 100 --clickhouse-url http://127.0.0.1:8123
blockzilla inspect --epoch 900
```

Expand All @@ -42,12 +45,21 @@ and depth with `--threads` (1..=128), `--net-workers` (1..=512),
`token-dump` takes `--epoch`, `--origin`, `--archive-url`, `--archive-base`,
`--s3-region`, `--cache-root`, `--archive-dir`, `--source-id`,
`--read-concurrency`, `--threads` (1..=128), `--net-workers` (1..=512),
`--first-block`, `--max-blocks`, and `--mint`. With no `--archive-url`,
`--first-block`, `--max-blocks`, `--mint`, `--output`, `--benchmark-only`, and
`--stats`. With no `--archive-url`,
`--origin`, or `--archive-dir`, it reads the public Foundation directory
`https://pub-97348740d6ef467aa2f1b4b62daa98dc.r2.dev/compact-v2/blockzilla-20261004/epoch-<EPOCH>`.
It writes one JSON line per recorded token balance. Each line includes the
transaction signature. The command stops when execution status or token data
is missing.

`superbank-ingest` (alias `superbank-dump`) reconstructs full Solana transactions,
block metadata, rewards, and PoH entries from an Archive V2 epoch and encodes
ClickHouse `RowBinary` rows for Superbank's `transactions`, `blocks_metadata`,
and `entries` tables. Supply `--clickhouse-url` to insert batches over HTTP
(add `--http-zstd` to compress request bodies), `--output-dir` to write raw
`.rowbinary` files, or `--benchmark-only` to measure decode and serialization
throughput without writing to a server.
`wallet-dump` and `program-dump` take the same arguments as the example
binaries in `examples/`. Omit `--archive-url` to read the public Foundation archive at
`https://pub-97348740d6ef467aa2f1b4b62daa98dc.r2.dev/compact-v2/blockzilla-20261004/epoch-<EPOCH>`.
Expand Down
5 changes: 5 additions & 0 deletions blockzilla/cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ mod compare_sdk_rpc;
mod first_seen_finalization;
mod progress;
mod stream;
mod superbank;
mod token_dump;
use progress::{ProgressTracker, file_nonempty};

Expand Down Expand Up @@ -42,6 +43,9 @@ enum Commands {
WalletDump(blockzilla::archive_dump::Args),
/// Export recorded outer and inner calls of one program.
ProgramDump(blockzilla::archive_dump::Args),
/// Ingest or benchmark Superbank ClickHouse `RowBinary` tables from an archive epoch.
#[command(visible_alias = "superbank-dump")]
SuperbankIngest(superbank::SuperbankArgs),
/// Show the admitted identity and range of an archive epoch.
Inspect {
#[command(flatten)]
Expand Down Expand Up @@ -73,6 +77,7 @@ fn main() -> Result<()> {
Commands::ProgramDump(args) => {
blockzilla::archive_dump::execute(blockzilla::archive_dump::Kind::Program, args)
}
Commands::SuperbankIngest(args) => superbank::run(args),
Commands::Inspect { source } => {
let archive = stream::open(&source)?;
println!("{}", serde_json::to_string_pretty(archive.identity())?);
Expand Down
Loading