aboutsummaryrefslogtreecommitdiff
path: root/src/Makefile.test_util.include
AgeCommit message (Collapse)Author
2023-02-17Merge bitcoin/bitcoin#26940: test: create random and coins utils, add amount ↵Andrew Chow
helper, dedupe add_coin 4275195606e6f42466d9a8ef766b3035833df4d5 De-duplicate add_coin methods to a test util helper (Jon Atack) 9d92c3d7f42c18939a9a6aa1ee185f1c958360a0 Create InsecureRandMoneyAmount() test util helper (Jon Atack) 81f5ade2a324167c03c5ce765a26bd42ed652723 Move random test util code from setup_common to random (Jon Atack) Pull request description: - Move random test utilities from `setup_common` to a new `random` file, as many tests don't use this code. - Create a helper to generate semi-random CAmounts up to `MONEY_RANGE` rather than only uint32, and use the helper in the unit tests. - De-duplicate a shared `add_coin` method by extracting it to a `coins` test utility. ACKs for top commit: pinheadmz: ACK 4275195606e6f42466d9a8ef766b3035833df4d5 achow101: ACK 4275195606e6f42466d9a8ef766b3035833df4d5 john-moffett: ACK 4275195606e6f42466d9a8ef766b3035833df4d5 Tree-SHA512: 3ed974251149c7417f935ef2f8865aa0dcc33b281b47522b0f96f1979dff94bb8527957f098fe4d210f40d715c00f29512f2ffe189097102229023b7284a3a27
2023-02-15Merge bitcoin/bitcoin#26153: Reduce wasted pseudorandom bytes in ChaCha20 + ↵fanquake
various improvements 511aa4f1c7508f15cab8d7e58007900ad6fd3d5d Add unit test for ChaCha20's new caching (Pieter Wuille) fb243d25f754da8f01793b41e2d225b917f3e5d7 Improve test vectors for ChaCha20 (Pieter Wuille) 93aee8bbdad808b7009279b67470d496cc26b936 Inline ChaCha20 32-byte specific constants (Pieter Wuille) 62ec713961ade7b58e90c905395558a41e8a59f0 Only support 32-byte keys in ChaCha20{,Aligned} (Pieter Wuille) f21994a02e1cc46d41995581b54222abc655be93 Use ChaCha20Aligned in MuHash3072 code (Pieter Wuille) 5d16f757639e2cc6e81db6e07bc1d5dd74abca6c Use ChaCha20 caching in FastRandomContext (Pieter Wuille) 38eaece67b1bc37b2f502348c5d7537480a34346 Add fuzz test for testing that ChaCha20 works as a stream (Pieter Wuille) 5f05b27841af0bed1b6e7de5f46ffe33e5919e4d Add xoroshiro128++ PRNG (Martin Leitner-Ankerl) 12ff72476ac0dbf8add736ad3fb5fad2eeab156c Make unrestricted ChaCha20 cipher not waste keystream bytes (Pieter Wuille) 6babf402130a8f3ef3058594750aeaa50b8f5044 Rename ChaCha20::Seek -> Seek64 to clarify multiple of 64 (Pieter Wuille) e37bcaa0a6dbb334ab6e817efcb609ccee6edc39 Split ChaCha20 into aligned/unaligned variants (Pieter Wuille) Pull request description: This is an alternative to #25354 (by my benchmarking, somewhat faster), subsumes #25712, and adds additional test vectors. It separates the multiple-of-64-bytes-only "core" logic (which becomes simpler) from a layer around which performs caching/slicing to support arbitrary byte amounts. Both have their uses (in particular, the MuHash3072 code can benefit from multiple-of-64-bytes assumptions), plus the separation results in more readable code. Also, since FastRandomContext effectively had its own (more naive) caching on top of ChaCha20, that can be dropped in favor of ChaCha20's new built-in caching. I thought about rebasing #25712 on top of this, but the changes before are fairly extensive, so redid it instead. ACKs for top commit: ajtowns: ut reACK 511aa4f1c7508f15cab8d7e58007900ad6fd3d5d dhruv: tACK crACK 511aa4f1c7 Tree-SHA512: 3aa80971322a93e780c75a8d35bd39da3a9ea570fbae4491eaf0c45242f5f670a24a592c50ad870d5fd09b9f88ec06e274e8aa3cefd9561d623c63f7198cf2c7
2023-02-09De-duplicate add_coin methods to a test util helperJon Atack
2023-02-06Move random test util code from setup_common to randomJon Atack
as many of the unit tests don't use this code
2023-01-30Add xoroshiro128++ PRNGMartin Leitner-Ankerl
Xoroshiro128++ is a fast non-cryptographic random generator. Reference implementation is available at https://prng.di.unimi.it/ Co-Authored-By: Pieter Wuille <pieter@wuille.net>
2023-01-27test, build: Separate `read_json` function into its own moduleHennadii Stepanov
2022-11-21refactor: unify test/util/wallet.h with wallet/test/util.hfurszy
files share the same purpose, and we shouldn't have wallet code inside the test directory. This later is needed to use wallet util functions in the bench and test binaries without be forced to duplicate them.
2022-10-18test: Remove unused txmempool include from testsMacroFake
2022-09-15build: remove unused libevent cppflagsfanquake
2022-09-15build: remove unused natpmp / upnp cppflagsfanquake
Their inclusion is likely just the result of copy-paste. The only place upnp/natpmpflags should be used is `libbitcoin_node` (mapport.cpp).
2022-09-13build: extract $(BOOST_CPPFLAGS) from $(BITCOIN_INCLUDES)fanquake
This leaves $(BITCOIN_INCLUDES) as internal dependencies, and gives finer control over Boost includes.
2022-04-11build: Don't add unrelated libs to LIBTEST_*Carl Dong
This was used to, in effect, manually emulate --start-group/--end-group. However, we can just order the libraries correctly and avoid specifying libraries multiple times on the link line. Note: lld (not ld.bfd) knows how to resolve out-of-order references and doesn't seem to need the reodering
2021-12-20scripted-diff: Rename libbitcoin_server.a to libbitcoin_node.aRussell Yanofsky
Goal along with namespacing PR #23497 is to have src/node/ code in node:: namespace in libbitcoin_node.a library -BEGIN VERIFY SCRIPT- bash -c ' # Bash shell needed for brace expansion {a,b} git mv build_msvc/libbitcoin_{server,node} git mv build_msvc/libbitcoin_node/libbitcoin_{server,node}.vcxproj.in ren() { git grep -l "$1" src build_msvc | xargs sed -i "s/$1/$2/g"; } ren LIBBITCOIN_{SERVER,NODE} ren libbitcoin_{server,node} ' -END VERIFY SCRIPT-
2021-09-15move-only: unittest: add test/util/chainstate.hJames O'Beirne
and move `CreateAndActivateUTXOSnapshot()` into it for reuse in future test modules.
2021-03-30fuzz: [refactor] Use IsValidFlagCombination in signature_checker fuzz targetMarcoFalke
Can be reviewed with --color-moved=dimmed-zebra
2021-03-04build: compile libnatpmp with -DNATPMP_STATICLIB on Windowsfanquake
This fixes linking issues and mirrors what we do with miniupnpc.
2021-02-17test: Move P2WSH_OP_TRUE to shared test libraryMarcoFalke
2020-11-07test: Mock IBD in net_processing fuzzersMarcoFalke
2020-04-05fuzz: Add process_messages harnessMarcoFalke
2019-11-25[test] move wallet helper functions into test libraryMartin Zumsande
2019-11-25[test] move mining helper functions into test libraryMartin Zumsande
2019-11-21build: Create test utility library from src/test/util/Harris