Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
105 commits
Select commit Hold shift + click to select a range
0811cbf
doc: add info about status code 404 for some rest endpoints
brunoerg Jan 15, 2022
0f40d65
refactor: remove duplicate code from BlockAssembler
jamesob Feb 17, 2022
a413595
build: Fix `capnp` package build for Android
hebasto Jun 9, 2022
8b8edc2
build: Specify native binaries explicitly when building `capnp` package
hebasto Jun 9, 2022
9cbfe40
net: remove useless call to IsReachable() from CConnman::Bind()
vasild Jul 29, 2022
11c190e
sync: simplify MaybeCheckNotHeld() definitions by using a template
vasild Jul 13, 2022
9d7ae4b
sync: remove unused template parameter from ::UniqueLock
vasild Jul 21, 2022
faed342
scripted-diff: Rename time symbols
Sep 16, 2022
fabf1cd
Use steady clock for bench logging
Sep 19, 2022
699f342
doc: add historical 0.20.2 release notes
fanquake Sep 19, 2022
cb075d2
doc: add historical 0.21.2 release notes
fanquake Sep 19, 2022
20adaea
build: split ARM crc & crypto extension checks
fanquake Sep 25, 2022
bff4e06
refactor: Do not discard `try_lock()` return value
hebasto Aug 10, 2022
51a08f4
signet/miner: reduce default interblock interval limit to 30min
ajtowns Sep 29, 2022
1a463c7
Squashed 'src/leveldb/' changes from 22f1e4a02f..e2f10b4e47
fanquake Sep 29, 2022
13601da
Update leveldb-subtree subtree to latest upstream
fanquake Sep 29, 2022
281e7c7
ci: Bump vcpkg to the latest version `2022.09.27`
hebasto Sep 30, 2022
be59bd1
contrib: Fix capture_output in getcoins.py
willcl-ark Sep 30, 2022
fa5752d
fuzz: Limit outpoints.size in txorphan target to avoid OOM
Sep 30, 2022
079cf88
refactor: move Boost datetime usage to wallet
fanquake Sep 28, 2022
76b79c1
wallet: Use correct effective value when checking target
aureleoules Sep 29, 2022
d0d9cf7
test: Check external coin effective value is used in CoinSelection
aureleoules Sep 29, 2022
3a230f4
Merge bitcoin/bitcoin#26211: ci: Bump vcpkg to the latest version `20…
Oct 2, 2022
abf2090
Merge bitcoin/bitcoin#26212: contrib: Fix capture_output in getcoins.py
Oct 2, 2022
13ec2c1
Merge bitcoin/bitcoin#24084: doc: add information about status code 4…
fanquake Oct 2, 2022
93001b1
Merge bitcoin/bitcoin#26216: fuzz: Limit outpoints.size in txorphan t…
fanquake Oct 2, 2022
5c9a27a
test: Use proper Boost macros instead of assertions
hebasto Oct 2, 2022
91bee4d
ci: Run `bench_bitcoin.exe --sanity-check` in "Win64 native" task
hebasto Oct 2, 2022
a9d20ee
doc: bump bips.md up-to-date version to v24.0
theStack Oct 2, 2022
25742aa
Merge bitcoin/bitcoin#26231: doc: bump bips.md up-to-date version to …
fanquake Oct 3, 2022
6c5ef5d
Merge bitcoin/bitcoin#26208: signet/miner: reduce default interblock …
fanquake Oct 3, 2022
132d98a
Merge bitcoin/bitcoin#26229: test: Use proper Boost macros instead of…
Oct 3, 2022
c21b32c
Merge bitcoin/bitcoin#26198: refactor: move Boost Datetime usage to w…
fanquake Oct 3, 2022
30cc1c6
refactor: Drop `owns_lock()` call
hebasto Oct 3, 2022
3baa0f5
Merge bitcoin/bitcoin#26230: ci: Run `bench_bitcoin.exe --sanity-chec…
Oct 3, 2022
b92b12e
Merge bitcoin/bitcoin#25735: net: remove useless call to IsReachable(…
fanquake Oct 3, 2022
2bfc1e6
refactor: move DEFAULT_TXINDEX from validation to txindex
fanquake Oct 3, 2022
c87d569
refactor: move DEFAULT_COINSTATSINDEX from validation to coinstatsindex
fanquake Oct 3, 2022
7d14577
refactor: move DEFAULT_BLOCKFILTERINDEX from val to blockfilterindex
fanquake Oct 3, 2022
1730f6c
Merge bitcoin/bitcoin#26189: refactor: Do not discard `try_lock()` re…
fanquake Oct 3, 2022
4bee62e
kernel: remove util/bytevectorhash.cpp
fanquake Oct 3, 2022
ac1d992
ci: Move `git config` commands into script where they are used
hebasto Oct 3, 2022
37cf472
ci: Use same `merge_script` implementation for Windows as for all
hebasto Oct 3, 2022
cda6c79
Merge bitcoin/bitcoin#26203: wallet: Use correct effective value when…
glozow Oct 4, 2022
44a2975
Merge bitcoin/bitcoin#26209: Update leveldb subtree
fanquake Oct 4, 2022
f65a2c6
Merge bitcoin/bitcoin#26237: kernel: remove util/bytevectorhash.cpp
Oct 4, 2022
fac085a
ci: Remove unused package
Oct 4, 2022
fa6054e
ci: Allow PIP_PACKAGES on centos
Oct 3, 2022
914c000
Merge bitcoin/bitcoin#26235: refactor: move *index constants out of v…
Oct 4, 2022
fa9436e
test: Remove unused fCheckpointsEnabled from miner_tests
Jul 26, 2022
f3e40c4
build, msvc: Enable C4834 warning
hebasto Oct 4, 2022
92e9fc6
Merge bitcoin/bitcoin#26128: doc: add missing historical release notes
fanquake Oct 4, 2022
4fa50dd
Merge bitcoin/bitcoin#26236: ci: Use same `merge_script` implementati…
fanquake Oct 4, 2022
192325a
kernel: move RunCommandParseJSON to its own file
theuni Sep 28, 2022
b8d361a
ci: Workaround Windows filesystem executable bit loss
hebasto Oct 4, 2022
2d8d9ae
Merge bitcoin/bitcoin#26249: ci: Workaround Windows filesystem execut…
Oct 4, 2022
d919e8d
Merge bitcoin/bitcoin#26244: build, msvc: Enable C4834 warning
fanquake Oct 4, 2022
eb15569
fuzz: add util/mempool/h.cpp
fanquake Sep 30, 2022
8a6b6df
fuzz: pass max fee into ConsumeTxMemPoolEntry
fanquake Oct 4, 2022
b6565b6
Merge bitcoin/bitcoin#26243: test: Remove unused fCheckpointsEnabled …
fanquake Oct 4, 2022
a23f8c8
Merge bitcoin/bitcoin#26234: ci: Allow PIP_PACKAGES on centos
fanquake Oct 4, 2022
5c5b85d
refactor: Make 64-bit shift explicit
hebasto Aug 10, 2022
43b8777
refactor: move run_command from util to common
theuni Oct 4, 2022
d3cdd37
Merge bitcoin/bitcoin#26250: fuzz: add mempool_utils.cpp
Oct 5, 2022
fa04376
Remove clang-format from lint task
Oct 2, 2022
b2e6d37
Merge bitcoin/bitcoin#26256: ci: Remove clang-format from lint task
Oct 5, 2022
fa29218
test: Pass mempool reference to AssemblerForTest
May 6, 2022
fa4055d
test: Use dedicated mempool in TestPrioritisedMining
May 6, 2022
fafab38
test: Use dedicated mempool in TestPackageSelection
May 6, 2022
faa1552
test: Use dedicated mempool in TestBasicMining
May 6, 2022
b85af25
refactor: mempool: add MemPoolLimits::NoLimits()
stickies-v Sep 15, 2022
3a86f24
refactor: mempool: use CTxMempool::Limits
stickies-v Sep 15, 2022
6945853
test: use NoLimits() in MempoolIndexingTest
stickies-v Oct 5, 2022
33b12e5
docs: improve docs where MemPoolLimits is used
stickies-v Oct 5, 2022
fabbbe3
Remove unused CDataStream::rdbuf method
Jun 7, 2022
5e82b9b
Merge bitcoin/bitcoin#26252: refactor: Make 64-bit shift explicit
Oct 5, 2022
8891949
index: Improve BaseIndex::BlockUntilSyncedToCurrentChain reliability
ryanofsky Sep 30, 2022
292f652
Merge bitcoin/bitcoin#24364: refactor: remove duplicate code from Blo…
glozow Oct 6, 2022
97007e2
test: Prevent UB in `minisketch_tests.cpp`
hebasto Oct 6, 2022
73b6171
Merge bitcoin/bitcoin#26272: test: Prevent UB in `minisketch_tests.cpp`
Oct 6, 2022
fa8a305
test: Remove confusing DUMMY_P2WPKH_SCRIPT
Oct 7, 2022
01bf4af
docs: fix m_children to be a member of CTxMemPoolEntry
stickies-v Oct 7, 2022
1c36baf
wallet: have prune error take precedence over assumedvalid
jamesob Oct 7, 2022
ec8016e
Merge bitcoin/bitcoin#26281: docs: fix m_children to be a member of C…
glozow Oct 9, 2022
adb1714
Fix comment typos in scriptpubkeyman.cpp, wallet.cpp, wallet.h
dimitris-t Oct 8, 2022
d33c589
Merge bitcoin/bitcoin#26103: refactor: mempool: use CTxMemPool::Limits
glozow Oct 9, 2022
cf3db7c
Merge bitcoin/bitcoin#26258: refactor: Remove unused CDataStream::rdb…
fanquake Oct 10, 2022
4175c33
Merge bitcoin/bitcoin#26215: index: Improve BaseIndex::BlockUntilSync…
fanquake Oct 10, 2022
4b2e167
sync: avoid confusing name overlap (Mutex)
vasild Jul 21, 2022
8d9ee8e
sync: remove DebugLock alias template
vasild Jul 22, 2022
75c3f9f
sync: rename AnnotatedMixin::UniqueLock to AnnotatedMixin::unique_lock
vasild Oct 10, 2022
857f07d
Merge bitcoin/bitcoin#26277: test: Remove confusing DUMMY_P2WPKH_SCRIPT
fanquake Oct 10, 2022
515c9c4
Merge bitcoin/bitcoin#26183: build: split ARM crc & crypto extension …
fanquake Oct 10, 2022
9f44f2e
Merge bitcoin/bitcoin#26284: Fix comment typos
Oct 10, 2022
9eaa5db
Merge bitcoin/bitcoin#25073: test: Cleanup miner_tests
fanquake Oct 10, 2022
869342f
Merge bitcoin/bitcoin#26282: wallet: have prune error take precedence…
fanquake Oct 10, 2022
866dd66
Merge bitcoin/bitcoin#26196: kernel: move RunCommandParseJSON to its …
fanquake Oct 10, 2022
2397574
Merge bitcoin/bitcoin#26118: log: Use steady clock for bench logging
Oct 10, 2022
57c1927
Merge bitcoin/bitcoin#25322: build: Fix `capnp` package build for And…
fanquake Oct 10, 2022
13afcc0
iwyu: Add zmq source files
hebasto Sep 15, 2022
9ca39d6
Merge bitcoin/bitcoin#26254: iwyu: Add zmq source files
Oct 10, 2022
2e77dff
Merge bitcoin/bitcoin#25676: sync: simplify and remove unused code fr…
fanquake Oct 11, 2022
f89aa69
Merge remote-tracking branch 'btc/master' into btc-master
mxaddict Oct 11, 2022
60164b8
Update .cirrus.yml
Jan 25, 2023
33f41ac
Merge branch 'master' into btc-master
Jan 25, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 5 additions & 15 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,8 @@ persistent_worker_template: &PERSISTENT_WORKER_TEMPLATE

base_template: &BASE_TEMPLATE
merge_base_script:
# Unconditionally install git (used in fingerprint_script) and set the
# default git author name (used in verify-commits.py)
# Unconditionally install git (used in fingerprint_script).
- bash -c "$PACKAGE_MANAGER_INSTALL git"
- git config --global user.email "ci@ci.ci"
- git config --global user.name "ci"
- if [ "$CIRRUS_PR" = "" ]; then exit 0; fi
- git fetch $CIRRUS_REPO_CLONE_URL "pull/${CIRRUS_PR}/merge"
- git checkout FETCH_HEAD # Use merged changes to detect silent merge conflicts
Expand Down Expand Up @@ -97,22 +94,15 @@ task:
env:
PATH: 'C:\jom;C:\Python39;C:\Python39\Scripts;C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Current\Bin;%PATH%'
PYTHONUTF8: 1
CI_VCPKG_TAG: '2022.06.16.1'
CI_VCPKG_TAG: '2022.09.27'
VCPKG_DOWNLOADS: 'C:\Users\ContainerAdministrator\AppData\Local\vcpkg\downloads'
VCPKG_DEFAULT_BINARY_CACHE: 'C:\Users\ContainerAdministrator\AppData\Local\vcpkg\archives'
CCACHE_DIR: 'C:\Users\ContainerAdministrator\AppData\Local\ccache'
WRAPPED_CL: 'C:\Users\ContainerAdministrator\AppData\Local\Temp\cirrus-ci-build\ci\test\wrapped-cl.bat'
x64_NATIVE_TOOLS: '"C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\Build\vcvars64.bat"'
IgnoreWarnIntDirInTempDetected: 'true'
merge_script:
- git config --global user.email "ci@ci.ci"
- git config --global user.name "ci"
# Windows filesystem loses the executable bit, and all of the executable
# files are considered "modified" now. It will break the following `git merge`
# command. The next two commands make git ignore this issue.
- git config core.filemode false
- git reset --hard
- PowerShell -NoLogo -Command if ($env:CIRRUS_PR -ne $null) { git fetch $env:CIRRUS_REPO_CLONE_URL $env:CIRRUS_BASE_BRANCH; git merge FETCH_HEAD; }
- PowerShell -NoLogo -Command if ($env:CIRRUS_PR -ne $null) { git fetch $env:CIRRUS_REPO_CLONE_URL pull/$env:CIRRUS_PR/merge; git reset --hard FETCH_HEAD; }
vcpkg_tools_cache:
folder: '%VCPKG_DOWNLOADS%\tools'
reupload_on_changes: false
Expand Down Expand Up @@ -152,9 +142,9 @@ task:
- python build_msvc\msvc-autogen.py
- msbuild build_msvc\bitcoin.sln -property:CLToolExe=%WRAPPED_CL% -property:Configuration=Release -maxCpuCount -verbosity:minimal -noLogo
- ccache --show-stats
unit_tests_script:
check_script:
- src\test_navcoin.exe -l test_suite
- src\bench_navcoin.exe > NUL
- src\bench_navcoin.exe --sanity-check > NUL
- python test\util\test_runner.py
- python test\util\rpcauth-test.py
functional_tests_script:
Expand Down
2 changes: 1 addition & 1 deletion build_msvc/common.init.vcxproj.in
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<AdditionalOptions>/utf-8 /Zc:__cplusplus /std:c++20 %(AdditionalOptions)</AdditionalOptions>
<DisableSpecificWarnings>4018;4244;4267;4334;4715;4805;4834</DisableSpecificWarnings>
<DisableSpecificWarnings>4018;4244;4267;4715;4805</DisableSpecificWarnings>
<TreatWarningAsError>true</TreatWarningAsError>
<PreprocessorDefinitions>_SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNING;ZMQ_STATIC;NOMINMAX;WIN32;HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;_CONSOLE;_WIN32_WINNT=0x0601;_WIN32_IE=0x0501;WIN32_LEAN_AND_MEAN;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\..\src;..\..\src\minisketch\include;..\..\src\univalue\include;..\..\src\secp256k1\include;..\..\src\leveldb\include;..\..\src\leveldb\helpers\memenv;..\..\src\bls\include;..\..\src\bls\mcl\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
Expand Down
4 changes: 1 addition & 3 deletions ci/lint/04_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,14 @@
export LC_ALL=C

${CI_RETRY_EXE} apt-get update
${CI_RETRY_EXE} apt-get install -y clang-format-9 python3-pip curl git gawk jq
${CI_RETRY_EXE} apt-get install -y python3-pip curl git gawk jq
(
# Temporary workaround for https://github.com/bitcoin/bitcoin/pull/26130#issuecomment-1260499544
# Can be removed once the underlying image is bumped to something that includes git2.34 or later
sed -i -e 's/bionic/jammy/g' /etc/apt/sources.list
${CI_RETRY_EXE} apt-get update
${CI_RETRY_EXE} apt-get install -y --reinstall git
)
update-alternatives --install /usr/bin/clang-format clang-format "$(which clang-format-9 )" 100
update-alternatives --install /usr/bin/clang-format-diff clang-format-diff "$(which clang-format-diff-9)" 100

${CI_RETRY_EXE} pip3 install codespell==2.2.1
${CI_RETRY_EXE} pip3 install flake8==4.0.1
Expand Down
2 changes: 2 additions & 0 deletions ci/lint/06_script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ if [ "$CIRRUS_REPO_FULL_NAME" = "navcoin/navcoin" ] && [ "$CIRRUS_PR" = "" ] ; t
git log HEAD~10 -1 --format='%H' > ./contrib/verify-commits/trusted-sha512-root-commit
git log HEAD~10 -1 --format='%H' > ./contrib/verify-commits/trusted-git-root
mapfile -t KEYS < contrib/verify-commits/trusted-keys
git config user.email "ci@ci.ci"
git config user.name "ci"
${CI_RETRY_EXE} gpg --keyserver hkps://keys.openpgp.org --recv-keys "${KEYS[@]}" &&
./contrib/verify-commits/verify-commits.py;
fi
Expand Down
3 changes: 2 additions & 1 deletion ci/test/00_setup_env_i686_centos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ export LC_ALL=C.UTF-8
export HOST=i686-pc-linux-gnu
export CONTAINER_NAME=ci_i686_centos
export DOCKER_NAME_TAG=quay.io/centos/centos:stream8
export DOCKER_PACKAGES="gcc-c++ glibc-devel.x86_64 libstdc++-devel.x86_64 glibc-devel.i686 libstdc++-devel.i686 ccache libtool make git python3 python3-zmq which patch lbzip2 xz procps-ng dash rsync coreutils bison"
export DOCKER_PACKAGES="gcc-c++ glibc-devel.x86_64 libstdc++-devel.x86_64 glibc-devel.i686 libstdc++-devel.i686 ccache libtool make git python3 python3-pip which patch lbzip2 xz procps-ng dash rsync coreutils bison"
export PIP_PACKAGES="pyzmq"
export GOAL="install"
export BITCOIN_CONFIG="--enable-zmq --enable-reduce-exports"
export CONFIG_SHELL="/bin/dash"
Expand Down
2 changes: 1 addition & 1 deletion ci/test/00_setup_env_i686_multiprocess.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export LC_ALL=C.UTF-8
export HOST=i686-pc-linux-gnu
export CONTAINER_NAME=ci_i686_multiprocess
export DOCKER_NAME_TAG=ubuntu:20.04
export PACKAGES="cmake python3 python3-pip llvm clang g++-multilib"
export PACKAGES="cmake python3 llvm clang g++-multilib"
export DEP_OPTS="DEBUG=1 MULTIPROCESS=1"
export GOAL="install"
export BITCOIN_CONFIG="--enable-debug CC='clang -m32' CXX='clang++ -m32' LDFLAGS='--rtlib=compiler-rt -lgcc_s'"
Expand Down
17 changes: 9 additions & 8 deletions ci/test/04_install.sh
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,6 @@ if [[ $QEMU_USER_CMD == qemu-s390* ]]; then
export LC_ALL=C
fi

if [ "$CI_OS_NAME" == "macos" ]; then
sudo -H pip3 install --upgrade pip
# shellcheck disable=SC2086
IN_GETOPT_BIN="$(brew --prefix gnu-getopt)/bin/getopt" ${CI_RETRY_EXE} pip3 install --user $PIP_PACKAGES
fi

# Create folders that are mounted into the docker
mkdir -p "${CCACHE_DIR}"
mkdir -p "${PREVIOUS_RELEASES_DIR}"
Expand Down Expand Up @@ -78,9 +72,16 @@ elif [ "$CI_USE_APT_INSTALL" != "no" ]; then
fi
${CI_RETRY_EXE} CI_EXEC apt-get update
${CI_RETRY_EXE} CI_EXEC apt-get install --no-install-recommends --no-upgrade -y "$PACKAGES" "$DOCKER_PACKAGES"
if [ -n "$PIP_PACKAGES" ]; then
fi

if [ -n "$PIP_PACKAGES" ]; then
if [ "$CI_OS_NAME" == "macos" ]; then
sudo -H pip3 install --upgrade pip
# shellcheck disable=SC2086
IN_GETOPT_BIN="/usr/local/opt/gnu-getopt/bin/getopt" ${CI_RETRY_EXE} pip3 install --user $PIP_PACKAGES
else
# shellcheck disable=SC2086
${CI_RETRY_EXE} pip3 install --user $PIP_PACKAGES
${CI_RETRY_EXE} CI_EXEC pip3 install --user $PIP_PACKAGES
fi
fi

Expand Down
1 change: 1 addition & 0 deletions ci/test/06_script_b.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ if [ "${RUN_TIDY}" = "true" ]; then
" src/util/string.cpp"\
" src/util/syserror.cpp"\
" src/util/url.cpp"\
" src/zmq"\
" -p . ${MAKEJOBS} -- -Xiwyu --cxx17ns -Xiwyu --mapping_file=${BASE_BUILD_DIR}/navcoin-$HOST/contrib/devtools/iwyu/bitcoin.core.imp"
fi

Expand Down
4 changes: 2 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -575,8 +575,8 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
CXXFLAGS="$TEMP_CXXFLAGS"

# ARM
AX_CHECK_COMPILE_FLAG([-march=armv8-a+crc+crypto], [ARM_CRC_CXXFLAGS="-march=armv8-a+crc+crypto"], [], [$CXXFLAG_WERROR])
AX_CHECK_COMPILE_FLAG([-march=armv8-a+crc+crypto], [ARM_SHANI_CXXFLAGS="-march=armv8-a+crc+crypto"], [], [$CXXFLAG_WERROR])
AX_CHECK_COMPILE_FLAG([-march=armv8-a+crc], [ARM_CRC_CXXFLAGS="-march=armv8-a+crc"], [], [$CXXFLAG_WERROR])
AX_CHECK_COMPILE_FLAG([-march=armv8-a+crypto], [ARM_SHANI_CXXFLAGS="-march=armv8-a+crypto"], [], [$CXXFLAG_WERROR])

TEMP_CXXFLAGS="$CXXFLAGS"
CXXFLAGS="$ARM_CRC_CXXFLAGS $CXXFLAGS"
Expand Down
2 changes: 1 addition & 1 deletion contrib/signet/getcoins.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ def bitcoin_cli(rpc_command_and_params):

# Convert SVG image to PPM, and load it
try:
rv = subprocess.run([args.imagemagick, 'svg:-', '-depth', '8', 'ppm:-'], input=res.content, check=True, capture_output=True)
rv = subprocess.run([args.imagemagick, 'svg:-', '-depth', '8', 'ppm:-'], input=res.content, check=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
except FileNotFoundError:
raise SystemExit(f"The binary {args.imagemagick} could not be found. Please make sure ImageMagick (or a compatible fork) is installed and that the correct path is specified.")

Expand Down
17 changes: 11 additions & 6 deletions contrib/signet/miner
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ def seconds_to_hms(s):
out = "-" + out
return out

def next_block_delta(last_nbits, last_hash, ultimate_target, do_poisson):
def next_block_delta(last_nbits, last_hash, ultimate_target, do_poisson, max_interval):
# strategy:
# 1) work out how far off our desired target we are
# 2) cap it to a factor of 4 since that's the best we can do in a single retarget period
Expand All @@ -248,7 +248,7 @@ def next_block_delta(last_nbits, last_hash, ultimate_target, do_poisson):
this_interval_variance = 1

this_interval = avg_interval * this_interval_variance
this_interval = max(1, min(this_interval, 3600))
this_interval = max(1, min(this_interval, max_interval))

return this_interval

Expand Down Expand Up @@ -308,6 +308,10 @@ def do_generate(args):
return 1
my_blocks = (start-1, stop, total)

if args.max_interval < 960:
logging.error("--max-interval must be at least 960 (16 minutes)")
return 1

ultimate_target = nbits_to_target(int(args.nbits,16))

mined_blocks = 0
Expand All @@ -324,7 +328,7 @@ def do_generate(args):
if lastheader is None:
lastheader = bestheader["hash"]
elif bestheader["hash"] != lastheader:
next_delta = next_block_delta(int(bestheader["bits"], 16), bestheader["hash"], ultimate_target, args.poisson)
next_delta = next_block_delta(int(bestheader["bits"], 16), bestheader["hash"], ultimate_target, args.poisson, args.max_interval)
next_delta += bestheader["time"] - time.time()
next_is_mine = next_block_is_mine(bestheader["hash"], my_blocks)
logging.info("Received new block at height %d; next in %s (%s)", bestheader["height"], seconds_to_hms(next_delta), ("mine" if next_is_mine else "backup"))
Expand All @@ -338,14 +342,14 @@ def do_generate(args):
action_time = now
is_mine = True
elif bestheader["height"] == 0:
time_delta = next_block_delta(int(bestheader["bits"], 16), bci["bestblockhash"], ultimate_target, args.poisson)
time_delta = next_block_delta(int(bestheader["bits"], 16), bci["bestblockhash"], ultimate_target, args.poisson, args.max_interval)
time_delta *= 100 # 100 blocks
logging.info("Backdating time for first block to %d minutes ago" % (time_delta/60))
mine_time = now - time_delta
action_time = now
is_mine = True
else:
time_delta = next_block_delta(int(bestheader["bits"], 16), bci["bestblockhash"], ultimate_target, args.poisson)
time_delta = next_block_delta(int(bestheader["bits"], 16), bci["bestblockhash"], ultimate_target, args.poisson, args.max_interval)
mine_time = bestheader["time"] + time_delta

is_mine = next_block_is_mine(bci["bestblockhash"], my_blocks)
Expand Down Expand Up @@ -419,7 +423,7 @@ def do_generate(args):
# report
bstr = "block" if is_mine else "backup block"

next_delta = next_block_delta(block.nBits, block.hash, ultimate_target, args.poisson)
next_delta = next_block_delta(block.nBits, block.hash, ultimate_target, args.poisson, args.max_interval)
next_delta += block.nTime - time.time()
next_is_mine = next_block_is_mine(block.hash, my_blocks)

Expand Down Expand Up @@ -497,6 +501,7 @@ def main():
generate.add_argument("--multiminer", default=None, type=str, help="Specify which set of blocks to mine (eg: 1-40/100 for the first 40%%, 2/3 for the second 3rd)")
generate.add_argument("--backup-delay", default=300, type=int, help="Seconds to delay before mining blocks reserved for other miners (default=300)")
generate.add_argument("--standby-delay", default=0, type=int, help="Seconds to delay before mining blocks (default=0)")
generate.add_argument("--max-interval", default=1800, type=int, help="Maximum interblock interval (seconds)")

calibrate = cmds.add_parser("calibrate", help="Calibrate difficulty")
calibrate.set_defaults(fn=do_calibrate)
Expand Down
9 changes: 8 additions & 1 deletion depends/packages/capnp.mk
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,15 @@ $(package)_file_name=$(native_$(package)_file_name)
$(package)_sha256_hash=$(native_$(package)_sha256_hash)
$(package)_dependencies=native_$(package)

define $(package)_set_vars :=
$(package)_config_opts := --with-external-capnp
$(package)_config_opts += CAPNP="$$(native_capnp_prefixbin)/capnp"
$(package)_config_opts += CAPNP_CXX="$$(native_capnp_prefixbin)/capnp-c++"
$(package)_config_opts_android := --disable-shared
endef

define $(package)_config_cmds
$($(package)_autoconf) --with-external-capnp
$($(package)_autoconf)
endef

define $(package)_build_cmds
Expand Down
2 changes: 2 additions & 0 deletions doc/REST-interface.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ Supported API
`GET /rest/tx/<TX-HASH>.<bin|hex|json>`

Given a transaction hash: returns a transaction in binary, hex-encoded binary, or JSON formats.
Responds with 404 if the transaction doesn't exist.

By default, this endpoint will only search the mempool.
To query for a confirmed transaction, enable the transaction index via "txindex=1" command line / configuration option.
Expand Down Expand Up @@ -76,6 +77,7 @@ Responds with 404 if the block doesn't exist.
`GET /rest/blockhashbyheight/<HEIGHT>.<bin|hex|json>`

Given a height: returns hash of block in best-block-chain at height provided.
Responds with 404 if block not found.

#### Chaininfos
`GET /rest/chaininfo.json`
Expand Down
2 changes: 1 addition & 1 deletion doc/bips.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
BIPs that are implemented by Bitcoin Core (up-to-date up to **v23.0**):
BIPs that are implemented by Bitcoin Core (up-to-date up to **v24.0**):

* [`BIP 9`](https://github.com/bitcoin/bips/blob/master/bip-0009.mediawiki): The changes allowing multiple soft-forks to be deployed in parallel have been implemented since **v0.12.1** ([PR #7575](https://github.com/bitcoin/bitcoin/pull/7575))
* [`BIP 11`](https://github.com/bitcoin/bips/blob/master/bip-0011.mediawiki): Multisig outputs are standard since **v0.6.0** ([PR #669](https://github.com/bitcoin/bitcoin/pull/669)).
Expand Down
Loading