Skip to content

Commit 5410f36

Browse files
7d049f1 Merge bitcoin#24806: RPC: Switch getblockfrompeer back to standard param name blockhash (fanquake) 68efe46 Merge bitcoin#16795: rpc: have raw transaction decoding infer output descriptors (Andrew Chow) 0352b35 Merge bitcoin#24250: Update translations for 0.23 string freeze (laanwj) cb70a69 Merge bitcoin#24131: build, qt: Fix Windows cross-compiling with Qt 5.15 (fanquake) 95a29e2 Merge bitcoin#24212: ci: Bump CentOS 8 image (MarcoFalke) 4ea1471 Merge bitcoin#24146: Avoid integer sanitizer warnings in chain.o (MarcoFalke) fa11b33 Merge bitcoin#24179: fuzz: Speed up script fuzz target (MarcoFalke) 99fe949 Merge bitcoin#24111: build: force CRCCheck in Windows installer (fanquake) a0c7290 Merge bitcoin#24155: doc: Fix rpc docs (fanquake) 886419c Merge bitcoin#24113: test, bugfix: fix intermittent failure in getrawtransaction_tests (MarcoFalke) 362ef37 Merge bitcoin#23706: rpc: getblockfrompeer followups (MarcoFalke) Pull request description: ## What was done? Regular backports from Bitcoin Core v23 ## How Has This Been Tested? Run unit & functional tests ## Breaking Changes N/A ## Checklist: - [x] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have added or updated relevant unit/integration/functional/e2e tests - [ ] I have made corresponding changes to the documentation - [x] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_ ACKs for top commit: UdjinM6: utACK 7d049f1 Tree-SHA512: 41ab13dffa445e68b7886142a85c5e77e45d9570c3e0fc775cab88b790df68b026b3caedda704e13d628951be733f3f5b706db231011f4b4b58a39c88bf73d5e
2 parents 1cf6a67 + 7d049f1 commit 5410f36

35 files changed

+149
-109
lines changed

.cirrus.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ task:
8989
name: '32-bit + dash [gui] [CentOS 9]'
9090
<< : *GLOBAL_TASK_TEMPLATE
9191
container:
92-
image: centos:9
92+
image: quay.io/centos/centos:stream9
9393
env:
9494
PACKAGE_MANAGER_INSTALL: "yum install -y"
9595
FILE_ENV: "./ci/test/00_setup_env_i686_centos.sh"

ci/test/04_install.sh

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -50,21 +50,21 @@ else
5050
echo "Running on host system without docker wrapper"
5151
fi
5252

53-
DOCKER_EXEC () {
53+
CI_EXEC () {
5454
$DOCKER_CI_CMD_PREFIX bash -c "export PATH=$BASE_SCRATCH_DIR/bins/:\$PATH && cd \"$P_CI_DIR\" && $*"
5555
}
56-
export -f DOCKER_EXEC
56+
export -f CI_EXEC
5757

5858
if [ -n "$DPKG_ADD_ARCH" ]; then
59-
DOCKER_EXEC dpkg --add-architecture "$DPKG_ADD_ARCH"
59+
CI_EXEC dpkg --add-architecture "$DPKG_ADD_ARCH"
6060
fi
6161

62-
if [[ $DOCKER_NAME_TAG == centos* ]]; then
63-
DOCKER_EXEC yum -y install epel-release
64-
DOCKER_EXEC yum -y install "$DOCKER_PACKAGES" "$PACKAGES"
62+
if [[ $DOCKER_NAME_TAG == *centos* ]]; then
63+
CI_EXEC yum -y install epel-release
64+
CI_EXEC yum -y install "$DOCKER_PACKAGES" "$PACKAGES"
6565
elif [ "$CI_USE_APT_INSTALL" != "no" ]; then
66-
${CI_RETRY_EXE} DOCKER_EXEC apt-get update
67-
${CI_RETRY_EXE} DOCKER_EXEC apt-get install --no-install-recommends --no-upgrade -y "$PACKAGES" "$DOCKER_PACKAGES"
66+
${CI_RETRY_EXE} CI_EXEC apt-get update
67+
${CI_RETRY_EXE} CI_EXEC apt-get install --no-install-recommends --no-upgrade -y "$PACKAGES" "$DOCKER_PACKAGES"
6868
if [ -n "$PIP_PACKAGES" ]; then
6969
# shellcheck disable=SC2086
7070
${CI_RETRY_EXE} pip3 install --user $PIP_PACKAGES
@@ -75,46 +75,46 @@ if [ "$CI_OS_NAME" == "macos" ]; then
7575
top -l 1 -s 0 | awk ' /PhysMem/ {print}'
7676
echo "Number of CPUs: $(sysctl -n hw.logicalcpu)"
7777
else
78-
DOCKER_EXEC free -m -h
79-
DOCKER_EXEC echo "Number of CPUs \(nproc\):" \$\(nproc\)
80-
DOCKER_EXEC echo "$(lscpu | grep Endian)"
78+
CI_EXEC free -m -h
79+
CI_EXEC echo "Number of CPUs \(nproc\):" \$\(nproc\)
80+
CI_EXEC echo "$(lscpu | grep Endian)"
8181
fi
82-
DOCKER_EXEC echo "Free disk space:"
83-
DOCKER_EXEC df -h
82+
CI_EXEC echo "Free disk space:"
83+
CI_EXEC df -h
8484

8585
if [ "$RUN_FUZZ_TESTS" = "true" ]; then
8686
export DIR_FUZZ_IN=${DIR_QA_ASSETS}/fuzz_seed_corpus/
8787
if [ ! -d "$DIR_FUZZ_IN" ]; then
88-
DOCKER_EXEC git clone --depth=1 https://github.com/bitcoin-core/qa-assets "${DIR_QA_ASSETS}"
88+
CI_EXEC git clone --depth=1 https://github.com/bitcoin-core/qa-assets "${DIR_QA_ASSETS}"
8989
fi
9090
(
91-
DOCKER_EXEC cd "${DIR_QA_ASSETS}"
92-
DOCKER_EXEC echo "Using qa-assets repo from commit ..."
93-
DOCKER_EXEC git log -1
91+
CI_EXEC cd "${DIR_QA_ASSETS}"
92+
CI_EXEC echo "Using qa-assets repo from commit ..."
93+
CI_EXEC git log -1
9494
)
9595
elif [ "$RUN_UNIT_TESTS" = "true" ] || [ "$RUN_UNIT_TESTS_SEQUENTIAL" = "true" ]; then
9696
export DIR_UNIT_TEST_DATA=${DIR_QA_ASSETS}/unit_test_data/
9797
if [ ! -d "$DIR_UNIT_TEST_DATA" ]; then
98-
DOCKER_EXEC mkdir -p "$DIR_UNIT_TEST_DATA"
99-
DOCKER_EXEC curl --location --fail https://github.com/bitcoin-core/qa-assets/raw/main/unit_test_data/script_assets_test.json -o "${DIR_UNIT_TEST_DATA}/script_assets_test.json"
98+
CI_EXEC mkdir -p "$DIR_UNIT_TEST_DATA"
99+
CI_EXEC curl --location --fail https://github.com/bitcoin-core/qa-assets/raw/main/unit_test_data/script_assets_test.json -o "${DIR_UNIT_TEST_DATA}/script_assets_test.json"
100100
fi
101101
fi
102102

103-
DOCKER_EXEC mkdir -p "${BASE_SCRATCH_DIR}/sanitizer-output/"
103+
CI_EXEC mkdir -p "${BASE_SCRATCH_DIR}/sanitizer-output/"
104104

105105
if [ -z "$DANGER_RUN_CI_ON_HOST" ]; then
106106
echo "Create $BASE_ROOT_DIR"
107-
DOCKER_EXEC rsync -a /ro_base/ "$BASE_ROOT_DIR"
107+
CI_EXEC rsync -a /ro_base/ "$BASE_ROOT_DIR"
108108
fi
109109

110110
if [ "$USE_BUSY_BOX" = "true" ]; then
111111
echo "Setup to use BusyBox utils"
112-
DOCKER_EXEC mkdir -p "${BASE_SCRATCH_DIR}/bins/"
112+
CI_EXEC mkdir -p "${BASE_SCRATCH_DIR}/bins/"
113113
# tar excluded for now because it requires passing in the exact archive type in ./depends (fixed in later BusyBox version)
114114
# find excluded for now because it does not recognize the -delete option in ./depends (fixed in later BusyBox version)
115115
# ar excluded for now because it does not recognize the -q option in ./depends (unknown if fixed)
116116
# shellcheck disable=SC1010
117-
DOCKER_EXEC for util in \$\(busybox --list \| grep -v "^ar$" \| grep -v "^tar$" \| grep -v "^find$"\)\; do ln -s \$\(command -v busybox\) "${BASE_SCRATCH_DIR}/bins/\$util"\; done
117+
CI_EXEC for util in \$\(busybox --list \| grep -v "^ar$" \| grep -v "^tar$" \| grep -v "^find$"\)\; do ln -s \$\(command -v busybox\) "${BASE_SCRATCH_DIR}/bins/\$util"\; done
118118
# Print BusyBox version
119-
DOCKER_EXEC patch --help
119+
CI_EXEC patch --help
120120
fi

ci/test/05_before_script.sh

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,28 +10,25 @@ export LC_ALL=C.UTF-8
1010
if [ "$CI_OS_NAME" == "macos" ]; then
1111
echo > "${HOME}/Library/Application Support/DashCore"
1212
else
13-
DOCKER_EXEC echo \> \$HOME/.dashcore
13+
CI_EXEC echo \> \$HOME/.dashcore
1414
fi
1515

16-
DOCKER_EXEC mkdir -p "${DEPENDS_DIR}/SDKs" "${DEPENDS_DIR}/sdk-sources"
16+
CI_EXEC mkdir -p "${DEPENDS_DIR}/SDKs" "${DEPENDS_DIR}/sdk-sources"
1717

1818
if [ -n "$XCODE_VERSION" ] && [ ! -f "$OSX_SDK_PATH" ]; then
19-
DOCKER_EXEC curl --location --fail "${SDK_URL}/${OSX_SDK_BASENAME}" -o "$OSX_SDK_PATH"
19+
CI_EXEC curl --location --fail "${SDK_URL}/${OSX_SDK_BASENAME}" -o "$OSX_SDK_PATH"
2020
fi
2121
if [ -n "$XCODE_VERSION" ] && [ -f "$OSX_SDK_PATH" ]; then
22-
DOCKER_EXEC tar -C "${DEPENDS_DIR}/SDKs" -xf "$OSX_SDK_PATH"
23-
fi
24-
if [[ $HOST = *-mingw32 ]]; then
25-
DOCKER_EXEC update-alternatives --set "${HOST}-g++" \$\(which "${HOST}-g++-posix"\)
22+
CI_EXEC tar -C "${DEPENDS_DIR}/SDKs" -xf "$OSX_SDK_PATH"
2623
fi
2724
if [ -z "$NO_DEPENDS" ]; then
28-
if [[ $DOCKER_NAME_TAG == centos* ]]; then
29-
SHELL_OPTS="CONFIG_SHELL=/bin/bash"
25+
if [[ $DOCKER_NAME_TAG == *centos* ]]; then
26+
SHELL_OPTS="CONFIG_SHELL=/bin/dash"
3027
else
3128
SHELL_OPTS="CONFIG_SHELL="
3229
fi
33-
DOCKER_EXEC "$SHELL_OPTS" make "$MAKEJOBS" -C depends HOST="$HOST" "$DEP_OPTS" LOG=1
30+
CI_EXEC "$SHELL_OPTS" make "$MAKEJOBS" -C depends HOST="$HOST" "$DEP_OPTS" LOG=1
3431
fi
3532
if [ -n "$PREVIOUS_RELEASES_TO_DOWNLOAD" ]; then
36-
DOCKER_EXEC test/get_previous_releases.py -b -t "$PREVIOUS_RELEASES_DIR" "${PREVIOUS_RELEASES_TO_DOWNLOAD}"
33+
CI_EXEC test/get_previous_releases.py -b -t "$PREVIOUS_RELEASES_DIR" "${PREVIOUS_RELEASES_TO_DOWNLOAD}"
3734
fi

contrib/containers/ci/ci.Dockerfile

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,6 @@ RUN set -ex; \
3333
zip \
3434
&& rm -rf /var/lib/apt/lists/*
3535

36-
# Make sure std::thread and friends are available
37-
RUN update-alternatives --set x86_64-w64-mingw32-gcc /usr/bin/x86_64-w64-mingw32-gcc-posix; \
38-
update-alternatives --set x86_64-w64-mingw32-g++ /usr/bin/x86_64-w64-mingw32-g++-posix; \
39-
exit 0
40-
4136
# Install Clang + LLVM and set it as default
4237
RUN set -ex; \
4338
apt-get update && apt-get install ${APT_ARGS} \

doc/REST-interface.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ $ curl localhost:19998/rest/getutxos/checkmempool/b2cdfd7b89def827ff8af7cd9bff76
111111
"value" : 8.8687,
112112
"scriptPubKey" : {
113113
"asm" : "OP_DUP OP_HASH160 1c7cebb529b86a04c683dfa87be49de35bcf589e OP_EQUALVERIFY OP_CHECKSIG",
114+
"desc" : "addr(mi7as51dvLJsizWnTMurtRmrP8hG2m1XvD)#gj9tznmy"
114115
"hex" : "76a9141c7cebb529b86a04c683dfa87be49de35bcf589e88ac",
115116
"type" : "pubkeyhash",
116117
"address" : "mi7as51dvLJsizWnTMurtRmrP8hG2m1XvD"

doc/build-windows.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,17 @@ See [dependencies.md](dependencies.md) for a complete overview.
3939
## Building for 64-bit Windows
4040

4141
The first step is to install the mingw-w64 cross-compilation tool chain:
42+
- on modern systems (Ubuntu 21.04 Hirsute Hippo or newer, Debian 11 Bullseye or newer):
4243

43-
sudo apt-get install g++-mingw-w64-x86-64 mingw-w64-x86-64-dev
44+
```sh
45+
sudo apt install g++-mingw-w64-x86-64-posix
46+
```
47+
48+
- on older systems:
49+
50+
```sh
51+
sudo apt install g++-mingw-w64-x86-64
52+
```
4453

4554
Once the toolchain is installed the build steps are common:
4655

share/setup.nsi.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ Var StartMenuGroup
5353

5454
# Installer attributes
5555
InstallDir $PROGRAMFILES64\DashCore
56-
CRCCheck on
56+
CRCCheck force
5757
XPStyle on
5858
BrandingText " "
5959
ShowInstDetails show

src/chain.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ int64_t GetBlockProofEquivalentTime(const CBlockIndex& to, const CBlockIndex& fr
153153
if (r.bits() > 63) {
154154
return sign * std::numeric_limits<int64_t>::max();
155155
}
156-
return sign * r.GetLow64();
156+
return sign * int64_t(r.GetLow64());
157157
}
158158

159159
/** Find the last common ancestor two blocks have.

src/chain.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,7 @@ class CChain
452452
/** Return the maximal height in the chain. Is equal to chain.Tip() ? chain.Tip()->nHeight : -1. */
453453
int Height() const
454454
{
455-
return vChain.size() - 1;
455+
return int(vChain.size()) - 1;
456456
}
457457

458458
/** Set/initialize a chain with a given tip. */

src/core_write.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#include <consensus/validation.h>
99
#include <key_io.h>
1010
#include <primitives/transaction.h>
11+
#include <script/descriptor.h>
1112
#include <script/script.h>
1213
#include <script/standard.h>
1314
#include <serialize.h>
@@ -162,6 +163,7 @@ void ScriptPubKeyToUniv(const CScript& scriptPubKey, UniValue& out, bool include
162163
CTxDestination address;
163164

164165
out.pushKV("asm", ScriptToAsmStr(scriptPubKey));
166+
out.pushKV("desc", InferDescriptor(scriptPubKey, DUMMY_SIGNING_PROVIDER)->ToString());
165167
if (include_hex) out.pushKV("hex", HexStr(scriptPubKey));
166168

167169
std::vector<std::vector<unsigned char>> solns;

0 commit comments

Comments
 (0)