Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ochaloup/solana-list-epoch-boundaries
Rust cli to list first and last slot of an epoch
https://github.com/ochaloup/solana-list-epoch-boundaries
solana
Last synced: 2 days ago
JSON representation
Rust cli to list first and last slot of an epoch
- Host: GitHub
- URL: https://github.com/ochaloup/solana-list-epoch-boundaries
- Owner: ochaloup
- Created: 2024-10-02T05:40:23.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-10-02T08:43:06.000Z (4 months ago)
- Last Synced: 2025-01-31T01:43:47.854Z (9 days ago)
- Topics: solana
- Language: Rust
- Homepage:
- Size: 33.2 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Rust CLI: solana-list-epoch-boundaries
Just to list first and last slot in the epoch
## To run
```sh
cargo run -- -f 660 -l 670
```# To SQL
```sh
cargo run -- -f 660 -l 670 | tee /tmp/blocks.txtcat /tmp/blocks.txt | head -n -1 | sed 's/^\([0-9]\+\).*| \([0-9]\+\) | \([0-9]\+\).*/-- epoch: \1\n-- and BLOCK_ID >= \2 and BLOCK_ID <= \3/'
cat /tmp/blocks.txt | head -n -1 | sed 's/^\([0-9]\+\).*| \([0-9]\+\) | \([0-9]\+\).*/ WHEN BLOCK_ID >= \2 and BLOCK_ID <= \3 THEN \1/'
```