Merge pull request #854 from input-output-hk/nfrisby/log-LedgerDbDichotomy-idea
Update logbook in response to 2026 April 9 Consensu Office Hours
Update logbook in response to 2026 April 9 Consensu Office Hours
Co-authored-by: Sebastian Nagel <[email protected]>
Point ouroboros-consensus to dnadales/cumulative-tx-size (adds shelleyCumulativeTxBytes to ShelleyLedgerState) and cardano-node-leios to dnadales/cumulative-tx-bytes-metric (exposes it as a Prometheus gauge via LedgerMetrics).
Adds a Grafana timeseries panel that plots txkB/s using: rate(cardano_node_metrics_cumulativeTxBytes_int[30s]) / 1000 Includes a 200 kB/s threshold line (the demo target from #845).
The experiment config's vote-generation-probability: 600 was being ignored because the simulation uses persistent + non-persistent probabilities directly (defaulting to 400 + 100 = 500). Override both in the wfa-ls mode to get the intended 600 total with 80:20 split, giving a 75% quorum at the existing threshold of 450. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Read VmRSS from /proc/self/status and log it alongside estimated totals so we can directly compare instrumented vs actual memory usage. Simplify praos.blocks stats back to basic entry count and tx_refs — the detailed unique/endorse breakdown showed praos.blocks is not a significant memory consumer. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
The txs HashMap grew to 120k entries (16 MB/node, ~12 GB total) because linear-tx-max-age-slots defaulted to null in the benchmark parameter chain. Set it to 24 in memory-limit.yaml (vote=4 + diffuse=7 + ceil(1000/1000)*3 + buffer=10) to match the experiment config timing. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
The || true was masking simulation failures (including OOM kills). The shutdown panic it originally worked around was fixed in e089975c4, and shard panics are now caught cleanly via catch_unwind in 8354af475. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
ledger_states was a BTreeMap caching a cumulative HashSet<u64> of spent inputs for every ranking block. At slot 1380 with 72 blocks this reached 3.4M entries per snapshot × 72 copies = 55 MB/node × 750 = 41 GB (~70% of total memory). Since resolve_ledger_state is only called for the current chain tip, and rollbacks aren't handled correctly anyway (slot battle replacement blocks are skipped by seen_blocks), replace the BTreeMap with a single Option<(BlockId, LedgerState)> that is mutated in place. Removes Clone derive from LedgerState. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Log entry counts and estimated byte sizes for all significant per-node data structures every 60 slots from node 0. Multiplied by node count to estimate total simulation memory. Identified ledger_states as the dominant consumer (~70% of 58 GB at 1380 slots). Also tee simulation output in the benchmark script so tracing logs (including memory stats) are visible during runs. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
prune_old_leios_state() could remove EBs from self.leios.ebs while a
CpuTask::EBBlockValidated was still in-flight (body validation takes
50+ ms). When the task completed, finish_validating_eb() panicked,
killing one shard thread and freezing its shared_time. Other shards
then deadlocked in the CMB ceiling check waiting for the dead shard.
- Skip pruning EBs in Received { validated: false } state
- Replace panic with tracing::warn! + return as a safety net
- Track pruned EBs to prevent re-requests of already-processed EBs
- Wrap shard threads in catch_unwind to cancel the token on panic,
preventing any future panic from deadlocking multi-shard runs
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Remove vote bundles, tallies, EB state, and relay announcements for EBs older than the latest endorsed EB. Only prunes once a newer EB has been endorsed on-chain, avoiding false positives from fixed time-based cutoffs. Also rename TMPDIR to WORK in benchmark script to avoid shadowing the system TMPDIR variable. Note: a reproducible hang has been observed at 0.250/wfa-ls throughput with 6-shard sequential engine. Under investigation — may be related to pruning timing or a pre-existing CMB synchronisation issue. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
When the simulation completes before the event monitor, the select! macro joins the monitor future. Awaiting it again on line 151 panics with "JoinHandle polled after completion". Return early from the monitor branch to avoid the double-await. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Cap of 100 was too aggressive — caused MissingTX vote failures at higher throughputs. 10000 avoids affecting vote behavior while still bounding TX memory growth (~35GB peak at 0.250/everyone). Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Vote bundles, per-EB tallies, EB state, and relay announcements were stored forever, causing 50GB+ memory with large voter committees. Add slot-based pruning that removes all leios state for EBs older than the full voting lifecycle (3*header_diffusion + vote_stage + diffuse_stage + buffer). Also remove write-only certified_ebs field. Reduces peak memory from 54GB to ~31GB for 750-voter/1500-slot runs. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Everyone and top-stake-fraction voters are all deterministically selected and don't need per-vote eligibility proofs, so use persistent vote sizes (90 bytes), generation time (0.135ms), and validation time (0.670ms) instead of the weighted persistent/non-persistent average. Also fix memory-limit peer backlog cap (raise to 1000 from typo fix). Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Accept optional second and third args for comma-separated throughput and mode filters (use "-" for all). Append to existing results CSV when filtering instead of overwriting. Examples: ./scripts/cip-voting-options.sh - 0.250 everyone ./scripts/cip-voting-options.sh - 0.250,0.300 wfa-ls,everyone Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Accept topology as leafname (resolved in data/simulation/pseudo-mainnet/), relative path, or absolute path. Defaults to topology-v2-cip.yaml. Auto-compute vote thresholds from topology stake distribution at configurable quorum fraction (QUORUM_FRACTION, default 60%). Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
- Phase 1 (acceptance): track consecutive errors, exit after 10 - Phase 2 (completion): track consecutive errors, exit after 5 - Final outcome: detect all-attempts-failed, handle jq parse errors per reviewer suggestion in PR#858 review thread Agent-Logs-Url: https://github.com/input-output-hk/ouroboros-leios/sessions/6365c0a4-b8cc-4046-bb53-b41de3d2cd02 Co-authored-by: wolf31o2 <[email protected]>