Commit graph

1207 commits

Author SHA1 Message Date
Andrew Poelstra
af441ca7bb Merge branch 'master' into 2021-10--rc2 2021-10-06 23:13:15 +00:00
Andrew Poelstra
7103471fd5 walletcreatefundedpsbt: signal blinding data correctly to FundTransaction 2021-09-30 21:54:10 +00:00
Andrew Chow
a143b7b87d Disallow sendtoaddress and sendmany when private keys disabled
Github-Pull: #21201
Rebased-From: 0997019e76
(cherry picked from commit d6b5eb5fcc)
2021-09-22 02:05:02 +00:00
Jon Atack
b4eb953986 wallet, bugfix: allow send to take string fee rate values
Github-Pull: #20573
Rebased-From: ce207d6b93
(cherry picked from commit 06c84232b3)
2021-09-22 02:05:01 +00:00
Jon Atack
a97c53172a Use the correct incremental fee constant in bumpfee help
and remove redundant units ("Must be at least 1.000 sat/vB sat/vB" -> "1.00 sat vB")

Github-Pull: #20426
Rebased-From: 9f08780dd7
(cherry picked from commit 6313362553)
2021-09-22 02:05:01 +00:00
Jon Atack
765c2b4d17 Allow zero-fee fundrawtxn and walletcreatefundedpsbt calls
A check to raise an error on zero-fee txns was mistakenly extended in commit
a0d4957 from the bumpfee and send{toaddress, many} RPCs to also include
fundrawtransaction and walletcreatefundedpsbt.

This commit overrides zero fee rate checking for these two RPCs, not only for
the feeRate (BTC/kvB) arg to return to previous behavior, but also for the new
fee_rate (sat/vB) arg.

Github-Pull: #20426
Rebased-From: 1b3d700928
(cherry picked from commit 54e1edcc2b)
2021-09-22 02:05:01 +00:00
Jon Atack
df1bd79314 wallet: fix and improve upgradewallet error responses
(cherry picked from commit ca8cd893bb)
2021-09-22 02:05:01 +00:00
Jon Atack
77627d8efd wallet: fix and improve upgradewallet result responses
(cherry picked from commit 99d56e3571)
2021-09-22 02:05:01 +00:00
MarcoFalke
ae26ff27a9 wallet: Do not treat default constructed types as None-type
(cherry picked from commit fa69c2c784)
2021-09-22 02:05:01 +00:00
MarcoFalke
2fe52979ea refactor: Change pointer to reference because it can not be null
(cherry picked from commit fac4e136fa)
2021-09-22 02:05:01 +00:00
Luke Dashjr
4f36e4cfc6 RPC/Wallet: unloadwallet: Clarify docs/error when both the RPC endpoint and wallet_name parameter specify a wallet
(cherry picked from commit b1f59d55d9)
2021-09-22 02:05:01 +00:00
Andrew Poelstra
388d47f9a3
Merge ElementsProject/elements#1010: Support supplying contract hash to issueasset RPC
47d43f14ad Support supplying contract hash to issueasset RPC (Steven Roose)

Pull request description:

  forward port of https://github.com/ElementsProject/elements/pull/993.
  Closes https://github.com/ElementsProject/elements/issues/985.

ACKs for top commit:
  apoelstra:
    ACK 47d43f14ad

Tree-SHA512: e29cda86291c8fe4650595129af477c6dc8648465a5305002ae521bac21a114d6a1c44738786351ac4355eafdcb0da3e4e42c8f204137f9e31e03df20a91db64
2021-09-16 23:06:23 +00:00
Andrew Poelstra
b456b72353
Merge ElementsProject/elements#1039: claimpegin: sanity-check fee in case fallbackfee is disabled, throw explicit exception
fc8bfc1f2c claimpegin: add regression test for behavior when fallbackfee is disabled (Andrew Poelstra)
fd520079a1 claimpegin: sanity-check fee in case fallbackfee is disabled, throw explicit exception (Andrew Poelstra)

Pull request description:

  Produce a much less confusing error message in `claimpegin` in the case that estimatesmartfee fails and no fallbackfee is set.

ACKs for top commit:
  stevenroose:
    ACK fc8bfc1f2c

Tree-SHA512: 2ae658ab3dc90b7319d047c192401a0dcc97e015e45b5b0db71db1d89d63605ba107312d8b4cf1c4aaef72437aa20aa33b442744f64fc08535b15610e6f4a526
2021-09-15 22:36:08 +00:00
Steven Roose
47d43f14ad
Support supplying contract hash to issueasset RPC 2021-09-15 16:23:32 -01:00
Andrew Chow
ac580db4ec pset, rpc: Do not fail walletprocesspsbt if missing utxos when blinding
Instead of discarding a PSET when the UTXOs are missing and the blinding
step fails in walletprocesspsbt, just ignore a missing UTXOs error and
don't blind.
2021-09-11 20:59:39 -04:00
Andrew Poelstra
fd520079a1 claimpegin: sanity-check fee in case fallbackfee is disabled, throw explicit exception
Core's fee logic has a special case where it will give a zero fee estimate
if fallbackfee is disabled and it has no good data from estimatesmartfee.
If it gets a nonzero value below the min relay fee, it'll instead use the
min relay fee ... but zero is special. I think this is a bug. Regardless,
it was causing confusing error messages in `claimpegin`, especially as
the fallbackfee is no longer set by default as of 0.21
2021-09-09 20:36:36 +00:00
Andrew Poelstra
abb52c861c rpc: specify that witnessScript is optional for signblock and combineblocksigs RPC call 2021-09-07 00:47:04 +00:00
Andrew Poelstra
b4369c06a2 rpc: change walletprocesspsbt help text to match upstream 2021-09-05 22:52:16 +00:00
Bezdrighin
c607835bad Better error messages for invalid addresses
This commit addresses #20809.

We add an additional 'error' property in the result of 'validateaddress' in case the address is not valid that gives a short description of why the address in invalid. We also change the error message returned by 'getaddressinfo' in case the address is invalid.

https://github.com/bitcoin/bitcoin/pull/20832 (1/1)

ELEMENTS: Merge conflicts resolved based on d6c85c5620 (from 22.0 rebase)
2021-08-17 22:32:47 +00:00
Andrew Chow
80ff739c7a Default to adding bip32 derivs 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
25df8aa12b Fixes to FillPSBT 2021-06-22 14:42:19 -04:00
Andrew Chow
3db2622e70 Only sign blinded PSBTs in walletprocesspsbt 2021-06-22 14:42:19 -04:00
Andrew Chow
124efa2668 Return better errors for BlindingStatus 2021-06-22 14:42:19 -04:00
Andrew Chow
f686e0fa54 Remove walletfillpsbtdata RPC 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
e6cc0fd693 Have walletprocesspsbt blind before signing 2021-06-22 14:42:19 -04:00
Andrew Chow
9a450ecc19 Set blinder_index to self in walletcreatefundedpsbt 2021-06-22 14:42:19 -04:00
Andrew Chow
3f6c8bfda1 Add walletblindpsbt rpc 2021-06-22 14:42:19 -04:00
Andrew Chow
e7dd046b03 Implement BlindPSBT 2021-06-22 14:42:19 -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
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
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
40c09f637c rpc: fix error message accidentally changed in 5e62edc 2021-04-15 18:06:52 +00: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
47885e97bf ci: tighten locking in signblock to ensure consistent main/wallet locking order 2021-03-26 17:33:05 +00:00
Andrew Poelstra
2f5c624b18 ci: eliminate a bunch of build warnings
Includes removing some variables from qt/intro.cpp that've been
unused since #13216 and ought to have been removed in the 0.17
rebase, but our linters were not so agressive then. Similarly
fix the BITCOIN_PID_FILE, whose value was incorrectly changed
in the 0.18 rebase.
2021-03-26 17:33:05 +00:00
Andrew Poelstra
68bfd70b43 ci: various linter / CI compiler error fixes
Includes changing TRUE to OP_TRUE for anyone-can-spend output name,
to avoid symbol conflict on win64 builds, which is really obnoxious.
2021-03-26 17:33:04 +00:00
Andrew Poelstra
1e98c9fa9e fix RPC linter issues 2021-03-26 17:33:02 +00:00
Andrew Poelstra
5b89a9fc92 Merge 80e32e120e into merged_master (Bitcoin PR #20305) 2020-12-02 17:53:59 +00:00
Andrew Poelstra
94f7b7ba64 Merge c463f70fb0 into merged_master (Bitcoin PR #20139) 2020-12-02 16:13:18 +00:00
Andrew Poelstra
fa64cc7608 Merge 0ede354367 into merged_master (Bitcoin PR #20386) 2020-12-02 14:48:46 +00:00
Andrew Poelstra
2577c79f78 Merge 5d32009f1a into merged_master (Bitcoin PR #20220) 2020-12-02 03:05:14 +00:00
Andrew Poelstra
3f275df2be Merge 17c6fb176a into merged_master (Bitcoin PR #20282) 2020-12-02 02:10:14 +00:00
Andrew Poelstra
f3afbf3d85 Merge f3727fd735 into merged_master (Bitcoin PR #20156) 2020-12-01 18:41:26 +00:00
Andrew Poelstra
9eb2afd7ff Merge f5bd46a4cc into merged_master (Bitcoin PR #20125) 2020-12-01 14:13:32 +00:00
Andrew Poelstra
e483648523 Merge cbb5f3a2d5 into merged_master (Bitcoin PR #19836) 2020-12-01 04:16:10 +00:00