Skip to content

Instantly share code, notes, and snippets.

View sonicfromnewyoke's full-sized avatar

Sonic sonicfromnewyoke

View GitHub Profile
@deanmlittle
deanmlittle / fib.md
Last active October 3, 2025 12:37
fib.so teardown

Deconstructing fib.so, a minimal sBPF program

For this deconstruction, we will be researching fib.so, a hand-rolled sBPF assembly program that calculates the fibonacci number based upon a u8 input.

Structure of an sBPF program

The structure of an sBPF program has 4 sections:

1. ELF Header

The starting point of the file, describing the overall file format, target environment, and offsets for program and section headers.

2. Program Headers

Define the memory segments and their attributes (readable, writable, executable) for runtime execution.

@adrena-orex
adrena-orex / Cargo.toml
Last active January 14, 2025 18:26
Track instruction computing unit consumption and size in Rust integration tests
# Only package specifics to tracking
[dev-dependencies]
colored = "=2.2.0" # Bring some colors to the terminal
ctor = "=0.2.9" # Used to execute a function when tests finishes
once_cell = "=1.20.2"
lazy_static = "=1.5.0"
@ripatel-fd
ripatel-fd / snapshots.md
Last active October 2, 2025 00:30
Informal Guide to Solana Snapshots

Consider this an informal guide to reading the Solana snapshot format. This guide is written for Solana Labs versions v1.14 through v1.17.

You are probably reading this because you want to read the accounts in a snapshot without going through the pain of interfacing with the Solana Labs codebase.

Terminology

We assume general familiarity with the Solana ledger.