Commit graph

39078 commits

Author SHA1 Message Date
Byron Hambly
b8cf7b768d
Merge pull request #1412 from psgreco/master-fix-macos
CI: Fix macos native build
2025-02-13 16:34:20 +02:00
Pablo Greco
49f151f013 Apply acc06bc91f fix also to pip upgrade 2025-02-13 05:46:30 -08:00
Pablo Greco
a121cf0e63 Manually pick acc06bc91f from bitcoin 2025-02-13 05:46:30 -08:00
Hennadii Stepanov
cde308e667 ci: Use macos-ventura-xcode:14.1 image for "macOS native" task
Github-Pull: #26388
Rebased-From: da16893474
2025-02-13 05:46:30 -08:00
Hennadii Stepanov
93218750de ci: Make getopt path architecture agnostic
Github-Pull: #26388
Rebased-From: 702836530f
2025-02-13 05:46:30 -08:00
Hennadii Stepanov
d789538aab ci: Improve naming related to "macOS 12 native x86_64" task
Github-Pull: #25444
Rebased-From: 0bb7a1f71d
2025-02-13 05:46:30 -08:00
Hennadii Stepanov
6e6c6d07b7 ci, refactor: Add MACOS_NATIVE_TASK_TEMPLATE
A native macOS task does not aware of Linux container settings, and it
does not use the `depends_built_cache`.

Github-Pull: #25444
Rebased-From: 8e017f3288
2025-02-13 05:46:30 -08:00
Byron Hambly
8a948be6df
Merge pull request #1210 from gwillen/feature-andrew-merge-script
Check in Andrew's script for merging changes into Elements integration branch
2025-02-13 09:48:39 +02:00
Byron Hambly
5cb3acef29
Merge pull request #1310 from GoodDaisy/master
Fix typos
2025-02-13 09:47:55 +02:00
Byron Hambly
077ae2d91a
Merge pull request #1408 from psgreco/master-fix-win64
Fix native win64 build (part 2)
2025-02-13 09:04:51 +02:00
Pablo Greco
5bff237cb4 CI: Win64 native: do not fail on functional tests
Windows native builds are really a best effort, but not a blocker.
Let's keep running them to see what we can fix, but keeping a green
pipeline. Also disabled a couple of long-running tests due to being
close to the timeout
2025-02-12 11:16:14 -08:00
Pablo Greco
e3011270b8 Win64: set the right TargetName in native builds 2025-02-12 11:16:14 -08:00
Byron Hambly
e41b225107
Merge pull request #1384 from apoelstra/2024-12--simple-fuzz
simplicity: add fuzz target
2025-02-12 14:15:27 +02:00
Byron Hambly
a259bc3693
Merge pull request #1341 from delta1/discount-test-vectors
test: add discountvsize test vectors
2025-02-12 12:38:20 +02:00
Byron Hambly
2c9c6cd7a0 test: add discountvsize test vectors 2025-02-11 11:21:18 -08:00
Andrew Poelstra
bd852baca6
ci: add more ubsan suppressions 2025-02-11 16:12:29 +00:00
Andrew Poelstra
3fe5d12c57
fuzz: simplicity: use zero CMR for invalid programs
When we have an invalid program, use a zero CMR and create a valid
control block/taptweak. Otherwise we fail to hit the Simplicity logic at
all with bad programs.

#
# You are committing on CAMUS
#

# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
#
# On branch 2024-12--simple-fuzz
# Changes to be committed:
#	modified:   src/test/fuzz/simplicity_tx.cpp
#
# Untracked files:
#	reduced-corpus/
#	run-fuzz-merge-dir-CPzq/
#	run-fuzz-merge-dir-sscf/
#
2025-02-11 16:12:29 +00: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
d020546243
Merge pull request #1401 from apoelstra/2025-02--fuzz-fixes-2
more fuzzer fixes (continuation of #1399)
2025-02-11 17:58:42 +02:00
Byron Hambly
d7efd310f8
Merge pull request #1400 from psgreco/master-fixbuild
Fix build in master with newer environments
2025-02-11 17:56:44 +02:00
Pablo Greco
04b114c148 CI: Cirrus: use -j2 in TSan to stabilize 2025-02-11 06:14:51 -08:00
Pablo Greco
276e405ab0 CI: Cirrus: Avoid using -j3 in some jobs when elements has -j3 as the global limit 2025-02-11 06:14:51 -08:00
Pablo Greco
b703da1148 Fix build with gcc-15 2025-02-11 06:14:51 -08:00
fanquake
8251fc8162 23.x Add missing includes to fix gcc-13 compile error
Additional include fixes are required to make the 23.x branch compile
using GCC 13.

(cherry picked from commit af86266165)
2025-02-11 06:14:51 -08:00
MarcoFalke
f64aa1e6c6 Add missing includes to fix gcc-13 compile error
(cherry picked from commit fadeb6b103)
2025-02-11 06:14:51 -08:00
Hennadii Stepanov
f8b1bb7070 build: Fix Boost.Process test for Boost 1.78
(cherry picked from commit 532c64a726)
2025-02-11 06:14:51 -08:00
Hennadii Stepanov
8a1500c63e build: Fix Boost.Process detection on macOS arm64
Could be tested as follows:
```
% brew install boost@1.76
% ./autogen.sh
% ./configure --with-boost='/opt/homebrew/opt/boost@1.76'
```

(cherry picked from commit 1d4157a42b)
2025-02-11 06:14:51 -08:00
MarcoFalke
56eec70de4
Fix signed integer overflow in prioritisetransaction RPC
Cherry-pick of fa52cf8e11
https://github.com/bitcoin/bitcoin/pull/23418 (2/2)
2025-02-11 13:47:57 +00:00
MarcoFalke
6043ab449e
refactor: Replace feeDelta by m_modified_fee
* feeDelta tracked the delta (to be applied on top of the actual fee)
* m_modified_fee tracks the actual fee with the delta included
* Instead of passing in the new total delta to the Updater, pass in by
  how much the total delta should be modified.

This is needed for the next commit, but makes sense on its own because
the same is done by UpdateDescendantState and UpdateAncestorState.

Cherry-pick of fa52cf8e11
https://github.com/bitcoin/bitcoin/pull/23418 (1/2)
2025-02-11 13:47:56 +00:00
Byron Hambly
99c2ee7f9a
Merge pull request #1399 from apoelstra/2025-02--fuzz-fixes
various bugfixes for new fuzz test vectors
2025-02-11 09:49:42 +02:00
Byron Hambly
22089ac8f6
Merge pull request #1372 from delta1/issues-1371
decodepsbt: add asset/assetcommitment to input.witness_utxo
2025-02-11 08:47:17 +02:00
Andrew Poelstra
363c5101c2
fuzz: change int to unsigned in witness_program
Avoids a signed/unsigned integer conversion.
2025-02-11 04:04:25 +00:00
Andrew Poelstra
b90ef38727
ubsan: add suppression for simplicity 2025-02-11 03:00:51 +00:00
MarcoFalke
371718bc99
Use CAmount for fee delta and modified fee
Cherry-pick of fa84a49526
https://github.com/bitcoin/bitcoin/pull/24625 (2/2)
2025-02-11 02:58:42 +00:00
MarcoFalke
3e46754507
Replace struct update_fee_delta with lambda
Cherry-pick of https://github.com/bitcoin/bitcoin/pull/24625 (1/2)
2025-02-11 02:58:42 +00:00
Andrew Poelstra
bd4ae1bcc4
rpc: fix crash in getcompactsketch
This originates in 8723debb3d which has no
PR associated with it. We've really gotta stop putting thousands of
unreviewed commits into this project and rebasing the history away..
2025-02-11 02:58:41 +00:00
Andrew Poelstra
f5ed4e4520
chain: make some integer conversions explicit
We have an unsigned constant which we're bit-inverting, or'ing into a
signed constant, then assigning back to the signed constant. We should
make it explicit wth is going on here.
2025-02-11 02:53:49 +00:00
Andrew Poelstra
86d740b5eb
fuzz: fix crash on null pointer in witness_program target 2025-02-11 02:53:44 +00:00
Byron Hambly
bd551ad186
Merge pull request #1393 from psgreco/master-fixci
CI: Fix Win64 native build, TSAN and CentOS 8 test
2025-02-09 11:22:34 +02:00
Pablo Greco
77b3bdd864 ci: Use clang-18 in tsan task (Ubuntu 20.04)
Cherry-picked from fabb6af850
Cherry-picked from faf4aca15a
Cherry-picked from fa23c9aa7c
Cherry-picked from fa83b65ef8
Cherry-picked from fa75220ac5
2025-02-07 14:49:19 -08:00
MarcoFalke
06b72ec82c ci: Temporarily use clang-13 to work around clang-14 TSan bug
Github-Pull: bitcoin#24572
Rebased-From: fa43933
2025-02-07 14:39:33 -08:00
Pablo Greco
7f10cd11c1 Update xcb_proto to 1.15.2, manually picked from 7cb88c8b46 2025-02-07 13:34:50 -08:00
Pablo Greco
871e9d2ea2 Update boost to 1.81, manually picked from e8b4201ba2 2025-02-07 13:33:59 -08:00
Cory Fields
cad37df99f upnp: add compatibility for miniupnpc 2.2.8
See: c0a50ce33e

The return value of 2 now indicates:
"A valid connected IGD has been found but its IP address is reserved (non routable)"

We continue to ignore any return value other than 1.

(cherry picked from commit 8acdf66540)
2025-02-07 13:25:48 -08:00
Pablo Greco
d1a9ff3478 Win64 native: fix build with simplicity 2025-02-07 13:09:38 -08:00
Pablo Greco
0b40e25beb Win64 native: fix build before simplicity 2025-02-07 13:09:24 -08:00
Pablo Greco
5194a62393 Win64 native: disable psbt_wallet_test just like in Makefile 2025-02-07 05:03:14 -08:00
Pablo Greco
daf8ddc7d2 CI: Use RockyLinux 8 instead of CentOS Stream 8 2025-02-07 05:03:14 -08:00