pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/finance/bitcoin finance/bitcoin: update to version 22.0



details:   https://anonhg.NetBSD.org/pkgsrc/rev/10cdcc66ea7e
branches:  trunk
changeset: 769906:10cdcc66ea7e
user:      khorben <khorben%pkgsrc.org@localhost>
date:      Mon Nov 22 21:32:04 2021 +0000

description:
finance/bitcoin: update to version 22.0

Notable changes:

- P2P and network changes

  * Added support for running Bitcoin Core as an I2P (Invisible Internet
    Project) service and connect to such services. See i2p.md for details.
  * This release removes support for Tor version 2 hidden services in favor of
    Tor v3 only, as the Tor network dropped support for Tor v2 with the release
    of Tor version 0.4.6. Henceforth, Bitcoin Core ignores Tor v2 addresses; it
    neither rumors them over the network to other peers, nor stores them in
    memory or to peers.dat.
  * Added NAT-PMP port mapping support via libnatpmp.

- New and Updated RPCs

  * Due to BIP 350 being implemented, behavior for all RPCs that accept
    addresses is changed when a native witness version 1 (or higher) is passed.
    These now require a Bech32m encoding instead of a Bech32 one, and Bech32m
    encoding will be used for such addresses in RPC output as well. No version 1
    addresses should be created for mainnet until consensus rules are adopted
    that give them meaning (as will happen through BIP 341). Once that happens,
    Bech32m is expected to be used for them, so this shouldn't affect any
    production systems, but may be observed on other networks where such addresses
    already have meaning (like signet).
  * The getpeerinfo RPC returns two new boolean fields, bip152_hb_to and
    bip152_hb_from, that respectively indicate whether we selected a peer to be
    in compact blocks high-bandwidth mode or whether a peer selected us as a
    compact blocks high-bandwidth peer. High-bandwidth peers send new block
    announcements via a cmpctblock message rather than the usual inv/headers
    announcements. See BIP 152 for more details.
  * getpeerinfo no longer returns the following fields: addnode, banscore, and
    whitelisted, which were previously deprecated in 0.21. Instead of addnode,
    the connection_type field returns manual. Instead of whitelisted, the
    permissions field indicates if the peer has special privileges. The
    banscore field has simply been removed.
  * The following RPCs: gettxout, getrawtransaction, decoderawtransaction,
    decodescript, gettransaction, and REST endpoints: /rest/tx, /rest/getutxos,
    /rest/block deprecated the following fields (which are no longer returned in
    the responses by default): addresses, reqSigs. The -deprecatedrpc=addresses
    flag must be passed for these fields to be included in the RPC response.
    This flag/option will be available only for this major release, after which
    the deprecation will be removed entirely. Note that these fields are
    attributes of the scriptPubKey object returned in the RPC response. However,
    in the response of decodescript these fields are top-level attributes, and
    included again as attributes of the scriptPubKey object.
  * When creating a hex-encoded bitcoin transaction using the bitcoin-tx
    utility with the -json option set, the following fields: addresses, reqSigs
    are no longer returned in the tx output of the response.
  * The listbanned RPC now returns two new numeric fields: ban_duration and
    time_remaining. Respectively, these new fields indicate the duration of a
    ban and the time remaining until a ban expires, both in seconds.
    Additionally, the ban_created field is repositioned to come before
    banned_until.
  * The setban RPC can ban onion addresses again. This fixes a regression
    introduced in version 0.21.0.
  * The getnodeaddresses RPC now returns a "network" field indicating the
    network type (ipv4, ipv6, onion, or i2p) for each address.
  * getnodeaddresses now also accepts a "network" argument (ipv4, ipv6, onion,
    or i2p) to return only addresses of the specified network.
  * The testmempoolaccept RPC now accepts multiple transactions (still
    experimental at the moment, API may be unstable). This is intended for
    testing transaction packages with dependency relationships; it is not
    recommended for batch-validating independent transactions. In addition to
    mempool policy, package policies apply: the list cannot contain more than 25
    transactions or have a total size exceeding 101K virtual bytes, and cannot
    conflict with (spend the same inputs as) each other or the mempool, even if
    it would be a valid BIP125 replace-by-fee. There are some known limitations
    to the accuracy of the test accept: it's possible for testmempoolaccept to
    return "allowed"=True for a group of transactions, but
    "too-long-mempool-chain" if they are actually submitted.
  * addmultisigaddress and createmultisig now support up to 20 keys for Segwit
    addresses.

Then also the build system, files, new settings, updated settings, tools and
utilities, wallet, and GUI changes; the full list is at
https://github.com/bitcoin/bitcoin/blob/master/doc/release-notes/release-notes-22.0.md.

diffstat:

 finance/bitcoin/Makefile                                |   5 ++---
 finance/bitcoin/PLIST                                   |   4 +++-
 finance/bitcoin/distinfo                                |  11 +++++------
 finance/bitcoin/files/bitcoind.sh                       |   4 ++--
 finance/bitcoin/patches/patch-src_netbase.cpp           |  16 ++++++++--------
 finance/bitcoin/patches/patch-src_wallet_walletutil.cpp |  13 -------------
 6 files changed, 20 insertions(+), 33 deletions(-)

diffs (119 lines):

diff -r 0b096450359b -r 10cdcc66ea7e finance/bitcoin/Makefile
--- a/finance/bitcoin/Makefile  Mon Nov 22 18:35:13 2021 +0000
+++ b/finance/bitcoin/Makefile  Mon Nov 22 21:32:04 2021 +0000
@@ -1,7 +1,6 @@
-# $NetBSD: Makefile,v 1.43 2021/11/15 22:54:11 wiz Exp $
+# $NetBSD: Makefile,v 1.44 2021/11/22 21:32:04 khorben Exp $
 
-DISTNAME=      bitcoin-0.21.1
-PKGREVISION=   6
+DISTNAME=      bitcoin-22.0
 CATEGORIES=    finance
 MASTER_SITES=  https://bitcoincore.org/bin/bitcoin-core-${PKGVERSION_NOREV}/
 
diff -r 0b096450359b -r 10cdcc66ea7e finance/bitcoin/PLIST
--- a/finance/bitcoin/PLIST     Mon Nov 22 18:35:13 2021 +0000
+++ b/finance/bitcoin/PLIST     Mon Nov 22 21:32:04 2021 +0000
@@ -1,8 +1,9 @@
-@comment $NetBSD: PLIST,v 1.3 2021/01/19 10:17:00 adam Exp $
+@comment $NetBSD: PLIST,v 1.4 2021/11/22 21:32:04 khorben Exp $
 bin/bench_bitcoin
 bin/bitcoin-cli
 ${PLIST.qt}bin/bitcoin-qt
 bin/bitcoin-tx
+bin/bitcoin-util
 bin/bitcoin-wallet
 bin/bitcoind
 bin/test_bitcoin
@@ -23,5 +24,6 @@
 man/man1/bitcoin-cli.1
 ${PLIST.qt}man/man1/bitcoin-qt.1
 man/man1/bitcoin-tx.1
+man/man1/bitcoin-util.1
 man/man1/bitcoin-wallet.1
 man/man1/bitcoind.1
diff -r 0b096450359b -r 10cdcc66ea7e finance/bitcoin/distinfo
--- a/finance/bitcoin/distinfo  Mon Nov 22 18:35:13 2021 +0000
+++ b/finance/bitcoin/distinfo  Mon Nov 22 21:32:04 2021 +0000
@@ -1,7 +1,6 @@
-$NetBSD: distinfo,v 1.13 2021/10/26 10:26:01 nia Exp $
+$NetBSD: distinfo,v 1.14 2021/11/22 21:32:04 khorben Exp $
 
-BLAKE2s (bitcoin-0.21.1.tar.gz) = 09e3f87803baec0838e4441ada172606be85c2a20a8c66a971f57d18d8a9e985
-SHA512 (bitcoin-0.21.1.tar.gz) = 644de170fab232a5f67a11064aac538d4a7df729f57a63c21d5d2407a92239960c8256ac30ea931592eb465a2e99ce8bfa0c2d5e328af4f25ba16d37a8decf81
-Size (bitcoin-0.21.1.tar.gz) = 7628715 bytes
-SHA1 (patch-src_netbase.cpp) = 901c8928181ba351658562477115dc92640d3886
-SHA1 (patch-src_wallet_walletutil.cpp) = 21b7208901c8403bbe839fa601f44e7417beea4e
+BLAKE2s (bitcoin-22.0.tar.gz) = 8e0526c33180ff5036637b774aeff354ecaff92806422239103a6e22a5394bf6
+SHA512 (bitcoin-22.0.tar.gz) = a39dcc6e89f42c9da2d9aad503071c615bde76b17c829d2b460754691ad07c3eef66c36555252d31ddc8f3b13d0e6893e40cfb042ba20ef19144bcd15d89ceb2
+Size (bitcoin-22.0.tar.gz) = 7972234 bytes
+SHA1 (patch-src_netbase.cpp) = d160078c9a7aedc5b569a89ebf9afa98b0d2022b
diff -r 0b096450359b -r 10cdcc66ea7e finance/bitcoin/files/bitcoind.sh
--- a/finance/bitcoin/files/bitcoind.sh Mon Nov 22 18:35:13 2021 +0000
+++ b/finance/bitcoin/files/bitcoind.sh Mon Nov 22 21:32:04 2021 +0000
@@ -1,6 +1,6 @@
 #!@RCD_SCRIPTS_SHELL@
 #
-# $NetBSD: bitcoind.sh,v 1.2 2021/08/29 22:38:58 khorben Exp $
+# $NetBSD: bitcoind.sh,v 1.3 2021/11/22 21:32:05 khorben Exp $
 #
 # Startup script for bitcoind
 #
@@ -17,7 +17,7 @@
 command="@PREFIX@/bin/bitcoind"
 pidfile="@VARBASE@/run/bitcoind.pid"
 required_directory="@VARBASE@/bitcoin"
-command_args="-daemon -conf=@PREFIX@/etc/bitcoin.conf -pid=${pidfile} -datadir=${required_directory}"
+command_args="-daemon -conf=@PKG_SYSCONFDIR@/bitcoin.conf -pid=${pidfile} -datadir=${required_directory}"
 
 if [ -f @SYSCONFBASE@/rc.subr ]; then
        load_rc_config $name
diff -r 0b096450359b -r 10cdcc66ea7e finance/bitcoin/patches/patch-src_netbase.cpp
--- a/finance/bitcoin/patches/patch-src_netbase.cpp     Mon Nov 22 18:35:13 2021 +0000
+++ b/finance/bitcoin/patches/patch-src_netbase.cpp     Mon Nov 22 21:32:04 2021 +0000
@@ -1,20 +1,20 @@
-$NetBSD: patch-src_netbase.cpp,v 1.4 2020/07/12 21:02:12 adam Exp $
+$NetBSD: patch-src_netbase.cpp,v 1.5 2021/11/22 21:32:05 khorben Exp $
 
 It is unclear why this patch exists.  NetBSD 6 and 7 have AI_ADDRCONFIG,
 although NetBSD 5 does not.  Arguably upstream should have an autoconf
 test instead.  This is not known to be reported upstream.
 
---- src/netbase.cpp.orig       2020-06-02 07:43:04.000000000 +0000
+--- src/netbase.cpp.orig       2021-09-08 18:16:07.000000000 +0000
 +++ src/netbase.cpp
-@@ -96,7 +96,11 @@ bool static LookupIntern(const std::stri
+@@ -56,7 +56,11 @@ std::vector<CNetAddr> WrappedGetAddrInfo
      // If we don't allow lookups, then use the AI_NUMERICHOST flag for
      // getaddrinfo to only decode numerical network addresses and suppress
      // hostname lookups.
 +#ifdef AI_ADDRCONFIG
-     aiHint.ai_flags = fAllowLookup ? AI_ADDRCONFIG : AI_NUMERICHOST;
+     ai_hint.ai_flags = allow_lookup ? AI_ADDRCONFIG : AI_NUMERICHOST;
 +#else
-+    aiHint.ai_flags = fAllowLookup ? 0 : AI_NUMERICHOST;
++    ai_hint.ai_flags = allow_lookup ? 0 : AI_NUMERICHOST;
 +#endif
-     struct addrinfo *aiRes = nullptr;
-     int nErr = getaddrinfo(name.c_str(), nullptr, &aiHint, &aiRes);
-     if (nErr)
+ 
+     addrinfo* ai_res{nullptr};
+     const int n_err{getaddrinfo(name.c_str(), nullptr, &ai_hint, &ai_res)};
diff -r 0b096450359b -r 10cdcc66ea7e finance/bitcoin/patches/patch-src_wallet_walletutil.cpp
--- a/finance/bitcoin/patches/patch-src_wallet_walletutil.cpp   Mon Nov 22 18:35:13 2021 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,13 +0,0 @@
-$NetBSD: patch-src_wallet_walletutil.cpp,v 1.2 2021/01/19 10:17:00 adam Exp $
-
---- src/wallet/walletutil.cpp.orig     2021-01-13 21:52:34.000000000 +0000
-+++ src/wallet/walletutil.cpp
-@@ -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