Commit graph

4069 commits

Author SHA1 Message Date
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
Andrew Poelstra
d4d5a35e7a Merge b0e5fbf6fa into merged_master (Bitcoin PR bitcoin/bitcoin#22156) 2021-07-25 12:45:27 +00:00
Andrew Poelstra
83a54cc7c7 Merge 6985038046 into merged_master (Bitcoin PR bitcoin/bitcoin#22118) 2021-07-24 17:52:37 +00:00
Andrew Poelstra
b413362d11 Merge ef8f2966ac into merged_master (Bitcoin PR bitcoin/bitcoin#22084) 2021-07-24 01:43:31 +00:00
Andrew Poelstra
b3fdb4bed1 Merge 82bc7faec8 into merged_master (Bitcoin PR bitcoin/bitcoin#21946)
Adds a new test which is broken, but which will be fixed in a few PRs.
Disabled it for now.
2021-07-23 13:50:58 +00:00
Andrew Poelstra
ba389d631a Merge 45a8b01fad into merged_master (Bitcoin PR bitcoin/bitcoin#22187) 2021-07-23 12:41:46 +00:00
Andrew Poelstra
fcc12d7e2a Merge 3c393ef9e1 into merged_master (Bitcoin PR bitcoin/bitcoin#22149) 2021-07-23 00:28:01 +00:00
Andrew Poelstra
f806c13661 Merge 260b1d74fe into merged_master (Bitcoin PR bitcoin/bitcoin#22092) 2021-07-22 18:31:32 +00:00
Andrew Poelstra
2971071544 Merge 898dd9e262 into merged_master (Bitcoin PR bitcoin/bitcoin#22150) 2021-07-22 14:41:26 +00:00
Andrew Poelstra
b9aa053c96 Merge 8f5c9a7fd4 into merged_master (Bitcoin PR bitcoin/bitcoin#22153) 2021-07-22 14:02:46 +00:00
Andrew Poelstra
e4cbbd4372 Merge 3ac5209662 into merged_master (Bitcoin PR bitcoin/bitcoin#18795) 2021-07-22 03:25:23 +00:00
Andrew Poelstra
3ffb9aa14f Merge c7dd9ff71b into merged_master (Bitcoin PR bitcoin/bitcoin#22051)
Does the bare minimum to introduce Taproot wallet support with CT; just
adds a CPubKey blinding_pubkey to the taproot destination variant and
updates some visitors.

In future when we define blech32 we will need to make sure we are using
that encoding and using the pubkey.
2021-07-21 23:15:57 +00:00
Andrew Poelstra
97ea1dabe4 Merge 07ededa30c into merged_master (Bitcoin PR bitcoin/bitcoin#22050) 2021-07-21 21:08:21 +00:00
Andrew Poelstra
f46e4fdf55 Merge 7e83e74e7f into merged_master (Bitcoin PR bitcoin/bitcoin#21178) 2021-07-20 12:32:17 +00:00
Andrew Poelstra
ef32d80f95 Merge 0b9ed3f6e7 into merged_master (Bitcoin PR bitcoin/bitcoin#22113) 2021-07-20 06:39:59 +00:00
Andrew Poelstra
01b1d5f844 Merge c5ee0cc11a into merged_master (Bitcoin PR bitcoin/bitcoin#21989) 2021-07-19 13:07:08 +00:00
Andrew Poelstra
ec674d3ecb Merge d7a6bba949 into merged_master (Bitcoin PR bitcoin/bitcoin#22103) 2021-07-19 06:12:28 +00:00
Andrew Poelstra
8a669eccfb Merge 7257e50dba into merged_master (Bitcoin PR bitcoin/bitcoin#20833) 2021-07-18 18:11:25 +00:00
Andrew Poelstra
5f8081db1a Merge ecddd12482 into merged_master (Bitcoin PR bitcoin/bitcoin#18418) 2021-07-18 03:10:21 +00:00
Andrew Poelstra
e0383d5a59 Merge 8600934018 into merged_master (Bitcoin PR bitcoin/bitcoin#22057) 2021-07-17 13:01:19 +00:00
Andrew Poelstra
8b34c974c3 Merge 6b254814c0 into merged_master (Bitcoin PR bitcoin/bitcoin#17331)
This removes a lot of the craziness that was added during the 0.21
rebase 240f03f586 (Bitcoin PR #17290)
as well as a lot of other upstream craziness. It's a very positive
change but will probably be a bear to review.

There are two places where I (purposely) nontrivially changed the
logic beyond what the upstream PR did:

    1. When setting the change output positions, I used a uniform
       distribution for all change outputs and also obeyed the user's
       `change_position` choice. The old code was non-uniform and
       had a bug where it would offset the change position.

       For non-policy assets, I do not create zero-sized change
       since we would just remove them later. For the policy asset,
       I do sometimes create zero-sized change since the upstream
       logic expects it to exist.

    2. Rather than "reblinding whenever something changes" we blind
       once for size/fee estimation purposes and then again at the
       end after all potential adjustments have been made. The
       resulting code should be closer to upstream.

       We should really redo this code though because our use of the
       `BlindDetails` structure is very confusing and stateful.

    3. We consider whether or not we're using CT/CA when estimating
       the size of change outpust. This is because we now use branch
       and bound far more often (yay!) which selects coins such that
       there will be no change output. This is implemented however
       by adding a change output then dumping it to fees ... meaning
       that if we dramatically overestimate the size of a change out
       then we'll end up dramatically dumping too many coins to fees.

There are another couple small things, which I apologize for .. this
PR took me 2 hours to get compiling and 11 hours to get working(!!)
and some things got away from me.

One fun thing is that I changed CWallet::SelectCoinsMinConf to gate
an addition on coin_selection_params.m_subtract_fee_outputs ... this
is actually an upstream bug that I'll file whenever I get around to
producing a test that triggers it. (A bit hard as I have to gin up
a scenario where branch-and-bound fails to hit this codepath.)

Also, in test/functional/wallet_bumpfee.py I had to change the feerate
required to force selection to add another input from 500 to 800. I
don't know why and I don't care to figure it out.
2021-07-17 02:42:16 +00:00
Andrew Poelstra
76bb76c18c Merge 40f7a2891f into merged_master (Bitcoin PR bitcoin/bitcoin#22043) 2021-07-13 00:24:44 +00:00
Andrew Poelstra
ff5c2de782 Merge 0a909073dc into merged_master (Bitcoin PR bitcoin/bitcoin#22048) 2021-07-12 21:04:54 +00:00
Andrew Poelstra
11548bb33c Merge 778b920179 into merged_master (Bitcoin PR bitcoin/bitcoin#21945) 2021-07-12 12:52:18 +00:00
Andrew Poelstra
bae18ea9ed Merge 37e9f07996 into merged_master (Bitcoin PR bitcoin/bitcoin#21843) 2021-07-11 17:21:19 +00:00
Andrew Poelstra
e56472be53 Merge d2ec37221a into merged_master (Bitcoin PR bitcoin/bitcoin#21796) 2021-07-09 17:38:32 +00:00
Andrew Poelstra
7447a3b352 Merge d8ae29ec8f into merged_master (Bitcoin PR bitcoin/bitcoin#21900) 2021-07-08 18:04:18 +00:00
Andrew Poelstra
d56bdbd28f Merge 32692d2681 into merged_master (Bitcoin PR bitcoin/bitcoin#21359)
I hacked up rpc_fundrawtransaction.py a little bit because our `get_address`
method here depends on nobody having called `createwallet` on a particular
node ... the "correct" fix for this would be to redo the Elements changes
to this functional test for the 0.20+ createwallet changes, but because
there will be big future changes to this test (in Elements #900 (PSET))
I did the quick/hacky thing, and will defer cleanups to a separate
post-rebase PR.
2021-07-08 16:08:49 +00:00
Andrew Poelstra
9c4837db05 Merge adf7843410 into merged_master (Bitcoin PR bitcoin/bitcoin#21786) 2021-07-08 02:57:17 +00:00
Andrew Poelstra
b7ec414b10 Merge 5925f1e652 into merged_master (Bitcoin PR bitcoin/bitcoin#21872) 2021-07-07 21:11:33 +00:00
Andrew Poelstra
bf5cf2b070 Merge 06d573f053 into merged_master (Bitcoin PR bitcoin/bitcoin#21867) 2021-07-07 13:00:25 +00:00
Andrew Poelstra
7b25418b9c Merge 128b98fce3 into merged_master (Bitcoin PR bitcoin/bitcoin#21681) 2021-07-07 03:49:35 +00:00
Andrew Poelstra
6ce592d7cd Merge 1b9a5236e9 into merged_master (Bitcoin PR bitcoin/bitcoin#21740) 2021-07-07 01:15:58 +00:00
Andrew Poelstra
ad61a8e5bf Merge a0f46028fc into merged_master (Bitcoin PR bitcoin/bitcoin#21814) 2021-07-06 23:36:32 +00:00
Andrew Poelstra
a61038a299 Merge fb43d7cb1e into merged_master (Bitcoin PR bitcoin/bitcoin#21787) 2021-07-06 18:06:39 +00:00
Andrew Poelstra
ab1e80eb09 Merge 779aaa7f03 into merged_master (Bitcoin PR bitcoin/bitcoin#21754)
What a pain in the ass. This changes the `feature_cltv` functional test
to use the `MiniWallet`, an internal Pythonic wallet that produces
"signatures" consisting of several OP_NOPs in a row, so that this test
can be used when the wallet is disabled.

This means that the functions in feature_cltv which add a CLTV check and
change the locktime/sequence number no longer need to re-sign when they
change the txid, so they don't...HOWEVER, our Elements-specific
`feature_block_v4` test calls these functions with a real transaction
and depended on the re-signing behavior.

After several attempts at min-effort min-diff fixes I landed on this,
which simply sets the locktime at transaction creation and avoids having
to re-sign at all.

Also, I had to change the number of NOPs in the fake wallet code to make
a vsize assertion pass, presumably because of differences in Bitcoin/Elements
transaction serialization.
2021-07-06 13:53:02 +00:00
Andrew Poelstra
fb60da4597 Merge 60132382a7 into merged_master (Bitcoin PR bitcoin/bitcoin#20867) 2021-07-29 13:40:05 +00:00