steviez afb60f70a5 chore: Fix typos (#8681) hai 3 días
..
src 73af3c20aa chore: deny already satisfied edition 2024 warnings for workspace (#8989) hai 1 semana
Cargo.toml 43da563748 agave-xdp-ebpf: fix package includes (#8854) hai 2 semanas
README afb60f70a5 chore: Fix typos (#8681) hai 3 días
agave-xdp-prog c159770f1d Add agave-xdp-ebpf (#8690) hai 3 semanas

README

# 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
# modifications, 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