Skip to content

Conversation

@7layermagik
Copy link

@7layermagik 7layermagik commented Dec 28, 2025

Summary

This PR improves Mithril's terminal output for better visibility into the startup and synchronization process:

  • Mithril ASCII banner - Displays on startup with gold/amber coloring
  • Dual progress bars - Shows snapshot download and AccountsDB build progress simultaneously to identify bottlenecks
  • Node discovery reports - Formatted tables showing RTT histograms, version distribution, and filter pipeline stats
  • Snapshot source summary - Clean box showing selected source, speed, RTT, and search time
  • Relative timestamps - Log messages show time since program start (e.g., (+2m30s)) for easier debugging
  • Box alignment - All terminal boxes are 80 characters wide with consistent teal coloring

Other Changes

  • CLI restructuring - New mithril run command as the primary entry point
  • Bootstrap mode - Default changed to snapshot mode (always download fresh)
  • Config consolidation - Simplified TOML config with always_download_full option
  • Setup scripts - Server setup, disk setup, and performance tuning scripts in scripts/

7layermagik and others added 20 commits December 28, 2025 01:50
Replace klog's verbose timestamp format with cleaner relative timestamps
showing elapsed time since program start. Format examples:
  (+    0s) - first few seconds
  (+   45s) - under a minute
  (+ 5m12s) - minutes and seconds
  (+ 1h05m) - hours and minutes

All formats produce consistent width (10 chars) so log messages align
at the same starting column.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Updates solana-snapshot-finder-go to include:
- Relative timestamps (+5m32s style) instead of full timestamps
- No timestamps on Node Discovery Report tables (cleaner output)
- Consistent formatting with mithril's mlog output

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Rename 'verify-live' to 'run' as the primary command
- Add [bootstrap] section with unified mode setting (auto/snapshot/accountsdb)
- Rename [ledger] to [storage] with clearer key names
- Rename [rpc] (Solana endpoints) to [network]
- Add [rpc] section for Mithril's RPC server (enabled by default on port 8899)
- Rename [development] to [tuning] and separate [debug] section
- Add 'mithril config init' command to generate starter config.toml
- Keep 'verify-live' as hidden alias for backwards compatibility
- Add backwards compatibility for all renamed config keys

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Print Node Discovery Report BEFORE speed testing
- Print Stage 2 candidates as formatted table (no timestamps)
- Move FILTER PIPELINE to after speed testing, before source selection
- Standardize box widths to 63 chars across all sections
- Update snapshot-finder dependency with split report functions

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Update README with 'mithril run' command and new config format
- Document [bootstrap], [storage], [network], [rpc] sections
- Update scripts/README.md with new directory structure
- Enhance disk-setup.sh with additional disk utilities

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Restore symmetric star pattern decorations that were truncated:
- ./|\. on both sides (was missing leading dot)
- <--:--> on both sides (was missing <-)
- '\|/' on both sides (was missing leading quote)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Fixes histogram bars and Stage 2 candidates table right edge alignment.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Update snapshotdl.go to capture and use speedStats from SortBestNodesWithStats
- Pass speedStats to PrintFilterPipeline for Stage 1/2 node count display
- Write detailed speed test log to /tmp/mithril-logs/ with breakdown of:
  - Stage 1: timeouts, errors, zero speed
  - Stage 2: collapsed (unstable), too slow, connection failures
- Remove unused formatProbeStats function
- Update snapshot-finder dependency to include SpeedTestStats return values

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Consolidate version info and startup config into single "Startup Info" section
- Show timestamp, commit, Go version, and command name at top
- Remove confusing endSlot display in live mode (was showing MaxUint64)
- Add docs/TROUBLESHOOTING.md with clean shutdown and recovery guidance
- Simplify README operational best practices section
- Update snapshot-finder-go for box padding alignment

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Use pgrep -x (exact executable name) instead of -f (full command line)
- Exclude parent PID to avoid killing sudo wrapper
- Prevents self-termination when running with sudo

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- mode=accountsdb: Resume from existing AccountsDB, fail if not found
- mode=snapshot: Always download fresh snapshot (current default behavior)
- mode=auto: Resume from AccountsDB if exists, else download snapshot

Previously the code always downloaded a snapshot regardless of mode.
Now the Startup Info display matches the actual behavior.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
… config

- Default bootstrap mode is now 'snapshot' (always download fresh)
- Added 'always_download_full' config option in [snapshot] section
- Reorganized config.example.toml to put age thresholds after verbose
- printStartupInfo now only shows full snapshot when actually using existing
- Incremental snapshots no longer shown in startup info

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add single-space left padding to PrintSnapshotSourceSummary to match
the visual alignment of FILTER PIPELINE and other info boxes.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Reduce gap between star decorations and MITHRIL text by 3 spaces
on each side for a more compact look. Left star remains at left edge.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add RTT column to staged speed candidates table
- Rename table header from "STAGE 2 CANDIDATES" to "STAGED SPEED CANDIDATES"
- Populate RTTMs field from node latency
- Fix FULL SNAPSHOT SOURCE SELECTED box inner padding to match other boxes
- Update snapshot-finder dependency

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Format all durations to 3 decimal places (e.g., 12.496s, 105.721ms)
- Add RPC endpoint to rate limit error messages
- Add Endpoint() getter to RpcClient

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The Latency field from NodeResult is already in milliseconds
(set via time.Since(start).Milliseconds()), so the *1000 conversion
was incorrect, causing values like 75000ms instead of 75ms.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@7layermagik 7layermagik changed the title improve: use relative timestamps in log output Terminal output improvements: banner, progress bars, and startup UX Dec 29, 2025
@7layermagik 7layermagik merged commit 95a6c98 into dev Dec 29, 2025
1 check passed
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.

2 participants