| Crates.io | agave-xdp-ebpf |
| lib.rs | agave-xdp-ebpf |
| version | 3.1.7 |
| created_at | 2025-10-26 04:12:23.088807+00 |
| updated_at | 2026-01-19 11:04:40.601332+00 |
| description | Blockchain, Rebuilt for Scale |
| homepage | https://anza.xyz/ |
| repository | https://github.com/anza-xyz/agave |
| max_upload_size | |
| id | 1900930 |
| size | 15,145 |
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.
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.
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.
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