Skip to content

Commit

Permalink
Merge 619f8a2 into merged_master (Bitcoin PR bitcoin/bitcoin#24304)
Browse files Browse the repository at this point in the history
  • Loading branch information
delta1 committed Jul 3, 2023
2 parents 6f90a02 + 619f8a2 commit b6d963e
Show file tree
Hide file tree
Showing 7 changed files with 383 additions and 172 deletions.
4 changes: 2 additions & 2 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -263,13 +263,13 @@ task:
FILE_ENV: "./ci/test/00_setup_env_i686_multiprocess.sh"

task:
name: '[no wallet] [bionic]'
name: '[no wallet, libbitcoinkernel] [bionic]'
<< : *GLOBAL_TASK_TEMPLATE
container:
image: ubuntu:bionic
env:
<< : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV
FILE_ENV: "./ci/test/00_setup_env_native_nowallet.sh"
FILE_ENV: "./ci/test/00_setup_env_native_nowallet_libbitcoinkernel.sh"

task:
name: 'macOS 10.15 [gui, no tests] [focal]'
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ src/elements-gui
src/elements-node
src/elements-tx
src/elements-util
src/elements-chainstate
src/elements-wallet
src/test/fuzz/fuzz
src/test/test_bitcoin
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@

export LC_ALL=C.UTF-8

export CONTAINER_NAME=ci_native_nowallet
export CONTAINER_NAME=ci_native_nowallet_libbitcoinkernel
export DOCKER_NAME_TAG=ubuntu:18.04 # Use bionic to have one config run the tests in python3.6, see doc/dependencies.md
export PACKAGES="python3-zmq clang-7 llvm-7 libc++abi-7-dev libc++-7-dev" # Use clang-7 to test C++17 compatibility, see doc/dependencies.md
export DEP_OPTS="NO_WALLET=1 CC=clang-7 CXX='clang++-7 -stdlib=libc++'"
export GOAL="install"
export BITCOIN_CONFIG="--enable-reduce-exports CC=clang-7 CXX='clang++-7 -stdlib=libc++'"
export BITCOIN_CONFIG="--enable-reduce-exports CC=clang-7 CXX='clang++-7 -stdlib=libc++' --enable-experimental-util-chainstate"
15 changes: 14 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
AC_PREREQ([2.69])
define(_CLIENT_VERSION_MAJOR, 22)
define(_CLIENT_VERSION_MAJOR, 23)
define(_CLIENT_VERSION_MINOR, 99)
define(_CLIENT_VERSION_BUILD, 0)
define(_CLIENT_VERSION_RC, 0)
Expand All @@ -24,6 +24,7 @@ BITCOIN_GUI_NAME=elements-qt
BITCOIN_CLI_NAME=elements-cli
BITCOIN_TX_NAME=elements-tx
BITCOIN_UTIL_NAME=elements-util
BITCOIN_CHAINSTATE_NAME=elements-chainstate
BITCOIN_WALLET_TOOL_NAME=elements-wallet
dnl Multi Process
BITCOIN_MP_NODE_NAME=elements-node
Expand Down Expand Up @@ -654,6 +655,12 @@ AC_ARG_ENABLE([util-util],
[build_bitcoin_util=$enableval],
[build_bitcoin_util=$build_bitcoin_utils])

AC_ARG_ENABLE([experimental-util-chainstate],
[AS_HELP_STRING([--enable-experimental-util-chainstate],
[build experimental bitcoin-chainstate executable (default=no)])],
[build_bitcoin_chainstate=$enableval],
[build_bitcoin_chainstate=no])

AC_ARG_WITH([libs],
[AS_HELP_STRING([--with-libs],
[build libraries (default=yes)])],
Expand Down Expand Up @@ -1279,6 +1286,7 @@ if test "$enable_fuzz" = "yes"; then
build_bitcoin_cli=no
build_bitcoin_tx=no
build_bitcoin_util=no
build_bitcoin_chainstate=no
build_bitcoin_wallet=no
build_bitcoind=no
build_bitcoin_libs=no
Expand Down Expand Up @@ -1635,6 +1643,10 @@ AC_MSG_CHECKING([whether to build bitcoin-util])
AM_CONDITIONAL([BUILD_BITCOIN_UTIL], [test $build_bitcoin_util = "yes"])
AC_MSG_RESULT($build_bitcoin_util)

AC_MSG_CHECKING([whether to build experimental bitcoin-chainstate])
AM_CONDITIONAL([BUILD_BITCOIN_CHAINSTATE], [test $build_bitcoin_chainstate = "yes"])
AC_MSG_RESULT($build_bitcoin_chainstate)

AC_MSG_CHECKING([whether to build libraries])
AM_CONDITIONAL([BUILD_BITCOIN_LIBS], [test $build_bitcoin_libs = "yes"])
if test "$build_bitcoin_libs" = "yes"; then
Expand Down Expand Up @@ -1855,6 +1867,7 @@ AC_SUBST(BITCOIN_GUI_NAME)
AC_SUBST(BITCOIN_CLI_NAME)
AC_SUBST(BITCOIN_TX_NAME)
AC_SUBST(BITCOIN_UTIL_NAME)
AC_SUBST(BITCOIN_CHAINSTATE_NAME)
AC_SUBST(BITCOIN_WALLET_TOOL_NAME)
AC_SUBST(BITCOIN_MP_NODE_NAME)
AC_SUBST(BITCOIN_MP_GUI_NAME)
Expand Down
169 changes: 2 additions & 167 deletions doc/release-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ template to create the initial release notes draft.*
for the process.*

*Create the draft, named* "*version* Release Notes Draft"
*(e.g. "22.0 Release Notes Draft"), as a collaborative wiki in:*
*(e.g. "23.0 Release Notes Draft"), as a collaborative wiki in:*

https://github.com/bitcoin-core/bitcoin-devwiki/wiki/

Expand Down Expand Up @@ -54,174 +54,9 @@ unsupported systems.
Notable changes
===============

P2P and network changes
-----------------------

- A bitcoind node will no longer rumour addresses to inbound peers by default.
They will become eligible for address gossip after sending an ADDR, ADDRV2,
or GETADDR message. (#21528)

Fee estimation changes
----------------------

- Fee estimation now takes the feerate of replacement (RBF) transactions into
account. (#22539)

Rescan startup parameter removed
--------------------------------

The `-rescan` startup parameter has been removed. Wallets which require
rescanning due to corruption will still be rescanned on startup.
Otherwise, please use the `rescanblockchain` RPC to trigger a rescan. (#23123)

Updated RPCs
------------

- The `validateaddress` RPC now returns an `error_locations` array for invalid
addresses, with the indices of invalid character locations in the address (if
known). For example, this will attempt to locate up to two Bech32 errors, and
return their locations if successful. Success and correctness are only guaranteed
if fewer than two substitution errors have been made.
The error message returned in the `error` field now also returns more specific
errors when decoding fails. (#16807)

- The `-deprecatedrpc=addresses` configuration option has been removed. RPCs
`gettxout`, `getrawtransaction`, `decoderawtransaction`, `decodescript`,
`gettransaction verbose=true` and REST endpoints `/rest/tx`, `/rest/getutxos`,
`/rest/block` no longer return the `addresses` and `reqSigs` fields, which
were previously deprecated in 22.0. (#22650)
- The `getblock` RPC command now supports verbosity level 3 containing transaction inputs'
`prevout` information. The existing `/rest/block/` REST endpoint is modified to contain
this information too. Every `vin` field will contain an additional `prevout` subfield
describing the spent output. `prevout` contains the following keys:
- `generated` - true if the spent coins was a coinbase.
- `height`
- `value`
- `scriptPubKey`

- The top-level fee fields `fee`, `modifiedfee`, `ancestorfees` and `descendantfees`
returned by RPCs `getmempoolentry`,`getrawmempool(verbose=true)`,
`getmempoolancestors(verbose=true)` and `getmempooldescendants(verbose=true)`
are deprecated and will be removed in the next major version (use
`-deprecated=fees` if needed in this version). The same fee fields can be accessed
through the `fees` object in the result. WARNING: deprecated
fields `ancestorfees` and `descendantfees` are denominated in sats, whereas all
fields in the `fees` object are denominated in BTC. (#22689)

- Both `createmultisig` and `addmultisigaddress` now include a `warnings`
field, which will show a warning if a non-legacy address type is requested
when using uncompressed public keys. (#23113)

New RPCs
--------

- Information on soft fork status has been moved from `getblockchaininfo`
to the new `getdeploymentinfo` RPC which allows querying soft fork status at any
block, rather than just at the chain tip. Inclusion of soft fork
status in `getblockchaininfo` can currently be restored using the
configuration `-deprecatedrpc=softforks`, but this will be removed in
a future release. Note that in either case, the `status` field
now reflects the status of the current block rather than the next
block. (#23508)

Build System
Example item
------------

Files
-----

* On startup, the list of banned hosts and networks (via `setban` RPC) in
`banlist.dat` is ignored and only `banlist.json` is considered. Bitcoin Core
version 22.x is the only version that can read `banlist.dat` and also write
it to `banlist.json`. If `banlist.json` already exists, version 22.x will not
try to translate the `banlist.dat` into json. After an upgrade, `listbanned`
can be used to double check the parsed entries. (#22570)

New settings
------------

Updated settings
----------------

- In previous releases, the meaning of the command line option
`-persistmempool` (without a value provided) incorrectly disabled mempool
persistence. `-persistmempool` is now treated like other boolean options to
mean `-persistmempool=1`. Passing `-persistmempool=0`, `-persistmempool=1`
and `-nopersistmempool` is unaffected. (#23061)

- `-maxuploadtarget` now allows human readable byte units [k|K|m|M|g|G|t|T].
E.g. `-maxuploadtarget=500g`. No whitespace, +- or fractions allowed.
Default is `M` if no suffix provided. (#23249)

- If `-proxy=` is given together with `-noonion` then the provided proxy will
not be set as a proxy for reaching the Tor network. So it will not be
possible to open manual connections to the Tor network for example with the
`addnode` RPC. To mimic the old behavior use `-proxy=` together with
`-onlynet=` listing all relevant networks except `onion`. (#22834)

Tools and Utilities
-------------------

- Update `-getinfo` to return data in a user-friendly format that also reduces vertical space. (#21832)

- CLI `-addrinfo` now returns a single field for the number of `onion` addresses
known to the node instead of separate `torv2` and `torv3` fields, as support
for Tor V2 addresses was removed from Bitcoin Core in 22.0. (#22544)

Wallet
------

- `upgradewallet` will now automatically flush the keypool if upgrading
from a non-HD wallet to an HD wallet, to immediately start using the
newly-generated HD keys. (#23093)

- a new RPC `newkeypool` has been added, which will flush (entirely
clear and refill) the keypool. (#23093)

- `listunspent` now includes `ancestorcount`, `ancestorsize`, and
`ancestorfees` for each transaction output that is still in the mempool.
(#12677)

- `lockunspent` now optionally takes a third parameter, `persistent`, which
causes the lock to be written persistently to the wallet database. This
allows UTXOs to remain locked even after node restarts or crashes. (#23065)

- `receivedby` RPCs now include coinbase transactions. Previously, the
following wallet RPCs excluded coinbase transactions: `getreceivedbyaddress`,
`getreceivedbylabel`, `listreceivedbyaddress`, `listreceivedbylabel`. This
release changes this behaviour and returns results accounting for received
coins from coinbase outputs. The previous behaviour can be restored using the
configuration `-deprecatedrpc=exclude_coinbase`, but may be removed in a
future release. (#14707)

- A new option in the same `receivedby` RPCs, `include_immature_coinbase`
(default=`false`), determines whether to account for immature coinbase
transactions. Immature coinbase transactions are coinbase transactions that
have 100 or fewer confirmations, and are not spendable. (#14707)

GUI changes
-----------

- UTXOs which are locked via the GUI are now stored persistently in the
wallet database, so are not lost on node shutdown or crash. (#23065)

- The Bech32 checkbox has been replaced with a dropdown for all address types, including the new Bech32m (BIP-350) standard for Taproot enabled wallets.

Low-level changes
=================

RPC
---

- `getblockchaininfo` now returns a new `time` field, that provides the chain tip time. (#22407)

Tests
-----

- For the `regtest` network the activation heights of several softforks were
set to block height 1. They can be changed by the runtime setting
`-testactivationheight=name@height`. (#22818)

Credits
=======

Expand Down
100 changes: 100 additions & 0 deletions src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,10 @@ if BUILD_BITCOIN_UTIL
bin_PROGRAMS += elements-util
endif

if BUILD_BITCOIN_CHAINSTATE
bin_PROGRAMS += bitcoin-chainstate
endif

.PHONY: FORCE check-symbols check-security
# bitcoin core #
BITCOIN_CORE_H = \
Expand Down Expand Up @@ -816,6 +820,102 @@ elements_util_LDADD = \
$(LIBSECP256K1)
#

# bitcoin-chainstate binary #
bitcoin_chainstate_SOURCES = \
bitcoin-chainstate.cpp \
arith_uint256.cpp \
blockfilter.cpp \
chain.cpp \
chainparamsbase.cpp \
chainparams.cpp \
clientversion.cpp \
coins.cpp \
compat/glibcxx_sanity.cpp \
compressor.cpp \
consensus/merkle.cpp \
consensus/tx_check.cpp \
consensus/tx_verify.cpp \
core_read.cpp \
dbwrapper.cpp \
deploymentinfo.cpp \
deploymentstatus.cpp \
flatfile.cpp \
fs.cpp \
hash.cpp \
index/base.cpp \
index/blockfilterindex.cpp \
index/coinstatsindex.cpp \
init/common.cpp \
key.cpp \
logging.cpp \
netaddress.cpp \
node/blockstorage.cpp \
node/chainstate.cpp \
node/coinstats.cpp \
node/ui_interface.cpp \
policy/feerate.cpp \
policy/fees.cpp \
policy/packages.cpp \
policy/policy.cpp \
policy/rbf.cpp \
policy/settings.cpp \
pow.cpp \
primitives/block.cpp \
primitives/transaction.cpp \
pubkey.cpp \
random.cpp \
randomenv.cpp \
scheduler.cpp \
script/interpreter.cpp \
script/script.cpp \
script/script_error.cpp \
script/sigcache.cpp \
script/standard.cpp \
shutdown.cpp \
signet.cpp \
support/cleanse.cpp \
support/lockedpool.cpp \
sync.cpp \
threadinterrupt.cpp \
timedata.cpp \
txdb.cpp \
txmempool.cpp \
uint256.cpp \
util/asmap.cpp \
util/bytevectorhash.cpp \
util/getuniquepath.cpp \
util/hasher.cpp \
util/moneystr.cpp \
util/rbf.cpp \
util/serfloat.cpp \
util/settings.cpp \
util/strencodings.cpp \
util/syscall_sandbox.cpp \
util/system.cpp \
util/thread.cpp \
util/threadnames.cpp \
util/time.cpp \
util/tokenpipe.cpp \
validation.cpp \
validationinterface.cpp \
versionbits.cpp \
warnings.cpp
bitcoin_chainstate_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES)
bitcoin_chainstate_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
bitcoin_chainstate_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS) $(PTHREAD_FLAGS)
bitcoin_chainstate_LDADD = \
$(LIBBITCOIN_CRYPTO) \
$(LIBUNIVALUE) \
$(LIBSECP256K1) \
$(LIBLEVELDB) \
$(LIBLEVELDB_SSE42) \
$(LIBMEMENV)

# Required for obj/build.h to be generated first.
# More details: https://www.gnu.org/software/automake/manual/html_node/Built-Sources-Example.html
bitcoin_chainstate-clientversion.$(OBJEXT): obj/build.h
#

# bitcoinconsensus library #
if BUILD_BITCOIN_LIBS
include_HEADERS = script/bitcoinconsensus.h
Expand Down
Loading

0 comments on commit b6d963e

Please sign in to comment.