aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/build-netbsd.md4
-rw-r--r--doc/build-openbsd.md15
-rw-r--r--doc/dependencies.md1
-rw-r--r--doc/developer-notes.md77
-rw-r--r--doc/release-notes.md14
-rw-r--r--doc/zmq.md2
6 files changed, 75 insertions, 38 deletions
diff --git a/doc/build-netbsd.md b/doc/build-netbsd.md
index ba9a80f83b..9cec201faf 100644
--- a/doc/build-netbsd.md
+++ b/doc/build-netbsd.md
@@ -1,6 +1,6 @@
-NetBSD build guide
+NetBSD Build Guide
======================
-(updated for NetBSD 8.0)
+**Updated for NetBSD [8.0](https://www.netbsd.org/releases/formal-8/NetBSD-8.0.html)**
This guide describes how to build bitcoind and command-line utilities on NetBSD.
diff --git a/doc/build-openbsd.md b/doc/build-openbsd.md
index 99daf73c86..6b2d404427 100644
--- a/doc/build-openbsd.md
+++ b/doc/build-openbsd.md
@@ -1,6 +1,6 @@
# OpenBSD Build Guide
-**Updated for OpenBSD [7.0](https://www.openbsd.org/70.html)**
+**Updated for OpenBSD [7.1](https://www.openbsd.org/71.html)**
This guide describes how to build bitcoind, command-line utilities, and GUI on OpenBSD.
@@ -78,12 +78,9 @@ export AUTOMAKE_VERSION=1.16
### 1. Configuration
-Note that building with external signer support currently fails on OpenBSD,
-hence you have to explicitly disable it by passing the parameter
-`--disable-external-signer` to the configure script. The feature requires the
-header-only library boost::process, which is available on OpenBSD, but contains
-certain system calls and preprocessor defines like `waitid()` and `WEXITED` that
-are not available.
+Note that external signer support is currently not available on OpenBSD, since
+the used header-only library Boost.Process fails to compile (certain system
+calls and preprocessor defines like `waitid()` and `WEXITED` are missing).
There are many ways to configure Bitcoin Core, here are a few common examples:
@@ -91,14 +88,14 @@ There are many ways to configure Bitcoin Core, here are a few common examples:
This enables the GUI and descriptor wallet support, assuming `sqlite` and `qt5` are installed.
```bash
-./configure --disable-external-signer MAKE=gmake
+./configure MAKE=gmake
```
##### Descriptor & Legacy Wallet. No GUI:
This enables support for both wallet types and disables the GUI:
```bash
-./configure --disable-external-signer --with-gui=no \
+./configure --with-gui=no \
BDB_LIBS="-L${BDB_PREFIX}/lib -ldb_cxx-4.8" \
BDB_CFLAGS="-I${BDB_PREFIX}/include" \
MAKE=gmake
diff --git a/doc/dependencies.md b/doc/dependencies.md
index 392078bfaf..697d432520 100644
--- a/doc/dependencies.md
+++ b/doc/dependencies.md
@@ -20,6 +20,7 @@ You can find installation instructions in the `build-*.md` file for your platfor
| [Boost](../depends/packages/boost.mk) | [link](https://www.boost.org/users/download/) | [1.77.0](https://github.com/bitcoin/bitcoin/pull/24383) | [1.64.0](https://github.com/bitcoin/bitcoin/pull/22320) | No |
| [libevent](../depends/packages/libevent.mk) | [link](https://github.com/libevent/libevent/releases) | [2.1.12-stable](https://github.com/bitcoin/bitcoin/pull/21991) | [2.1.8](https://github.com/bitcoin/bitcoin/pull/24681) | No |
| glibc | [link](https://www.gnu.org/software/libc/) | N/A | [2.18](https://github.com/bitcoin/bitcoin/pull/23511) | Yes |
+| Linux Kernel | [link](https://www.kernel.org/) | N/A | 3.2.0 | Yes |
## Optional
diff --git a/doc/developer-notes.md b/doc/developer-notes.md
index 9b1026a375..3793fb3315 100644
--- a/doc/developer-notes.md
+++ b/doc/developer-notes.md
@@ -32,6 +32,7 @@ Developer Notes
- [C++ data structures](#c-data-structures)
- [Strings and formatting](#strings-and-formatting)
- [Shadowing](#shadowing)
+ - [Lifetimebound](#lifetimebound)
- [Threads and synchronization](#threads-and-synchronization)
- [Scripts](#scripts)
- [Shebang](#shebang)
@@ -96,7 +97,10 @@ code.
Guidelines](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Renum-caps),
which recommend using `snake_case`. Please use what seems appropriate.
- Class names, function names, and method names are UpperCamelCase
- (PascalCase). Do not prefix class names with `C`.
+ (PascalCase). Do not prefix class names with `C`. See [Internal interface
+ naming style](#internal-interface-naming-style) for an exception to this
+ convention.
+
- Test suite naming convention: The Boost test suite in file
`src/test/foo_tests.cpp` should be named `foo_tests`. Test suite names
must be unique.
@@ -138,6 +142,27 @@ public:
} // namespace foo
```
+Coding Style (C++ functions and methods)
+--------------------
+
+- When ordering function parameters, place input parameters first, then any
+ in-out parameters, followed by any output parameters.
+
+- *Rationale*: API consistency.
+
+- Prefer returning values directly to using in-out or output parameters. Use
+ `std::optional` where helpful for returning values.
+
+- *Rationale*: Less error-prone (no need for assumptions about what the output
+ is initialized to on failure), easier to read, and often the same or better
+ performance.
+
+- Generally, use `std::optional` to represent optional by-value inputs (and
+ instead of a magic default value, if there is no real default). Non-optional
+ input parameters should usually be values or const references, while
+ non-optional in-out and output parameters should usually be references, as
+ they cannot be null.
+
Coding Style (C++ named arguments)
------------------------------
@@ -369,8 +394,10 @@ Defining `DEBUG_LOCKCONTENTION` adds a "lock" logging category to the logging
RPC that, when enabled, logs the location and duration of each lock contention
to the `debug.log` file.
-To enable it, run configure with `-DDEBUG_LOCKCONTENTION` added to your
-CPPFLAGS, e.g. `CPPFLAGS="-DDEBUG_LOCKCONTENTION"`, then build and run bitcoind.
+The `--enable-debug` configure option adds `-DDEBUG_LOCKCONTENTION` to the
+compiler flags. You may also enable it manually for a non-debug build by running
+configure with `-DDEBUG_LOCKCONTENTION` added to your CPPFLAGS,
+i.e. `CPPFLAGS="-DDEBUG_LOCKCONTENTION"`, then build and run bitcoind.
You can then use the `-debug=lock` configuration option at bitcoind startup or
`bitcoin-cli logging '["lock"]'` at runtime to turn on lock contention logging.
@@ -657,10 +684,6 @@ Wallet
- Make sure that no crashes happen with run-time option `-disablewallet`.
-- Include `db_cxx.h` (BerkeleyDB header) only when `ENABLE_WALLET` is set.
-
- - *Rationale*: Otherwise compilation of the disable-wallet build will fail in environments without BerkeleyDB.
-
General C++
-------------
@@ -863,12 +886,22 @@ from using a different variable with the same name),
please name variables so that their names do not shadow variables defined in the source code.
When using nested cycles, do not name the inner cycle variable the same as in
-the upper cycle, etc.
+the outer cycle, etc.
+
+Lifetimebound
+--------------
+
+The [Clang `lifetimebound`
+attribute](https://clang.llvm.org/docs/AttributeReference.html#lifetimebound)
+can be used to tell the compiler that a lifetime is bound to an object and
+potentially see a compile-time warning if the object has a shorter lifetime from
+the invalid use of a temporary. You can use the attribute by adding a `LIFETIMEBOUND`
+annotation defined in `src/attributes.h`; please grep the codebase for examples.
Threads and synchronization
----------------------------
-- Prefer `Mutex` type to `RecursiveMutex` one
+- Prefer `Mutex` type to `RecursiveMutex` one.
- Consistently use [Clang Thread Safety Analysis](https://clang.llvm.org/docs/ThreadSafetyAnalysis.html) annotations to
get compile-time warnings about potential race conditions in code. Combine annotations in function declarations with
@@ -947,6 +980,8 @@ TRY_LOCK(cs_vNodes, lockNodes);
Scripts
--------------------------
+Write scripts in Python rather than bash, when possible.
+
### Shebang
- Use `#!/usr/bin/env bash` instead of obsolete `#!/bin/bash`.
@@ -1389,22 +1424,9 @@ communication:
virtual boost::signals2::scoped_connection connectTipChanged(TipChangedFn fn) = 0;
```
-- For consistency and friendliness to code generation tools, interface method
- input and inout parameters should be ordered first and output parameters
- should come last.
+- Interface methods should not be overloaded.
- Example:
-
- ```c++
- // Good: error output param is last
- virtual bool broadcastTransaction(const CTransactionRef& tx, CAmount max_fee, std::string& error) = 0;
-
- // Bad: error output param is between input params
- virtual bool broadcastTransaction(const CTransactionRef& tx, std::string& error, CAmount max_fee) = 0;
- ```
-
-- For friendliness to code generation tools, interface methods should not be
- overloaded:
+ *Rationale*: consistency and friendliness to code generation tools.
Example:
@@ -1418,10 +1440,13 @@ communication:
virtual bool disconnect(NodeId id) = 0;
```
-- For consistency and friendliness to code generation tools, interface method
- names should be `lowerCamelCase` and standalone function names should be
+### Internal interface naming style
+
+- Interface method names should be `lowerCamelCase` and standalone function names should be
`UpperCamelCase`.
+ *Rationale*: consistency and friendliness to code generation tools.
+
Examples:
```c++
diff --git a/doc/release-notes.md b/doc/release-notes.md
index 8462714898..5598f7c353 100644
--- a/doc/release-notes.md
+++ b/doc/release-notes.md
@@ -50,6 +50,17 @@ P2P and network changes
Updated RPCs
------------
+- The `-deprecatedrpc=softforks` configuration option has been removed. The
+ RPC `getblockchaininfo` no longer returns the `softforks` field, which was
+ previously deprecated in 23.0. (#23508) Information on soft fork status is
+ now only available via the `getdeploymentinfo` RPC.
+
+- The `deprecatedrpc=exclude_coinbase` configuration option has been removed.
+ The `receivedby` RPCs (`listreceivedbyaddress`, `listreceivedbylabel`,
+ `getreceivedbyaddress` and `getreceivedbylabel`) now always return results
+ accounting for received coins from coinbase outputs, without an option to
+ change that behaviour. Excluding coinbases was previously deprecated in 23.0.
+ (#25171)
Changes to wallet related RPCs can be found in the Wallet section below.
@@ -74,6 +85,9 @@ Tools and Utilities
Wallet
------
+- RPC `getreceivedbylabel` now returns an error, "Label not found
+ in wallet" (-4), if the label is not in the address book. (#25122)
+
GUI changes
-----------
diff --git a/doc/zmq.md b/doc/zmq.md
index b832e71734..4055505d74 100644
--- a/doc/zmq.md
+++ b/doc/zmq.md
@@ -76,7 +76,7 @@ The option to set the PUB socket's outbound message high water mark
-zmqpubhashblockhwm=n
-zmqpubrawblockhwm=n
-zmqpubrawtxhwm=n
- -zmqpubsequencehwm=address
+ -zmqpubsequencehwm=n
The high water mark value must be an integer greater than or equal to 0.