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
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
//! Read blocks from the public Foundation Compact V2 archive.
//!
//! Run from the workspace root:
//! cargo run --locked -p blockzilla-compact-v2-reader --features http \
//! RUSTFLAGS='-C target-cpu=native' cargo run --locked -p blockzilla-compact-v2-reader --features http \
//! --example read_epoch -- <epoch> <max-blocks>
//!
//! The default epoch is 200. Its directory is on the public Foundation bucket.
//! The default epoch is 1094. Its first slot is 472608000.

use std::{error::Error, num::NonZeroU32};

Expand All @@ -18,7 +18,7 @@ const ARCHIVE_BASE: &str =

fn main() -> Result<(), Box<dyn Error>> {
let mut args = std::env::args().skip(1);
let epoch: u64 = args.next().as_deref().unwrap_or("200").parse()?;
let epoch: u64 = args.next().as_deref().unwrap_or("1094").parse()?;
let max_blocks: u32 = args.next().as_deref().unwrap_or("10").parse()?;
let max_blocks = NonZeroU32::new(max_blocks).ok_or("max-blocks must be at least 1")?;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
//! Measure whether the SDK or the input limits a scan on this machine.
//!
//! cargo run --release -p blockzilla-compact-v2-reader --features http --example sdk_ceiling -- \
//! RUSTFLAGS='-C target-cpu=native' cargo run --release -p blockzilla-compact-v2-reader --features http --example sdk_ceiling -- \
//! --archive-dir /data/epoch-200 --source-id my-build --epoch 200 --first-block 150000 --max-blocks 1000
//!
//! or, for an HTTPS epoch directory:
//!
//! cargo run --release -p blockzilla-compact-v2-reader --features http --example sdk_ceiling -- \
//! --url https://archive.example/compact-v2/build/epoch-200 --cache-dir /tmp/bz-cache --epoch 200 --max-blocks 1000
//! RUSTFLAGS='-C target-cpu=native' cargo run --release -p blockzilla-compact-v2-reader --features http --example sdk_ceiling -- \
//! --url https://pub-97348740d6ef467aa2f1b4b62daa98dc.r2.dev/compact-v2/blockzilla-20261004/epoch-1094 --cache-dir /tmp/bz-cache --epoch 1094 --max-blocks 1000
//!
//! Legs, on the same block-row range:
//! - `input`: only read the compressed bytes of the range, with the same request
Expand Down