Commit graph

125 commits

Author SHA1 Message Date
Byron Hambly
ccd7b72d79 Merge e30b6ea194 into merged_master (Bitcoin PR bitcoin/bitcoin#24067) 2023-06-28 14:48:32 +00:00
Byron Hambly
7878ba47b9 Merge c561f2f06e into merged_master (Bitcoin PR bitcoin/bitcoin#23497) 2023-06-19 09:28:31 +00:00
James Dorfman
81119e6161 Merge fa74718414 into merged_master (Bitcoin PR bitcoin/bitcoin#24026) 2023-06-15 20:36:05 +00:00
Byron Hambly
47626b5a64 Merge 623745ca74 into merged_master (Bitcoin PR bitcoin/bitcoin#23912) 2023-06-14 15:44:11 +00:00
Byron Hambly
01c3d7fbec Merge f7367b88e1 into merged_master (Bitcoin PR bitcoin/bitcoin#23842) 2023-06-14 06:43:35 +00:00
Byron Hambly
8886ceae12 Merge 63b5dfac21 into merged_master (Bitcoin PR bitcoin-core/gui#459) 2023-06-14 05:54:10 +00:00
Byron Hambly
8bff356855 Merge a30642926a into merged_master (Bitcoin PR bitcoin/bitcoin#23721) 2023-06-13 13:41:22 +00:00
Byron Hambly
3e43f34618 Merge 014cae2ee8 into merged_master (Bitcoin PR bitcoin/bitcoin#23591) 2023-05-31 11:32:20 +00:00
Byron Hambly
498907a233 Merge 816e15ee81 into merged_master (Bitcoin PR bitcoin/bitcoin#22951) 2023-05-09 11:50:39 +00:00
Byron Hambly
c96554c071 Merge 09cb5ec6c8 into merged_master (Bitcoin PR bitcoin/bitcoin#23065) 2023-04-24 10:05:11 +00:00
Byron Hambly
3e078a0566 Merge 638855af63 into merged_master (Bitcoin PR bitcoin/bitcoin#19101) 2023-04-10 10:37:34 +00:00
Andrea Bonel
60b913e341 Elements-qt: Correctly display the amount in the sender's wallet after using Send button 2022-08-31 19:12:50 -03:00
MarcoFalke
888841ea8d
interfaces: Remove unused is_final 2022-01-14 11:28:45 +01:00
MarcoFalke
c561f2f06e
Merge bitcoin/bitcoin#23497: Add src/node/ and src/wallet/ code to node:: and wallet:: namespaces
e5b6aef612 Move CBlockFileInfo::ToString method where class is declared (Russell Yanofsky)
f7086fd8ff Add src/wallet/* code to wallet:: namespace (Russell Yanofsky)
90fc8b089d Add src/node/* code to node:: namespace (Russell Yanofsky)

Pull request description:

  There are no code changes, this is just adding `namespace` and `using` declarations and `node::` or `wallet::` qualifiers in some places.

  Motivations for this change are:

  - To make it easier to see when node and wallet code is being accessed places where it shouldn't be. For example if GUI code is accessing node and wallet internals or if wallet and node code are referencing each other.
  - To make source code organization clearer ([#15732](https://github.com/bitcoin/bitcoin/issues/15732)), being able to know that `wallet::` code is in `src/wallet/`, `node::` code is in `src/node/`, `init::` code is in `src/init/`, `util::` code is in `src/util/`, etc.

  Reviewing with `git log -p -n1 -U0 --word-diff-regex=.` can be helpful to verify this is only updating declarations, not changing code.

ACKs for top commit:
  achow101:
    ACK e5b6aef612
  MarcoFalke:
    Concept ACK e5b6aef612 🍨

Tree-SHA512: 3797745c90246794e2d55a2ee6e8b0ad5c811e4e03a242d3fdfeb68032f8787f0d48ed4097f6b7730f540220c0af99ef423cd9dbe7f76b2ec12e769a757a2c8d
2022-01-11 11:11:00 +01:00
Hennadii Stepanov
3a45dc36a6
Change type of backup_file parameter in RestoreWallet/restoreWallet
`fs::path` looks more native than `std::string` for a parameter which
represents a backup file. This change eliminates back-and-forth type
conversions.
2022-01-11 00:00:00 +02:00
Russell Yanofsky
f7086fd8ff Add src/wallet/* code to wallet:: namespace 2022-01-06 22:14:16 -05:00
Hennadii Stepanov
f47dda2c58
scripted-diff: Bump copyright headers
-BEGIN VERIFY SCRIPT-
./contrib/devtools/copyright_header.py update ./
-END VERIFY SCRIPT-

Commits of previous years:
* 2020: fa0074e2d8
* 2019: aaaaad6ac9
2021-12-30 19:36:57 +02:00
Russell Yanofsky
ff5f6dea53 scripted-diff: Rename interfaces::WalletClient to interfaces::WalletLoader
Name has been confusing since it was introduced, and it was pointed in
recent review club as https://bitcoincore.reviews/10102 that it was
particularly unclear how interfaces::WalletClient was different from
interfaces::Wallet.

-BEGIN VERIFY SCRIPT-
ren() { git grep -l "$1" src | xargs sed -i "s/$1/$2/g"; }
ren WalletClient WalletLoader
ren walletClient walletLoader
ren wallet_client wallet_loader
ren "wallet clients release the wallet" "wallet pointer owners release the wallet"
ren "wallet client" "wallet loader"
ren "Wallet client" "Wallet loader"
-END VERIFY SCRIPT-
2021-12-22 13:44:55 -05:00
Sjors Provoost
56113daef4
wallet: add taprootEnabled() to interface 2021-12-21 11:31:38 +07:00
w0xlt
4807f73f48 refactor: Implement restorewallet() logic in the wallet section
Currently restorewallet() logic is written in the RPC layer
and it can´t be reused by GUI. So it reimplements this in the
wallet and interface sections and then, GUI can access it.
2021-12-14 19:18:56 -03:00
MarcoFalke
fa2c991ec9
refactor: Use underlying type of isminetype for isminefilter 2021-11-25 14:56:30 +01:00
fanquake
d09071da5b
[MOVEONLY] consensus: move amount.h into consensus
Move amount.h to consensus/amount.h.
Renames, adds missing and removes uneeded includes.
2021-09-30 07:41:57 +08:00
Samuel Dobson
d96b000e94 Make GUI UTXO lock/unlock persistent 2021-09-25 23:50:06 +12:00
Samuel Dobson
c52789365e Allow locked UTXOs to be store in the wallet database 2021-09-25 23:50:06 +12:00
Russell Yanofsky
62a09a3077 refactor: remove ::vpwallets and related global variables
Move global wallet variables to WalletContext struct
2021-08-17 04:05:15 -04:00
Andrew Poelstra
65d3a13da4 Merge 9795e8ec8c into merged_master (Bitcoin PR bitcoin/bitcoin#22214) 2021-07-25 01:01:39 +00:00
Andrew Poelstra
1756fb7e5a Merge 68a89d7a46 into merged_master (Bitcoin PR bitcoin-core/gui#4) 2021-07-23 16:10:31 +00:00
Andrew Poelstra
18986689be Merge 907d636e5e into merged_master (Bitcoin PR bitcoin/bitcoin#21353) 2021-07-21 20:30:59 +00:00
Russell Yanofsky
f47e802839 Rearrange fillPSBT arguments
Move fillPSBT input-output argument before output-only arguments. This is a
temporary workaround which can go away with improvements to libmultiprocess
code generator. Currently code generator figures out order of input-output
parameters by looking at input list, but it would make more sense for it to
take order from output list, so input-only parameters still have to be first
but there is more flexibility for the other parameters.
2021-06-10 10:58:45 -04:00
Samuel Dobson
68a89d7a46
Merge bitcoin-core/gui#4: UI external signer support (e.g. hardware wallet)
1c4b456e1a gui: send using external signer (Sjors Provoost)
24815c6309 gui: wallet creation detects external signer (Sjors Provoost)
3f845ea299 node: add externalSigners to interface (Sjors Provoost)
62ac119f91 gui: display address on external signer (Sjors Provoost)
450cb40a34 wallet: add displayAddress to interface (Sjors Provoost)
eef8d64529 gui: create wallet with external signer (Sjors Provoost)
6cdbc83e93 gui: add external signer path to options dialog (Sjors Provoost)

Pull request description:

  Big picture overview in [this gist](https://gist.github.com/Sjors/29d06728c685e6182828c1ce9b74483d).

  This PR adds GUI support for external signers, based on the since merged bitcoin/bitcoin#16546 (RPC).

  The UX isn't amazing - especially the blocking calls - but it works.

  First we adds a GUI setting for the signer script (e.g. path to HWI):

  <img width="625" alt="Schermafbeelding 2019-08-05 om 19 32 59" src="https://user-images.githubusercontent.com/10217/62483415-e1ff1680-b7b7-11e9-97ca-8d2ce54ca1cb.png">

  Then we add an external signer checkbox to the wallet creation dialog:

  <img width="374" alt="Schermafbeelding 2019-11-07 om 19 17 23" src="https://user-images.githubusercontent.com/10217/68416387-b57ee000-0194-11ea-9730-127d60273008.png">

  It's checked by default if HWI detects a device. It also grabs the name. It then creates a fresh wallet and imports the keys.

  You can verify an address on the device (blocking...):
  <img width="673" alt="Schermafbeelding 2019-08-05 om 19 29 22" src="https://user-images.githubusercontent.com/10217/62483560-43bf8080-b7b8-11e9-9902-8a036116dc4b.png">

  Sending, including coin selection, Just Works(tm) as long the device is present.

  ~External signer support is enabled by default when the GUI is configured and Boost::Process is present.~

  External signer support remains disabled by default, see https://github.com/bitcoin/bitcoin/pull/21935.

ACKs for top commit:
  achow101:
    Code Review ACK 1c4b456e1a
  hebasto:
    ACK 1c4b456e1a, tested on Linux Mint 20.1 (Qt 5.12.8) with HWW `2.0.2-rc.1`.
  promag:
    Tested ACK 1c4b456e1a but rebased with e033ca1379, with HWI 2.0.2, with Nano S and Nano X.
  meshcollider:
    re-code-review ACK 1c4b456e1a

Tree-SHA512: 3503113c5c69d40adb6ce364d8e7cae23ce82d032a00474ba9aeb6202eb70f496ef4a6bf2e623e5171e524ad31ade7941a4e0e89539c64518aaec74f4562d86b
2021-06-09 18:59:59 +12:00
Sjors Provoost
62ac119f91
gui: display address on external signer 2021-05-27 14:01:54 +02:00
Sjors Provoost
450cb40a34
wallet: add displayAddress to interface 2021-05-27 14:01:54 +02:00
Russell Yanofsky
62252c95e5 interfaces: Stop exposing wallet destdata to gui
Stop giving GUI access to destdata rows in database. Replace with narrow
API just for saving and reading receive request information.

This simplifies code and should prevent the GUI from interfering with
other destdata like address-used status.

Note: No user-visible behavior is changing in this commit. New
CWallet::SetAddressReceiveRequest() implementation avoids a bug in
CWallet::AddDestData() where a modification would leave the previous
value in memory while writing the new value to disk. But it doesn't
matter because the GUI doesn't currently expose the ability to modify
receive requests, only to add and erase them.
2021-03-03 10:19:35 -04:00
Andrew Poelstra
a7602fb56d Merge 652c45fdbb into merged_master (Bitcoin PR #15454) 2020-11-29 06:12:28 +00:00
Andrew Poelstra
d4e8eb56b0 Merge 56d47e19ed into merged_master (Bitcoin PR #19619) 2020-11-29 00:21:17 +00:00
Andrew Poelstra
4087c88a7e Merge 269a7ccb27 into merged_master (Bitcoin PR #19099) 2020-11-28 17:53:38 +00:00
Andrew Poelstra
9ac0c98505 Merge 7173a3c73b into merged_master (Bitcoin PR #19396) 2020-11-26 01:09:18 +00:00
Andrew Poelstra
c473bf0bce Merge bb588669f9 into merged_master (Bitcoin PR #19331) 2020-11-26 01:09:16 +00:00
Andrew Poelstra
4839db857d Merge c27330897d into merged_master (Bitcoin PR #18027) 2020-11-26 01:09:11 +00:00
Andrew Poelstra
bfa1cef745 Merge f4b603cff6 into merged_master (Bitcoin PR #17993) 2020-11-26 01:08:53 +00:00
Andrew Poelstra
d359b993f1 Merge a587f85853 into merged_master (Bitcoin PR #18587) 2020-11-26 01:08:46 +00:00
Andrew Poelstra
d4711bdf91 Merge 23c926d859 into merged_master (Bitcoin PR #18699) 2020-11-26 01:08:37 +00:00
Andrew Poelstra
4414990576 Merge 608359b071 into merged_master (Bitcoin PR #16426) 2020-11-26 01:08:35 +00:00
Andrew Poelstra
1c12ae1719 Merge eef90c14ed into merged_master (Bitcoin PR #16528)
This is the 43-commit descriptor wallet PR. It was remarkably easy to merge, given
its magnitude. With this commit Elements supports importing Bitcoin descriptors
and deriving (Bitcoin) addresses, though of course it does not support blinding
yet. That is a post-rebase project.

The material changes were:

1. Changing constants in the tests (super annoying but nothing surprising)

2. Adding a missing "skip if this coin is not ours" check in src/script/sign.cpp
   which was causing us to erroneously remove existing witnesses from transactions.
   This wasn't a problem before this commit since we would only ask specific
   scriptpubkeymans to sign, and we'd never ask any to sign inputs we didn't
   own. Andy simplified the logic here to always try every scriptpubkeyman,
   which means they have to play a bit more nicely with each other.

Other than that, this was a big diff with many conflicts but literally all of
them were "we both added code" and the resolution was to take both sides.
2020-11-26 01:08:31 +00:00
Andrew Poelstra
fd37b7c5d6 Merge 54f812d9d2 into merged_master (Bitcoin PR #18673) 2020-11-26 01:08:23 +00:00
Andrew Poelstra
90081b0645 Merge 99d6a5be8b into merged_master (Bitcoin PR #17999) 2020-11-26 01:08:16 +00:00
Andrew Poelstra
943443791e Merge f2880e21ef into merged_master (Bitcoin PR #18160) 2020-11-26 01:08:05 +00:00
Andrew Poelstra
bdd87dc5fa Merge 694f4cbd78 into merged_master (Bitcoin PR #18312) 2020-11-26 01:08:02 +00:00
Andrew Poelstra
90c7d5774a Merge ac579ada7e into merged_master (Bitcoin PR #18278) 2020-11-26 01:08:00 +00:00
Andrew Poelstra
5b9f316537 Merge dcf2ccbfde into merged_master (Bitcoin PR #18115)
I really like this PR, but it wound up being pretty nontrivial to merge.
The crux is that it pulls PSBT signing logic into scriptpubkey manager,
which is where it belongs, but for us this means reasoning about pegins
inside script/sign.cpp.

However, sign.cpp is part of libbitcoin_common, which does not include
anything for reasoning about PoW or RPC (lol) or anything heavy about
that. This means that some pegin validation had to remain split between
the wallet/rpc layer and sign.cpp. I added a new file script/pegins.cpp
which has the (one) method we actually need in sign.cpp.

Aside from that, this diff is very large but is mostly just moving our
code changes to wallet/psbtwallet.* into wallet/wallet.* where those
functions now live. As far as review, it's probably not worthwhile to
spend too much too much time on this since it's going to be change
again in #16528 and others. The test coverage is pretty extensive.
2020-11-26 01:07:51 +00:00