Commit graph

338 commits

Author SHA1 Message Date
ivanlele
b4a01e4696
Merge 5d5cc021ce into merged_master (Bitcoin PR bitcoin/bitcoin#31051) 2026-03-27 14:47:55 +00:00
Tom Trevethan
47b759f1ed Merge 33adc7521c into merged_master (Bitcoin PR bitcoin/bitcoin#30765) 2026-03-26 22:41:05 +00:00
ivanlele
b72efc9f34
Merge b52d547361 into merged_master (Bitcoin PR bitcoin/bitcoin#30377) 2026-03-23 14:31:53 +00:00
ivanlele
c7d1ee1c41
Merge d184fc3ba4 into merged_master (Bitcoin PR bitcoin/bitcoin#30571) 2026-03-23 11:53:22 +00:00
ivanlele
4fc984078d
Merge 21c2879f37 into merged_master (Bitcoin PR bitcoin/bitcoin#30560) 2026-03-11 11:41:20 +00:00
ivanlele
cd6ec40d0f
Merge 2aff9a36c3 into merged_master (Bitcoin PR bitcoin/bitcoin#30352) 2026-03-11 09:41:57 +00:00
Tom Trevethan
aacf403349 Merge 94d56b9def into merged_master (Bitcoin PR bitcoin/bitcoin#30141)
Added FIXMEs to blind_tests. TODO: de-globalise range/surjection proof sig cache logic.
2026-03-05 12:23:49 +00:00
Tom Trevethan
b64d8b87c8 Merge 6300438a2e into merged_master (Bitcoin PR bitcoin/bitcoin#30115) 2026-02-23 23:41:30 +00:00
Tom Trevethan
fd9d5610a7 Merge 4877fcdb42 into merged_master (Bitcoin PR bitcoin/bitcoin#30048) 2026-02-22 22:49:47 +00:00
ivanlele
831a076608
Merge c143244ce3 into merged_master (Bitcoin PR bitcoin/bitcoin#29853) 2026-02-18 15:20:07 +00:00
ivanlele
c8b1dfc103
Merge 948ecf181e into merged_master (Bitcoin PR bitcoin/bitcoin#29648) 2026-02-17 13:09:58 +00:00
Tom Trevethan
78f831139f
updated keypath spend test vectors for elements and re-enabled equility checks
(cherry picked from commit 4142ceabbe46b7ac68840d1a100fc0c6adfa86a0)
2026-01-09 15:03:59 +02:00
Byron Hambly
5c60efbd8e
script_tests: fixme for bitcoinconsensus 2025-12-05 13:53:36 +02:00
Byron Hambly
451ac2cc1c
Merge 45b2a91897 into merged_master (Bitcoin PR bitcoin/bitcoin#29404) 2025-12-04 09:29:58 +02:00
Byron Hambly
e2aa52246d
Merge 265250687b into merged_master (Bitcoin PR bitcoin/bitcoin#28455) 2025-11-17 21:16:45 +02:00
Byron Hambly
12b5689c12
Merge fe4e83f50d into merged_master (Bitcoin PR bitcoin/bitcoin#28912) 2025-11-11 10:33:43 +02:00
Byron Hambly
8556ebfa64
Merge 22025d06e5 into merged_master (Bitcoin PR bitcoin/bitcoin#28605) 2025-11-10 14:17:41 +02:00
Byron Hambly
8cf8bd5564
Merge 108462139b into merged_master (Bitcoin PR bitcoin/bitcoin#28438) 2025-11-10 13:45:17 +02:00
Byron Hambly
832af6a098
fixme: src/script/bitcoinconsensus.cpp
this is working with a default asset in script_tests.cpp, but if
we need this consensus lib for elements then it must be fixed to
use multi assets correctly
2025-11-03 09:55:38 +02:00
Byron Hambly
c895baf56d
test: fixme for consensus script_tests
FIXME the consensus library inherited from upstream has to be updated to work with other assets,
comments out this failing test assertion until it can be fixed
2025-08-22 09:26:39 +02:00
Byron Hambly
4de706a2a4
ci(tidy): use emplace_back instead of push_back 2025-08-22 09:23:55 +02:00
Byron Hambly
3f12670fa4
Merge 90f7d8a7f9 into merged_master (Bitcoin PR bitcoin/bitcoin#28539)
ELEMENTS FIXME
2025-08-07 12:16:06 +02:00
Byron Hambly
e826a411ec
Merge 48b8910d12 into merged_master (Bitcoin PR bitcoin/bitcoin#28508)
GetHash now manually implemented for CBlockHeader. SER_GETHASH removed,
so CProof now always serializes `solution`. CBlockHeader::GetHash copies
from Serialize, but only includes `challenge` of CProof, and no signblock witness

This needs to be tested with liquidv1 chain
2025-08-05 14:12:48 +02:00
Byron Hambly
6c55760a2d Merge 7ef2d4ee4d into merged_master (Bitcoin PR bitcoin/bitcoin#28244) 2025-07-04 17:24:18 +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
edc585d157 Merge 9564f98fee into merged_master (Bitcoin PR bitcoin/bitcoin#27636) 2025-06-25 11:40:46 +02:00
Byron Hambly
e23e51f9ef Merge 369d4c03b7 into merged_master (Bitcoin PR bitcoin/bitcoin#27254) 2025-04-12 12:19:09 +02:00
Byron Hambly
4ec18086ff Merge a245429d68 into merged_master (Bitcoin PR bitcoin/bitcoin#26940) 2025-04-07 10:05:17 +02:00
Byron Hambly
c7bff919f0 Merge fb82d91a9c into merged_master (Bitcoin PR bitcoin/bitcoin#24149) 2025-04-05 22:44:14 +02:00
Byron Hambly
cfdedd8e98 Merge 17acbc1a5a into merged_master (Bitcoin PR bitcoin/bitcoin#25974) 2025-04-05 10:03:26 +02:00
Byron Hambly
9a56283d35 Merge c0b6c40bb0 into merged_master (Bitcoin PR bitcoin/bitcoin#26934) 2025-04-04 08:39:53 +02:00
Byron Hambly
44e0c0fe10 Merge 58da1619be into merged_master (Bitcoin PR bitcoin/bitcoin#25877) 2025-04-03 21:23:59 +02:00
Byron Hambly
b4405ba453 Merge e9262ea32a into merged_master (Bitcoin PR bitcoin/bitcoin#26750) 2025-03-31 16:37:52 +02:00
Byron Hambly
301f7c9225
Merge 368010a308 into merged_master (Elements PR #1390) 2025-02-11 15:06:18 +02:00
Russell O'Connor
31d94775b3 Update to latest Simplicity
The main difference is that there is now explicit simplicity deallocation functions to go with the allocation functions in the API.
There are some minor changes to error message text.
The deserialization code is now automatically generated.
The are some other minor internal changes.
2025-02-04 12:14:25 -05:00
Byron Hambly
a6f8dc6a86
tidy: fixes for clang tidy ci job 2024-12-04 14:16:45 +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
Byron Hambly
1006327a13 Merge 9eaef10801 into merged_master (Bitcoin PR bitcoin/bitcoin#25707) 2024-11-04 11:26:40 +02:00
Byron Hambly
593c724509 Merge c90f86e4c7 into merged_master (Bitcoin PR bitcoin/bitcoin#25694) 2024-10-18 14:59:49 +02:00
Byron Hambly
28d35f619e Merge 510ac41eac into merged_master (Bitcoin PR bitcoin/bitcoin#25331) 2024-10-18 13:14:02 +02:00
Christian Lewe
508836028e Asset tests: Check script error
Compare the expected script error, parsed from JSON, with the actual
error that VerifyScript returns. If the JSON does not include an
expected error, then skip this check.
2024-10-07 14:39:10 -04:00
Russell O'Connor
4ca2411795 Asset tests: Parse Elements script errors
Take the existing function to parse script errors and extend it to parse
Elements errors. SCRIPT_ERR_ERROR_COUNT is not included because it is a
pseudo error.
2024-10-07 14:39:10 -04:00
Russell O'Connor
bcd508f409 Add Simplicity Deployment structure 2024-10-07 14:39:10 -04:00
fanquake
e0287bc4b2
test: remove unused code from script_tests
This has been unused since #29648.
Noticed while running a newer version of clang-tidy (19.1.1):
```bash
[127/391][6.2s] /opt/homebrew/opt/llvm/bin/clang-tidy -p=build -quiet --config-file=/bitcoin/src/.clang-tidy /bitcoin/src/test/script_tests.cpp
bitcoin/src/test/script_tests.cpp:126:25: error: local copy 'tx2' of the variable 'tx' is never modified and never used; consider removing the statement [performance-unnecessary-copy-initialization,-warnings-as-errors]
  126 |     CMutableTransaction tx2 = tx;
      |     ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~
  127 |     BOOST_CHECK_MESSAGE(VerifyScript(scriptSig, scriptPubKey, &scriptWitness, flags, MutableTransactionSignatureChecker(&tx, 0, txCredit.vout[0].nValue, MissingDataBehavior::ASSERT_FAIL), &err) == expect, message);
512 warnings generated.
```
2024-10-07 16:31:12 +01:00
Lőrinc
5e190cd11f Replace CScript _hex_v_u8 appends with _hex
This will skip vector conversion before serializing to the prevector in CScript.
2024-09-11 17:41:27 +02:00
Hodlinator
8756ccd712
scripted-diff: Replace ParseHex[<std::byte>]("str") -> "str"_hex[_u8]
Ideally all call sites should accept std::byte instead of uint8_t but those transformations are left to future PRs.

-BEGIN VERIFY SCRIPT-
sed -i --regexp-extended 's/\bParseHex\(("[^"]*")\)/\1_hex_u8/g' $(git grep -l ParseHex -- :src ':(exclude)src/test/util_tests.cpp')
sed -i --regexp-extended 's/\bParseHex<std::byte>\(("[^"]*")\)/\1_hex/g' $(git grep -l ParseHex -- :src ':(exclude)src/test/util_tests.cpp')
sed -i --regexp-extended 's/\bScriptFromHex\(("[^"]*")\)/ToScript(\1_hex)/g' src/test/script_tests.cpp
-END VERIFY SCRIPT-

Co-Authored-By: MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz>
Co-Authored-By: Ryan Ofsky <ryan@ofsky.org>
2024-08-28 19:11:59 +02:00
Hodlinator
9cb687351f
refactor: Prepare for ParseHex -> ""_hex scripted-diff
- Adds using namespace.
- Extracts ToScript helper function from ScriptFromHex, to be used heavily in the next commit.
- Changes ScriptFromHex from using ParseHex to TryParseHex, now asserting the string is valid.
- Use even number of hex digits in comment (and apply replacement from next commit to only touch line once).
2024-08-28 19:11:59 +02:00
Hodlinator
50bc017040
refactor: Hand-replace some ParseHex -> ""_hex
The following scripted-diff commit will replace ParseHex("...") with "..."_hex_u8, but this replacement will not work in cases where vectors are needed instead of arrays, and is not ideal in cases where std::byte is accepted.

For example, it is currently necessary to use _hex_v_u8 when calling CScript operator<< because that operator does not currently support std::array or std::byte.

Conversely, it is incorrect to use _hex_v instead of _hex in net_processing.cpp for the MakeAndPushMessage argument, because if the argument is a std::vector it is considered variable-length and serialized with a size prefix, but if the argument is a std::array or Span is it considered fixed length and serialized without a prefix.

By the same logic, it is also safe to change the NUMS_H constant in pubkey.cpp from a std::vector to std::array because it is never serialized.
2024-08-28 19:11:59 +02:00
MarcoFalke
fa0fe08eca
scripted-diff: [test] Use g_rng/m_rng directly
-BEGIN VERIFY SCRIPT-

 # Use m_rng in unit test files
 ren() { sed -i "s:\<$1\>:$2:g" $( git grep -l "$1" src/test/*.cpp src/wallet/test/*.cpp src/test/util/setup_common.cpp ) ; }
 ren InsecureRand32                m_rng.rand32
 ren InsecureRand256               m_rng.rand256
 ren InsecureRandBits              m_rng.randbits
 ren InsecureRandRange             m_rng.randrange
 ren InsecureRandBool              m_rng.randbool
 ren g_insecure_rand_ctx           m_rng
 ren g_insecure_rand_ctx_temp_path g_rng_temp_path

-END VERIFY SCRIPT-
2024-08-26 11:19:52 +02:00