pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/finance/bitcoin bitcoin: updated to 0.21.0

branches:  trunk
changeset: 445290:14b174fbc268
user:      adam <>
date:      Tue Jan 19 10:17:00 2021 +0000

bitcoin: updated to 0.21.0


Notable changes

P2P and network changes

The mempool now tracks whether transactions submitted via the wallet or RPCs have been successfully broadcast. Every 10-15 minutes, the node will try to announce unbroadcast transactions until a peer 
requests it via a getdata message or the transaction is removed from the mempool for other reasons. The node will not track the broadcast status of transactions submitted to the node using P2P relay. 
This version reduces the initial broadcast guarantees for wallet transactions submitted via P2P to a node running the wallet.

The size of the set of transactions that peers have announced and we consider for requests has been reduced from 100000 to 5000 (per peer), and further announcements will be ignored when that limit 
is reached. If you need to dump (very) large batches of transactions, exceptions can be made for trusted peers using the "relay" network permission. For localhost for example it can be enabled using 
the command line option -whitelist=relay@

This release adds support for Tor version 3 hidden services, and rumoring them over the network to other peers using BIP155. Version 2 hidden services are still fully supported by Bitcoin Core, but 
the Tor network will start deprecating them in the coming months.

The Tor onion service that is automatically created by setting the -listenonion configuration parameter will now be created as a Tor v3 service instead of Tor v2. The private key that was used for 
Tor v2 (if any) will be left untouched in the onion_private_key file in the data directory (see -datadir) and can be removed if not needed. Bitcoin Core will no longer attempt to read it. The private 
key for the Tor v3 service will be saved in a file named onion_v3_private_key. To use the deprecated Tor v2 service (not recommended), the onion_private_key can be copied over onion_v3_private_key, 
e.g. cp -f onion_private_key onion_v3_private_key.

The client writes a file (anchors.dat) at shutdown with the network addresses of the node’s two outbound block-relay-only peers (so called "anchors"). The next time the node starts, it reads this 
file and attempts to reconnect to those same two peers. This prevents an attacker from using node restarts to trigger a complete change in peers, which would be something they could use as part of an 
eclipse attack.

This release adds support for serving BIP157 compact filters to peers on the network when enabled using -blockfilterindex=1 -peerblockfilters=1.

This release adds support for signets (BIP325) in addition to the existing mainnet, testnet, and regtest networks. Signets are centrally-controlled test networks, allowing them to be more predictable 
test environments than the older testnet. One public signet is maintained, and selectable using -signet. It is also possible to create personal signets.

This release implements BIP339 wtxid relay. When negotiated, transactions are announced using their wtxid instead of their txid.

This release implements the proposed Taproot consensus rules (BIP341 and BIP342), without activation on mainnet. Experimentation with Taproot can be done on signet, where its rules are already active.

Updated RPCs

The getpeerinfo RPC has a new network field that provides the type of network ("ipv4", "ipv6", or "onion") that the peer connected through.

The getpeerinfo RPC now has additional last_block and last_transaction fields that return the UNIX epoch time of the last block and the last valid transaction received from each peer.

getnetworkinfo now returns two new fields, connections_in and connections_out, that provide the number of inbound and outbound peer connections. These new fields are in addition to the existing 
connections field, which returns the total number of peer connections.

Exposed transaction version numbers are now treated as unsigned 32-bit integers instead of signed 32-bit integers. This matches their treatment in consensus logic. Versions greater than 2 continue to 
be non-standard (matching previous behavior of smaller than 1 or greater than 2 being non-standard). Note that this includes the joinpsbt command, which combines partially-signed transactions by 
selecting the highest version number.

getmempoolinfo now returns an additional unbroadcastcount field. The mempool tracks locally submitted transactions until their initial broadcast is acknowledged by a peer. This field returns the 
count of transactions waiting for acknowledgement.

Mempool RPCs such as getmempoolentry and getrawmempool with verbose=true now return an additional unbroadcast field. This indicates whether initial broadcast of the transaction has been acknowledged 
by a peer. getmempoolancestors and getmempooldescendants are also updated.

The getpeerinfo RPC no longer returns the banscore field unless the configuration option -deprecatedrpc=banscore is used. The banscore field will be fully removed in the next major release.

The testmempoolaccept RPC returns vsize and a fees object with the base fee if the transaction would pass validation.

The getpeerinfo RPC now returns a connection_type field. This indicates the type of connection established with the peer. It will return one of six options. For more information, see the getpeerinfo 
help documentation.

The getpeerinfo RPC no longer returns the addnode field by default. This field will be fully removed in the next major release. It can be accessed with the configuration option 
-deprecatedrpc=getpeerinfo_addnode. However, it is recommended to instead use the connection_type field (it will return manual when addnode is true).

The getpeerinfo RPC no longer returns the whitelisted field by default. This field will be fully removed in the next major release. It can be accessed with the configuration option 
-deprecatedrpc=getpeerinfo_whitelisted. However, it is recommended to instead use the permissions field to understand if specific privileges have been granted to the peer.

The walletcreatefundedpsbt RPC call will now fail with Insufficient funds when inputs are manually selected but are not enough to cover the outputs and fee. Additional inputs can automatically be 
added through the new add_inputs option.

The fundrawtransaction RPC now supports add_inputs option that when false prevents adding more inputs if necessary and consequently the RPC fails.

Changes to Wallet or GUI related RPCs can be found in the GUI or Wallet section below.

New RPCs

The getindexinfo RPC returns the actively running indices of the node, including their current sync status and height. It also accepts an index_name to specify returning the status of that index only.
Build System

Updated settings

The same ZeroMQ notification (e.g. -zmqpubhashtx=address) can now be specified multiple times to publish the same notification to different ZeroMQ sockets.

The -banscore configuration option, which modified the default threshold for disconnecting and discouraging misbehaving peers, has been removed as part of changes in 0.20.1 and in this release to the 
handling of misbehaving peers. Refer to "Changes regarding misbehaving peers" in the 0.20.1 release notes for details.

The -debug=db logging category, which was deprecated in 0.20 and replaced by -debug=walletdb to distinguish it from coindb, has been removed.

A download permission has been extracted from the noban permission. For compatibility, noban implies the download permission, but this may change in future releases. Refer to the help of the affected 
settings -whitebind and -whitelist for more details.

Netmasks that contain 1-bits after 0-bits (the 1-bits are not contiguous on the left side, e.g. are no longer accepted. They are invalid according to RFC 4632. Netmasks are used in the 
-rpcallowip and -whitelist configuration options and in the setban RPC.

The -blocksonly setting now completely disables fee estimation.

Changes to Wallet or GUI related settings can be found in the GUI or Wallet section below.

Tools and Utilities

A new bitcoin-cli -netinfo command provides a network peer connections dashboard that displays data from the getpeerinfo and getnetworkinfo RPCs in a human-readable format. An optional integer 
argument from 0 to 4 may be passed to see increasing levels of detail.

A new bitcoin-cli -generate command, equivalent to RPC generatenewaddress followed by generatetoaddress, can generate blocks for command line testing purposes. This is a client-side version of the 
former generate RPC. See the help for details.

The bitcoin-cli -getinfo command now displays the wallet name and balance for each of the loaded wallets when more than one is loaded (e.g. in multiwallet mode) and a wallet is not specified with 

The connections field of bitcoin-cli -getinfo is now expanded to return a JSON object with in, out and total numbers of peer connections. It previously returned a single integer value for the total 
number of peer connections.

New settings

The startupnotify option is used to specify a command to execute when Bitcoin Core has finished with its startup sequence.

Backwards compatibility has been dropped for two getaddressinfo RPC deprecations, as notified in the 0.20 release notes. The deprecated label field has been removed as well as the deprecated labels 
behavior of returning a JSON object containing name and purpose key-value pairs. Since 0.20, the labels field returns a JSON array of label names.

To improve wallet privacy, the frequency of wallet rebroadcast attempts is reduced from approximately once every 15 minutes to once every 12-36 hours. To maintain a similar level of guarantee for 
initial broadcast of wallet transactions, the mempool tracks these transactions as a part of the newly introduced unbroadcast set. See the "P2P and network changes" section for more information on 
the unbroadcast set.

The sendtoaddress and sendmany RPCs accept an optional verbose=True argument to also return the fee reason about the sent tx.

The wallet can create a transaction without change even when the keypool is empty. Previously it failed.

The -salvagewallet startup option has been removed. A new salvage command has been added to the bitcoin-wallet tool which performs the salvage operations that -salvagewallet did.

A new configuration flag -maxapsfee has been added, which sets the max allowed avoid partial spends (APS) fee. It defaults to 0 (i.e. fee is the same with and without APS). Setting it to -1 will 
disable APS, unless -avoidpartialspends is set.

The wallet will now avoid partial spends (APS) by default, if this does not result in a difference in fees compared to the non-APS variant. The allowed fee threshold can be adjusted using the new 
-maxapsfee configuration option.

The createwallet, loadwallet, and unloadwallet RPCs now accept load_on_startup options to modify the settings list. Unless these options are explicitly set to true or false, the list is not modified, 
so the RPC methods remain backwards compatible.

A new send RPC with similar syntax to walletcreatefundedpsbt, including support for coin selection and a custom fee rate, is added. The send RPC is experimental and may change in subsequent releases.

The estimate_mode parameter is now case-insensitive in the bumpfee, fundrawtransaction, sendmany, sendtoaddress, send and walletcreatefundedpsbt RPCs.

The bumpfee RPC now uses conf_target rather than confTarget in the options.

fundrawtransaction and walletcreatefundedpsbt when used with the lockUnspents argument now lock manually selected coins, in addition to automatically selected coins. Note that locked coins are never 
used in automatic coin selection, but can still be manually selected.

The -zapwallettxes startup option has been removed and its functionality removed from the wallet. This option was originally intended to allow for rescuing wallets which were affected by a 
malleability attack. More recently, it has been used in the fee bumping of transactions that did not signal RBF. This functionality has been superseded with the abandon transaction feature.

The error code when no wallet is loaded, but a wallet RPC is called, has been changed from -32601 (method not found) to -18 (wallet not found).


 finance/bitcoin/Makefile                                |   5 +--
 finance/bitcoin/PLIST                                   |   5 +++-
 finance/bitcoin/distinfo                                |  13 ++++-----
 finance/bitcoin/patches/patch-src_wallet_walletutil.cpp |  22 ++++++++--------
 4 files changed, 23 insertions(+), 22 deletions(-)

diffs (80 lines):

diff -r b40a5c58109e -r 14b174fbc268 finance/bitcoin/Makefile
--- a/finance/bitcoin/Makefile  Tue Jan 19 08:14:05 2021 +0000
+++ b/finance/bitcoin/Makefile  Tue Jan 19 10:17:00 2021 +0000
@@ -1,7 +1,6 @@
-# $NetBSD: Makefile,v 1.32 2021/01/01 09:52:24 ryoon Exp $
+# $NetBSD: Makefile,v 1.33 2021/01/19 10:17:00 adam Exp $
-DISTNAME=      bitcoin-0.20.1
+DISTNAME=      bitcoin-0.21.0
 CATEGORIES=    finance
diff -r b40a5c58109e -r 14b174fbc268 finance/bitcoin/PLIST
--- a/finance/bitcoin/PLIST     Tue Jan 19 08:14:05 2021 +0000
+++ b/finance/bitcoin/PLIST     Tue Jan 19 10:17:00 2021 +0000
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.2 2019/09/20 16:57:28 adam Exp $
+@comment $NetBSD: PLIST,v 1.3 2021/01/19 10:17:00 adam Exp $
@@ -9,7 +9,10 @@
diff -r b40a5c58109e -r 14b174fbc268 finance/bitcoin/distinfo
--- a/finance/bitcoin/distinfo  Tue Jan 19 08:14:05 2021 +0000
+++ b/finance/bitcoin/distinfo  Tue Jan 19 10:17:00 2021 +0000
@@ -1,9 +1,8 @@
-$NetBSD: distinfo,v 1.9 2020/08/03 15:01:16 adam Exp $
+$NetBSD: distinfo,v 1.10 2021/01/19 10:17:00 adam Exp $
-SHA1 (bitcoin-0.20.1.tar.gz) = 82781d8293ad84f383173e6565a7ac97682900e9
-RMD160 (bitcoin-0.20.1.tar.gz) = 9dd3d6455b6c70e2c9b60802c07a40d3d69097c8
-SHA512 (bitcoin-0.20.1.tar.gz) = ce5a06aa57475c7d8d94a60f2487ef9646406f7c96f68ab845f085121507455b495f9460a25d5ab2348d326117b25115b0f86015d939089829e68d6d7e0e2b13
-Size (bitcoin-0.20.1.tar.gz) = 6981793 bytes
+SHA1 (bitcoin-0.21.0.tar.gz) = 7b4238971148b39d45c988238f92b9f45478087b
+RMD160 (bitcoin-0.21.0.tar.gz) = 8f114015d5eab2f24cced9399d44c2b245e3ace1
+SHA512 (bitcoin-0.21.0.tar.gz) = 80337bd6eec42ac74313a415bf9ffa4d47d8bbffe7dc0ce717750accef59e80cf6053ebd8a6cd2588b634cd2f514f6bcd8b0bf3b462a80ca77a1239fd81a65ae
+Size (bitcoin-0.21.0.tar.gz) = 7531395 bytes
 SHA1 (patch-src_netbase.cpp) = 901c8928181ba351658562477115dc92640d3886
-SHA1 (patch-src_qt_trafficgraphwidget.cpp) = 99b5ce11aa4d23c2cb50208b04c691e329bbce50
-SHA1 (patch-src_wallet_walletutil.cpp) = 27fc38ad137a842c568f9208fb23818748aa1ef8
+SHA1 (patch-src_wallet_walletutil.cpp) = 21b7208901c8403bbe839fa601f44e7417beea4e
diff -r b40a5c58109e -r 14b174fbc268 finance/bitcoin/patches/patch-src_wallet_walletutil.cpp
--- a/finance/bitcoin/patches/patch-src_wallet_walletutil.cpp   Tue Jan 19 08:14:05 2021 +0000
+++ b/finance/bitcoin/patches/patch-src_wallet_walletutil.cpp   Tue Jan 19 10:17:00 2021 +0000
@@ -1,13 +1,13 @@
-$NetBSD: patch-src_wallet_walletutil.cpp,v 1.1 2020/03/29 01:00:01 joerg Exp $
+$NetBSD: patch-src_wallet_walletutil.cpp,v 1.2 2021/01/19 10:17:00 adam Exp $
---- src/wallet/walletutil.cpp.orig     2020-03-28 23:09:25.601811010 +0000
+--- src/wallet/walletutil.cpp.orig     2021-01-13 21:52:34.000000000 +0000
 +++ src/wallet/walletutil.cpp
-@@ -74,7 +74,7 @@ std::vector<fs::path> ListWalletDir()
-         if (it->status().type() == fs::directory_file && IsBerkeleyBtree(it->path() / "wallet.dat")) {
-             // Found a directory which contains wallet.dat btree file, add it as a wallet.
-             paths.emplace_back(path);
--        } else if (it.level() == 0 && it->symlink_status().type() == fs::regular_file && IsBerkeleyBtree(it->path())) {
-+        } else if (it.depth() == 0 && it->symlink_status().type() == fs::regular_file && IsBerkeleyBtree(it->path())) {
-             if (it->path().filename() == "wallet.dat") {
-                 // Found top-level wallet.dat btree file, add top level directory ""
-                 // as a wallet.
+@@ -58,7 +58,7 @@ std::vector<fs::path> ListWalletDir()
+                 (ExistsBerkeleyDatabase(it->path()) || ExistsSQLiteDatabase(it->path()))) {
+                 // Found a directory which contains wallet.dat btree file, add it as a wallet.
+                 paths.emplace_back(path);
+-            } else if (it.level() == 0 && it->symlink_status().type() == fs::regular_file && ExistsBerkeleyDatabase(it->path())) {
++            } else if (it.depth() == 0 && it->symlink_status().type() == fs::regular_file && ExistsBerkeleyDatabase(it->path())) {
+                 if (it->path().filename() == "wallet.dat") {
+                     // Found top-level wallet.dat btree file, add top level directory ""
+                     // as a wallet.

Home | Main Index | Thread Index | Old Index