aboutsummaryrefslogtreecommitdiff
path: root/src/test/fuzz/script.cpp
AgeCommit message (Collapse)Author
2022-08-11script/sign: remove needless IsSolvable() utilityAntoine Poinsot
It was used back when we didn't have a concept of descriptor. Now we can check for solvability using descriptors.
2022-08-02Pass datacarrier setting into IsStandardMacroFake
2022-02-15fuzz: Split script formatting from script fuzz targetMarcoFalke
2022-01-27fuzz: Speed up script fuzz targetMarcoFalke
2021-11-19scripted-diff: Use clang-tidy syntax for C++ named argumentsMarcoFalke
-BEGIN VERIFY SCRIPT- perl -0777 -pi -e 's:((\(|\{|,)(\n| )*)\/\* ?([^=* ]+) ?\*\/ ?:\1/*\4=*/:g' $( git ls-files ./src/test ./src/wallet/test ) -END VERIFY SCRIPT-
2021-11-01fuzz: Rework ConsumeScriptMarcoFalke
This should make it easier for the fuzz engine to explore multisig code paths. See discussion in https://github.com/bitcoin/bitcoin/issues/23105 The downside is that all fuzz inputs that use ConsumeScript are now invalidated and need to be re-generated. Another downside may be that most multisig scripts from ConsumeScript are using likely not fully valid pubkeys.
2021-09-24refactor: share logic between ScriptPubKeyToUniv and ScriptToUnivMichael Dietz
2021-09-24rpc: remove deprecated addresses and reqSigs from rpc outputsMichael Dietz
2021-07-04fuzz: Move CTxDestination fuzzing to script fuzz targetMarcoFalke
No need to split it over several targets
2021-07-04fuzz: Simplify CTxDestination fuzzing in the script targetMarcoFalke
The WitnessUnknown operators == and < are already called indirectly by the corresponding CTxDestination operators.
2021-04-28Merge bitcoin/bitcoin#18847: compressor: use a prevector in CompressScript ↵MarcoFalke
serialization [ZAP1] 83a425d25af033086744c1c8c892015014ed46bd compressor: use a prevector in compressed script serialization (William Casarin) Pull request description: This function was doing millions of unnecessary heap allocations during IBD. I'm start to catalog unnecessary heap allocations as a pet project of mine: as-zero-as-possible-alloc IBD. This is one small step. before: ![May01-174536](https://user-images.githubusercontent.com/45598/80850964-9a38de80-8bd3-11ea-8eec-08cd38ee1fa1.png) after: ![May01-174610](https://user-images.githubusercontent.com/45598/80850974-a91f9100-8bd3-11ea-94a1-e2077391f6f4.png) ~should I type alias this?~ *I type aliased it* This is a part of the Zero Allocations Project #18849 (ZAP1). This code came up as a place where many allocations occur. ACKs for top commit: Empact: ACK https://github.com/bitcoin/bitcoin/pull/18847/commits/83a425d25af033086744c1c8c892015014ed46bd elichai: tACK 83a425d25af033086744c1c8c892015014ed46bd sipa: utACK 83a425d25af033086744c1c8c892015014ed46bd Tree-SHA512: f0ffa6ab0ea1632715b0b76362753f9f6935f05cdcc80d85566774401155a3c57ad45a687942a1806d3503858f0bb698da9243746c8e2edb8fdf13611235b0e0
2021-04-28Merge bitcoin/bitcoin#20772: fuzz: bolster ExtractDestination(s) checksMarcoFalke
a29f522ba4aa71582b54025c5682b4c1687ae9f3 fuzz: bolster ExtractDestination(s) checks (Michael Dietz) Pull request description: ACKs for top commit: practicalswift: Tested ACK a29f522ba4aa71582b54025c5682b4c1687ae9f3 Tree-SHA512: 0fc194edb7b0fce77c7bb725fe65dec7976598edcd53882b5a0eb7cd83281a3ddcd2b3de00282468be659a7e5bc9991eb482816418f55b30e657cdc5a3bd7438
2021-03-23rpc: deprecate `addresses` and `reqSigs` from rpc outputsMichael Dietz
1) add a new sane "address" field (for outputs that have an identifiable address, which doesn't include bare multisig) 2) with -deprecatedrpc: leave "reqSigs" and "addresses" intact (with all weird/wrong behavior they have now) 3) without -deprecatedrpc: drop "reqSigs" and "addresses" entirely, always.
2021-03-11scripted-diff: remove MakeUnique<T>()fanquake
-BEGIN VERIFY SCRIPT- git rm src/util/memory.h sed -i -e 's/MakeUnique/std::make_unique/g' $(git grep -l MakeUnique src) sed -i -e '/#include <util\/memory.h>/d' $(git grep -l '#include <util/memory.h>' src) sed -i -e '/util\/memory.h \\/d' src/Makefile.am -END VERIFY SCRIPT-
2021-02-22scripted-diff: Rename MakeFuzzingContext to MakeNoLogFileContextMarcoFalke
-BEGIN VERIFY SCRIPT- # Rename sed -i -e 's/MakeFuzzingContext/MakeNoLogFileContext/g' $(git grep -l MakeFuzzingContext) # Bump the copyright of touched files in this scripted diff to avoid touching them again later ./contrib/devtools/copyright_header.py update ./src/test/fuzz/ -END VERIFY SCRIPT-
2021-01-25fuzz: Avoid -fsanitize=integer warnings in fuzzing harnessespracticalswift
2021-01-03fuzz: bolster ExtractDestination(s) checksMichael Dietz
2020-12-28fuzz: check that certain script TxoutType are nonstandardMichael Dietz
2020-12-24fuzz: Check that NULL_DATA is unspendableMarcoFalke
2020-12-10fuzz: Link all targets onceMarcoFalke
2020-08-14Replace usage of GetScriptForWitness with GetScriptForDestinationMeshCollider
2020-07-22fuzz: add missing overrides to signature_checkerJon Atack
and also - add missing parentheses in fuzz/scriptnum_ops.cpp - remove useless unsigned int conditional in fuzz/script.cpp These changes fix 5 compile warnings in gcc 10.
2020-06-21scripted-diff: TxoutType C++11 scoped enum classMarcoFalke
-BEGIN VERIFY SCRIPT- # General rename helper: $1 -> $2 rename_global() { sed -i "s/\<$1\>/$2/g" $(git grep -l "$1"); } # Helper to rename TxoutType $1 rename_value() { sed -i "s/ TX_$1,/ $1,/g" src/script/standard.h; # First strip the prefix in the definition (header) rename_global TX_$1 "TxoutType::$1"; # Then replace globally } # Change the type globally to bring it in line with the style-guide # (clsses are UpperCamelCase) rename_global 'enum txnouttype' 'enum class TxoutType' rename_global 'txnouttype' 'TxoutType' # Now rename each enum value rename_value 'NONSTANDARD' rename_value 'PUBKEY' rename_value 'PUBKEYHASH' rename_value 'SCRIPTHASH' rename_value 'MULTISIG' rename_value 'NULL_DATA' rename_value 'WITNESS_V0_KEYHASH' rename_value 'WITNESS_V0_SCRIPTHASH' rename_value 'WITNESS_UNKNOWN' -END VERIFY SCRIPT-
2020-05-30tests: Fill fuzzing coverage gaps for functions in script/script.h, ↵practicalswift
script/script_error.h and script/standard.h
2020-05-15compressor: use a prevector in compressed script serializationWilliam Casarin
Use a prevector for stack allocation instead of heap allocation during script compression and decompression. These functions were doing millions of unnecessary heap allocations during IBD. We introduce a CompressedScript type alias for this prevector. It is size 33 as that is the maximum size of a compressed script. Fix the DecompressScript header to match the variable name from compressor.cpp Signed-off-by: William Casarin <jb55@jb55.com>
2020-05-14Switch from Optional<T> to std::optional<T> (C++17). Run clang-format.practicalswift
2020-04-16scripted-diff: Bump copyright headersMarcoFalke
-BEGIN VERIFY SCRIPT- ./contrib/devtools/copyright_header.py update ./ -END VERIFY SCRIPT-
2020-04-04fuzz: Extend script fuzz testMarcoFalke
2020-03-11tests: Simplify code by removing unwarranted use of unique_ptr:spracticalswift
2020-03-11tests: Increase fuzzing coverage of DecompressScript(...)practicalswift
2020-03-11tests: Remove unit test from fuzzing harnesspracticalswift
2020-03-07fuzz: Add assert(script == decompressed_script)MarcoFalke
2020-03-07tests: Fuzz additional functions in the script fuzzing harnesspracticalswift
2019-10-25tests: Add fuzzing harness for various CScript related functionspracticalswift