Commit graph

773 commits

Author SHA1 Message Date
ivanlele
059e4bc6cd
Merge 37bd70a225 into merged_master (Bitcoin PR bitcoin/bitcoin#30126) 2026-03-10 13:13:52 +00:00
Tom Trevethan
ff61a00025 Merge 1db0be8353 into merged_master (Bitcoin PR bitcoin/bitcoin#28263) 2026-03-09 00:22:06 +00:00
ivanlele
8d69f4b94d
Merge 5c0cd205a1 into merged_master (Bitcoin PR bitcoin/bitcoin#29625) 2026-03-03 15:43:14 +00:00
ivanlele
cdfc5aad8d
Merge ddf2ebd465 into merged_master (Bitcoin PR bitcoin/bitcoin#30058) 2026-03-02 10:03:33 +00:00
ikripaka
006073614d
Merge 011a895a82 into merged_master (Bitcoin PR bitcoin/bitcoin#29015) 2026-02-27 22:51:31 +00:00
Tom Trevethan
905e3aa798 Merge d0cb5167d6 into merged_master (Bitcoin PR bitcoin/bitcoin#30230) 2026-02-26 22:23:17 +00:00
ikripaka
557d6e13b1
Merge 91e0beede2 into merged_master (Bitcoin PR bitcoin/bitcoin#30160) 2026-02-26 13:01:41 +00:00
Tom Trevethan
d4f098da11 Merge feab35189b into merged_master (Bitcoin PR bitcoin/bitcoin#30161) 2026-02-26 00:05:13 +00:00
ivanlele
535aa69dd9
Merge b3a61bd7b1 into merged_master (Bitcoin PR bitcoin/bitcoin#28074) 2026-02-24 17:05:24 +00:00
ivanlele
230d4aa4d1
Merge e40df5468d into merged_master (Bitcoin PR bitcoin/bitcoin#30216) 2026-02-24 14:09:25 +00:00
Tom Trevethan
848288ba1c Merge 5acdc2b97d into merged_master (Bitcoin PR bitcoin/bitcoin#26606) 2026-02-22 23:33:14 +00:00
ivanlele
b7a64d4e3c
Merge 0c3a3c9394 into merged_master (Bitcoin PR bitcoin/bitcoin#29623) 2026-02-19 12:37:27 +00:00
ivanlele
9bf3ef6967
Merge 16a6174613 into merged_master (Bitcoin PR bitcoin/bitcoin#29904) 2026-02-18 16:43:54 +00:00
ivanlele
c8b1dfc103
Merge 948ecf181e into merged_master (Bitcoin PR bitcoin/bitcoin#29648) 2026-02-17 13:09:58 +00:00
Tom Trevethan
8252d23042 Merge c2dbbc35b9 into merged_master (Bitcoin PR bitcoin/bitcoin#29242) 2026-02-16 23:03:52 +00:00
Byron Hambly
5471eb55e6
Merge 0b3202d8ef into merged_master (Bitcoin PR bitcoin/bitcoin#29377) 2025-11-30 17:32:56 +02:00
Byron Hambly
b5859dc083
Merge 0b768746ef into merged_master (Bitcoin PR bitcoin/bitcoin#28170) 2025-11-29 13:46:08 +02:00
Byron Hambly
552716245d
Merge 2f218c664b into merged_master (Bitcoin PR bitcoin/bitcoin#28921) 2025-11-18 15:12:49 +02:00
Byron Hambly
d67a708ec8
Merge 8c5e4f42d5 into merged_master (Bitcoin PR bitcoin/bitcoin#29208) 2025-11-18 10:22:00 +02:00
Byron Hambly
910f6d4759
Merge f4073c5395 into merged_master (Bitcoin PR bitcoin/bitcoin#28578) 2025-11-10 15:24:39 +02:00
Byron Hambly
86ea3ebeac
Merge 29c2c90362 into merged_master (Bitcoin PR bitcoin/bitcoin#28721) 2025-11-06 11:20:50 +02:00
Byron Hambly
dd02400bdf
Merge 9ad19fc7c7 into merged_master (Bitcoin PR bitcoin/bitcoin#28155) 2025-11-06 10:25:36 +02:00
Byron Hambly
a162e5cc53
Merge 023418a140 into merged_master (Bitcoin PR bitcoin/bitcoin#28530) 2025-11-05 19:22:50 +02:00
Byron Hambly
ace93336cb
Merge abfc8c901d into merged_master (Bitcoin PR bitcoin/bitcoin#28692) 2025-08-07 13:48:15 +02:00
Byron Hambly
fcba9d14e3
Merge 6619d6a8dc into merged_master (Bitcoin PR bitcoin/bitcoin#28450)
ELEMENTS FIXME: the new package_eval fuzz target is compiling but likely
will need to be fixed further for actual fuzzing
2025-08-04 14:46:29 +02:00
Byron Hambly
9a5c281863 Merge b2ec0326fd into merged_master (Bitcoin PR bitcoin/bitcoin#28008) 2025-07-03 21:09:28 +02:00
Byron Hambly
3af734391e Merge 8aa77a77e6 into merged_master (Bitcoin PR bitcoin/bitcoin#28168) 2025-07-03 12:29:20 +02:00
Byron Hambly
c384ea35c3 Merge 8f40271037 into merged_master (Bitcoin PR bitcoin/bitcoin#27902) 2025-06-27 14:40:42 +02:00
Byron Hambly
07d32d31e6 Merge 7a59865793 into merged_master (Bitcoin PR bitcoin/bitcoin#27647) 2025-06-27 14:40:26 +02:00
Byron Hambly
0d64b264ee Merge 0f8c95dccd into merged_master (Bitcoin PR bitcoin/bitcoin#27021) 2025-06-20 21:39:19 +02:00
Byron Hambly
d2ce32e63a Merge d819840f38 into merged_master (Bitcoin PR bitcoin/bitcoin#27041) 2025-06-20 15:48:59 +02:00
Byron Hambly
9c9439cef9 Merge 322ec63b01 into merged_master (Bitcoin PR bitcoin/bitcoin#17860) 2025-05-16 11:01:25 +02:00
Byron Hambly
0c1e24ab17 Merge 5aa0c82ccd into merged_master (Bitcoin PR bitcoin/bitcoin#25325) 2025-05-02 15:01:30 +02:00
Byron Hambly
abdf08133b Merge c17d4d3b6b into merged_master (Bitcoin PR bitcoin/bitcoin#26662) 2025-04-12 13:49:26 +02:00
Tom Trevethan
0ab95ded19 Merge fc037c8c83 into merged_master (Bitcoin PR bitcoin/bitcoin#27150) 2025-04-09 17:42:19 +00:00
Tom Trevethan
bff78b8a4e Merge 4ea3a8b71d into merged_master (Bitcoin PR bitcoin/bitcoin#25806) 2025-04-09 17:17:19 +00:00
Byron Hambly
bdb3612cea Merge 1e0198b6c1 into merged_master (Bitcoin PR bitcoin/bitcoin#26153) 2025-04-05 18:42:18 +02:00
Byron Hambly
14af5f2c3c Merge 8126551d54 into merged_master (Bitcoin PR bitcoin/bitcoin#27011) 2025-04-05 16:54:52 +02:00
Byron Hambly
c38021b28f Merge 837e9ed611 into merged_master (Bitcoin PR bitcoin/bitcoin#26898) 2025-04-04 10:27:59 +02:00
Byron Hambly
6be0c1b786 Merge 65d7c31b3f into merged_master (Bitcoin PR bitcoin/bitcoin#25789) 2025-04-01 06:55:02 +02:00
Byron Hambly
9d04fc68e4 Merge b9028b2e26 into merged_master (Bitcoin PR bitcoin/bitcoin#26481) 2025-03-31 16:57:17 +02:00
Byron Hambly
58b3c39377 Merge 5690848dfb into merged_master (Bitcoin PR bitcoin/bitcoin#26532) 2025-03-04 10:57:04 +02:00
Byron Hambly
f92dc0ec3c
Merge 547a963628 into merged_master (Bitcoin PR bitcoin/bitcoin#26489) 2025-02-27 15:22:57 +02:00
Byron Hambly
4a8546600d
Merge e41b225107 into merged_master (Elements PR #1384) 2025-02-13 08:48:21 +02:00
Andrew Poelstra
eea423e3d6
fuzz: add second simplicity fuzz test
The first fuzztest takes a Simplicity program and a transaction and
directly calls the Simplicity interpreter with some context cobbled
together from the transaction. It also tries messing with the budget
and computes AMRs to check that the AMR-check works, even though on
the blockchain AMRs are never used.

It also attempts mangling programs to directly fuzz the parser, type
inference and CMR checking.

THIS test, on the other hand, takes a transaction, looks for Simplicity
programs (or witnesses which look like Simplicity programs), computes
their CMRs to produce a correct corresponding scriptPubKey, creates
scriptchecks, and executes them. This should do an end-to-end coverage
of the whole Simplicity consensus logic, including all the new branches
in interpreter.cpp.

To produce seeds for this, I have a a local fuzz target which uses
rust-simplicity and rust-elements to produce programs, deep Taproot trees,
and transactions. I run this to get high coverage, then dump the
resulting complete transactions to disk, where they can be used as
seeds for this test.
2025-02-11 16:12:29 +00:00
Andrew Poelstra
a87e4cf70b
simplicity: rewrite fuzz target
This fuzz target takes its seeds in a simple and well-defined format: a
four-byte LE budget, then a transaction, Simplicity program and witness,
each prefixed by a four-byte LE length. The fuzz target extracts any
additional randomness it needs from the txid of the first input of the
transaction, since this data is not interpreted in any other way we
therefore won't confuse the fuzzer.

The reason for this design, rather than a more typical "just query the
fuzzer when you need stuff", is to make it possible to fairly easily
generate test vectors from sources other than this fuzz test. (For
example, I have an alternate target which uses Rust code to generate
well-formed Simplicity programs, which quickly gets high coverage at the
expense of being an unmaintainable mess.)

This commit includes a .c file with a small function to comute the AMR
of a program. This is needed to pass a correct AMR to the Simplicity
interpreter, to exercise all the AMR-checking paths. In practice this is
not really necessary; Elements passes NULL to disable these AMR checks.
2025-02-11 16:12:28 +00:00
Byron Hambly
52642b1afd
simplicity: add fuzz target 2025-02-11 16:12:28 +00:00
Byron Hambly
ca0a68b350
Merge UP TO 551c8e9526 into merged_master (UP TO bitcoin/bitcoin#26349)
Includes FIXMEs for a few functional tests
2025-02-05 09:50:17 +02:00
Byron Hambly
8499b13762
lint: fix lint issues 2024-12-03 14:02:33 +02:00
Byron Hambly
d78604da4c Merge 2534141e19 into merged_master (Elements PR ElementsProject/elements#1219) 2024-12-02 08:51:39 +02:00