Solana Bytes is an interactive hex visualizer for Solana accounts — paste any address and it dumps the raw account bytes, color-coded by field, with hover tooltips that decode each region. Then it flips into a Byte Challenge: an 8-bit arcade game where you hunt for specific fields in a gray hex dump, build streaks, and climb a leaderboard.
It’s the most playful app in the showcase, and a good demonstration that “decode raw on-chain bytes” is something Rails can do cleanly — entirely in Ruby.
What it does
- Interactive hex dump of any Solana account, color-coded by byte region
- Hover tooltips with field names, decoded values, and offsets
- Decoders for SPL Mints, Token Accounts, Token-2022 extensions, and BPF programs (ELF headers)
- Byte Challenge game — find the target field, build streaks, compete on a leaderboard
- 8-bit theme — Press Start 2P font, SVG pixel sprites, and Web Audio sound effects
- Network selector — mainnet, devnet, or testnet
- Guest play works; sign in to save results
How it’s built
- Three processes (
web,js,css) and the four-database Solid stack. - A Turbo Frame SPA — account results load inline via an
account_resultframe with a URL push, no full reloads. - O(1) offset lookup — the
AccountPresenterbuilds an offset map so any byte maps to its field region instantly. - Per-program decoders —
RegionDecoderknows the layouts for SPL Token, Mint, Token-2022, and ELF/BPF.
Decoding bytes in Ruby
The whole app hinges on turning raw getAccountInfo bytes into meaningful, labeled
regions. That decoding — discriminators, pubkeys, u64 amounts, Token-2022 extension
TLVs, ELF headers — runs server-side in Ruby presenters, fed by solrengine-rpc. The
front end only renders the structured output the server produces.
Game integrity, server-side
A leaderboard invites cheating, so the streak can’t live in the browser:
- Signed challenge tokens (
ActiveSupport::MessageVerifier) bind the streak, the account, and the target field — the server verifies them on every save, so streaks can’t be spoofed. - Rate limiting via Rack::Attack (60 req/min general, 20/min RPC, 10/min save).
- Nonce-based CSP on
script-src, and Sentry error tracking in production. - 29 tests cover the decoders, base58, and game integrity.
The SolRengine gems behind it
- auth — optional SIWS sign-in to save your results
- rpc — the raw
getAccountInforeads that feed every decoder
It also leans on base58 for address decoding and rack-attack for rate limiting.