11d797e3a078b8f5f0039a1073047d3f0a8c6cdc depends: Build `native_capnp` package with CMake (Hennadii Stepanov)
90389c95e9edf3d705fb9376388c83f07d1a570e depends: Build `capnp` package with CMake (Hennadii Stepanov)
Pull request description:
The first commit fixes two bugs when cross-compiling the `capnp` package on the master branch @ 160d23677ad799cf9b493eaa923b2ac080c3fb8e:
- for `x86_64-w64-mingw32` (see https://github.com/bitcoin/bitcoin/pull/28735#issuecomment-1790406668):
```
libtool: link: x86_64-w64-mingw32-g++-posix -shared -nostdlib /usr/lib/gcc/x86_64-w64-mingw32/12-posix/../../../../x86_64-w64-mingw32/lib/dllcrt2.o /usr/lib/gcc/x86_64-w64-mingw32/12-posix/crtbegin.o src/kj/.libs/cidr.o src/kj/.libs/common.o src/kj/.libs/units.o src/kj/.libs/memory.o src/kj/.libs/refcount.o src/kj/.libs/array.o src/kj/.libs/list.o src/kj/.libs/string.o src/kj/.libs/string-tree.o src/kj/.libs/source-location.o src/kj/.libs/hash.o src/kj/.libs/table.o src/kj/.libs/encoding.o src/kj/.libs/exception.o src/kj/.libs/debug.o src/kj/.libs/arena.o src/kj/.libs/io.o src/kj/.libs/mutex.o src/kj/.libs/thread.o src/kj/.libs/time.o src/kj/.libs/filesystem.o src/kj/.libs/filesystem-disk-unix.o src/kj/.libs/filesystem-disk-win32.o src/kj/.libs/test-helpers.o src/kj/.libs/main.o src/kj/parse/.libs/char.o -L/home/hebasto/git/bitcoin/depends/x86_64-w64-mingw32/lib -L/usr/lib/gcc/x86_64-w64-mingw32/12-posix -L/usr/lib/gcc/x86_64-w64-mingw32/12-posix/../../../../x86_64-w64-mingw32/lib -lstdc++ -lmingw32 -lgcc_s -lgcc -lmoldname -lmingwex -lmsvcrt -lkernel32 -lpthread -ladvapi32 -lshell32 -luser32 -lkernel32 -lmingw32 -lgcc_s -lgcc -lmoldname -lmingwex -lmsvcrt -lkernel32 /usr/lib/gcc/x86_64-w64-mingw32/12-posix/crtend.o -mthreads -O2 -mthreads -mthreads -o .libs/libkj-1-0-1.dll -Wl,--enable-auto-image-base -Xlinker --out-implib -Xlinker .libs/libkj.dll.a
/usr/bin/x86_64-w64-mingw32-ld: src/kj/.libs/cidr.o:cidr.c++:(.text+0x1dc): undefined reference to `__imp_inet_ntop'
/usr/bin/x86_64-w64-mingw32-ld: src/kj/.libs/cidr.o:cidr.c++:(.text+0x44b): undefined reference to `__imp_inet_pton'
collect2: error: ld returned 1 exit status
```
- for `arm64-apple-darwin`:
```
checking build system type... x86_64-pc-linux-gnu
checking host system type... Invalid configuration `arm64-apple-darwin': machine `arm64-apple' not recognized
configure: error: /bin/bash build-aux/config.sub arm64-apple-darwin failed
```
The second commit applies the same changes for the `native_capnp` package for [consistency](https://github.com/bitcoin/bitcoin/pull/28856#issuecomment-1807936546).
ACKs for top commit:
ryanofsky:
Code review ACK 11d797e3a078b8f5f0039a1073047d3f0a8c6cdc. Since last review arm64-apple-darwin platform is now mentioned in the commit message, and the change to `depends/packages/libmultiprocess.mk` in d1604d4b1d1ee8df279a1776303e167cc3d06193 which was unrelated (but probably still a good optimization) was reverted.
Tree-SHA512: c636e53073ce6fcda9724723bc59f3990fa9629a3b2f73d93dbc102a5a1badfbe8f4c5fef841f03588ebcad5cd4883f3ce32b128afcd75f6bc21eb801796a586
a3a2bd9e8ad360a63cc8bdfc365d8bfd25ecc720 ci: Drop no longer needed package-specific flags (Hennadii Stepanov)
071eef1e974f128131afe6c6b5c68a430c64687a build: Propagate user-defined flags to host packages (Hennadii Stepanov)
Pull request description:
On master (4f8b1f8759301d2553183e14f72444a0f1d80725) `{CPP,C,CXX,LD}FLAGS` that are specified in the command line are not propagated to packages:
```
$ make --no-print-directory -C depends print-libevent_cxxflags CXXFLAGS=-some-fancy-flag
libevent_cxxflags=-pipe -O2
```
This PR:
- propagates `{CPP,C,CXX,LD}FLAGS` to host packages:
```
$ make --no-print-directory -C depends print-libevent_cxxflags CXXFLAGS=-some-fancy-flag
libevent_cxxflags= -some-fancy-flag
```
- does not propagate `{CPP,C,CXX,LD}FLAGS` to native packages:
```
$ make --no-print-directory -C depends print-native_b2_cxxflags CXXFLAGS=-some-fancy-flag
native_b2_cxxflags=
```
- actually addresses the https://github.com/bitcoin/bitcoin/pull/23551#issuecomment-973896518
ACKs for top commit:
TheCharlatan:
Code review ACK a3a2bd9e8ad360a63cc8bdfc365d8bfd25ecc720
Tree-SHA512: 243d6b1b0e9c5de46debc36de62a77b6b4d6f638940fd530040c219956ec624e321b0c25290fed164e3a8c88befa7b97b20f765d7b9a428c269b3720f21da099
6e2eb0d63b42288c11a65d585d487108643888d0 rpc/wallet: use OMITTED_NAMED_ARG instead of Default(VNULL) (Karl-Johan Alm)
4983f4cba44c4ffaa4972fdede7cf6fcf8caec00 rpc/createwallet: omitted named arguments (Karl-Johan Alm)
dc4db23b30b4bc7884bb28630b2b24edd81c1799 rpc: address:amount dictionaries are OBJ_USER_KEYS (Karl-Johan Alm)
c8cf0a3d513b8c892f1ae16b8c0cda184064a07b rpc/getpeerinfo: bytesrecv_per_msg is a dynamic dictionary (Karl-Johan Alm)
eb4fb7e507b583bd4ae8d1e3747f41616c782ded rpc/gettxoutsetinfo: hash_or_height is a named argument (Karl-Johan Alm)
Pull request description:
This is a follow-up to #21897, and I believe covers the remaining cases, at least that I could find.
Edited to remove unrelated information about a side project.
ACKs for top commit:
laanwj:
Documentation diff ACK 6e2eb0d63b42288c11a65d585d487108643888d0
promag:
Code review ACK 6e2eb0d63b42288c11a65d585d487108643888d0.
Tree-SHA512: d26f6e074e13d64bbca2a114a0adc7f905d47d238c4e9bc49f70ca0b775afbebf9879fc3794ab29dc316a6dbd00ba8cbeb01197e236ee4ab2e9854db25f23f04
bee56c78e94417f89b1f48682404e2821b57bdec rpc: Check default value type againts argument type (João Barbosa)
f81ef4303e057e85aa24772c865287c17ffa4350 rpc: Keep default argument value in correct type (João Barbosa)
Pull request description:
Store default values of RPC arguments in the corresponding type instead of a string. The value is then serialized when the help output is needed. This change simplifies #20017.
The following examples illustrates how to use the new `RPCArg::Default` and `RPCArg::DefaultHint`:
```diff
- {"verbose", RPCArg::Type::BOOL, /* default */ "false", "True for a json object, false for array of transaction ids"}
+ {"verbose", RPCArg::Type::BOOL, RPCArg::Default(false), "True for a json object, false for array of transaction ids"}
```
```diff
- {"nblocks", RPCArg::Type::NUM, /* default */ "one month", "Size of the window in number of blocks"}
+ {"nblocks", RPCArg::Type::NUM, RPCArg::DefaultHint("one month"), "Size of the window in number of blocks"}
```
No behavior change is expected.
ACKs for top commit:
LarryRuane:
ACK bee56c78e94417f89b1f48682404e2821b57bdec
MarcoFalke:
ACK bee56c78e94417f89b1f48682404e2821b57bdec 🦅
Tree-SHA512: c47d78c918e996d36631d4ad3c933b270a34c5b446b8d736be94cf4a0a7b8c0e33d954149ec786cf9550639865b79deb6a130ad044de6030f95aac33f524293a
1eb5389ee5d612b8dc935b1f59ac949feeae0858 Update test/sanitizer_suppressions/lsan (Hennadii Stepanov)
Pull request description:
With Qt 5.15.2 in depends it seems we can drop some Leak Sanitizer suppressions now.
ACKs for top commit:
fanquake:
ACK 1eb5389ee5d612b8dc935b1f59ac949feeae0858 given the CI is passing. Did not test anything locally.
Tree-SHA512: 657aa390ffa68951a95bfaac6502da57daf2533ffb0ed49b483f056f6242952316515f250ad36890c9f02ca79eccd60f43c16922d5a50acb1508936e780496cc
b8cd2a429271b7af12e98186449ddc00fc7580e6 Add references for the generator/constant used in Bech32(m) (Pieter Wuille)
Pull request description:
I often find myself recreating this, or looking up references for this construction. So instead, this seems like as good a place as any to place a summary.
ACKs for top commit:
Zero-1729:
crACK b8cd2a429271b7af12e98186449ddc00fc7580e6
Tree-SHA512: 9d2001c5016485cea441c28fda093d67a7d4274e4c1e4dd3d357353ce6a52987e38d684d8462bad2d72ba0b6b1db2f809948e228fb02371e64b12146aace89bd
This marks the completion of our transition from code based on
`talebook/statsd-client-cpp` to code based on `vthiery/cpp-statsd-client`.
Also, we long stopped using `snprintf`, remove it from exclusions list.
`statsns`, aside from being an unclear name, in its default behaviour,
doesn't use the namespace delimiter contaminates the root namespace
of the key.
Let's take care of that by deprecating `statsns` with its replacement,
`statsprefix`, that behaves properly.
`statshostname` implies that alongside specifying the host, the user
needs to specify a separate "hostname" field in order to connect when
in fact, it is an entirely optional suffix field applied to stats keys.
Rename it to `statssuffix` and deprecate `statshostname`, the latter
will be removed in a subsequent major release.
This is to avoid the odd circumstance where stats don't work because you
specified everything but didn't explicitly enable it. Using
`-statsenabled` has been deprecated and will be removed in the next
major release.
- `timing` cannot contain a negative value, change to `uint64_t`
- remove `sendDouble`, use template specialization of `Send` instead,
that can be reused as `send`
- rename `value` in `count()` to `delta`
- add more comments
`gaugeDouble` has been kept around because utilizing templates for it
would require us to either write template specializations for every kind
of `gauge` value (implicit conversions will not save us from this) or
move all logic to the header, neither option seems desirable.
`RawSender` is inspired by `UDPSender` from `vthiery/cpp-statsd-client`
and separating it out of `StatsdClient` is needed to implement queueing
and batching support in upcoming commits.
This is the start of migrating our Statsd codebase to `cpp-statsd-client`.
c3f2474898 chore: update pasta gpg key to reflect new subkeys (pasta)
Pull request description:
## Issue being fixed or feature implemented
I've added 2 subkeys to my GPG key `29590362EC878A81FD3C202B52527BEDABE87984` to better follow best practices, which avoids using your primary key whenever possible. All future git commit signing, and potentially releases will be signed by a subkey instead of the primary key.
These updated subkeys keys are now included on all the major keyservers
hkps://keyserver.ubuntu.com
hkps://pgp.mit.edu
hkps://keyserver.ubuntu.com
keybase has 1 of the 2 subkeys already, will add the other soon.
## What was done?
## How Has This Been Tested?
## Breaking Changes
Users who validate my signatures may have to refresh the key from keyservers via `gpg --refresh-keys` or pull down from keybase via `curl https://keybase.io/pasta/pgp_keys.asc | gpg --import`
## Checklist:
- [ ] 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 c3f2474898
Tree-SHA512: 87d33caceb1973a54877c5d5a8b85a48e1373b7709698efc793598bf7453608979bfe1c75e4ea0c9ec852c0343b43b06357c58f6c4fbf72915eb910788cc705f
7703884ab19cd7ffddc5c52ba57dec82fbc8dc2b Fix MSVC warning C4273 "inconsistent dll linkage" (Hennadii Stepanov)
Pull request description:
Broken out of https://github.com/bitcoin/bitcoin/pull/30454.
When using CMake, the user can select the MSVC runtime library to be:
1) Statically-linked (with the corresponding `x64-windows-static` vcpkg triplet) or
2) Dynamically-linked (with the corresponding `x64-windows` vcpkg triplet)
In the latter case, the compiler emits the [C4273](https://learn.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-1-c4273) warning.
As the "Necessary on some platforms" comment does not apply to MSVC, skip the declaration for MSVC.
The MSVC build system in the master branch supports the statically-linked runtime only: ed739d14b5/build_msvc/common.init.vcxproj.in (L65)
ACKs for top commit:
sipa:
utACK 7703884ab19cd7ffddc5c52ba57dec82fbc8dc2b
sipsorcery:
utACK 7703884ab19cd7ffddc5c52ba57dec82fbc8dc2b.
theuni:
utACK 7703884ab19cd7ffddc5c52ba57dec82fbc8dc2b
Tree-SHA512: a42e1a0d48973217462e703c418f3e9ef9cb5236267c1bf32912aacaf68976cdd2b9229168523f7c2a99ee3f2fb1bf8add4f342796bdb1e4063ca026b761db51
7231c7630e61c062440459963f7b00ccbec68f0f qt: Replace deprecated LogPrintf with LogInfo in GUIUtil::LogQtInfo() (Hennadii Stepanov)
b3d3ae0680e7529853413de045aa9fbd7ac51e5c qt, build: Drop `QT_STATICPLUGIN` macro (Hennadii Stepanov)
Pull request description:
Broken out of https://github.com/bitcoin/bitcoin/pull/30454.
Our `QT_STATICPLUGIN` macro is effectively equivalent to the Qt's `QT_STATIC` macro.
It is easy to see in the `_BITCOIN_QT_IS_STATIC` macro implementation: ebd82fa9fa/build-aux/m4/bitcoin_qt.m4 (L269-L292)
No need to handle both macros.
ACKs for top commit:
maflcko:
re-ACK 7231c7630e61c062440459963f7b00ccbec68f0f
TheCharlatan:
ACK 7231c7630e61c062440459963f7b00ccbec68f0f
Tree-SHA512: abbf21859b7ac2aaf47c5b0e075403e4cc9bc540b1565d23f51650b8932dde314586aca67fd4ed5daadebc89268baf8c18f65348fa2b836078ac24543c14cfd6
1b622944c4 Merge bitcoin/bitcoin#30743: depends: build libevent with `-D_GNU_SOURCE` (merge-script)
0f135dd233 Merge bitcoin/bitcoin#30522: ci: Add missing qttools5-dev install to Asan task (merge-script)
d46e16c023 Merge bitcoin/bitcoin#30490: depends: bump libmultiprocess for CMake fixes (merge-script)
7a63c20c47 Merge bitcoin/bitcoin#29276: depends: Update libmultiprocess library to fix C++20 macos build error (fanquake)
630e767be7 Merge bitcoin/bitcoin#28907: depends: bump libmultiprocess to fix capnproto deprecation warnings (fanquake)
318471d599 Merge bitcoin/bitcoin#28735: depends: Bump to capnproto-c++-1.0.1 (fanquake)
ad0c279ac8 Merge bitcoin/bitcoin#26672: build: Update libmultiprocess library (fanquake)
Pull request description:
## Issue being fixed or feature implemented
depends on https://github.com/dashpay/dash/pull/6294
## What was done?
Batch of backports
## How Has This Been Tested?
## Breaking Changes
## Checklist:
_Go over all the following points, and put an `x` in all the boxes that apply._
- [ ] 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 1b622944c4
Tree-SHA512: a0a01b1b4844725aa6c96304a4cddae61ec29b677a760f35648e7f39fb36f6f462d3a6d5e411e99f4db1fa59c01f6fffd87158cbef5e1ba1edb43e68fc362c77
c91ba8ac14 fix: no crashes allowed (UdjinM6)
a4cd1d6423 fix: explicitly test no tx in mempool after invalidateblock (UdjinM6)
04b5db9417 test: extend and refactor DIP0020 activation test (UdjinM6)
Pull request description:
## Issue being fixed or feature implemented
~23590 backport in #6256 results in node crashes (for dashd compiled with `--enable-debug`) when we try to spend coins locked via disabled opcodes in `feature_dip0020_activation.py`. Also,~ there is only rpc part and no tests for relaying such txes via p2p.
## What was done?
## How Has This Been Tested?
run test on develop and on top of #6256 + #6299 with and without `--enable-debug`
## Breaking Changes
## Checklist:
- [ ] 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
- [ ] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_
ACKs for top commit:
PastaPastaPasta:
utACK c91ba8ac14
knst:
utACK c91ba8ac14
Tree-SHA512: 2ba16d6a6bb58cb98c01234ed60a8eecd4ff214d3d8386a4b8ed10f4776e0862d7794747791d82345d6031678a308df39c2dbdd361a902ee1e56cf7f05a73c1a
`random_bytes()` is introduced in bitcoin#25625 but the function def
alone doesn't warrant a full backport, so we'll only implement the
section relevant to this PR.
The fix introduced in bitcoin#27981 (8c986d6b, dash#6067) is not
validated to work until bitcoin#28287, an upcoming backport.
As the latter has identified the former backport didn't pass validation,
let's fix it so that the latter tests succeed when they're backported
in an upcoming commit.
556775408797d8e27154c3edaf139820b0979cce depends: build libevent with -D_GNU_SOURCE (fanquake)
Pull request description:
Currently, builds of libevent in depends, using CMake, fail on some systems, like Alpine, with the following:
```bash
/bitcoin/depends/work/build/aarch64-unknown-linux-musl/libevent/2.1.12-stable-1516ed47ea8/evmap.c: In function 'evmap_signal_add_':
/bitcoin/depends/work/build/aarch64-unknown-linux-musl/libevent/2.1.12-stable-1516ed47ea8/evmap.c:456:31: error: 'NSIG' undeclared (first use in this function)
456 | if (sig < 0 || sig >= NSIG)
```
From what I can tell the `GNU_SOURCE` "detection" in libevents CMake build system, never? really worked, primarily relies on looking for a deprecated define, and it's not clear what a nice fix is. For now, always build with `_GNU_SOURCE`, to match the autotools behaviour.
ACKs for top commit:
TheCharlatan:
ACK 556775408797d8e27154c3edaf139820b0979cce
Tree-SHA512: 4552b4a92867e8fa2af0ffa39b2be6c994bf739de7ce6a7c581590be486da81f7d93fca816854548c1e912347d33a35218c441b5058c3cbd3e82c74a9b7c78d9
Due to stricter checks, we can no longer start masternodes in parallel,
as entities used to process `to_connection` checks are reused before the
previous check is completed, resulting in an exception. Since we're
now validating the establishment of a two-way connection, we have to do
it one at a time.
9a9d0d5b79 feat: drop SPORK 24 (EHF) so far as this feature works on testnet / mainnet (Konstantin Akimov)
da0dc06eea perf: optimize feature_mnehf.py by generating less blocks (Konstantin Akimov)
0de3923b06 feat: bury fork mn_rr (masternode reward reallocation) (Konstantin Akimov)
Pull request description:
## Issue being fixed or feature implemented
MN_RR is activated on mainnet: time to bury it!
## What was done?
Hard-fork mn_rr is buried. Prior fixes are done here: https://github.com/dashpay/dash/pull/6270 and https://github.com/dashpay/dash/pull/6269
## How Has This Been Tested?
Run unit and functional tests
## Breaking Changes
N/A
## Checklist:
- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas
- [x] I have added or updated relevant unit/integration/functional/e2e tests
- [x] I have made corresponding changes to the documentation
- [x] I have assigned this pull request to a milestone
ACKs for top commit:
UdjinM6:
light ACK 9a9d0d5b79
PastaPastaPasta:
utACK 9a9d0d5b79
Tree-SHA512: 73ea0ca1270f15f6f1193efbaf402d476c84e9a843af85b7eae3e40199f4c943ad40f58e062b8db20e1c5c69c1a85579ebaf0722f1044ee2e1a4e7f96c58e645