#blockchain #agave #ebpf #xdp

bin+lib agave-xdp-ebpf

Blockchain, Rebuilt for Scale

13 stable releases

3.1.8 Jan 26, 2026
3.1.7 Jan 19, 2026
3.1.5 Dec 21, 2025
3.1.3 Nov 29, 2025
0.0.0 Oct 26, 2025

#23 in #xdp

Download history 6/week @ 2025-10-28 93/week @ 2025-11-04 224/week @ 2025-11-11 90/week @ 2025-11-18 166/week @ 2025-11-25 200/week @ 2025-12-02 37/week @ 2025-12-09 42/week @ 2025-12-16 36/week @ 2025-12-23 33/week @ 2025-12-30 87/week @ 2026-01-06 94/week @ 2026-01-13 3294/week @ 2026-01-20 5026/week @ 2026-01-27 6920/week @ 2026-02-03 6585/week @ 2026-02-10

21,870 downloads per month
Used in 11 crates (via agave-xdp)

Apache-2.0

7KB
68 lines

Contains (ELF exe/lib, 2KB) agave-xdp-prog

Overview

agave-xdp-ebpf is the eBPF XDP program loaded by Agave.

It's a lib AND bin package, where the bin package is used to build the eBPF bytecode, and the lib package is used to bundle the eBPF bytecode in a host crate and loaded as a regular dependency.

Usage

To use the program you can depend on the agave-xdp-ebpf crate and load the bytecode available at agave_xdp_ebpf::AGAVE_XDP_EBPF_PROGRAM using aya::Ebpf::load.

Building the eBPF XDP program

The eBPF program is prebuilt and saved in ./agave-xdp-prog. This is done so that the crate can be built from crates.io. To rebuild the program from the monorepo root run:

scripts/build-agave-xdp-ebpf.sh

The ebpf program must be rebuilt anytime the source changes (duh), or the rust nightly version used by the monorepo is bumped.

Verify the crates.io bytecode

To verify that the bytecode loaded by agave via crates.io matches the bytecode generated by the source included in this package, from the monorepo root run:

# This will rebuild and print whether the hashes have changed. If you haven't made any
# modications, the hashes must match.
scripts/build-agave-xdp.sh

# If the hashes match, build agave as usual and verify that the final code also matches
scripts/elf-hash-symbol.sh target/release/agave-validator AGAVE_XDP_EBPF_PROGRAM

Dependencies

~0–1.2MB
~25K SLoC