Peanut Butter AND JAM

Getting Started with Peanut Butter AND JAM

This guide is based on the Peanut Butter AND JAM (PBJ) implementation of the JAM protocol. Read the Gray Paper for the authoritative specification.

Note: The PBJ source repository is currently private for the duration of the JAM contest. You do not need repo access to get started: use the Docker image or pre-built binaries from the links below. Source and build-from-source instructions will be available when the repo is public.


Running the Docker container

Use the PBJ fuzzer-target Docker image to run the node in a container without building from source.

Prerequisites

Pull and run

# Pull the image
docker pull shimonchick/pbnjam-fuzzer-target:latest

# Run with a test socket (mount /tmp so the socket can be shared)
docker run --rm -v /tmp:/tmp shimonchick/pbnjam-fuzzer-target:latest --socket /tmp/jam_test.sock --spec tiny

You should see the target listening on the socket. Press Ctrl+C to stop.

Custom socket path

SOCKET_PATH="/tmp/my_socket.sock"

docker run --rm \
  -v /tmp:/tmp \
  shimonchick/pbnjam-fuzzer-target:latest \
  bun run infra/node/fuzzer-target.ts --socket "$SOCKET_PATH" --spec tiny

Parameters

Troubleshooting


Download and run the binary

Pre-built fuzzer target binaries are published on GitHub Releases. Linux (x64) only for now.

Releases: https://github.com/Esscrypt/pbnj-fuzzer-releases/releases

Prerequisites

Run the fuzzer target

  1. Download fuzzer-target.gz from the latest release.
  2. Decompress, make executable, and run:
gunzip -c fuzzer-target.gz > fuzzer-target && chmod +x fuzzer-target && ./fuzzer-target --socket /tmp/jam_target.sock --spec tiny

Use your own socket path and --spec tiny or --spec full as needed. The target will listen on the socket until you stop it (Ctrl+C).


Key Resources

When the PBJ repo is public, it will include test vectors for Safrole, PVM, erasure coding, and codec, plus build and run-from-source instructions. Until then, use Docker or the binaries above.


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


Getting Help


Remember