diff options
Diffstat (limited to 'doc')
-rw-r--r-- | doc/bips.md | 3 | ||||
-rw-r--r-- | doc/build-osx.md | 2 | ||||
-rw-r--r-- | doc/developer-notes.md | 44 | ||||
-rw-r--r-- | doc/release-notes-pr12823.md | 20 | ||||
-rw-r--r-- | doc/release-notes-pr12892.md | 32 | ||||
-rw-r--r-- | doc/release-notes.md | 16 |
6 files changed, 81 insertions, 36 deletions
diff --git a/doc/bips.md b/doc/bips.md index e587275f0f..5b8eabd6df 100644 --- a/doc/bips.md +++ b/doc/bips.md @@ -1,4 +1,4 @@ -BIPs that are implemented by Bitcoin Core (up-to-date up to **v0.13.0**): +BIPs that are implemented by Bitcoin Core (up-to-date up to **v0.16.0**): * [`BIP 9`](https://github.com/bitcoin/bips/blob/master/bip-0009.mediawiki): The changes allowing multiple soft-forks to be deployed in parallel have been implemented since **v0.12.1** ([PR #7575](https://github.com/bitcoin/bitcoin/pull/7575)) * [`BIP 11`](https://github.com/bitcoin/bips/blob/master/bip-0011.mediawiki): Multisig outputs are standard since **v0.6.0** ([PR #669](https://github.com/bitcoin/bitcoin/pull/669)). @@ -34,4 +34,5 @@ BIPs that are implemented by Bitcoin Core (up-to-date up to **v0.13.0**): * [`BIP 147`](https://github.com/bitcoin/bips/blob/master/bip-0147.mediawiki): NULLDUMMY softfork as of **v0.13.1** ([PR 8636](https://github.com/bitcoin/bitcoin/pull/8636) and [PR 8937](https://github.com/bitcoin/bitcoin/pull/8937)). * [`BIP 152`](https://github.com/bitcoin/bips/blob/master/bip-0152.mediawiki): Compact block transfer and related optimizations are used as of **v0.13.0** ([PR 8068](https://github.com/bitcoin/bitcoin/pull/8068)). * [`BIP 159`](https://github.com/bitcoin/bips/blob/master/bip-0159.mediawiki): NODE_NETWORK_LIMITED service bit [signaling only] is supported as of **v0.16.0** ([PR 11740](https://github.com/bitcoin/bitcoin/pull/11740)). +* [`BIP 173`](https://github.com/bitcoin/bips/blob/master/bip-0173.mediawiki): Bech32 addresses for native Segregated Witness outputs are supported as of **v0.16.0** ([PR 11167](https://github.com/bitcoin/bitcoin/pull/11167)). * [`BIP 176`](https://github.com/bitcoin/bips/blob/master/bip-0176.mediawiki): Bits Denomination [QT only] is supported as of **v0.16.0** ([PR 12035](https://github.com/bitcoin/bitcoin/pull/12035)). diff --git a/doc/build-osx.md b/doc/build-osx.md index f19e4f0b8d..e52a770ced 100644 --- a/doc/build-osx.md +++ b/doc/build-osx.md @@ -16,7 +16,7 @@ Then install [Homebrew](https://brew.sh). Dependencies ---------------------- - brew install automake berkeley-db4 libtool boost miniupnpc openssl pkg-config protobuf python qt libevent + brew install automake berkeley-db4 libtool boost miniupnpc openssl pkg-config protobuf python qt libevent qrencode See [dependencies.md](dependencies.md) for a complete overview. diff --git a/doc/developer-notes.md b/doc/developer-notes.md index b00cceb987..1f237b750e 100644 --- a/doc/developer-notes.md +++ b/doc/developer-notes.md @@ -50,7 +50,7 @@ Do not submit patches solely to modify the style of existing code. [src/.clang-format](/src/.clang-format). You can use the provided [clang-format-diff script](/contrib/devtools/README.md#clang-format-diffpy) tool to clean up patches automatically before submission. - - Braces on new lines for namespaces, classes, functions, methods. + - Braces on new lines for classes, functions, methods. - Braces on the same line for everything else. - 4 space indentation (no tabs) for every block except namespaces. - No indentation for `public`/`protected`/`private` or for `namespace`. @@ -72,7 +72,8 @@ code. - Class names, function names and method names are UpperCamelCase (PascalCase). Do not prefix class names with `C`. - Test suite naming convention: The Boost test suite in file - `src/test/foo_tests.cpp` should be named `foo_tests`. + `src/test/foo_tests.cpp` should be named `foo_tests`. Test suite names + must be unique. - **Miscellaneous** - `++i` is preferred over `i++`. @@ -84,8 +85,7 @@ Block style example: ```c++ int g_count = 0; -namespace foo -{ +namespace foo { class Class { std::string m_name; @@ -450,12 +450,21 @@ C++ data structures - Vector bounds checking is only enabled in debug mode. Do not rely on it -- Make sure that constructors initialize all fields. If this is skipped for a - good reason (i.e., optimization on the critical path), add an explicit - comment about this +- Initialize all non-static class members where they are defined. + If this is skipped for a good reason (i.e., optimization on the critical + path), add an explicit comment about this - *Rationale*: Ensure determinism by avoiding accidental use of uninitialized values. Also, static analyzers balk about this. + Initializing the members in the declaration makes it easy to + spot uninitialized ones. + +```cpp +class A +{ + uint32_t m_count{0}; +} +``` - By default, declare single-argument constructors `explicit`. @@ -474,18 +483,6 @@ C++ data structures - *Rationale*: Easier to understand what is happening, thus easier to spot mistakes, even for those that are not language lawyers -- Initialize all non-static class members where they are defined - - - *Rationale*: Initializing the members in the declaration makes it easy to spot uninitialized ones, - and avoids accidentally reading uninitialized memory - -```cpp -class A -{ - uint32_t m_count{0}; -} -``` - Strings and formatting ------------------------ @@ -571,8 +568,7 @@ Source code organization - *Rationale*: Shorter and simpler header files are easier to read, and reduce compile time - Every `.cpp` and `.h` file should `#include` every header file it directly uses classes, functions or other - definitions from, even if those headers are already included indirectly through other headers. One exception - is that a `.cpp` file does not need to re-include the includes already included in its corresponding `.h` file. + definitions from, even if those headers are already included indirectly through other headers. - *Rationale*: Excluding headers because they are already indirectly included results in compilation failures when those indirect dependencies change. Furthermore, it obscures what the real code @@ -588,11 +584,11 @@ Source code organization ```c++ namespace mynamespace { - ... +... } // namespace mynamespace namespace { - ... +... } // namespace ``` @@ -626,7 +622,7 @@ GUI holds: try to not directly access core data structures from Views. - Avoid adding slow or blocking code in the GUI thread. In particular do not - add new `interface::Node` and `interface::Wallet` method calls, even if they + add new `interfaces::Node` and `interfaces::Wallet` method calls, even if they may be fast now, in case they are changed to lock or communicate across processes in the future. diff --git a/doc/release-notes-pr12823.md b/doc/release-notes-pr12823.md new file mode 100644 index 0000000000..b493908716 --- /dev/null +++ b/doc/release-notes-pr12823.md @@ -0,0 +1,20 @@ +Configuration sections for testnet and regtest +---------------------------------------------- + +It is now possible for a single configuration file to set different +options for different networks. This is done by using sections or by +prefixing the option with the network, such as: + + main.uacomment=bitcoin + test.uacomment=bitcoin-testnet + regtest.uacomment=regtest + [main] + mempoolsize=300 + [test] + mempoolsize=100 + [regtest] + mempoolsize=20 + +The `addnode=`, `connect=`, `port=`, `bind=`, `rpcport=`, `rpcbind=` +and `wallet=` options will only apply to mainnet when specified in the +configuration file, unless a network is specified. diff --git a/doc/release-notes-pr12892.md b/doc/release-notes-pr12892.md new file mode 100644 index 0000000000..894bf19dee --- /dev/null +++ b/doc/release-notes-pr12892.md @@ -0,0 +1,32 @@ +'label' API for wallet +---------------------- + +A new 'label' API has been introduced for the wallet. This is intended as a +replacement for the deprecated 'account' API. + +The label RPC methods mirror the account functionality, with the following functional differences: + +- Labels can be set on any address, not just receiving addresses. This functionality was previously only available through the GUI. +- Labels can be deleted by reassigning all addresses using the `setlabel` RPC method. +- There isn't support for sending transactions _from_ a label, or for determining which label a transaction was sent from. +- Labels do not have a balance. + +Here are the changes to RPC methods: + +| Deprecated Method | New Method | Notes | +| :---------------------- | :-------------------- | :-----------| +| `getaccount` | `getaddressinfo` | `getaddressinfo` returns a json object with address information instead of just the name of the account as a string. | +| `getaccountaddress` | `getlabeladdress` | `getlabeladdress` throws an error by default if the label does not already exist, but provides a `force` option for compatibility with existing applications. | +| `getaddressesbyaccount` | `getaddressesbylabel` | `getaddressesbylabel` returns a json object with the addresses as keys, instead of a list of strings. | +| `getreceivedbyaccount` | `getreceivedbylabel` | _no change in behavior_ | +| `listaccounts` | `listlabels` | `listlabels` does not return a balance or accept `minconf` and `watchonly` arguments. | +| `listreceivedbyaccount` | `listreceivedbylabel` | Both methods return new `label` fields, along with `account` fields for backward compatibility. | +| `move` | n/a | _no replacement_ | +| `sendfrom` | n/a | _no replacement_ | +| `setaccount` | `setlabel` | Both methods now: <ul><li>allow assigning labels to any address, instead of raising an error if the address is not receiving address.<li>delete the previous label associated with an address when the final address using that label is reassigned to a different label, instead of making an implicit `getaccountaddress` call to ensure the previous label still has a receiving address. | + +| Changed Method | Notes | +| :--------------------- | :------ | +| `addmultisigaddress` | Renamed `account` named parameter to `label`. Still accepts `account` for backward compatibility. | +| `getnewaddress` | Renamed `account` named parameter to `label`. Still accepts `account` for backward compatibility. | +| `listunspent` | Returns new `label` fields, along with `account` fields for backward compatibility. | diff --git a/doc/release-notes.md b/doc/release-notes.md index 48ee364c18..d4c5b03449 100644 --- a/doc/release-notes.md +++ b/doc/release-notes.md @@ -63,17 +63,13 @@ RPC changes - The `createrawtransaction` RPC will now accept an array or dictionary (kept for compatibility) for the `outputs` parameter. This means the order of transaction outputs can be specified by the client. - The `fundrawtransaction` RPC will reject the previously deprecated `reserveChangeKey` option. -- Wallet `getnewaddress` and `addmultisigaddress` RPC `account` named - parameters have been renamed to `label` with no change in behavior. -- Wallet `getlabeladdress`, `getreceivedbylabel`, `listreceivedbylabel`, and - `setlabel` RPCs have been added to replace `getaccountaddress`, - `getreceivedbyaccount`, `listreceivedbyaccount`, and `setaccount` RPCs, - which are now deprecated. There is no change in behavior between the - new RPCs and deprecated RPCs. -- Wallet `listreceivedbylabel`, `listreceivedbyaccount` and `listunspent` RPCs - add `label` fields to returned JSON objects that previously only had - `account` fields. - `sendmany` now shuffles outputs to improve privacy, so any previously expected behavior with regards to output ordering can no longer be relied upon. +- The new RPC `testmempoolaccept` can be used to test acceptance of a transaction to the mempool without adding it. +- JSON transaction decomposition now includes a `weight` field which provides + the transaction's exact weight. This is included in REST /rest/tx/ and + /rest/block/ endpoints when in json mode. This is also included in `getblock` + (with verbosity=2), `listsinceblock`, `listtransactions`, and + `getrawtransaction` RPC commands. External wallet files --------------------- |