test: add fuzzing harness and fee-payer property tests - #618
Merged
Conversation
Cover Kora's untrusted transaction-input paths with coverage-guided fuzzing and property-based tests. - fuzz/: standalone cargo-fuzz workspace with parse_transaction and decode_b64_transaction libFuzzer targets over the decode/parse path - proptest fee-payer drain invariant across the System-program policy matrix in the kora-lib validator tests - raise kora-lib recursion_limit to 256 so the sanitizer build compiles - justfile fuzz / fuzz-build / fuzz-list recipes
Contributor
Greptile SummaryThe PR adds native transaction fuzzing and strengthens fee-payer policy property testing.
Confidence Score: 4/5The PR appears safe to merge, although the previously reported lookup-table fuzz coverage gap remains. The CreateAccount property-test omission has been fixed, while the parser fuzz target still uses a static-key-only constructor that returns before parsing lookup-table-backed instructions; this limits test coverage but does not alter production behavior. Files Needing Attention: fuzz/fuzz_targets/parse_transaction.rs Important Files Changed
Reviews (3): Last reviewed commit: "test: cover fee-payer-as-new-account in ..." | Re-trigger Greptile |
Add a module doc for the fee-payer policy property test and align the proptest requirement with the already-resolved latest stable (1.11.0).
validate_fee_payer_usage gates CreateAccount on both the payer and the new-account slot. The property test only placed the fee payer in the payer slot, so a regression in new-account gating went undetected. Split the role so both independently-gated positions are exercised.
amilz
approved these changes
Jul 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
cargo-fuzzworkspace (fuzz/) with two libFuzzer targets over Kora's untrusted transaction-input paths:parse_transaction(bytes →VersionedTransaction→ theget_or_parse_*instruction parsers) anddecode_b64_transaction(the RPC base64 decode entry point).proptestfee-payer drain invariant across the System-program policy matrix: the fee payer is gated in a role exactly when its policy flag is off, and non-fee-payer actors are never gated. Targets the pure, RPC-freevalidate_fee_payer_usage.kora-librecursion_limitto 256 so the cargo-fuzz sanitizer build compiles (an async-block layout query overflows the default 128; harmless for normal builds).just fuzz/fuzz-build/fuzz-listrecipes and afuzz/README.md.Why not Crucible
Crucible fuzzes on-chain sBPF via LiteSVM edge tracing. Kora's validator, fee-payer policy, and instruction parsers are native off-chain Rust, so Crucible yields no coverage signal there.
cargo-fuzz(byte-level) +proptest(structural invariants) fit the native surface.Test Plan
cargo test -p kora-lib --lib fee_payer_policy_props— 512 cases pass.cargo install cargo-fuzz && just fuzz-build— both targets build under the sanitizer.just fuzz parse_transaction/just fuzz decode_b64_transaction— smoke-ran ~158k / ~122k executions at ~7.8k exec/s, no crashes.Notes
fuzz/is its own workspace so sanitizerRUSTFLAGSdon't leak into the main build;target/,corpus/,artifacts/are gitignored.max_allowed_lamportsnever exceeded) using the RPC mock harness.