Commit graph

509 commits

Author SHA1 Message Date
Andrew Chow
5425da4278 Enable converttopsbt for PSET 2021-06-22 14:42:38 -04:00
Andrew Chow
9fe6401d59 Allow specifying SIGHASH_RANGEPROOF 2021-06-22 14:42:38 -04:00
Andrew Chow
64b30bfc3d Enable analyzepsbt 2021-06-22 14:42:38 -04:00
Andrew Chow
46ccf611c4 Only allow psbt_version 2 2021-06-22 14:42:38 -04:00
Andrew Chow
b1ebc813ea Remove walletsignpsbt, blindpsbt, walletblindpsbt, and
walletfillpsbtdata

These are all done by walletprocesspsbt
2021-06-22 14:42:38 -04:00
Andrew Chow
e9bfff25db Allow empty scriptPubKeys 2021-06-22 14:42:19 -04:00
Andrew Chow
5391095205 Output PSBTOutputs with aux info from ConstructTransaction
Output PSBTOutputs with blinding pubkey and index info from
ConstructTransaction so that these can be added to PSBTs later.
2021-06-22 14:42:19 -04:00
Andrew Chow
ea2c3dfb20 Remove output_assets and have asset field in outputs
Instead of having an output_assets argument to createpsbt,
createrawtransaction, and walletcreatefundedpsbt, move the asset
specification into the outputs array itself. This also removes the
backwards compatibility of using a dict for outputs in createrawtransaction.
2021-06-22 14:42:19 -04:00
Andrew Chow
1dbc3b270c Implement updatepsbtpegin RPC 2021-06-22 14:42:18 -04:00
Andrew Chow
bdfcb436b7 Add calculateasset RPC 2021-06-22 14:41:44 -04:00
Andrew Chow
79c4a9901b pset: add issuance things
The asset issuance details are added to createpsbt and
walletcreatefundedpsbt.
2021-06-22 13:54:50 -04:00
Andrew Chow
6890461bfe Implement blinded combiner stuff 2021-06-22 13:54:50 -04:00
Andrew Chow
e37439775a Implement and enable decodepsbt for PSET 2021-06-22 13:54:50 -04:00
Andrew Chow
f4bca18784 Restrict joinpsbts to PSBTv0 only 2021-06-22 13:54:50 -04:00
Andrew Chow
ebc49e3111 Allow createpsbt and walletcreatefundedpsbt to take psbt version 2021-06-22 13:54:50 -04:00
Andrew Chow
2c1fe5841f Allow and create PSBTv2 in RPCs 2021-06-22 13:54:50 -04:00
Andrew Chow
bedc1e0fec Implement PSBTv2 in decodepsbt 2021-06-22 13:54:50 -04:00
Andrew Chow
9c8330024a Update RPCs for PSBTv2 2021-06-22 13:54:50 -04:00
Andrew Chow
cd5515a266 Change PSBT::AddOutput to take just PSBTOutput 2021-06-22 13:54:50 -04:00
Andrew Chow
90cd7ec5d5 Change PSBT::AddInput to take just PSBTInput 2021-06-22 13:54:50 -04:00
Andrew Chow
2042765520 Have PSBTInput and PSBTOutput know the PSBT's version 2021-06-22 13:54:50 -04:00
Andrew Chow
20e8dff880 Merge global xpubs in joinpsbts and combinepsbts 2021-06-22 13:54:50 -04:00
Andrew Chow
7fd50b2795 Add global_xpubs to decodepsbt 2021-06-22 13:54:50 -04:00
Andrew Chow
5bb930e0b4 Output proprietary type info in decodepsbt 2021-06-03 15:44:20 -04:00
Andrew Chow
25c13ad3b8 Output psbt version in decodepsbt 2021-06-03 15:44:20 -04:00
Andrew Chow
fdf71def4c Remove PSET and disable PSBT/PSET things for now
Reset back to Bitcoin PSBT and disable PSBT/PSET handling in wallet and
rpc.

This is just a reset to allow for PSBTv2 change and then a new and
improved PSET.
2021-06-03 15:44:19 -04:00
Andrew Poelstra
14ff891036 Various ubsan fixes
Mostly harmless signed/unsigned conversions but also an actual
memory leak related to `BlindingData`.
2021-03-26 17:33:05 +00:00
Andrew Poelstra
1e98c9fa9e fix RPC linter issues 2021-03-26 17:33:02 +00:00
Andrew Poelstra
e483648523 Merge cbb5f3a2d5 into merged_master (Bitcoin PR #19836) 2020-12-01 04:16:10 +00:00
Andrew Poelstra
ab283556b0 Merge db88db4727 into merged_master (Bitcoin PR #19339)
Changes API for AcceptToMemoryPool to no longer check maximum fee; we remove
this check from interfaces::CChain::testPeginClaimAcceptance. This is fine,
the check never should have been there (this method's job is to notice double
claim attempts and provide a more helpful message to the user; other mempool
failures should be caught later in the `claimrawpegin` logic when we call
`pwallet->commitTransaction` which actually subits to the mempool). It was
only checking fees because the API made it easier to do so than to not.
2020-11-30 15:50:18 +00:00
Andrew Poelstra
0bc6dbbce1 Merge e6207229b8 into merged_master (Elements PR #911)
Spent a while figuring out where this new function should live now that
the PSBT stuff has been pulled into src/psbt.cpp and the wallet, and isn't
mixed up with the RPC logic.

In the end I modified the the function to return a normal error rather
than throwing an RPC exception and put it in src/psbt.cpp with the other
functions that behave this way.
2020-11-30 14:31:38 +00:00
Andrew Poelstra
5c1a330c57 Merge d692d192cd into merged_master (Bitcoin PR #19849)
More RPC cleanups. This one discovered that the `createpsbt` and
`rawblindrawtransaction` RPCs had incorrect argument lists :)
2020-11-29 17:58:59 +00:00
Andrew Poelstra
81a3dda09b Merge c30f79d418 into merged_master (Bitcoin PR #19940) 2020-11-29 14:00:02 +00:00
Andrew Poelstra
2a0cf12ecc Merge 07087051af into merged_master (Bitcoin PR #19556)
Added a method testPeginClaimAcceptance to interfaces::CChain. It is not clear
to me that this is meaningfully different from the existing method broadcastTransaction
(with the `relay` flag set to false so it doesn't actually broadcast), except
that this method returns the TxValidationState, which we display to the user
in the RPC error. Worth revisiting this.

Another nonobvious change was replacing a block of mempool-searching logic
in wallet/rpcwallet.cpp with the single line `pwallet->chain().findCoins(coins)`.
This I stole from the current state of upstream #17211, our favorite in-progress
PR from which the original logic came.
2020-11-29 01:43:20 +00:00
Andrew Poelstra
4393de33e3 Merge df75e9f3ee into merged_master (Bitcoin PR #19878) 2020-11-28 23:10:31 +00:00
Andrew Poelstra
2a04500584 Merge a12d9e5fd2 into merged_master (Bitcoin PR #19687) 2020-11-28 13:35:24 +00:00
Andrew Poelstra
5902895d0c Merge 31760bb7c9 into merged_master (Bitcoin PR #19528) 2020-11-27 18:39:01 +00:00
Andrew Poelstra
08378e5ad8 Merge 609ce2d0da into merged_master (Bitcoin PR #19644) 2020-11-27 18:05:45 +00:00
Andrew Poelstra
419fd4f90d Merge b75f2ad72d into merged_master (Bitcoin PR #19660) 2020-11-27 04:05:36 +00:00
Andrew Poelstra
54f2d85914 Merge 34eb236258 into merged_master (Bitcoin PR #19326) 2020-11-27 00:39:12 +00:00
Andrew Poelstra
21f9f41bf4 Merge a1da180b1b into merged_master (Bitcoin PR #19589) 2020-11-26 19:33:53 +00:00
Andrew Poelstra
50d06f59f3 Merge db9f1b9edc into merged_master (Elements PR #896) 2020-11-26 19:16:44 +00:00
Andrew Poelstra
f36832a9dd Merge f5000ae66c into merged_master (Bitcoin PR #19555) 2020-11-26 14:11:14 +00:00
Andrew Poelstra
c6cb7be640 Merge c57dc566b0 into merged_master (Bitcoin PR #16525) 2020-11-26 12:15:14 +00:00
Andrew Poelstra
262c624540 Merge 032cfdc9a2 into merged_master (Bitcoin PR #19517) 2020-11-26 04:17:00 +00:00
Andrew Poelstra
1aa51f0c4c Merge b52e25cc1b into merged_master (Bitcoin PR #19328) 2020-11-26 01:09:20 +00:00
Andrew Poelstra
d664527f5a Merge a24806c25d into merged_master (Bitcoin PR #19215) 2020-11-26 01:09:18 +00:00
Andrew Poelstra
dc44b27189 Merge d3a5dbfd1f into merged_master (Bitcoin PR #19114) 2020-11-26 01:09:14 +00:00
Andrew Poelstra
b431cfa2d7 Merge 532b134cb0 into merged_master (Bitcoin PR #19373) 2020-11-26 01:09:12 +00:00
Andrew Poelstra
fa10c4dfe5 Merge bd331bd745 into merged_master (Bitcoin PR #17938)
Also re-`static`'d a method in src/script/standard.cpp which we had made globally
visible for some historical reason, but which I noticed diffing that file against
upstream.
2020-11-26 01:09:10 +00:00