Commit graph

3615 commits

Author SHA1 Message Date
Andrew Poelstra
18986689be Merge 907d636e5e into merged_master (Bitcoin PR bitcoin/bitcoin#21353) 2021-07-21 20:30:59 +00:00
Andrew Poelstra
f39648bfe5 Merge 5cf92c32d1 into merged_master (Bitcoin PR bitcoin/bitcoin#21969) 2021-07-20 02:11:14 +00:00
Andrew Poelstra
3d6a5a2182 Merge 55a156fca0 into merged_master (Bitcoin PR bitcoin/bitcoin#21207)
git diff --color-moved=zebra is your friend
2021-07-19 03:15:44 +00:00
Andrew Poelstra
013eaeaca2 Merge 7076bba841 into merged_master (Bitcoin PR bitcoin-core/gui#346) 2021-07-18 09:43:00 +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
81eb03b40c Merge 7aa41fc581 into merged_master (Bitcoin PR bitcoin/bitcoin#22042) 2021-07-17 19:14:17 +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
53344c6b08 Merge db1aca01d5 into merged_master (Bitcoin PR bitcoin/bitcoin#22021) 2021-07-12 23:18:07 +00:00
Andrew Poelstra
29a8292858 Merge 599000903e into merged_master (Bitcoin PR bitcoin/bitcoin#21850)
Copied GetMainchainAuthCookieFile logic from GetAuthCookieFile, since
the former no longer compiled.
2021-07-12 15:20:15 +00:00
Andrew Poelstra
a9a2cc0c10 Merge ea8b2e8e12 into merged_master (Bitcoin PR bitcoin/bitcoin#21913) 2021-07-11 16:14:30 +00:00
Andrew Poelstra
e552043a9a Merge d4c409cf09 into merged_master (Bitcoin PR bitcoin/bitcoin#20773) 2021-07-11 07:37:55 +00:00
Andrew Poelstra
ad78587f9d Merge 087812864b into merged_master (Bitcoin PR bitcoin/bitcoin#21962) 2021-07-11 05:25:13 +00:00
Andrew Poelstra
d9d4910a7d Merge a31a1ceec7 into merged_master (Bitcoin PR bitcoin/bitcoin#21907) 2021-07-10 03:16:24 +00:00
Andrew Poelstra
9096687c0e Merge 386ba92e83 into merged_master (Bitcoin PR bitcoin/bitcoin#21910) 2021-07-10 02:10:19 +00:00
Andrew Poelstra
3402d0aa23 Merge 94f83534e4 into merged_master (Bitcoin PR bitcoin/bitcoin#21752) 2021-07-09 03:24:22 +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
400268064d Merge f8176b768a into merged_master (Bitcoin PR bitcoin/bitcoin#21836) 2021-07-08 08:34:10 +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
c40a9ecf0f Merge 2a22d903f3 into merged_master (Bitcoin PR bitcoin/bitcoin#21897) 2021-07-08 00:27:49 +00:00
Andrew Poelstra
3850e85010 Merge 32f1f021bf into merged_master (Bitcoin PR bitcoin/bitcoin#21817) 2021-07-07 02:29:25 +00:00
Andrew Poelstra
87c10268ee Merge 3275c6e578 into merged_master (Bitcoin PR bitcoin/bitcoin#21727) 2021-07-06 21:07:44 +00:00
Andrew Poelstra
a8362769f4 Merge d9ae6ec892 into merged_master (Bitcoin PR bitcoin/bitcoin#21759) 2021-07-03 20:38:21 +00:00
Andrew Poelstra
ff1af2ca5d Merge 74a960a220 into merged_master (Bitcoin PR bitcoin/bitcoin#21714) 2021-07-01 03:22:26 +00:00
Andrew Poelstra
b9a6573841 Merge d4300a10dd into merged_master (Bitcoin PR #21679) 2021-06-30 20:52:10 +00:00
Andrew Poelstra
a20f127ddd Merge a5e756b74e into merged_master (Bitcoin PR #21676) 2021-06-30 17:06:01 +00:00
Andrew Poelstra
95e11d5a9d Merge e7af2f35af into merged_master (Bitcoin PR #21666) 2021-06-30 12:53:47 +00:00
Andrew Poelstra
b945a1dacf Merge a1f0b8b62e into merged_master (Bitcoin PR #21634) 2021-06-30 12:41:09 +00:00
Andrew Poelstra
f2bd5dd18b Merge f0b457212f into merged_master (Bitcoin PR #21467) 2021-07-27 01:26:50 +00:00
Andrew Poelstra
770892540f Merge 6664211be2 into merged_master (Bitcoin PR #21574) 2021-06-29 22:00:51 +00:00
Andrew Poelstra
833ebac2fb Merge aa69471ecd into merged_master (Bitcoin PR #21572) 2021-06-29 21:16:38 +00:00
Andrew Poelstra
dc314b7d34 Merge 2b3e5bf4c0 into merged_master (Bitcoin PR #21613) 2021-06-29 21:03:11 +00:00
Andrew Poelstra
9d8cea4394 Merge c0160ea52e into merged_master (Bitcoin PR #21540) 2021-06-29 20:38:24 +00:00
Andrew Poelstra
31f571ed0d Merge 9ac8f6d7dd into merged_master (Bitcoin PR #21598) 2021-06-29 17:22:19 +00:00
Andrew Poelstra
e0ce471ef6 Merge 5c9b06db81 into merged_master (Bitcoin PR #21302) 2021-06-29 15:47:24 +00:00
Andrew Poelstra
c4faf2f836 Merge ad4bf8a945 into merged_master (Bitcoin PR #20459)
What an awful PR. This introduces Python-like runtime failures into the
RPC interface in case there are type mismatches between the documentation
and every possible return value from every RPC call. I fixed all the errors
that are triggered by the existing tests but there will be a long tail of
errors to come, I'm sure.
2021-06-30 16:10:11 +00:00
Andrew Poelstra
4b7d6fdcaa Merge 7aa0d8adf8 into merged_master (Bitcoin PR #21063) 2021-06-29 03:15:39 +00:00
Andrew Poelstra
ccd5ecbdde Merge 2b2ab9ab78 into merged_master (Bitcoin PR #21544) 2021-06-29 00:57:03 +00:00
Andrew Poelstra
d20af8f9ea Merge 602b038d43 into merged_master (Bitcoin PR #21366) 2021-06-29 00:32:18 +00:00
Andrew Poelstra
d39d57c704 Merge 1c7be9ab90 into merged_master (Bitcoin PR #20286)
I hate this PR.
2021-06-28 21:30:17 +00:00
Andrew Poelstra
2fe92c0077 Merge b1281b5d8f into merged_master (Bitcoin PR #21516) 2021-06-28 13:25:43 +00:00
Andrew Poelstra
1c58e32ee6 Merge 4132193617 into merged_master (Bitcoin PR #21040) 2021-06-27 21:04:51 +00:00
Andrew Poelstra
26fd4eb181 Merge a9d1b40d53 into merged_master (Bitcoin PR #21415) 2021-06-27 15:02:35 +00:00
Andrew Poelstra
a4a400ef64 Merge 993ecafa5e into merged_master (Bitcoin PR #21417) 2021-06-27 14:38:37 +00:00
Andrew Poelstra
b1fab9a7e6 Merge d25e28c20b into merged_master (Bitcoin PR #21083) 2021-06-27 14:26:06 +00:00
Andrew Poelstra
d16103e6c4 Merge b650c9140e into merged_master (Bitcoin PR #21141) 2021-06-27 01:12:01 +00:00
Andrew Poelstra
a64f85e647 Merge 1e57d14d96 into merged_master (Bitcoin PR #21035) 2021-06-26 23:44:41 +00:00
Andrew Poelstra
8c54b98b25 Merge e0bc27a14c into merged_master (Bitcoin PR #21404) 2021-06-26 22:39:09 +00:00
Andrew Poelstra
edf1915727 Merge eea6196c3d into merged_master (Bitcoin PR #21331) 2021-06-26 18:12:53 +00:00
Andrew Poelstra
14685bfef5 Merge 6c156e49cb into merged_master (Bitcoin PR #18842) 2021-06-26 14:38:38 +00:00
Andrew Poelstra
24a86af27b Merge a8b0892b74 into merged_master (Bitcoin PR #20536)
This PR adds a new functional test which unfortunately we need to disable
because it triggers an unrelated Elements bug (assertation failure when
attempting a large fundrawtransaction).

See https://github.com/ElementsProject/elements/issues/880
2021-06-26 14:25:24 +00:00