Commit graph

4921 commits

Author SHA1 Message Date
Andrew Poelstra
6387aaf765 Merge feee029d29 into merged_master (Elements PR ElementsProject/elements#1020)
Messy merge conflicts because this PR backported some ad-hoc stuff from
upstream while keeping a few things that upstream deleted. Hopefully
reviewing is easier than doing this in the first place, since ultimately
all I did was delete code from one side or another of the conflicts.
(Ok, I also changed some boost optional stuff to std::optional, and had
to patch up a test file for test framework changes.)

When reviewing the detailed crypto, bear in mind that taptweaks, like all
hashes are the kind of crypto that cannot be subtly wrong -- it will either
fail very hard or be correct. And we have independent implementations in
C++ and Python that cross-check each other, si it's unlikely to be the former.
2021-09-05 13:42:34 +00:00
Andrew Poelstra
7d1c77f0a1 Merge 1ba24fe9b3 into merged_master (Elements PR ElementsProject/elements#1002)
This forward-ports the new Taproot sighash but does not fix a couple
22-blocked TODOs related to the MissingDataBehavior enum. Should be fixed
in a followup commit.

One nontrivial change I had to make was feeding the genesis hash to SignTransaction
(the "global" one in script/sign.cpp) so that it could correctly compute
the sighash at signing time.
2021-09-04 22:14:42 +00:00
Andrew Poelstra
36e5e2a7f1 Merge 9a154599fe into merged_master (Elements PR ElementsProject/elements#900)
Surprisingly easy to do. Almost all of the diff resolution was mechanically
  * replacing boost::variant with std::variant
  * replacing Optional with std::optional
     * then replacing `nullopt` with `std::nullopt`
  * updating the RPC functions for the new RPCArg::Default type
  * update the tests/ directory to make new (since 22) tests use arrays for
    createrawtransaction outputs
  * other ad-hoc changes to function parameters etc (not too many of these)

I had to "really" change the code in PrecomputePSBTData, which was introduced
in 22.0 and affected by PSET, but this function was like 8 lines long so it
was easy.

Reviewing the diff may be a bit difficult because of the mix of mechanical
changes and ad-hoc things. Probably the most straightforward thing to do
is to redo the merge, `sed -i` to fix the boost::variant and Optional stuff,
then diff the remaining conflicts against this commit.

TODO: grep for `blindpsbt` and you will see that this RPC is still referenced
in documentation and help text even though it was deleted. Need to fix this
in 0.21 in a separate PR.
2021-09-04 19:34:14 +00:00
sanket1729
2c5c7eb87b Update tapscript leaf version 2021-08-27 19:24:07 +00:00
sanket1729
937343c75c Add tests for crypto opcodes 2021-08-27 19:24:07 +00:00
sanket1729
3e7b8c6aed Test arithmetic opcodes 2021-08-26 20:28:01 +00:00
sanket1729
6092d94c1d Add tests for introspection 2021-08-26 20:28:01 +00:00
sanket1729
007912eea4 Implement tests for sha256 streaming opcodes 2021-08-26 20:28:01 +00:00
Andrew Poelstra
71045e76ea Merge 539023ab41 into merged_master (Bitcoin PR bitcoin/bitcoin#22492) 2021-08-03 16:35:52 +00:00
Andrew Poelstra
3fff335dff Merge 8ed8164e6f into merged_master (Bitcoin PR bitcoin/bitcoin#22261) 2021-08-03 15:55:27 +00:00
Andrew Poelstra
fc9e070952 Merge e4487fd5bb into merged_master (Bitcoin PR bitcoin/bitcoin#22096) 2021-08-03 15:17:22 +00:00
Andrew Poelstra
7a9b6ec4bf Merge e7441a6a45 into merged_master (Bitcoin PR bitcoin/bitcoin#21711) 2021-08-03 12:46:53 +00:00
Andrew Poelstra
d4c71593bb Merge d3474b8df2 into merged_master (Bitcoin PR bitcoin/bitcoin#22387) 2021-08-03 01:33:10 +00:00
Andrew Poelstra
42343f2fdc Merge 5341c3b1b3 into merged_master (Bitcoin PR bitcoin/bitcoin#22461) 2021-08-02 23:08:58 +00:00
Andrew Poelstra
6361a13268 Merge a88fa1a555 into merged_master (Bitcoin PR bitcoin/bitcoin#22211) 2021-08-02 19:21:52 +00:00
Andrew Poelstra
1b001cf83a Merge e2c4ac7cfb into merged_master (Bitcoin PR bitcoin/bitcoin#22447) 2021-08-02 12:40:50 +00:00
Andrew Poelstra
2924ce232e Merge fdf9b3eba3 into merged_master (Bitcoin PR bitcoin/bitcoin#22446) 2021-08-01 18:03:50 +00:00
Andrew Poelstra
ce53627c25 Merge 531c2b7c04 into merged_master (Bitcoin PR bitcoin/bitcoin#20354) 2021-08-01 17:26:59 +00:00
Andrew Poelstra
78c3a94eb8 Merge d8f1e1327f into merged_master (Bitcoin PR bitcoin/bitcoin#22112) 2021-07-31 21:46:05 +00:00
Andrew Poelstra
a4a4d73a44 Merge 842e2a9c54 into merged_master (Bitcoin PR bitcoin/bitcoin#20234) 2021-07-31 19:55:26 +00:00
Andrew Poelstra
ab707223f6 Merge 8ab0c77299 into merged_master (Bitcoin PR bitcoin/bitcoin#22253) 2021-07-31 18:42:01 +00:00
Andrew Poelstra
2e6ff43f2d Merge d1e4c56309 into merged_master (Bitcoin PR bitcoin/bitcoin#22363) 2021-07-31 15:28:34 +00:00
Andrew Poelstra
915d06019a Merge 34d1d6a112 into merged_master (Bitcoin PR bitcoin/bitcoin#22381) 2021-07-31 13:46:26 +00:00
Andrew Poelstra
cf9d252d10 Merge df2b5dadfb into merged_master (Bitcoin PR bitcoin/bitcoin#22408) 2021-07-31 03:33:34 +00:00
Andrew Poelstra
ae15e5dc5d Merge 137f3b9ba3 into merged_master (Bitcoin PR bitcoin/bitcoin#22405) 2021-07-31 01:42:33 +00:00
Andrew Poelstra
dbd482d595 Merge a926d6dfd2 into merged_master (Bitcoin PR bitcoin/bitcoin#22310) 2021-07-30 12:39:04 +00:00
Andrew Poelstra
3c24e4c1b5 Merge 045bb06ebd into merged_master (Bitcoin PR bitcoin/bitcoin#19651) 2021-07-29 23:12:48 +00:00
Andrew Poelstra
8a158e3e93 Merge 722776c0fd into merged_master (Bitcoin PR bitcoin/bitcoin#21329) 2021-07-29 22:11:13 +00:00
Andrew Poelstra
9fc1ba6008 Merge 3f56ef7bef into merged_master (Bitcoin PR bitcoin/bitcoin#22146) 2021-07-29 07:14:19 +00:00
Andrew Poelstra
b3bba59059 Merge 0553d75268 into merged_master (Bitcoin PR bitcoin/bitcoin#22154) 2021-07-29 02:50:04 +00:00
Andrew Poelstra
635abda3e9 Merge e59ea87954 into merged_master (Bitcoin PR bitcoin/bitcoin#22311) 2021-07-28 23:48:22 +00:00
Andrew Poelstra
083e08cf82 Merge d6a59166a1 into merged_master (Bitcoin PR bitcoin/bitcoin#22257)
Just as mechanical and annoying as it looks.
2021-07-28 21:06:57 +00:00
Andrew Poelstra
043b76e919 Merge bfa885898a into merged_master (Bitcoin PR bitcoin/bitcoin#22306) 2021-07-28 18:55:40 +00:00
Andrew Poelstra
bb8e5d1ce4 Merge a196c89317 into merged_master (Bitcoin PR bitcoin/bitcoin#22270)
Some PRs ago (in #19937) the bitcoin-util binary was added, which we
didn't notice and didn't rename to elements-util. This commit adds
some tests for it, which made me notice it ... so rename it here.
2021-07-28 18:18:31 +00:00
Andrew Poelstra
6d72443536 Merge c0e30933e0 into merged_master (Bitcoin PR bitcoin/bitcoin#22323) 2021-07-28 15:20:02 +00:00
Andrew Poelstra
a503005be7 Merge 567670bec5 into merged_master (Bitcoin PR bitcoin/bitcoin#22166) 2021-07-28 14:42:42 +00:00
Andrew Poelstra
e8b84fa091 Merge d6e0d78c31 into merged_master (Bitcoin PR bitcoin/bitcoin#20966) 2021-07-28 14:05:54 +00:00
Andrew Poelstra
f8ca439f8f Merge 03aa59a4e5 into merged_master (Bitcoin PR bitcoin/bitcoin#22313) 2021-07-28 13:29:17 +00:00
Andrew Poelstra
01766fafdf Merge c93e123dc7 into merged_master (Bitcoin PR bitcoin/bitcoin#22308) 2021-07-28 12:52:10 +00:00
Andrew Poelstra
2a28a2f2d1 Merge 672870ab7b into merged_master (Bitcoin PR bitcoin/bitcoin#22201) 2021-07-28 04:50:06 +00:00
Andrew Poelstra
8e462c9a98 Merge 74013641e0 into merged_master (Bitcoin PR bitcoin/bitcoin#22089) 2021-07-28 03:33:26 +00:00
Andrew Poelstra
a83d2595bc Merge 6556da77d7 into merged_master (Bitcoin PR bitcoin/bitcoin#21056) 2021-07-28 02:41:57 +00:00
Andrew Poelstra
53951df7ef Merge f6a25bea82 into merged_master (Bitcoin PR bitcoin/bitcoin#22147) 2021-07-28 00:28:42 +00:00
Andrew Poelstra
cfa325712a Merge e172ea8804 into merged_master (Bitcoin PR bitcoin/bitcoin#22210) 2021-07-27 22:06:32 +00:00
Andrew Poelstra
0de2551429 Merge da1e6d5911 into merged_master (Bitcoin PR bitcoin/bitcoin#14604) 2021-07-27 20:26:45 +00:00
Andrew Poelstra
16c93fc360 Merge 0844084c13 into merged_master (Bitcoin PR bitcoin/bitcoin#22249) 2021-07-27 19:40:31 +00:00
Andrew Poelstra
0afcb6d978 Merge 5c2e2afe99 into merged_master (Bitcoin PR bitcoin/bitcoin#21365)
This introduces Taproot wallet support. I fixed all the merge conflicts
and ensured that the tests pass, but this is still using the old sighash
(before Russell/Sanket/I redid it) so is not actually production ready.
Will be fixed when we bring Elements #1002 in.
2021-08-03 20:43:53 +00:00
Andrew Poelstra
6846865183 Merge dd24567a24 into merged_master (Bitcoin PR bitcoin/bitcoin#22120) 2021-07-27 02:45:38 +00:00
Andrew Poelstra
be04e946b9 Merge 964d91b193 into merged_master (Bitcoin PR bitcoin/bitcoin#22130) 2021-07-25 15:24:50 +00:00
Andrew Poelstra
ae37da1ad8 Merge 9c1ec689f3 into merged_master (Bitcoin PR bitcoin/bitcoin#22102) 2021-07-25 13:23:19 +00:00