diff --git a/README.md b/README.md index 75dc9e847a858..b5577106a40ba 100644 --- a/README.md +++ b/README.md @@ -37,6 +37,9 @@ The `master` branch is meant to be stable. Development is normally done in separ [Tags](https://github.com/dashpay/dash/tags) are created to indicate new official, stable release versions of Dash Core. +The `develop` branch is regularly built (see doc/build-*.md for instructions) and tested, but is not guaranteed to be +completely stable. + The contribution workflow is described in [CONTRIBUTING.md](CONTRIBUTING.md) and useful hints for developers can be found in [doc/developer-notes.md](doc/developer-notes.md). diff --git a/ci/test/00_setup_env.sh b/ci/test/00_setup_env.sh index eff442719e914..e94162dde2dcd 100755 --- a/ci/test/00_setup_env.sh +++ b/ci/test/00_setup_env.sh @@ -8,7 +8,7 @@ export LC_ALL=C.UTF-8 # The root dir. # The ci system copies this folder. -# This is where the build is done (depends and dist). +# This is where the depends build is done. BASE_ROOT_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )"/../../ >/dev/null 2>&1 && pwd ) export BASE_ROOT_DIR @@ -59,8 +59,10 @@ export CCACHE_DIR=${CCACHE_DIR:-$CACHE_DIR/ccache} # The depends dir. # This folder exists on the ci host and ci guest. Changes are propagated back and forth. export DEPENDS_DIR=${DEPENDS_DIR:-$BASE_ROOT_DIR/depends} -# Folder where the build is done (bin and lib). +# Folder where the build result is put (bin and lib). export BASE_OUTDIR=${BASE_OUTDIR:-$BASE_SCRATCH_DIR/out/$HOST} +# Folder where the build is done (dist and out-of-tree build). +export BASE_BUILD_DIR=${BASE_BUILD_DIR:-$BASE_SCRATCH_DIR/build-ci} export PREVIOUS_RELEASES_DIR=${PREVIOUS_RELEASES_DIR:-$BASE_ROOT_DIR/releases/$HOST} export SDK_URL=${SDK_URL:-https://bitcoincore.org/depends-sources/sdks} export DOCKER_PACKAGES=${DOCKER_PACKAGES:-build-essential libtool autotools-dev automake pkg-config bsdmainutils curl ca-certificates ccache python3 rsync git procps} diff --git a/ci/test/04_install.sh b/ci/test/04_install.sh index 8e25a65a510d8..68fc56036b591 100755 --- a/ci/test/04_install.sh +++ b/ci/test/04_install.sh @@ -18,7 +18,7 @@ if [ "$TRAVIS_OS_NAME" == "osx" ]; then ${CI_RETRY_EXE} pip3 install $PIP_PACKAGES fi -mkdir -p "${BASE_SCRATCH_DIR}" +# Create folders that are mounted into the docker mkdir -p "${CCACHE_DIR}" mkdir -p "${PREVIOUS_RELEASES_DIR}" diff --git a/configure.ac b/configure.ac index ad96a2d1e1dac..943eaf5fa5033 100644 --- a/configure.ac +++ b/configure.ac @@ -1871,7 +1871,7 @@ echo " gprof enabled = $enable_gprof" echo " werror = $enable_werror" echo echo " target os = $TARGET_OS" -echo " build os = $BUILD_OS" +echo " build os = $build_os" echo echo " CC = $CC" echo " CFLAGS = $PTHREAD_CFLAGS $CFLAGS" diff --git a/doc/fuzzing.md b/doc/fuzzing.md index 859c3c04b77dd..87c9127a3dcb7 100644 --- a/doc/fuzzing.md +++ b/doc/fuzzing.md @@ -8,7 +8,7 @@ To quickly get started fuzzing Dash Core using [libFuzzer](https://llvm.org/docs $ git clone https://github.com/dashpay/dash $ cd dash/ $ ./autogen.sh -$ CC=clang CXX=clang++ ./configure --enable-fuzz --with-sanitizers=address,fuzzer,undefined --enable-c++17 +$ CC=clang CXX=clang++ ./configure --enable-fuzz --with-sanitizers=address,fuzzer,undefined # macOS users: If you have problem with this step then make sure to read "macOS hints for # libFuzzer" on https://github.com/dashpay/dash/blob/develop/doc/fuzzing.md#macos-hints-for-libfuzzer $ make @@ -123,7 +123,7 @@ You may also need to take care of giving the correct path for `clang` and Full configure that was tested on macOS Catalina with `brew` installed `llvm`: ```sh -./configure --enable-fuzz --with-sanitizers=fuzzer,address,undefined CC=/usr/local/opt/llvm/bin/clang CXX=/usr/local/opt/llvm/bin/clang++ --disable-asm --enable-c++17 +./configure --enable-fuzz --with-sanitizers=fuzzer,address,undefined CC=/usr/local/opt/llvm/bin/clang CXX=/usr/local/opt/llvm/bin/clang++ --disable-asm ``` Read the [libFuzzer documentation](https://llvm.org/docs/LibFuzzer.html) for more information. This [libFuzzer tutorial](https://github.com/google/fuzzing/blob/master/tutorial/libFuzzerTutorial.md) might also be of interest. @@ -142,7 +142,7 @@ $ make -C AFLplusplus/ source-only $ ./autogen.sh # If afl-clang-lto is not available, see # https://github.com/AFLplusplus/AFLplusplus#a-selecting-the-best-afl-compiler-for-instrumenting-the-target -$ CC=$(pwd)/AFLplusplus/afl-clang-lto CXX=$(pwd)/AFLplusplus/afl-clang-lto++ ./configure --enable-fuzz --enable-c++17 +$ CC=$(pwd)/AFLplusplus/afl-clang-lto CXX=$(pwd)/AFLplusplus/afl-clang-lto++ ./configure --enable-fuzz $ make # For macOS you may need to ignore x86 compilation checks when running "make". If so, # try compiling using: AFL_NO_X86=1 make @@ -169,7 +169,7 @@ $ git clone https://github.com/google/honggfuzz $ cd honggfuzz/ $ make $ cd .. -$ CC=$(pwd)/honggfuzz/hfuzz_cc/hfuzz-clang CXX=$(pwd)/honggfuzz/hfuzz_cc/hfuzz-clang++ ./configure --enable-fuzz --with-sanitizers=address,undefined --enable-c++17 +$ CC=$(pwd)/honggfuzz/hfuzz_cc/hfuzz-clang CXX=$(pwd)/honggfuzz/hfuzz_cc/hfuzz-clang++ ./configure --enable-fuzz --with-sanitizers=address,undefined $ make $ mkdir -p inputs/ $ FUZZ=process_message honggfuzz/honggfuzz -i inputs/ -- src/test/fuzz/fuzz diff --git a/doc/release-notes-bitcoin-17219.md b/doc/release-notes-bitcoin-17219.md new file mode 100644 index 0000000000000..97df9ff0119d3 --- /dev/null +++ b/doc/release-notes-bitcoin-17219.md @@ -0,0 +1,8 @@ +Wallet +------ + + +- The wallet can create a transaction without change even when the keypool is + empty. Previously it failed. (#17219) + + diff --git a/src/bitcoin-cli.cpp b/src/bitcoin-cli.cpp index 9c2e0518b290e..af24fb55b8e0e 100644 --- a/src/bitcoin-cli.cpp +++ b/src/bitcoin-cli.cpp @@ -26,6 +26,7 @@ #include #include #include +#include #include #include @@ -172,7 +173,7 @@ struct HTTPReply std::string body; }; -static const char *http_errorstring(int code) +static std::string http_errorstring(int code) { switch(code) { #if LIBEVENT_VERSION_NUMBER >= 0x02010300 diff --git a/src/core_read.cpp b/src/core_read.cpp index cbd31f55a52db..f0232b7902573 100644 --- a/src/core_read.cpp +++ b/src/core_read.cpp @@ -16,6 +16,7 @@ #include #include +#include namespace { @@ -31,10 +32,9 @@ opcodetype ParseOpCode(const std::string& s) if (op < OP_NOP && op != OP_RESERVED) continue; - const char* name = GetOpName(static_cast(op)); - if (strcmp(name, "OP_UNKNOWN") == 0) + std::string strName = GetOpName(static_cast(op)); + if (strName == "OP_UNKNOWN") continue; - std::string strName(name); mapOpNames[strName] = static_cast(op); // Convenience: OP_ADD and just ADD are both recognized: if (strName.compare(0, 3, "OP_") == 0) { // strName starts with "OP_" diff --git a/src/rpc/mining.cpp b/src/rpc/mining.cpp index 9d4415275c65f..6f027d18be9ed 100644 --- a/src/rpc/mining.cpp +++ b/src/rpc/mining.cpp @@ -849,6 +849,7 @@ static UniValue getblocktemplate(const JSONRPCRequest& request) result.pushKV("capabilities", aCaps); UniValue aRules(UniValue::VARR); + aRules.push_back("csv"); UniValue vbavailable(UniValue::VOBJ); for (int j = 0; j < (int)Consensus::MAX_VERSION_BITS_DEPLOYMENTS; ++j) { Consensus::DeploymentPos pos = Consensus::DeploymentPos(j); diff --git a/src/script/script.cpp b/src/script/script.cpp index 4c3f7091de2fa..900e4e7ee5eaf 100644 --- a/src/script/script.cpp +++ b/src/script/script.cpp @@ -6,7 +6,9 @@ #include