Simplex 0.2.0 has been released. You can get it on GitHub or via simplexup.
This is a pretty big release with a lot of new functionality. From the changelog:
[0.2.0]
- Added
simplex fmtto format SimplicityHL sources withsimfmt, whichsimplexupnow installs. - Rewrote fuzz testing to a much more versatile and smart suite.
- Made every command find
Simplex.tomlin the current directory or any of its ancestors.
fuzz
- Replaced the single-program fuzz engine with
Scenario, a transaction template where each programspendsinputs andlocksoutputs. - Added
bind_argumentsandbind_witnessto derive values from the case, andrequires_witnessfor values the fuzzer also violates to check that the contract rejects them. - Added
specto state when a case must be accepted, rejected or either, read fromFuzzCase. - Added transaction
Mutationsof amounts, assets, timelocks and layout, applied to the template’s targeted inputs and outputs. - Added lock and authorization smart checks that redirect locked outputs and replay signatures from a wrong key.
- Added
spending_pathandstorage_capacityto the program builder, andrandom_strategyandcustom_strategyto replace the guided default. - Added a run summary of verdicts, rejections, spec predictions, violations, mutations and smart checks.
- Removed
FuzzableProgram,FuzzTransaction,ArgsStrategyBuilder,ProgramCheckandFuzzError.
sdk
- Replaced
RequiredSignaturearguments withOption<NativeSignature>for native inputs andOption<ProgramSignature>for program inputs, built asProgramSignature::new(name).at_path(path).tagged(tag). - Made
Signersign only inputs that request a native signature and refuse a key that doesn’t own a P2WPKH input. - Made
Signerderive its keys and addresses once, and reuse one sighash cache per transaction. - Reduced how often coin selection signs the transaction.
- Fixed coin selection: skip UTXOs listed twice, skip confidential UTXOs for an explicit change target, and keep blinded change that would reveal a blinded amount.
- Fixed fees: report the whole leftover as the fee when change is dropped, and fold explicit change below the 22 sat dust threshold into the fee.
- Made a set locktime enforced by default, by giving inputs without a sequence
ENABLE_LOCKTIME_NO_RBF. - Made per-input
sequenceandlocktimeoptional, so an explicitSequence::MAXorLockTime::ZEROis kept. - Made
get_utxosskip outputs the wallet can’t unblind, instead of failing. - Replaced panics with errors for unknown input amounts, amount overflows, invalid fee rates, duplicate inputs, empty issuances, unblinded reissuance tokens, inputs without a witness UTXO and invalid derivation paths.
- Fixed token-only issuance by encoding a zero asset amount as null.
- Added
FinalTransaction::sequenceandlocktimegetters. - Added
Program::set_storage,get_argumentsandMAX_STORAGE_SLOTS, and capped storage at 128 slots. - Made
SimplexProvider::broadcast_transactionwait until Esplora indexes the transaction. - Cached the program’s CMR, witness types and taproot spend info.
build
- Refused a dependency
src_dirthat resolves outside its package. - Refused an
out_dirthat holds the project or itssrc_dir, in bothbuildandclean. - Refused source directories that aren’t Rust identifiers, before writing any artifact.
- Warned about
.simffiles that don’t parse, instead of skipping them silently.
install
- Resolved tags and branches by their full ref.
- Made git dependency directory names unambiguous.
- Made installs atomic, and reported an incomplete dependency instead of treating it as installed.
init
- Made
simplex initoptimize dependencies in dev builds, which speeds up tests.
wasm
- Rejected issuances of zero, reissuance tokens with a zero blinding factor, derivation paths other than
m/n, and more than 128 extra leaves.
simplexup
- Verified binaries before installing them and refused versions whose install didn’t complete.
- Verified the attestation’s signer with
ghwhen the GitHub CLI is installed and logged in. - Installed
--commitbuilds as their own version. - Made
--useswitch every binary to the chosen version.