Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
69 changes: 68 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
workflow_dispatch:
inputs:
upload_tag:
description: "If set, upload artifacts to this existing release tag (e.g. 1.12.2.0)"
description: "If set, upload artifacts to this existing release tag (e.g. 1.12.3.0)"
required: false
default: ""

Expand Down Expand Up @@ -62,6 +62,38 @@ jobs:
strip src/wojakcoind src/wojakcoin-cli src/wojakcoin-tx || true
strip src/qt/wojakcoin-qt || true

- name: Smoke test daemon (regtest)
run: |
DATA="$PWD/smoke-data"
mkdir -p "$DATA"
CLI="./src/wojakcoin-cli -regtest -datadir=$DATA -rpcuser=ci -rpcpassword=ci -rpcport=28499"
./src/wojakcoind -regtest -datadir="$DATA" -listen=0 -server \
-rpcuser=ci -rpcpassword=ci -rpcport=28499 -printtoconsole > wojakcoind-smoke.log 2>&1 &
DPID=$!
ready=0
for i in $(seq 1 60); do
if $CLI getblockcount >/dev/null 2>&1; then ready=1; break; fi
if ! kill -0 "$DPID" 2>/dev/null; then break; fi
sleep 1
done
if [ "$ready" != 1 ]; then
echo "::error::wojakcoind did not become ready on $(uname -m)"
tail -n 200 wojakcoind-smoke.log || true
sudo dmesg | tail -n 40 || true
if kill -0 "$DPID" 2>/dev/null; then
sudo apt-get install -y gdb >/dev/null 2>&1 || true
sudo gdb -p "$DPID" -batch -ex 'thread apply all bt' || true
kill -9 "$DPID" || true
fi
exit 1
fi
ADDR="$($CLI getnewaddress)"
$CLI generatetoaddress 5 "$ADDR"
test "$($CLI getblockcount)" = "5"
$CLI stop
wait "$DPID" || true
echo "smoke test OK on $(uname -m)"

- name: Stage artifacts
run: |
mkdir -p dist
Expand Down Expand Up @@ -148,6 +180,41 @@ jobs:
make -j${JOBS}
strip src/wojakcoind src/wojakcoin-cli src/wojakcoin-tx

# Runs on the native arm64 runner — same environment class as arm64
# Docker hosts (Apple Silicon, Graviton). Catches aarch64-only startup
# failures that a QEMU-emulated build/check cannot see.
- name: Smoke test daemon (regtest)
run: |
DATA="$PWD/smoke-data"
mkdir -p "$DATA"
CLI="./src/wojakcoin-cli -regtest -datadir=$DATA -rpcuser=ci -rpcpassword=ci -rpcport=28499"
./src/wojakcoind -regtest -datadir="$DATA" -listen=0 -server \
-rpcuser=ci -rpcpassword=ci -rpcport=28499 -printtoconsole > wojakcoind-smoke.log 2>&1 &
DPID=$!
ready=0
for i in $(seq 1 60); do
if $CLI getblockcount >/dev/null 2>&1; then ready=1; break; fi
if ! kill -0 "$DPID" 2>/dev/null; then break; fi
sleep 1
done
if [ "$ready" != 1 ]; then
echo "::error::wojakcoind did not become ready on $(uname -m)"
tail -n 200 wojakcoind-smoke.log || true
sudo dmesg | tail -n 40 || true
if kill -0 "$DPID" 2>/dev/null; then
sudo apt-get install -y gdb >/dev/null 2>&1 || true
sudo gdb -p "$DPID" -batch -ex 'thread apply all bt' || true
kill -9 "$DPID" || true
fi
exit 1
fi
ADDR="$($CLI getnewaddress)"
$CLI generatetoaddress 5 "$ADDR"
test "$($CLI getblockcount)" = "5"
$CLI stop
wait "$DPID" || true
echo "smoke test OK on $(uname -m)"

- name: Stage artifacts (aarch64 names)
run: |
mkdir -p dist
Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ dnl require autoconf 2.60 (AS_ECHO/AS_ECHO_N)
AC_PREREQ([2.60])
define(_CLIENT_VERSION_MAJOR, 1)
define(_CLIENT_VERSION_MINOR, 12)
define(_CLIENT_VERSION_REVISION, 2)
define(_CLIENT_VERSION_REVISION, 3)
define(_CLIENT_VERSION_BUILD, 0)
define(_CLIENT_VERSION_IS_RELEASE, true)
define(_COPYRIGHT_YEAR, 2016)
Expand Down
26 changes: 14 additions & 12 deletions depends/packages/boost.mk
Original file line number Diff line number Diff line change
@@ -1,41 +1,43 @@
package=boost
$(package)_version=1_59_0
$(package)_download_path=https://archives.boost.io/release/1.59.0/source
$(package)_version=1_70_0
$(package)_download_path=https://archives.boost.io/release/1.70.0/source
$(package)_file_name=$(package)_$($(package)_version).tar.bz2
$(package)_sha256_hash=727a932322d94287b62abb1bd2d41723eec4356a7728909e38adb65ca25241ca
$(package)_sha256_hash=430ae8354789de4fd19ee52f3b1f739e1fba576f0aded0897c3c2bc00fb38778
$(package)_patches=fix_pthread_stack_min_glibc234.patch

define $(package)_set_vars
$(package)_config_opts_release=variant=release
$(package)_config_opts_debug=variant=debug
$(package)_config_opts=--layout=tagged --build-type=complete --user-config=user-config.jam
$(package)_config_opts+=threading=multi link=static -sNO_BZIP2=1 -sNO_ZLIB=1
$(package)_config_opts_linux=threadapi=pthread runtime-link=shared
$(package)_config_opts_darwin=--toolset=darwin-4.2.1 runtime-link=shared
$(package)_config_opts_mingw32=binary-format=pe target-os=windows threadapi=win32 runtime-link=static
$(package)_config_opts_linux=target-os=linux threadapi=pthread runtime-link=shared
$(package)_config_opts_darwin=target-os=darwin runtime-link=shared
$(package)_config_opts_mingw32=target-os=windows binary-format=pe threadapi=win32 runtime-link=static
$(package)_config_opts_x86_64_mingw32=address-model=64
$(package)_config_opts_i686_mingw32=address-model=32
$(package)_config_opts_i686_linux=address-model=32 architecture=x86
$(package)_toolset_$(host_os)=gcc
$(package)_toolset_darwin=clang
$(package)_archiver_$(host_os)=$($(package)_ar)
$(package)_toolset_darwin=darwin
$(package)_archiver_darwin=$($(package)_libtool)
$(package)_config_libraries=chrono,filesystem,program_options,system,thread,test
$(package)_cxxflags=-fvisibility=hidden
$(package)_cxxflags=-std=c++11 -fvisibility=hidden
$(package)_cxxflags_linux=-fPIC
endef

define $(package)_preprocess_cmds
echo "using $(boost_toolset_$(host_os)) : : $($(package)_cxx) : <cxxflags>\"$($(package)_cxxflags) $($(package)_cppflags)\" <linkflags>\"$($(package)_ldflags)\" <archiver>\"$(boost_archiver_$(host_os))\" <striper>\"$(host_STRIP)\" <ranlib>\"$(host_RANLIB)\" <rc>\"$(host_WINDRES)\" : ;" > user-config.jam
patch -p1 < $($(package)_patch_dir)/fix_pthread_stack_min_glibc234.patch && \
echo "using $($(package)_toolset_$(host_os)) : : $($(package)_cxx) : <cxxflags>\"$($(package)_cxxflags) $($(package)_cppflags)\" <linkflags>\"$($(package)_ldflags)\" <archiver>\"$($(package)_archiver_$(host_os))\" <striper>\"$(host_STRIP)\" <ranlib>\"$(host_RANLIB)\" <rc>\"$(host_WINDRES)\" : ;" > user-config.jam
endef

define $(package)_config_cmds
./bootstrap.sh --without-icu --with-libraries=$(boost_config_libraries)
./bootstrap.sh --without-icu --with-libraries=$($(package)_config_libraries) --with-toolset=$($(package)_toolset_$(host_os))
endef

define $(package)_build_cmds
./b2 -d2 -j2 -d1 --prefix=$($(package)_staging_prefix_dir) $($(package)_config_opts) stage
./b2 -d2 -j2 -d1 --prefix=$($(package)_staging_prefix_dir) $($(package)_config_opts) toolset=$($(package)_toolset_$(host_os)) stage
endef

define $(package)_stage_cmds
./b2 -d0 -j4 --prefix=$($(package)_staging_prefix_dir) $($(package)_config_opts) install
./b2 -d0 -j4 --prefix=$($(package)_staging_prefix_dir) $($(package)_config_opts) toolset=$($(package)_toolset_$(host_os)) install
endef
15 changes: 5 additions & 10 deletions depends/packages/libevent.mk
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
package=libevent
$(package)_version=2.0.22
$(package)_download_path=https://github.com/libevent/libevent/releases/download/release-2.0.22-stable
$(package)_file_name=$(package)-$($(package)_version)-stable.tar.gz
$(package)_sha256_hash=71c2c49f0adadacfdbe6332a372c38cf9c8b7895bb73dabeaa53cdcc1d4e1fa3
$(package)_patches=reuseaddr.patch

define $(package)_preprocess_cmds
patch -p1 < $($(package)_patch_dir)/reuseaddr.patch
endef
$(package)_version=2.1.12-stable
$(package)_download_path=https://github.com/libevent/libevent/releases/download/release-$($(package)_version)
$(package)_file_name=$(package)-$($(package)_version).tar.gz
$(package)_sha256_hash=92e6de1be9ec176428fd2367677e61ceffc2ee1cb119035037a27d346b0403bb

define $(package)_set_vars
$(package)_config_opts=--disable-shared --disable-openssl --disable-libevent-regress
$(package)_config_opts=--disable-shared --disable-openssl --disable-libevent-regress --disable-samples
$(package)_config_opts_release=--disable-debug-mode
$(package)_config_opts_linux=--with-pic
endef
Expand Down
16 changes: 16 additions & 0 deletions depends/patches/boost/fix_pthread_stack_min_glibc234.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Fix boost.thread build with glibc >= 2.34, where PTHREAD_STACK_MIN is
defined as sysconf(_SC_THREAD_STACK_MIN) and can no longer be used in
preprocessor arithmetic. Backport of upstream boostorg/thread commit
74ff2db959c5fa75bec770c41ed2951a740fe936 (shipped in boost 1.78).

--- a/boost/thread/pthread/thread_data.hpp
+++ b/boost/thread/pthread/thread_data.hpp
@@ -57,7 +57,7 @@
#else
std::size_t page_size = ::sysconf( _SC_PAGESIZE);
#endif
-#if PTHREAD_STACK_MIN > 0
+#ifdef PTHREAD_STACK_MIN
if (size<PTHREAD_STACK_MIN) size=PTHREAD_STACK_MIN;
#endif
size = ((size+page_size-1)/page_size)*page_size;
21 changes: 0 additions & 21 deletions depends/patches/libevent/reuseaddr.patch

This file was deleted.

72 changes: 72 additions & 0 deletions doc/release-notes/release-notes-1.12.3.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
WojakCore version 1.12.3.0
==========================

Notable changes
===============

Fix daemon crash on startup on aarch64 (arm64)
----------------------------------------------

The Linux aarch64 binaries crashed with `SIGSEGV` immediately after logging
`scheduler thread start`, so arm64 Docker hosts (Apple Silicon, Graviton) never
reached a usable node and containers restarted in a loop.

The cause was the depends build of Boost 1.59 (2015), whose `boost::bind` /
`boost::function` headers are miscompiled by modern GCC on aarch64: the
scheduler thread dispatched its first `boost::function` call with a corrupt
`this` pointer. Depends now builds Boost 1.70, and libevent is updated from
2.0.22 to 2.1.12-stable alongside it.

Operators running arm64 no longer need the `platform: linux/amd64` emulation
workaround in `docker-compose.yml`.

`bytespersigop` no longer rejects sigop-dense transactions
----------------------------------------------------------

Transactions below the `MAX_STANDARD_TX_SIGOPS` limit (16,000) are no longer
rejected for sigop *density*. Following Bitcoin Core 0.13, `-bytespersigop`
is now a fee-based policy: a transaction's virtual size for relay and mining
is `max(actual size, sigops * bytespersigop)`, so dense scripts pay more fee
instead of being dropped.

Bitcoin Computer transactions now relay with default settings. Node operators
and mining pools no longer need `bytespersigop=0` in `wojakcoin.conf`.

This is a policy (standardness) change only. Block validity, including
`MAX_BLOCK_SIGOPS`, is unchanged, so upgraded and non-upgraded nodes stay in
consensus.

New RPC: `generatetoaddress`
---------------------------

`generatetoaddress numblocks address` mines blocks directly to a given address
on regtest, without requiring wallet keypool state. Backported from Bitcoin
Core 0.13; `generate` is unchanged.

1.12.3.0 change log
===================

Policy
------

- Apply `-bytespersigop` as a fee-based policy instead of rejecting
sigop-dense transactions

RPC
---

- Add `generatetoaddress` (regtest)

Build system
------------

- depends: update Boost 1.59 -> 1.70, fixing the aarch64 startup crash
- depends: update libevent 2.0.22 -> 2.1.12-stable
- ci: smoke-boot the built daemon on regtest in both Linux release jobs, so
aarch64 startup failures fail the release instead of shipping

Credits
=======

Thanks to the Bitcoin Computer team for the integration testing and the
detailed report in bitcoin-computer/monorepo#456.
2 changes: 1 addition & 1 deletion docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ The official multi-platform Docker image is maintained in a separate repo:
Hub: **https://hub.docker.com/r/reallyshadydev/wojakcoin-core**

```bash
docker pull reallyshadydev/wojakcoin-core:1.12.2.0
docker pull reallyshadydev/wojakcoin-core:1.12.3.0
# or
docker pull reallyshadydev/wojakcoin-core:latest
```
Expand Down
2 changes: 1 addition & 1 deletion src/clientversion.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
//! These need to be macros, as clientversion.cpp's and bitcoin*-res.rc's voodoo requires it
#define CLIENT_VERSION_MAJOR 1
#define CLIENT_VERSION_MINOR 12
#define CLIENT_VERSION_REVISION 2
#define CLIENT_VERSION_REVISION 3
#define CLIENT_VERSION_BUILD 0

//! Set to true for release, false for prerelease or test build
Expand Down
2 changes: 1 addition & 1 deletion src/init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@ std::string HelpMessage(HelpMessageMode mode)
strUsage += HelpMessageGroup(_("Node relay options:"));
if (showDebug)
strUsage += HelpMessageOpt("-acceptnonstdtxn", strprintf("Relay and mine \"non-standard\" transactions (%sdefault: %u)", "testnet/regtest only; ", !Params(CBaseChainParams::TESTNET).RequireStandard()));
strUsage += HelpMessageOpt("-bytespersigop", strprintf(_("Minimum bytes per sigop in transactions we relay and mine (default: %u)"), DEFAULT_BYTES_PER_SIGOP));
strUsage += HelpMessageOpt("-bytespersigop", strprintf(_("Equivalent bytes per sigop in transactions for relay and mining (default: %u)"), DEFAULT_BYTES_PER_SIGOP));
strUsage += HelpMessageOpt("-datacarrier", strprintf(_("Relay and mine data carrier transactions (default: %u)"), DEFAULT_ACCEPT_DATACARRIER));
strUsage += HelpMessageOpt("-datacarriersize", strprintf(_("Maximum size of data in data carrier transactions we relay and mine (default: %u)"), MAX_OP_RETURN_RELAY));
strUsage += HelpMessageOpt("-mempoolreplacement", strprintf(_("Enable transaction replacement in the memory pool (default: %u)"), DEFAULT_ENABLE_REPLACEMENT));
Expand Down
7 changes: 5 additions & 2 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1173,8 +1173,11 @@ bool AcceptToMemoryPoolWorker(CTxMemPool& pool, CValidationState &state, const C
// sigops, making it impossible to mine. Since the coinbase transaction
// itself can contain sigops MAX_STANDARD_TX_SIGOPS is less than
// MAX_BLOCK_SIGOPS; we still consider this an invalid rather than
// merely non-standard transaction.
if ((nSigOps > MAX_STANDARD_TX_SIGOPS) || (nBytesPerSigOp && nSigOps > nSize / nBytesPerSigOp))
// merely non-standard transaction. Sigop density below that limit is
// no longer grounds for rejection: -bytespersigop is applied as a
// fee-based policy via CTxMemPoolEntry::GetTxSize(), matching the
// bytespersigop implementation introduced in Bitcoin Core 0.13.
if (nSigOps > MAX_STANDARD_TX_SIGOPS)
return state.DoS(0, false, REJECT_NONSTANDARD, "bad-txns-too-many-sigops", false,
strprintf("%d", nSigOps));

Expand Down
1 change: 1 addition & 0 deletions src/rpcclient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ static const CRPCConvertParam vRPCConvertParams[] =
{ "setgenerate", 0 },
{ "setgenerate", 1 },
{ "generate", 0 },
{ "generatetoaddress", 0 },
{ "getnetworkhashps", 0 },
{ "getnetworkhashps", 1 },
{ "sendtoaddress", 1 },
Expand Down
Loading
Loading