This takes the ConditionStack from d0e8f4d5d8ddaccb37f98b7989fb944081e41ab8 and e6e622e5a0e22c2ac1b50b96af818e412d67ac54 and checks that they behave equally with a fuzz test.
fuzz: Add fuzzer for ConditionStack #18127
pull MarcoFalke wants to merge 4 commits into bitcoin:master from MarcoFalke:2002-fuzzConditionStack changing 4 files +208 −3-
MarcoFalke commented at 3:05 PM on February 12, 2020: member
-
Benchmark script verification with 100 nested IFs 89fb241c54
-
d0e8f4d5d8
[refactor] interpreter: define interface for vfExec
Includes comments added by Pieter Wuille.
-
e6e622e5a0
Implement O(1) OP_IF/NOTIF/ELSE/ENDIF logic
This optimization was first suggested by Sergio Demian Lerner in https://bitslog.wordpress.com/2017/04/17/new-quadratic-delays-in-bitcoin-scripts/. The implementation follows the suggested approach there, but with a slightly simpler representation.
-
fuzz: Add fuzzer for ConditionStack faabdea539
-
practicalswift commented at 3:15 PM on February 12, 2020: contributor
Concept ACK: thanks for adding fuzzing harnesses. Nice to see the new PR title prefix
fuzz::) - DrahtBot added the label Build system on Feb 12, 2020
- DrahtBot added the label Consensus on Feb 12, 2020
- DrahtBot added the label Tests on Feb 12, 2020
-
Empact commented at 4:48 PM on February 12, 2020: member
Concept ACK - I take it you don't mean for this to be merged but rather to prove the point?
-
jonatack commented at 5:35 PM on February 12, 2020: member
Concept ACK, tested
(pr/18127)$ src/test/fuzz/script_condition_stack INFO: Seed: 3449044402 INFO: Loaded 1 modules (510932 inline 8-bit counters): 510932 [0x5642d9dc1678, 0x5642d9e3e24c), INFO: Loaded 1 PC tables (510932 PCs): 510932 [0x5642d9e3e250,0x5642da609f90), INFO: -max_len is not provided; libFuzzer will not generate inputs larger than 4096 bytes INFO: A corpus is not provided, starting from an empty corpus [#2](/bitcoin-bitcoin/2/) INITED cov: 177 ft: 178 corp: 1/1b exec/s: 0 rss: 117Mb [#3](/bitcoin-bitcoin/3/) NEW cov: 179 ft: 242 corp: 2/59b exec/s: 0 rss: 117Mb L: 58/58 MS: 1 InsertRepeatedBytes- [#4](/bitcoin-bitcoin/4/) NEW cov: 179 ft: 290 corp: 3/90b exec/s: 0 rss: 117Mb L: 31/58 MS: 1 EraseBytes- [#5](/bitcoin-bitcoin/5/) NEW cov: 179 ft: 291 corp: 4/121b exec/s: 0 rss: 117Mb L: 31/58 MS: 1 ChangeByte- [#6](/bitcoin-bitcoin/6/) REDUCE cov: 179 ft: 291 corp: 4/111b exec/s: 0 rss: 117Mb L: 21/58 MS: 1 EraseBytes- [#7](/bitcoin-bitcoin/7/) REDUCE cov: 179 ft: 291 corp: 4/99b exec/s: 0 rss: 117Mb L: 19/58 MS: 1 EraseBytes- NEW_FUNC[0/10]: 0x5642d6f4b1d0 in std::_Bvector_base<std::allocator<bool> >::_Bvector_impl::_M_end_addr() const /usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_bvector.h:487 NEW_FUNC[1/10]: 0x5642d6f4b880 in std::vector<bool, std::allocator<bool> >::_M_insert_aux(std::_Bit_iterator, bool) /usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/vector.tcc:843 .../... [#24489](/bitcoin-bitcoin/24489/) REDUCE cov: 438 ft: 2252 corp: 118/178Kb exec/s: 9 rss: 264Mb L: 2263/4096 MS: 2 InsertRepeatedBytes-EraseBytes- - MarcoFalke closed this on Feb 12, 2020
- MarcoFalke deleted the branch on Feb 12, 2020
-
practicalswift commented at 9:57 PM on February 12, 2020: contributor
@MarcoFalke Why the close?
- DrahtBot locked this on Feb 15, 2022
Contributors