cargo run --example sigverify
Approximately 2x faster than solana's ed25519-dalek on an AMD Ryzen 9950X, see benches
Running benches/bench_sigverify.rs (target/release/deps/bench_sigverify-e01361226af04f4a)
solana_sigverify time: [28.992 µs 29.024 µs 29.057 µs]
Found 6 outliers among 100 measurements (6.00%)
2 (2.00%) high mild
4 (4.00%) high severe
fd_sigverify time: [13.646 µs 13.662 µs 13.681 µs]
Found 2 outliers among 100 measurements (2.00%)
1 (1.00%) high mild
1 (1.00%) high severe
The ballet
C library source code is expected to be placed within the vendor/
directory at the root of this Rust project:
Files taken from: https://github.com/firedancer-io/firedancer/tree/v0.703.20300
Directories:
ballet
: Copieded25519
,fiat-crypto
,hex
, andsha512
verbatim from FD. Only modifiedfd_ballet.h
to remove unnecessary importsutil
: Copied verbatim from FD,fd_log
modified to avoid extra imports
cp -r ~/dev/firedancer/src/ballet/{ed25519,fiat-crypto,hex,sha512,fd_ballet.h,fd_ballet_base.h} vendor/ballet
cp -r ~/dev/firedancer/src/util vendor
Once built, you can use the cryptographic functions from your Rust code. The src/lib.rs
file provides an example of safe Rust wrappers around the unsafe FFI calls.
Here's a conceptual example of how you might use the fd_ed25519_verify
function: