aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces
AgeCommit message (Collapse)Author
2024-09-17Add waitTipChanged to Mining interfaceSjors Provoost
Co-authored-by: TheCharlatan <seb.kung@gmail.com>
2024-09-17Rename getTipHash() to getTip() and return BlockRefSjors Provoost
2024-09-17refactor: rename BlockKey to BlockRefSjors Provoost
2024-09-13Have createNewBlock return BlockTemplate interfaceSjors Provoost
An external program that uses the Mining interface may need quick access to some information in the block template, while it can wait a bit longer for the full raw transaction data. This would be the case for a Stratum v2 Template Provider which needs to send a NewTemplate message (which doesn't include transactions) as quickly as possible.
2024-09-06multiprocess: Add -ipcbind option to bitcoin-nodeRussell Yanofsky
Add `-ipcbind` option to `bitcoin-node` to listen on an IPC socket and accept connections from other processes. In the future, there will be an `-ipcconnect` option added to `bitcoin-wallet` and `bitcoin-node` to allow wallet and gui processes to connect to the node and access it. Example usage: src/bitcoin-node -regtest -debug -ipcbind=unix src/bitcoin-wallet -regtest -ipcconnect=unix info src/bitcoin-gui -regtest -ipcconnect=unix src/bitcoin-mine -regtest -ipcconnect=unix
2024-09-06multiprocess: Add IPC connectAddress and listenAddress methodsRussell Yanofsky
Allow listening on and connecting to unix sockets.
2024-09-03Merge bitcoin/bitcoin#26619: log: expand BCLog::LogFlags (categories) to 64 bitsAva Chow
b31a0cd0378184b2b9eb8f4bd3120cbd32c62005 log: expand BCLog::LogFlags (categories) to 64 bits (Larry Ruane) Pull request description: Increase the maximum number of logging categories from 32 to 64. We're currently using 29 of the 32 available logging categories (there are only 3 remaining). It would be good to increase the limit soon; the fourth PR to be merged that adds a new logging category will be blocked until something like this is done. This PR also adds a `TEST` category that uses the new range (`1ULL << 63`) in case there's a hidden assumption somewhere that the `BCLog::LogFlags` type is 32 bits. (Also added a test for this test category.) It also provides an example showing that the expression must be `1ULL << <shift>` for shift value 31 and beyond. ACKs for top commit: achow101: ACK b31a0cd0378184b2b9eb8f4bd3120cbd32c62005 vasild: ACK b31a0cd0378184b2b9eb8f4bd3120cbd32c62005 ryanofsky: Code review ACK b31a0cd0378184b2b9eb8f4bd3120cbd32c62005, just dropping mask_bit constant since last review. I still think theStack: Code-review ACK b31a0cd0378184b2b9eb8f4bd3120cbd32c62005 Tree-SHA512: de422dbeb479848d370aed42d415f42461457ab0eda62b245dc7ff9f0e111626e7d4c0d62ff13082ec664d05fbb0db04c71eb4b6f22eb8f19198826a67c4035e
2024-08-26wallet: bugfix: ensure atomicity in settings updatesismaelsadeeq
- 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-13log: expand BCLog::LogFlags (categories) to 64 bitsLarry Ruane
This will increase the maximum number of logging categories from 32 to 64.
2024-08-13gui: Use wallet name for wallet migration rather than WalletModelAva Chow
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-13wallet, interfaces: Include database format in listWalletDirAva Chow
2024-08-02Merge bitcoin-core/gui#626: Showing Local Addresses in Node WindowHennadii Stepanov
189c987386a0da132d7ef076cdf539f9eb75fc3c Showing local addresses on the Node Window (Jadi) a5d7aff867a3df9ac77664deed03e930e2636db0 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 189c987386a0da132d7ef076cdf539f9eb75fc3c furszy: utACK 189c987 Tree-SHA512: 93f201bc6d21d81b27b87be050a447b841f01e3efb69b9eca2cc7af103023d7cd69eb5e16e2875855573ef51a5bf74a6ee6028636c1b6798cb4bb11567cb4996
2024-08-02net: Providing an interface for mapLocalHostJadi
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-07-16refactor: pass BlockCreateOptions to createNewBlockSjors Provoost
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-14Merge bitcoin-core/gui#825: Show maximum mempool size in information windowHennadii Stepanov
4a028cf54c0502bc9ba0804bf1ae413b20a007cb gui: show maximum mempool size in information window (Sebastian Falbesoner) bbde6ffefea9587b07a9f8d4043b2dd23ef8c3c5 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 4a028cf54c0502bc9ba0804bf1ae413b20a007cb pablomartin4btc: tACK 4a028cf54c0502bc9ba0804bf1ae413b20a007cb luke-jr: tACK 4a028cf54c0502bc9ba0804bf1ae413b20a007cb & in Knots hebasto: ACK 4a028cf54c0502bc9ba0804bf1ae413b20a007cb, tested on Ubuntu 24.04. Tree-SHA512: c10fb23605d060cea19a86d11822fc4d12496b19547870052aace503670e62e4c4e19ae4c2c4fbf7420a472adb071c9ddebe82447e0cfbce5a6fb9fcd7b9eda3
2024-07-08tidy: modernize-use-equals-defaultMarcoFalke
2024-06-27Have testBlockValidity hold cs_main instead of callerSjors Provoost
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-26refactor: testBlockValidity make out argument lastSjors Provoost
2024-06-26Add missing include for mining interfaceSjors Provoost
Needed for std::unique_ptr
2024-06-20add node interface method for getting maximum mempool sizeSebastian Falbesoner
2024-06-18rpc: call IsInitialBlockDownload via miner interfaceSjors Provoost
2024-06-18rpc: minize getTipHash() calls in gbtSjors Provoost
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-18rpc: call processNewBlock via miner interfaceSjors Provoost
2024-06-18rpc: getTransactionsUpdated via miner interfaceSjors Provoost
2024-06-18rpc: call CreateNewBlock via miner interfaceSjors Provoost
2024-06-18rpc: getblocktemplate getTipHash() via Miner interfaceSjors Provoost
2024-06-18rpc: call TestBlockValidity via miner interfaceSjors Provoost
2024-06-18Introduce Mining interfaceSjors Provoost
Start out with a single method isTestChain() that's used by the getblocktemplate RPC.
2024-05-16util: add TransactionError includes and namespace declarationsRyan Ofsky
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-16common: Add PSBTError enumRyan Ofsky
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-16util: move util/message to common/signmessageRyan Ofsky
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-04-16wallet: return and display signer errorSjors Provoost
Both RPC and GUI now render a useful error message instead of (silently) failing. Replace bool with util::Result<void> to clarify that this either succeeds or returns an error message.
2024-01-05Merge bitcoin/bitcoin#28890: rpc: Remove deprecated -rpcserialversionfanquake
fa46cc22bc696e6845915ae91d6b68e36bf4c242 Remove deprecated -rpcserialversion (MarcoFalke) Pull request description: The flag is problematic for many reasons: * It is deprecated * It is a global flag, requiring a restart to change, as opposed to a flag that can be set on each RPC invocation * It may be hidden in config files by accident, hard to debug, causing LND crashes and bugs, see https://github.com/bitcoin/bitcoin/issues/28730#issuecomment-1780940868 * It makes performance improvements harder to implement: https://github.com/bitcoin/bitcoin/pull/17529#issuecomment-556082818 Fix all issues by removing it. If there is a use-case, likely a per-RPC flag can be added, if needed. ACKs for top commit: ajtowns: crACK fa46cc22bc696e6845915ae91d6b68e36bf4c242 TheCharlatan: lgtm ACK fa46cc22bc696e6845915ae91d6b68e36bf4c242 Tree-SHA512: 96ba1c60356ce93954fe5c2a59045771c6d1516ad0d9dc436ef1800a1f1b0153f0d5fb78ca99d53ad54ba25fbce36962bdf1d4325aceedfc8154a61347a6a915
2023-12-17wallet, mempool: propagete `checkChainLimits` error message to walletismaelsadeeq
Update CheckPackageLimits to use util::Result to pass the error message instead of out parameter. Also update test to reflect the error message from `CTxMempool` `CheckPackageLimits` output.
2023-12-11Remove deprecated -rpcserialversionMarcoFalke
2023-11-14Use ParamsWrapper for witness serializationAnthony Towns
2023-10-20interfaces: Rename CalculateBumpFees methods to be compatible with capn'protoRyan Ofsky
2023-10-20interfaces: Change getUnspentOutput return type to avoid multiprocess segfaultRyan Ofsky
Coin serialize method segfaults if IsSpent condition is true. This caused multiprocess code to segfault when serializing the Coin& output argument to of the Node::getUnspentOutput method if the coin was not found. Segfault could be triggered by double clicking and viewing transaction details in the GUI transaction list. Fix this by replacing Coin& output argument with optional<Coin> return value to avoid trying to serializing spent coins.
2023-10-20interfaces: Add schedulerMockForward method so mockscheduler RPC can work ↵Ryan Ofsky
across processes Needed to fix new wallet_groups.py and wallet_resendwallettransactions.py tests with multiprocess bitcoin-node executable.
2023-10-20interfaces: Fix const virtual method that breaks multiprocess supportRyan Ofsky
2023-09-30validation: pass ChainstateRole for validationinterface callsJames O'Beirne
This allows consumers to decide how to handle events from background or assumedvalid chainstates.
2023-09-22Merge bitcoin-core/gui#119: Replace send-to-self with dual send+receive entriesHennadii Stepanov
099dbe4224e0e896604e7f6901d0fc302b0bd3a0 GUI: TransactionRecord: When time/index/etc match, sort send before receive (Luke Dashjr) 2d182f77cd8100395cf47a721bd01dc8620c9718 Bugfix: Ignore ischange flag when we're not the sender (Luke Dashjr) 71fbdb7f403e673877be94a79cd4c6b13b0bbcd6 GUI: Remove SendToSelf TransactionRecord type (Luke Dashjr) f3fbe99fcf90daec79d49fd5d868102dc99feb23 GUI: TransactionRecord: Refactor to turn send-to-self into send+receive pairs (Luke Dashjr) b9765ba1d67d7b74c17f9ce70cad5487715208a0 GUI: TransactionRecord: Use "any from me" as the criteria for deciding whether a transaction is a send or receive (Luke Dashjr) Pull request description: Makes the GUI transaction list more like the RPC, and IMO clearer in general. As a side effect, this also fixes the GUI entries when a transaction is a net profit to us, but some inputs were also from us. Originally https://github.com/bitcoin/bitcoin/pull/15115 Has Concept ACKs from @*Empact @*jonasschnelli ACKs for top commit: hebasto: ACK 099dbe4224e0e896604e7f6901d0fc302b0bd3a0. Tree-SHA512: 7d581add2f59431aa019126d54232a1f15723def5147d7a1b672e9b6d525b6e5a944cc437701aa1bd5bd0fbe557a3d1f4b239337f42bdba4fe1d3960442d0e3b
2023-09-20Merge bitcoin-core/gui#738: Add menu option to migrate a walletHennadii Stepanov
48aae2cffeb91add75a70ac4d5075c38054452fa gui: Add File > Migrate Wallet (Andrew Chow) 577be889cd52fc2d896a5f39c66bc2cadb8622e4 gui: Optionally return passphrase after unlocking (Andrew Chow) 5b3a85b4c6ffd1f29a917d4c1af4bff6c0ea2ef5 interfaces, wallet: Expose migrate wallet (Andrew Chow) Pull request description: GUI users need to be able to migrate wallets without going to the RPC console. ACKs for top commit: jarolrod: ACK 48aae2cffeb91add75a70ac4d5075c38054452fa pablomartin4btc: tACK 48aae2cffeb91add75a70ac4d5075c38054452fa hebasto: ACK 48aae2cffeb91add75a70ac4d5075c38054452fa Tree-SHA512: 2d02b1e85e7d6cfbf503f417f150cdaa0c63822942e9a6fe28c0ad3e7f40a957bb01a375c909a60432dc600e84574881aa446c7ec983b56f0bb23f07ef15de54
2023-09-13[node] interface to get bump feesglozow
2023-08-14Move CTxDestination to its own fileAndrew Chow
CTxDestination is really our internal representation of an address and doesn't really have anything to do with standard script types, so move them to their own file.
2023-08-14Move CScriptID to script.{h/cpp}Andrew Chow
CScriptID should be next to CScript just as CKeyID is next to CPubKey
2023-06-23GUI: TransactionRecord: Refactor to turn send-to-self into send+receive pairsLuke Dashjr
2023-06-13interfaces, wallet: Expose migrate walletAndrew Chow
2023-06-12Merge bitcoin/bitcoin#27708: Return EXIT_FAILURE on post-init fatal errorsRyan Ofsky
61c569ab6069d04079a0831468eb713983919636 refactor: decouple early return commands from AppInit (furszy) 4927167f855f8ed3bbf6d2766f61229f742e632a gui: return EXIT_FAILURE on post-init fatal errors (furszy) 3b2c61e8198bcefb1c2343caff1d705951026cc4 Return EXIT_FAILURE on post-init fatal errors (furszy) 3c06926cf21dcca3074ef51506f556b2286c299b refactor: index: use `AbortNode` in fatal error helper (Sebastian Falbesoner) 9ddf7e03a35592617a016418fd320cc93c8d1abd move ThreadImport ABC error to use AbortNode (furszy) Pull request description: It seems odd to return `EXIT_SUCCESS` when the node aborted execution due a fatal internal error or any post-init problem that triggers an unrequested shutdown. e.g. blocks or coins db I/O errors, disconnect block failure, failure during thread import (external blocks loading process error), among others. ACKs for top commit: TheCharlatan: ACK 61c569ab6069d04079a0831468eb713983919636 ryanofsky: Code review ACK 61c569ab6069d04079a0831468eb713983919636 pinheadmz: ACK 61c569ab6069d04079a0831468eb713983919636 theStack: Code-review ACK 61c569ab6069d04079a0831468eb713983919636 Tree-SHA512: 18a59c3acc1c6d12cbc74a20a401e89659740c6477fccb59070c9f97922dfe588468e9e5eef56c5f395762187c34179a5e3954aa5b844787fa13da2e666c63d3
2023-06-10gui: return EXIT_FAILURE on post-init fatal errorsfurszy