Getting Started with Peanut Butter AND JAM
This guide is based on the Peanut Butter AND JAM (PBNJ) implementation of the JAM protocol. Read the Gray Paper for the authoritative specification.
The current release supports GP 0.7.2.
Usage
Docker
# Pull the image (Docker Hub)
docker pull shimonchick/pbnjam-fuzzer-target:latest
# Run a test
docker run --rm \
-v /tmp:/tmp \
pbnjam-fuzzer-target:latest \
--socket /tmp/jam_target.sock
Binary (Linux only)
TAG=$(curl -sL "https://api.github.com/repos/Esscrypt/pbnj-fuzzer-releases/releases?per_page=1" | grep '"tag_name"' | head -1 | sed 's/.*"tag_name": "\([^"]*\)".*/\1/')
echo "Latest tag: $TAG"
curl -sL -o fuzzer-target-bin.tar.gz \
"https://github.com/Esscrypt/pbnj-fuzzer-releases/releases/download/${TAG}/fuzzer-target-bin.tar.gz"
tar xzvf fuzzer-target-bin.tar.gz
./fuzzer-target --socket /tmp/jam_target.sock --spec tiny
Running directly
git clone https://github.com/Esscrypt/peanutbutterandjam
cd peanutbutterandjam
bun i && bun run build
bun run infra/node/fuzzer-target.ts --socket /tmp/jam_target.sock --spec tiny
Key Resources
The PBNJ repo includes test vectors for Safrole, PVM, erasure coding, and codec, plus the build and run-from-source instructions above. Pre-built fuzzer target binaries are also available.
- Releases (binaries): https://github.com/Esscrypt/pbnj-fuzzer-releases/releases
Bandersnatch VRF README
The Bandersnatch VRF package provides Verifiable Random Functions (VRFs) over the Bandersnatch curve: IETF VRF (RFC-9381-style), Pedersen VRF, and Ring VRF (including a WASM-backed variant), plus hash-to-curve and CLI tooling.
Bandersnatch VRF documentation
- Repository & docs: https://github.com/Esscrypt/bandersnatch-vrf
- npm: @pbnjam/bandersnatch-vrf
Getting Help
- Gray Paper: https://graypaper.com/
- Community Docs: https://docs.jamcha.in/
Remember
- The Gray Paper is authoritative — When in doubt, consult the Gray Paper.
- Test vectors are correct — Fix implementation, not tests.
- Documentation is required — Always reference Gray Paper sections.
- Performance matters — But not at the expense of correctness.
