Skip to content

transaction-fuzzer: add address-balance and gasless fuzz tests#26176

Draft
alex-mysten wants to merge 1 commit intomainfrom
steka-fuzz
Draft

transaction-fuzzer: add address-balance and gasless fuzz tests#26176
alex-mysten wants to merge 1 commit intomainfrom
steka-fuzz

Conversation

@alex-mysten
Copy link
Copy Markdown
Contributor

Summary

  • Adds two new sim-test fuzzers under 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.
  • New addr_balance_fuzzer module factored into common.rs, coin_reservation.rs, addr_balance.rs, gasless.rs. Both flows share TxFuzzContext, expiration, and coin-reservation strategies.
  • Adds proptest_derive::Arbitrary (gated on feature = "fuzzing") for the types reachable from any::<ObjectArg>()/any::<ChainIdentifier>()/any::<Argument>() so the garbage strategies can drive those decoders directly.
  • Each fuzz iteration submits a real transaction against a TestEnvBuilder cluster, dual-signs sponsored variants when sender != 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, and enable_address_balance_gas_payments, so no proto-config overrides are needed.

Test plan

  • cargo simtest --no-capture -p transaction-fuzzer fuzz_addr_balance
  • cargo simtest --no-capture -p transaction-fuzzer fuzz_gasless
  • cargo xclippy -D warnings
  • cargo fmt --all

@vercel
Copy link
Copy Markdown

vercel bot commented Apr 9, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
sui-docs Ready Ready Preview, Comment Apr 10, 2026 0:48am
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
multisig-toolkit Ignored Ignored Preview Apr 10, 2026 0:48am
sui-kiosk Ignored Ignored Preview Apr 10, 2026 0:48am

Request Review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant