transaction-fuzzer: add address-balance and gasless fuzz tests#26176
Draft
alex-mysten wants to merge 1 commit intomainfrom
Draft
transaction-fuzzer: add address-balance and gasless fuzz tests#26176alex-mysten wants to merge 1 commit intomainfrom
alex-mysten wants to merge 1 commit intomainfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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
crates/transaction-fuzzer/tests/transaction_data_fuzz.rs:fuzz_addr_balance— exercises the implicit-gas address-balance flow with composed valid PTs (transfer, clock, randomness, balance/coin send, FundsWithdrawal, coin reservations) and a garbage-PT arm that drives the validator rejection paths.fuzz_gasless— exercises gasless transactions (budget=0, no payment) with composed PTs of allow-listed framework calls (balance::redeem_funds,balance::split,coin::redeem_funds,coin::into_balance,coin::put,funds_accumulator::withdrawal_split) plus coin-reservation inputs.addr_balance_fuzzermodule factored intocommon.rs,coin_reservation.rs,addr_balance.rs,gasless.rs. Both flows shareTxFuzzContext, expiration, and coin-reservation strategies.proptest_derive::Arbitrary(gated onfeature = "fuzzing") for the types reachable fromany::<ObjectArg>()/any::<ChainIdentifier>()/any::<Argument>()so the garbage strategies can drive those decoders directly.TestEnvBuildercluster, dual-signs sponsored variants whensender != gas_owner, classifies the result, and asserts a minimum result-distribution depth so a strategy regression that collapses into a single category fails the test.Both tests rely on the default protocol version (119+ on non-mainnet) which already enables
enable_gasless,enable_coin_reservation_obj_refs, andenable_address_balance_gas_payments, so no proto-config overrides are needed.Test plan
cargo simtest --no-capture -p transaction-fuzzer fuzz_addr_balancecargo simtest --no-capture -p transaction-fuzzer fuzz_gaslesscargo xclippy -D warningscargo fmt --all