Skip to content

bench-parquet: run logs as Parquet, queried with DuckDB (local and remote); wb parquet, wb run sanity-check - #6794

Draft
mgmeier wants to merge 9 commits into
masterfrom
mkarg/wb-parquets
Draft

mgmeier wants to merge 9 commits into
masterfrom
mkarg/wb-parquets

Conversation

@mgmeier

@mgmeier mgmeier commented Dec 4, 2026 •

Copy link
Copy Markdown
Contributor

Run process logs (stdout of node-*, generator, explorer) stored losslessly as Parquet in
RUN/parquets/ and queried with DuckDB. A self-contained path in the workbench: nothing existing
depends on it, and wb start, the analysis and CI are unchanged unless parquets/ exists.

Documentation:

  • Commands, Parquet layout and schema, sessions, remote runs: README.md
  • Entry-level walk-through of bench-parquet and wb parquet: HOWTO.md
  • Package SQL: view tiers, checks, prepared queries, conventions: sql/README.md
  • Analysts' SQL, never loaded by default: user_sql/README.md

bench/bench-parquet-cli/ (bash + SQL, independent of the workbench):

  • convert / restore / verify: lossless (sha256 recorded at conversion and checked on
    restore), scheduled by memory and cores; --add converts only missing logs.
  • query / run / check: DuckDB sessions with the package views (sql/views/, three tiers,
    v_*), checks (sql/checks/, chk_*) and prepared queries (sql/queries/, run PQDIR NAME);
    --load for analysts' SQL (user_sql/, never loaded by default; includes a locli 3.0
    cross-check as table macros); query --ui for the DuckDB UI; run --csv; run without a
    query lists the prepared ones (--list: with descriptions).
  • head, tail, excerpt, lines, host-summary: original log lines, byte for byte.
  • remote SSH-HOST COMMAND PQDIR: the query-side commands on another host, without a checkout
    there: the package is shipped by content hash, the tools (DuckDB, bash, coreutils, ...) are
    fetched there from substituters at the store paths of the local flake.lock's nixpkgs, for the
    remote's system. Sessions bounded (4 GB, 4 threads, 10 GB spill by default).

Workbench:

  • wb parquet (pq): create RUN [--delete] (archive: stdouts replaced by parquets/ once
    verified), restore, remote RUN COMMAND .. (over WB_REMOTE), and the query-side commands with
    RUN in place of PQDIR. Apart from create, RUN may be any directory with parquets/: the
    run's metadata is not read.
  • wb run sanity-check RUN: exit codes, stderr, logs, and the package checks over parquets/
    where present; verdict in RUN/sanity-check.txt, exit status 1 on a fail.
  • wb analyse prepare-db builds the per-host DBs from parquets/ where present (locli
    prepare-db-from-lines).

locli: prepare-db-from-lines (per-host DB from Parquet-streamed lines plus a precomputed host
summary); prepare-db in constant memory.

Blocking / To be decided

  • decide: v_eb_bodyhits: forger's own rows
  • investigate: Duplicate tx-centrifuge tx ids
  • decide: Shared SQL macros
  • investigate: Three Leios view headers contradicted by data
  • decide: Per-minute rate queries in user_sql/
  • decide: Block propagation population / contested heights
  • decide: More run metadata as Parquet such as config, topology, genesis fields
  • update: Leios views and queries: current namespaces and fields

mgmeier and others added 9 commits December 4, 2026 13:32
…2), queried with DuckDB: convert (single pass, scheduled by memory and cores, --add, genesis values), restore and verify against the recorded sha256, head, tail, excerpt, lines and host-summary (locli input), query and run sessions (--load, --ui, prepared queries by name), check

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…-composed, v_*), checks (chk_*), prepared queries (series, reports), sql/README.md

Co-authored-by: Federico Mastellone <federico.pascual-mastellone@iohk.io>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rates, Leios report tables), never loaded by default; queries/locli: locli 3.0 block propagation and cluster performance as table macros, with diff macros to cross-check a locli analysis of the same run

Co-authored-by: Federico Mastellone <federico.pascual-mastellone@iohk.io>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rer stdout into RUN/parquets/, per-log skip, --delete once verified), restore into the run, and every bench-parquet command with RUN in place of PQDIR; duckdb in the workbench shell

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
locli prepare-db-from-lines builds a host's SQLite DB from log lines on
stdin, with the counts per namespace and the first and last timestamp
given as a host summary; it shares the per-line decoding with prepare-db,
which is unchanged. wb analyse prepare-db uses this path for every host
whose RUN/parquets/<host>.parquet exists (bench-parquet host-summary and
lines, only the interpreted namespaces), unless --from-logs is given.

Checked on the local value run d55b5: the DBs equal those built from
stdout in every table except error (text lines leave no rows), and a
standard analysis on them gives identical clusterperf.json and
blockprop.json.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
tMinMax walked the log's lines with 'last' while the pending 'head' still
held the start of the list, so the whole file stayed in memory: for a
1.26 GB log 1.17 GB maximum residency and a 1.8 GiB heap. Evaluating the
first and the last line in order brings it to 207 KB residency and a
286 MiB heap (the 128 MiB allocation area), with identical DBs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…er overflows recognised), logs, and the package checks over parquets/ where present; verdict in RUN/sanity-check.txt, exit status 1 on a fail

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…li input) and HOWTO.md (an entry-level walk through bench-parquet and wb parquet)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ck, verify, head, tail, lines, host-summary on another host: the local package shipped by content hash and pruned after 30 days unused, the local tools' store paths fetched there, local SQL files shipped per call, sessions bounded to 4 GB / 4 threads / 10 GB spill), wb parquet remote RUN over WB_REMOTE, run --csv and all rows; bench-parquet split into lib/ modules by area

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant