Commit graph

123 commits

Author SHA1 Message Date
Andrew Poelstra
03b835c887 PSET: output warnings in decodepsbt and analyzepsbt about blinding status 2021-09-21 21:59:16 +00:00
Andrew Poelstra
048ca4a550 pset: fix logic bug in analyzepsbt so that the "blinder" role may be returned 2021-09-14 15:48:35 +00:00
Andrew Chow
64b30bfc3d Enable analyzepsbt 2021-06-22 14:42:38 -04:00
Andrew Chow
500554acbe Update AnalyzePSBT for PSBTv2 2021-06-22 13:54:50 -04:00
Andrew Chow
3c647b7a54 Replace PSBT::GetInputUTXO with PSBTInput::GetUTXO
Now that PSBTInput's track their own prevouts, there's no need for a
PSBT global function to fetch input specific data.
2021-06-22 13:54:50 -04:00
Andrew Poelstra
ed77072953 Merge e21b824386 into merged_master (Bitcoin PR #20109) 2020-11-30 18:38:05 +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
28f22e39af Merge 1c4f59728c into merged_master (Bitcoin PR #19879) 2020-11-29 05:32:13 +00:00
Andrew Poelstra
b657dd4a3a Merge 147d50d63e into merged_master (Bitcoin PR #19791) 2020-11-29 02:07:46 +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
4087c88a7e Merge 269a7ccb27 into merged_master (Bitcoin PR #19099) 2020-11-28 17:53:38 +00:00
Andrew Poelstra
e547a98b54 Merge ccef10261e into merged_master (Bitcoin PR #18044) 2020-11-26 17:01:52 +00:00
Andrew Poelstra
0fb616ece5 Merge 834ac4c0f5 into merged_master (Bitcoin PR #19323) 2020-11-26 03:36:32 +00:00
Andrew Poelstra
1aa51f0c4c Merge b52e25cc1b into merged_master (Bitcoin PR #19328) 2020-11-26 01:09:20 +00:00
Andrew Poelstra
7fabb1de9a Merge 5ec19df687 into merged_master (Bitcoin PR #19277) 2020-11-26 01:09:19 +00:00
Andrew Poelstra
c5a26c7e94 Merge ffa70801da into merged_master (Bitcoin PR #19256) 2020-11-26 01:09:17 +00:00
Andrew Poelstra
c473bf0bce Merge bb588669f9 into merged_master (Bitcoin PR #19331) 2020-11-26 01:09:16 +00:00
Andrew Poelstra
cac993d7e9 Merge 13397dc78f into merged_master (Bitcoin PR #19056) 2020-11-26 01:08:50 +00:00
Andrew Poelstra
29b17c1221 Merge 793e0ff22c into merged_master (Bitcoin PR #18698) 2020-11-26 01:08:49 +00:00
Andrew Poelstra
f89b990b78 Merge 448bdff263 into merged_master (Bitcoin PR #18317) 2020-11-26 01:08:46 +00:00
Andrew Poelstra
e5f1b2cdaa Merge 0ef0d33f75 into merged_master (Bitcoin PR #18038) 2020-11-26 01:08:33 +00:00
Andrew Poelstra
1ea940a2e2 Merge 4f802e59a0 into merged_master (Bitcoin PR #17509) 2020-11-26 01:08:28 +00:00
Andrew Poelstra
fd37b7c5d6 Merge 54f812d9d2 into merged_master (Bitcoin PR #18673) 2020-11-26 01:08:23 +00:00
Andrew Poelstra
2016bea80a Merge 544709763e into merged_master (Bitcoin PR #18571)
This resulted in double-initializing the asset directory (and from multiple
places), so I added a `ClearGlobalAssetDir` method and called it from the
qt test setup.
2020-11-26 01:08:20 +00:00
Andrew Poelstra
cdeb19ce22 Merge 088604221b into merged_master (Bitcoin PR #18253) 2020-11-26 01:07:48 +00:00
Andrew Poelstra
01aa5b3023 Merge 1f886243e4 into merged_master (Bitcoin PR #18224)
Added a new "signed but not finalized" vector to the functional tests, which took
some time to figure out how to generate. Evenetually I took the output of walletsignpsbt
from the nonconf->nonconf test and manually un-finalized that by pulling the
scriptwitness apart into a pubkey->signature mapping.
2020-11-26 01:07:48 +00:00
Andrew Poelstra
0246b86872 Merge 54a7ef612a into merged_master (Bitcoin PR #17399) 2020-11-26 01:07:48 +00:00
Andrew Poelstra
70819cbab4 Merge 36f42e1bf4 into merged_master (Bitcoin PR #18037) 2020-11-26 01:07:43 +00:00
Andrew Poelstra
68d0a25901 Merge 1326092e6c into merged_master (Bitcoin PR #17156)
This fixes a segfault I introduced in 981df590811 (#17371) a couple hundred PRs
ago, where we might out-of-bounds access the vout arrray of a non_witness_utxo
transaction in a PSBT.

This logic should probably be refactored after the rebase -- we sift through
the non_witness_utxos to find a scriptpubkey, which we use to get a wallet
provider, so we can pass this to SignPSBTInput, which then repeats the same
logic (for its own reasons, and without the segfault bug)....and we aren't
even calling SignPSBTInput for signing reasons! It has something to do with
blinding.
2020-11-14 16:52:12 +00:00
Andrew Poelstra
65f6fc64e9 Merge 5d2ff75e20 into merged_master (Bitcoin PR #17945) 2020-11-14 16:52:09 +00:00
Andrew Poelstra
009bc2fdfb Merge 99813a9745 into merged_master (Bitcoin PR #17829) 2020-11-14 16:52:02 +00:00
Andrew Poelstra
4219b6d7d9 Merge 48d64d73c0 into merged_master (Bitcoin PR #17564) 2020-11-14 16:51:59 +00:00
Andrew Poelstra
9709d02c23 Merge fae94785d9 into merged_master (Bitcoin PR #17524)
lol converting the psbt test vector to a pset one was pretty brutal. Conversion to
hex using rust-bitcoin and then manual hex-editing in vim.
2020-11-14 16:51:56 +00:00
Andrew Poelstra
fcc3e6c04c Merge ae6943620a into merged_master (Bitcoin PR #17407) 2020-11-09 23:10:14 +00:00
Andrew Poelstra
f5036e8b4b Merge 45e65376ac into merged_master (Bitcoin PR #17382) 2020-11-09 21:20:53 +00:00
Andrew Poelstra
1d3555cdaf Merge b05b28183c into merged_master (Bitcoin PR #16899) 2020-11-09 21:20:53 +00:00
Andrew Poelstra
c82f65f262 Merge 73b26e38d7 into merged_master (Bitcoin PR #17351) 2020-11-09 21:20:50 +00:00
Andrew Poelstra
bde84fefc4 Merge 3c40bc6726 into merged_master (Bitcoin PR #15921) 2020-11-09 21:20:48 +00:00
Andrew Poelstra
34af974d28 Merge 471e5f8829 into merged_master (Bitcoin PR #16839) 2020-11-09 21:20:47 +00:00
Andrew Poelstra
821f5256a5 Merge 46d6930f8c into merged_master (Bitcoin PR #16659) 2020-11-09 21:20:41 +00:00
Andrew Poelstra
4476f0cfa0 Merge a7be1cc92b into merged_master (Bitcoin PR #16728) 2020-11-09 21:20:18 +00:00
Andrew Poelstra
028f2d94d1 Merge 85883a9f8e into merged_master (Bitcoin PR #16443) 2020-11-09 21:20:14 +00:00
Andrew Poelstra
766d79d33f Merge 9ab9d63569 into merged_master (Bitcoin PR #16503) 2020-11-09 21:20:12 +00:00
Andrew Poelstra
c14d13f7fe Merge be0e8b4bff into merged_master (Bitcoin PR #15713) 2020-11-09 21:20:11 +00:00
Andrew Poelstra
293823aa7a Merge 7821821a23 into merged_master (Bitcoin PR #16452) 2020-11-09 21:20:10 +00:00
Andrew Poelstra
a8581ea138 Merge 6a135fbe5b into merged_master (Bitcoin PR #15638) 2020-10-28 03:16:57 +00:00
gzhao408
c201d73df3 style and nits for fee-checking in BroadcastTransaction 2020-10-08 14:11:16 -07:00
John Newbery
b048b275d9 [validation] Remove absurdfee from accepttomempool
Mempool behavior should not be user-specific.
Checking that txfee is acceptable should be
the responsibility of the wallet or client, not
the mempool.
2020-10-05 04:55:01 -07:00
gzhao408
8f1290c601 [rpc/node] check for high fee before ATMP in clients
Check absurd fee in BroadcastTransaction and RPC,
return TransactionError::MAX_FEE_EXCEEDED instead
of TxValidationResult::TX_NOT_STANDARD because this
is client preference, not a node-wide policy.
2020-10-05 04:54:05 -07:00
fanquake
1c4f59728c
Merge #19879: [p2p] miscellaneous wtxid followups
a8a64acaf3 [BroadcastTransaction] Remove unsafe move operator (Amiti Uttarwar)
125c038126 [p2p] Remove dead code (Amiti Uttarwar)
fc66d0a65c [p2p] Check for nullptr before dereferencing pointer (Adam Jonas)
cb79b9dbf4 [mempool] Revert unbroadcast set to tracking just txid (Amiti Uttarwar)

Pull request description:

  Addresses some outstanding review comments from #18044

  - reverts unbroadcast txids to a set instead of a map (simpler, communicates intent better, takes less space, no efficiency advantages of map)
  - adds safety around two touchpoints (check for nullptr before dereferencing pointer, remove an inaccurate std::move operator)
  - removes some dead code

  Links to comments on wtxid PR: [1](https://github.com/bitcoin/bitcoin/pull/18044#discussion_r460495254) [2](https://github.com/bitcoin/bitcoin/pull/18044#discussion_r460496023) [3](https://github.com/bitcoin/bitcoin/pull/18044#discussion_r463532611)

  thanks to jnewbery & adamjonas for flagging these ! !

ACKs for top commit:
  sdaftuar:
    utACK a8a64acaf3
  naumenkogs:
    utACK a8a64acaf3
  jnewbery:
    utACK a8a64acaf3

Tree-SHA512: 7be669cb30cc17fb9e06b50e636ef7887c6a27354697987e4e4d38dba4b8f50e175647587430cd9bc3295bec01ce8b1e6639a50a4249d8fff9b1ca1b9ead3277
2020-09-16 06:30:57 +08:00