Commit Graph

22317 Commits

Author SHA1 Message Date
Kittywhiskers Van Gogh
5261a4733a
refactor: create context for LLMQ subsystem within NodeContext, alias entangled globals (#5030)
* llmq: move initialization logic to 'LLMQContext', add unique pointer to NodeContext

* llmq: add aliases to LLMQ globals, expose them to RPC via LLMQContext

* rpc: replace most global invocations with LLMQContext aliases

* rpc: replace quorum RPC global invocations with LLMQContext aliases

* llmq: replace individual global member arguments with context pointer

* llmq: pass aliased context pointer instead of individual globals in tests

* llmq: move BLS worker to LLMQContext, remove global

* llmq: move DKG debug manager to LLMQContext, remove global

* llmq: move DKG session manager to LLMQContext, remove global

* llmq: move quorum share manager to LLMQContext, remove global

* llmq: move quorum signing manager to LLMQContext, remove global
2022-11-07 21:09:44 +03:00
PastaPastaPasta
d72a31f87c
Merge pull request #5073 from kittywhiskers/20323
backport: merge bitcoin#20323 (Create or use existing properly initialized NodeContexts)
2022-11-07 11:37:10 -06:00
Kittywhiskers Van Gogh
0c0716fa03 merge bitcoin#20323: Create or use existing properly initialized NodeContexts 2022-11-07 22:46:23 +05:30
thephez
76d70bd962
ci: convert semantic pr title check to use action (#5071)
* ci: add semantic pr check action (#6)

* ci: add types and scopes for pr title checks

* ci: change action name

* ci: add comment and link for our commit types/scopes

* ci: remove config for deprecated service

* Update .github/workflows/semantic-pull-request.yml

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2022-11-07 08:44:31 -06:00
UdjinM6
083c86040f
fix: params cleanup in pow_tests/get_next_work (#5067) 2022-11-02 10:30:09 -05:00
Kittywhiskers Van Gogh
e74c41bf80
ci: bump docker and docker-dind to 20.10.20 for gitlab (#5045) 2022-11-02 10:28:18 -05:00
PastaPastaPasta
1443b6fd31
Merge pull request #5064 from knst/ubuntu-22.10
fix: build on ubuntu 22.10 due to new gcc 12
2022-11-02 10:25:01 -05:00
MarcoFalke
12995edf33 Merge #20745: qa: Correct epoll_ctl data race suppression
d71e29e3e828bcb7b702fad728546351b8db5c01 qa: Correct epoll_ctl data race suppression (Hennadii Stepanov)

Pull request description:

  Fixup of #20218. Comments must start from the beginning of the line.

ACKs for top commit:
  MarcoFalke:
    review ACK d71e29e3e828bcb7b702fad728546351b8db5c01

Tree-SHA512: 4d8663ab505c347bcb62c2f118656e3343d5179825be0d1b86761ffdfdae1e7462002bf226a54dfc94be5885ce7f2633abaf70421ea35bf06eddad8e99fb9683
2022-11-02 10:24:45 -05:00
Wladimir J. van der Laan
5b4a1e7ec7 Merge #17008: build: bump libevent to 2.1.11 in depends
02ac445b2fec60e028d2cc93bbf74a35e3d0f48e bump libevent to 2.1.11 in depends (stefanwouldgo)

Pull request description:

  this doesn't need patches on Android anymore like 2.1.8 did.

ACKs for top commit:
  laanwj:
    ACK 02ac445b2fec60e028d2cc93bbf74a35e3d0f48e

Tree-SHA512: 1fbfe342ee15fa4c5cb417979bd6c443f7c7aa40a489accf8ccd7c919e5b08e859b3da6edeee3de484f6f156b35dd4e97c7e2c7971b59fc31029865585ccb296
2022-11-02 10:24:45 -05:00
laanwj
4fde6a8f71 Merge bitcoin/bitcoin#25436: build: GCC-12 build improvements
880d4aaf81f3d5d7fbb915905c2e61b816a6a747 build: use BOOST_NO_CXX98_FUNCTION_BASE to suppress warnings (fanquake)
1bdbbbdc46c4e50bf07bc362e7e391ea1a53ea2f build: suppress array-bounds errors in libxkbcommon (fanquake)

Pull request description:

  2 changes to better support building with GCC 12, which out of the box, is currently broken if you want to build using depends.
  Prevent `-Warray-bounds` errors when building libxkbcommon. i.e:
  ```bash
  src/xkbcomp/ast-build.c:82:27: error: array subscript 'ExprDef[0]' is partly outside array bounds of 'unsigned char[32]' [-Werror=array-bounds]
     82 |     expr->expr.value_type = type;
        |     ~~~~~~~~~~~~~~~~~~~~~~^~~~~~
  src/xkbcomp/ast-build.c:75:21: note: object of size 32 allocated by 'malloc'
     75 |     ExprDef *expr = malloc(size);
        |                     ^~~~~~~~~~~~
  ```

  It might be the case that these would be fixed by updating the
  package, but that would also require installing new build tools (meson),
  as well as potentially more dependencies (wayland), and it'd need
  testing with Qt. For now, just turn the errors into wanrings.

  Define `BOOST_NO_CXX98_FUNCTION_BASE` to prevent GCC warning about the use of `std::unary_function`. i.e:
  ```bash
  /bitcoin/depends/aarch64-unknown-linux-gnu/include/boost/container_hash/hash.hpp:131:33:
  warning: 'template<class _Arg, class _Result> struct std::unary_function' is deprecated [-Wdeprecated-declarations]
    131 |         struct hash_base : std::unary_function<T, std::size_t> {};
        |                                 ^~~~~~~~~~~~~~
  In file included from /usr/include/c++/12/bits/unique_ptr.h:37,
                   from /usr/include/c++/12/memory:76,
                   from ./init.h:10,
                   from init.cpp:10:
  /usr/include/c++/12/bits/stl_function.h:117:12: note: declared here
    117 |     struct unary_function
  ```

  Boost `container_hash` (included via functional -> multi_index) uses
  [`std::unary_function`, which was deprecated in C++11](https://en.cppreference.com/w/cpp/utility/functional/unary_function), and "removed" in
  C++17. It's use causes warnings with newer compilers, i.e GCC 12.1.

  Use the MACRO outlined in https://github.com/boostorg/container_hash/issues/22, and added to Boost Config for GCC 12 in https://github.com/boostorg/config/pull/430, to prevent it's use.

  [BOOST_NO_CXX98_FUNCTION_BASE](https://www.boost.org/doc/libs/master/libs/config/doc/html/boost_config/boost_macro_reference.html):
  > The standard library no longer supports std::unary_function and std::binary_function.
  > They were deprecated in C++11 and is removed from C++14.

  Guix Build (x86_64):
  ```bash

  ```

  Guix Build (arm64):
  ```bash

  ```

ACKs for top commit:
  laanwj:
    Code review ACK 880d4aaf81f3d5d7fbb915905c2e61b816a6a747

Tree-SHA512: 10c4679c3eb788e9279acc4960731c55ae1568bd3df525d3c46f97d8b0319e7d8450b1638b6777d98111b5991dba5c787e95d80b1ac932e0b4779d4b8e74875e
2022-11-02 10:24:45 -05:00
UdjinM6
468769f9ff
fix: do not crash when running with statsenabled=1 (#5066) 2022-11-01 00:30:54 -05:00
PastaPastaPasta
55332c931a
Merge pull request #5056 from kittywhiskers/auxports7
backport: merge bitcoin#20788, #19203, #19415, #21444, #21328, #20457, #20429, #18416, #16251, partial #18638 (auxiliary backports: part 7)
2022-11-01 00:29:10 -05:00
Kittywhiskers Van Gogh
8c07349a49 merge bitcoin#16251: Improve signrawtransaction error reporting 2022-11-01 00:28:53 -05:00
Kittywhiskers Van Gogh
4dbb95316a merge bitcoin#18416: Limit decimal range of numbers ParseScript accepts 2022-11-01 00:28:53 -05:00
Kittywhiskers Van Gogh
8542752296 merge bitcoin#20429: replace (sizeof(a)/sizeof(a[0])) with C++17 std::size
Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2022-11-01 00:28:53 -05:00
Kittywhiskers Van Gogh
8133469746 merge bitcoin#20457: Make Parse{Int,UInt}{32,64} use locale independent std::from_chars(…) (C++17) instead of locale dependent strto{l,ll,ul,ull} 2022-11-01 00:28:53 -05:00
Kittywhiskers Van Gogh
55e1853d65 merge bitcoin#21328: pass uint16 CService::port as uint16 2022-11-01 00:28:53 -05:00
Kittywhiskers Van Gogh
138ad4f9bf merge bitcoin#21444: Doxygen updates and fixes in netbase.{h,cpp} 2022-11-01 00:28:53 -05:00
Kittywhiskers Van Gogh
e28c1c3f1b merge bitcoin#19415: Make DNS lookup mockable, add fuzzing harness 2022-11-01 00:28:53 -05:00
Kittywhiskers Van Gogh
9a9bd217ad merge bitcoin#19203: Add regression fuzz harness for CVE-2017-18350. Add FuzzedSocket 2022-11-01 00:28:53 -05:00
Kittywhiskers Van Gogh
ba90fb6338 merge bitcoin#20812: Bump FuzzedDataProvider.h 2022-11-01 00:28:53 -05:00
Kittywhiskers Van Gogh
f6b2a1722a merge bitcoin#20788: add RAII socket and use it instead of bare SOCKET 2022-11-01 00:28:53 -05:00
Kittywhiskers Van Gogh
1fb1f0d86f partial bitcoin#18638: Use mockable time for ping/pong, add tests 2022-11-01 00:28:53 -05:00
UdjinM6
8b37fd616a
fix(ci): disable --tls explicitly (#5068)
see https://gitlab.com/gitlab-org/gitlab-runner/-/issues/27300#note_621025442
2022-10-31 13:08:46 -05:00
PastaPastaPasta
aaa5c7967d
refactor: change Process* functions from accepting a ptr to a reference (#5062)
also drops an almost always unneeded string
converts some std::strings to std::string_view
also drops an unneeded param
2022-10-28 22:50:54 +03:00
UdjinM6
e04b31cb9a
fix: make masternodeSync available as early as possible (#5060) 2022-10-25 07:42:48 +03:00
PastaPastaPasta
90bb674ac0
refactor: use util/irange.h in block_reward_reallocation_tests.cpp (#5061) 2022-10-24 00:05:22 +03:00
PastaPastaPasta
88adf2402f
refactor: introduce a python-like enumerate() method, and use it in block_reward_reallocation_tests.cpp 2022-10-24 00:00:17 +03:00
Kittywhiskers Van Gogh
32a328cae3
refactor: replace util::Ref with CoreContext (std::variant) (#5055)
Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>

Co-authored-by: PastaPastaPasta <6443210+PastaPastaPasta@users.noreply.github.com>
Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2022-10-22 12:18:03 -05:00
UdjinM6
0b7b76135a
Merge pull request #5057 from kittywhiskers/resolve_issues
fix: resolve always-true serialization bug, statsd_client warning, minor refactoring
2022-10-21 21:08:09 +03:00
Kittywhiskers Van Gogh
835f2baf86 refactor: remove leftover rpc prefix from filename (evo, quorum) 2022-10-21 21:51:45 +05:30
Kittywhiskers Van Gogh
1f7c2353a9 refactor: resolve implicit-const-int-float-conversion warning in statsd_client 2022-10-21 21:51:35 +05:30
Kittywhiskers Van Gogh
ce90b10402 fix(coinjoin): fix version comparison check serialization bug 2022-10-21 21:44:41 +05:30
Kittywhiskers Van Gogh
184bd6031b ci: make fuzzing builds stricter by enabling -Werror by default
Unfortunately, we need -Wno-unused-command-line-argument as configure will fail to run
with -Werror due to Dash's current build system utilizing -static-libstdc++ indiscriminately,
resulting in Clang warnings of "unused arguments".
2022-10-21 19:09:56 +05:30
PastaPastaPasta
5e2eacbbce
Merge pull request #5044 from kittywhiskers/cxx_cleanup
backport: merge bitcoin#21404, #21415, #19314, #21882, #16939, #19084, #20602, #20253, #20480, #20736 (remove deprecated logic, use standard library alternatives)
2022-10-20 16:09:06 -05:00
Kittywhiskers Van Gogh
f5f41e5348 merge bitcoin#19314: Use uint16_t instead of unsigned short 2022-10-20 16:08:45 -05:00
Kittywhiskers Van Gogh
9e9e170bd6 merge bitcoin#20736: Replace boost::variant with std::variant for RPCArg.m_fallback 2022-10-20 16:08:45 -05:00
Kittywhiskers Van Gogh
76c8e8f2e8 merge bitcoin#20480: Replace boost::variant with std::variant 2022-10-20 16:08:45 -05:00
Kittywhiskers Van Gogh
3ef8b80abf merge bitcoin#20253: use std::chrono throughout maxOutbound logic 2022-10-20 16:08:45 -05:00
Kittywhiskers Van Gogh
41f8af2211 merge bitcoin#20602: Allow use of C++14 chrono literals 2022-10-20 16:08:45 -05:00
Kittywhiskers Van Gogh
dc85f86dbb merge bitcoin#19084: improve code documentation for dns seed behaviour 2022-10-20 16:08:45 -05:00
Kittywhiskers Van Gogh
40a80c0aff merge bitcoin#16939: Delay querying DNS seeds 2022-10-20 16:08:45 -05:00
Kittywhiskers Van Gogh
6851dbf908 merge bitcoin#21882: Fix undefined reference to __mulodi4 2022-10-20 16:08:45 -05:00
Kittywhiskers Van Gogh
41eba6beef merge bitcoin#21415: remove Optional & nullopt 2022-10-20 16:08:45 -05:00
Kittywhiskers Van Gogh
898fef5c01 merge bitcoin#21404: Remove MakeUnique<T>() 2022-10-20 16:08:45 -05:00
Odysseas Gabrielides
a99fe72cbe
refactor: restrict some llmq logging to only debug=llmq (#5050)
* llmq only logging

* llmq only logging

* style: reference on the left

* refactoring

* fix

* style: fix colon location in for loop

Co-authored-by: PastaPastaPasta <6443210+PastaPastaPasta@users.noreply.github.com>
2022-10-20 14:47:50 -05:00
PastaPastaPasta
fa84fc5634
Merge pull request #5051 from Munkybooty/backports-0.20-pr8
Backports 0.20 pr8
2022-10-20 14:37:06 -05:00
Wladimir J. van der Laan
b0518f0796 Merge #17985: net: Remove forcerelay of rejected txs
facb71576cd4d2e90fd03e09d29b42fa3d730e8c net: Remove forcerelay of rejected txs (MarcoFalke)

Pull request description:

  This removes the code that supposedly handled the forced relay of txs from a permissioned peer that were rejected from our mempool. The removal should be fine, because it is dead code for the following reasons:

  * While `RelayTransaction` enqueues the inv for all peers, the inv is never processed because it can not be found in the mempool. See 4a07233076/src/net_processing.cpp (L3862-L3866)

  * Even if the peers we intended to send the inv to can somehow reply with a getdata to the never-received inv, they won't receive the tx as a reply because it was never added to the "relay memory" (`mapRelay`)

  The dead code is (obviously) untested: https://marcofalke.github.io/btc_cov/total.coverage/src/net_processing.cpp.gcov.html#2574

  This feature was (intentionally or accidentally) removed in 4d8993b346, which was released in Bitcoin Core 0.13.0. So all currently supported versions of Bitcoin Core ship without this feature. I am not aware of any complaints about this feature or actual documented use-cases. So instead of reviving an unneeded feature, just remove the dead code.

ACKs for top commit:
  hebasto:
    ACK facb71576cd4d2e90fd03e09d29b42fa3d730e8c, locally running the unit and functional tests.

Tree-SHA512: bfceae6f2983c1510fa0649a9a63c343cbbc1c4ab3a3698039cccf454c81e58c8f5114b147ed42a1bc867da74c43a5b53764ab14f942e191b6f59079044108b5
2022-10-20 11:48:21 -04:00
Wladimir J. van der Laan
4b4856ee80 Merge #17984: test: Add p2p test for forcerelay permission
aaaae4d0ebd5ef34d81997a73ab9839ba7b4b9e4 test: Add p2p test for forcerelay permission (MarcoFalke)
fa6b57bcaaf4dc65d78316353033b03d171a3beb test: Fix whitespace in p2p_permissions.py (MarcoFalke)
faf40810d7b7f42f3588bfa8a663095aa24001b1 test: Make msg_tx a witness tx (MarcoFalke)

Pull request description:

  The commit `test: Make msg_tx a witness tx` is needed so that the python mininode does not strip the witness from transactions before sending them over p2p. The commit should also be done to keep symmetry with msg_block. See:

  *  tests: Make msg_block a witness block #15982

ACKs for top commit:
  laanwj:
    ACK aaaae4d0ebd5ef34d81997a73ab9839ba7b4b9e4

Tree-SHA512: b4b546c88f7f0576cb512f0872bc6bef9d4df65783803f226986e56175937f418aa1ed906417ac909f27f1fd521d64629621fda83250fa925c46ef9513db0e4c
2022-10-20 11:48:12 -04:00
MarcoFalke
79bd96b744 Merge #17921: test: test OP_CSV empty stack fail in feature_csv_activation.py
5ffaf883b93fb8d3d841c36e808b90d61d39d492 test: eliminiated magic numbers in feature_csv_activation.py (Sebastian Falbesoner)
09f706ab8e47ddfdfa41418f2e7cb6d87661147a test: check for OP_CSV empty stack fail reject reason in feature_csv_activation.py (Sebastian Falbesoner)
cbd345a75c2be26e17fce4c65c0c1ca19a3eb9e0 test: test OP_CSV empty stack fail in feature_csv_activation.py (Sebastian Falbesoner)

Pull request description:

  Adds an empty stack failure check for OP_CSV (BIP112) to the functional test `feature_csv_activation.py` by prepending a valid scriptSig with `OP_CHECKSEQUENCEVERIFY`.
  If BIP112 is inactive, the operator just behaves as a NOP (for both tx versions 1 and 2) and the transaction remains valid -- if it is active, the tx is invalid due to an empty stack (for both tx versions 1 and 2, as well).

Top commit has no ACKs.

Tree-SHA512: 81102aaead5be11e02b894867fa9a9cc17358ec0eb2f21ce2d3db845b87691d305e6ed7c525f9c7e5bcb3c5c609eb28deca0fbaa3d5e9ff928cecd3b91ff129a
2022-10-20 11:48:04 -04:00