Commit Graph

463 Commits

Author SHA1 Message Date
Luke Dashjr
d69357dcf5 Merge blockview-28.1+knots 2025-03-05 03:27:08 +00:00
Luke Dashjr
dc8fc35fc0 Merge gbt_rpc_options-28+knots 2025-03-05 03:27:08 +00:00
Luke Dashjr
ea31fd84e3 Merge 15428 via tor_gui_pairing-28+knots 2025-03-05 03:27:08 +00:00
Luke Dashjr
647dcf1fe7 Merge 9152 via sweepprivkeys 2025-03-05 03:27:08 +00:00
Luke Dashjr
c7dd00c6de Merge 24058 via bip322-28+knots 2025-03-05 03:27:08 +00:00
Luke Dashjr
2740504652 Merge g230 via gui_backup_formats 2025-03-05 03:27:08 +00:00
Luke Dashjr
d8114ff110 Merge 19463 via prune_locks 2025-03-05 03:27:08 +00:00
Luke Dashjr
ea957a557d Merge g562 via wallet_warn_reuse_gui 2025-03-05 03:27:08 +00:00
Luke Dashjr
f7e50a7e3f Merge 28616 via assumeutxo_unconfirmed_ux_Sjors-28 2025-03-05 03:27:08 +00:00
Luke Dashjr
8e36b81928 Merge 28345 via fix_bytespersigop_checks-mini 2025-03-05 03:27:08 +00:00
Luke Dashjr
d40c122004 Merge g236 via gui_init_walleterror_cont 2025-03-05 03:27:08 +00:00
Luke Dashjr
36708a812a add basic BIP-322 message signing support
Github-Pull: #24058
Rebased-From: 69bd3c4fe8586cf5b61a7df25dc73d4d473a1868
2025-03-01 16:26:00 +00:00
Luke Dashjr
8ef56b3f03 mining: Return shared_ptr from CreateNewBlock 2025-02-24 21:28:53 +00:00
Luke Dashjr
d3e5f1a69f Merge branch 'gbt_rpc_options-28+knots' into blockview-28.1+knots 2025-02-24 21:27:45 +00:00
Luke Dashjr
927a2e9643 Add signals for network local address added/removed 2025-02-24 21:26:56 +00:00
Luke Dashjr
23fd2eb9b1 interfaces/mining: Add createNewBlock2 that does not override or lose options 2025-02-24 21:12:50 +00:00
Luke Dashjr
ef4e8669cc HACK: RPC: Workaround libc++ bug compiling sweepprivkeys 2025-02-21 16:29:15 +00:00
Sjors Provoost
d8a448249a wallet: add IsTxAssumed() to WalletTxStatus
Determine if a given transaction belongs to a block that is assumed to be valid pending background validation.

Add this information to WalletTxStatus.

Github-Pull: #28616
Rebased-From: a6c53bb24436ecc1ae717b032c0cccdd704044eb
2025-02-08 18:40:02 +00:00
Luke Dashjr
d03d19a05f Merge branch 'wallet_warn_reuse_gui' into gui_netwatch-28+knots 2024-11-21 22:17:05 +00:00
Luke Dashjr
1bb949be27 GUI: Omit DbDump option for backup of BDB wallets 2024-11-12 01:44:25 +00:00
Luke Dashjr
941ac94094 interfaces/Wallet: Add DumpWallet format to backupWallet interface 2024-11-12 01:44:25 +00:00
Luke Dashjr
922b6d2eea interfaces/Wallet: Add the ability to choose a backup format
Also outputs a bilingual_str error (unused for now)
2024-11-12 01:44:25 +00:00
Luke Dashjr
ee8bcadb84 Support for persisting prune locks in blocks/index db 2024-09-03 04:29:43 +00:00
Luke Dashjr
55fc577c9a Add internal interfaces for prune locks
Including desc member of PruneLockInfo for a human-readable description
2024-09-03 01:31:45 +00:00
Luke Dashjr
117fc4c6fe Diff-minimise 2024-08-30 19:44:54 +00:00
Luke Dashjr
1cee5b1ac7 node: Refactor BroadcastTransaction to accept a CFeeRate maximum 2024-08-30 19:39:21 +00:00
Luke Dashjr
4b3cc3d48e policy: Delete buggy GetVirtualTransactionSize(CTransaction&) 2024-08-30 19:34:03 +00:00
ismaelsadeeq
1b41d45d46
wallet: bugfix: ensure atomicity in settings updates
- Settings updates were not thread-safe, as they were executed in
  three separate steps:

  1) Obtain settings value while acquiring the settings lock.
  2) Modify settings value.
  3) Overwrite settings value while acquiring the settings lock.

  This approach allowed concurrent threads to modify the same base value
  simultaneously, leading to data loss. When this occurred, the final
  settings state would only reflect the changes from the last thread
  that completed the operation, overwriting updates from other threads.

  Fix this by making the settings update operation atomic.

- Add test coverage for this behavior.

Co-authored-by: furszy <matiasfurszyfer@protonmail.com>
2024-08-26 13:41:56 +01:00
Ava Chow
d56a450bf5 gui: Use wallet name for wallet migration rather than WalletModel
To prepare for migrating wallets that are not loaded, when migration
occurs in the GUI, it should not rely on a WalletModel existing.

Co-authored-by: furszy <matiasfurszyfer@protonmail.com>
2024-08-13 11:25:38 -04:00
Ava Chow
28fc562f26 wallet, interfaces: Include database format in listWalletDir 2024-08-13 11:25:38 -04:00
Hennadii Stepanov
ec8b38c7b9
Merge bitcoin-core/gui#626: Showing Local Addresses in Node Window
189c987386 Showing local addresses on the Node Window (Jadi)
a5d7aff867 net: Providing an interface for mapLocalHost (Jadi)

Pull request description:

  This change adds a new row to the Node Window (debugwindow.ui)
  under the Network section which shows the LocalAddresses.

  fixes #564

  <!--
  *** Please remove the following help text before submitting: ***

  Pull requests without a rationale and clear improvement may be closed
  immediately.

  GUI-related pull requests should be opened against
  https://github.com/bitcoin-core/gui
  first. See CONTRIBUTING.md
  -->

  <!--
  Please provide clear motivation for your patch and explain how it improves
  Bitcoin Core user experience or Bitcoin Core developer experience
  significantly:

  * Any test improvements or new tests that improve coverage are always welcome.
  * All other changes should have accompanying unit tests (see `src/test/`) or
    functional tests (see `test/`). Contributors should note which tests cover
    modified code. If no tests exist for a region of modified code, new tests
    should accompany the change.
  * Bug fixes are most welcome when they come with steps to reproduce or an
    explanation of the potential issue as well as reasoning for the way the bug
    was fixed.
  * Features are welcome, but might be rejected due to design or scope issues.
    If a feature is based on a lot of dependencies, contributors should first
    consider building the system outside of Bitcoin Core, if possible.
  * Refactoring changes are only accepted if they are required for a feature or
    bug fix or otherwise improve developer experience significantly. For example,
    most "code style" refactoring changes require a thorough explanation why they
    are useful, what downsides they have and why they *significantly* improve
    developer experience or avoid serious programming bugs. Note that code style
    is often a subjective matter. Unless they are explicitly mentioned to be
    preferred in the [developer notes](/doc/developer-notes.md), stylistic code
    changes are usually rejected.
  -->

  <!--
  Bitcoin Core has a thorough review process and even the most trivial change
  needs to pass a lot of eyes and requires non-zero or even substantial time
  effort to review. There is a huge lack of active reviewers on the project, so
  patches often sit for a long time.
  -->

ACKs for top commit:
  pablomartin4btc:
    re-ACK 189c987386
  furszy:
    utACK 189c987

Tree-SHA512: 93f201bc6d21d81b27b87be050a447b841f01e3efb69b9eca2cc7af103023d7cd69eb5e16e2875855573ef51a5bf74a6ee6028636c1b6798cb4bb11567cb4996
2024-08-02 14:19:02 +01:00
Jadi
a5d7aff867 net: Providing an interface for mapLocalHost
Contributes to #564 by providing an interface for mapLocalHost
through net -> node interface -> clientModel. Later this value can be
read by GUI to show the local addresses.
2024-08-02 10:40:33 +03:30
Sjors Provoost
6b4c817d4b
refactor: pass BlockCreateOptions to createNewBlock
Rather than pass options individually to createNewBlock and then
combining them into BlockAssembler::Options, this commit introduces
BlockCreateOptions and passes that instead.

Currently there's only one option (use_mempool) but the next
commit adds more.

Co-authored-by: Ryan Ofsky <ryan@ofsky.org>
2024-07-16 10:27:57 +02:00
Hennadii Stepanov
ff100bb549
Merge bitcoin-core/gui#825: Show maximum mempool size in information window
4a028cf54c gui: show maximum mempool size in information window (Sebastian Falbesoner)
bbde6ffefe add node interface method for getting maximum mempool size (Sebastian Falbesoner)

Pull request description:

  This PR adds the maximum mempool size to the information window (Menu "Window" -> "Information" -> section "Memory Pool" -> line "Memory usage").

  master:

  ![image](https://github.com/bitcoin-core/gui/assets/91535/157e92f5-7d06-4303-b4ef-bcdfac5527e3)

  PR:

  ![image](https://github.com/bitcoin-core/gui/assets/91535/796322aa-9f16-4b09-9893-bf52a3898a5c)

ACKs for top commit:
  MarnixCroes:
    tested ACK 4a028cf54c
  pablomartin4btc:
    tACK 4a028cf54c
  luke-jr:
    tACK 4a028cf54c & in Knots
  hebasto:
    ACK 4a028cf54c, tested on Ubuntu 24.04.

Tree-SHA512: c10fb23605d060cea19a86d11822fc4d12496b19547870052aace503670e62e4c4e19ae4c2c4fbf7420a472adb071c9ddebe82447e0cfbce5a6fb9fcd7b9eda3
2024-07-14 13:07:44 +01:00
MarcoFalke
3333bae9b2
tidy: modernize-use-equals-default 2024-07-08 11:12:01 +02:00
Sjors Provoost
a74b0f93ef
Have testBlockValidity hold cs_main instead of caller
The goal of interfaces is to eventually run in their own process,
so we can't use EXCLUSIVE_LOCKS_REQUIRED in their declaration.

However TestBlockValidaty will crash (in its call to ConnectBlock)
if the tip changes from under the proposed block.

Have the testBlockValidity implementation  hold the lock instead,
and non-fatally check for this condition.
2024-06-27 08:58:25 +02:00
Sjors Provoost
75ce7637ad
refactor: testBlockValidity make out argument last 2024-06-26 12:24:48 +02:00
Sjors Provoost
83a9bef0e2
Add missing include for mining interface
Needed for std::unique_ptr
2024-06-26 12:24:47 +02:00
Sebastian Falbesoner
bbde6ffefe add node interface method for getting maximum mempool size 2024-06-20 17:43:37 +02:00
Sjors Provoost
a9716c53f0
rpc: call IsInitialBlockDownload via miner interface 2024-06-18 21:07:51 +02:00
Sjors Provoost
dda0b0834f
rpc: minize getTipHash() calls in gbt
Set tip at the start of the function and only update it for a long poll.

Additionally have getTipHash return an optional, so the
caller can explicitly check that a tip exists.
2024-06-18 18:47:52 +02:00
Sjors Provoost
7b4d3249ce
rpc: call processNewBlock via miner interface 2024-06-18 18:47:52 +02:00
Sjors Provoost
9e228351e7
rpc: getTransactionsUpdated via miner interface 2024-06-18 18:47:52 +02:00
Sjors Provoost
4bf2e361da
rpc: call CreateNewBlock via miner interface 2024-06-18 18:47:51 +02:00
Sjors Provoost
404b01c436
rpc: getblocktemplate getTipHash() via Miner interface 2024-06-18 18:47:51 +02:00
Sjors Provoost
d8a3496b5a
rpc: call TestBlockValidity via miner interface 2024-06-18 18:47:51 +02:00
Sjors Provoost
8ecb681678
Introduce Mining interface
Start out with a single method isTestChain() that's used by the getblocktemplate RPC.
2024-06-18 18:47:51 +02:00
Ryan Ofsky
4d05d3f3b4 util: add TransactionError includes and namespace declarations
Add TransactionError to node namespace and include it directly instead of
relying on indirect include through common/messages.h

This is a followup to a previous commit which moved the TransactionError enum.
These changes were done in a separate followup just to keep the previous commit
more minimal and easy to review.
2024-05-16 10:16:08 -05:00
Ryan Ofsky
02e62c6c9a common: Add PSBTError enum
Add separate PSBTError enum instead of reusing TransactionError enum for PSBT
operations, and drop unused error codes. The error codes returned by PSBT
operations and transaction broadcast functions mostly do not overlap, so using
an unified enum makes it harder to call any of these functions and know which
errors actually need to be handled.

Define PSBTError in the common library because PSBT functionality is
implemented in the common library and used by both the node (for rawtransaction
RPCs) and the wallet.
2024-05-16 10:16:08 -05:00
Ryan Ofsky
6861f954f8 util: move util/message to common/signmessage
Move util/message to common/signmessage so it is named more clearly, and
because the util library is not supposed to depend on other libraries besides
the crypto library. The signmessage functions use CKey, CPubKey, PKHash, and
DecodeDestination functions in the consensus and common libraries.
2024-05-16 11:16:08 -04:00