Latest PIVX Core Github Commits


This is a test

Merge #2943: [Cleanup] Declare single-argument (non-converting) const…

Merge #2943: [Cleanup] Declare single-argument (non-converting) constructors "explicit"

1cc9a805eaa4fd8b84b660e439dfa517e9b1f1bb CI: Add extended lint job for cppcheck (Fuzzbawls)
43b75ca4ae760a44181ec984dc0fe8828965c75b Declare single-argument (non-converting) constructors "explicit" (Fuzzbawls)

Pull request description:

  Declare single-argument (non-converting) constructors explicit.

  In order to avoid unintended implicit conversions.

  Coming from https://github.com/bitcoin/bitcoin/pull/10969

  Added a new CI lint job that uses cppcheck to indicate any regressions or new introductions. This lint framework can be expanded on to catch other static analysis warnings in future PRs.

ACKs for top commit: 1cc9a805eaa4fd8b84b660e439dfa517e9b1f1bb
  panleone:
    utACK 1cc9a805eaa4fd8b84b660e439dfa517e9b1f1bb
  Liquid369:
    utACK 1cc9a805eaa4fd8b84b660e439dfa517e9b1f1bb

Tree-SHA512: 612997f2799d2527d3ecfff023740add6ea4f5d67bce3e378880b27e596e5b6ab4e33c39492e846ae071b9c5da1fe6938fc8d030d3bab2894b7ad0b406697765


Merge #2948: [Tests] Actually wait for nodes to connect

Merge #2948: [Tests] Actually wait for nodes to connect

5f8c06ea1904856702bcc99a1a69cd57addc7214 test: Add possibility to skip awaiting for the connection (Alessandro Rezzi)
53742291e707960329cb3aad547b774e29c2f10a Merge bitcoin/bitcoin#30252: test: Remove redundant verack check (merge-script)
e7c21c7e583280fae31dd562db6351030b4fd35b Merge bitcoin/bitcoin#30118: test: improve robustness of connect_nodes() (Ava Chow)
9beef8d47672b09d4f359474a8e26d5f3888671f Merge bitcoin/bitcoin#26854: test: Fix intermittent timeout in p2p_permissions.py (MarcoFalke)
b3a3d780fa5062e5620a656ec28a7e959c982c32 Merge bitcoin/bitcoin#25443: test: Fail if connect_nodes fails (laanwj)
72709b9b4230e4af8fb6b1b51ec0bbcf9c08b6e6 test: Avoid connecting a peer to himself (Alessandro Rezzi)
77697b8969c776553e5e4748e8e19b2eb240c06c test: Do not connect the nodes in parallel (Alessandro Rezzi)
17c065da749689f9b28f9b05e39ed677765304d5 test: Avoid race after connect_nodes (MarcoFalke)
d73ac82f6c45bb17e1691389863f8d4b3a284443 test: refactor connect_nodes and disconnect_nodes to take two indices instead of index + node (Alessandro Rezzi)
e19d72f1c6558c682b64dfad781a5a9cd06f5149 Merge #18866: test: Fix verack race to avoid intermittent test failures (MarcoFalke)

Pull request description:

  This PR solves the failures of wallet_listtransactions.py, like the one of  https://github.com/PIVX-Project/PIVX/actions/runs/11705208154/job/32601252220?pr=2947.

  They happen due to mempool sync timeout:
     2024-11-06T14:58:03.8489793Z AssertionError: Mempool sync timed out after 60s:   2024-11-06T14:58:03.8490785Z   {'7364836e7eae24a75378b920373e303b99b4ff18db758defc4c057d784a43905'} 

  The issue is that the connection between nodes is established after the transaction is sent, as we can see from the logs:
     2024-11-06T14:58:03.9085473Z 2024-11-06T14:57:02Z (mocktime: 2019-10-31T18:21:20Z) Relaying wtx 7364836e7eae24a75378b920373e303b99b4ff18db758defc4c057d784a43905   ...   2024-11-06T14:58:03.9103287Z 2024-11-06T14:57:02Z (mocktime: 2019-10-31T18:21:20Z) New outbound peer connected: version: 70927, blocks=200, peer=0 

  Hence the newly connected node will never receive the transaction and the mempool will never be synced.

  This bug is fixed by ensuring that connect_nodes actually wait for the connection to be established. As a consequence of those checks we cannot anymore connect nodes in parallel in connect_nodes_clique (which will make tests run slightly slower)

ACKs for top commit: 5f8c06ea1904856702bcc99a1a69cd57addc7214
  Fuzzbawls:
    utACK 5f8c06ea1904856702bcc99a1a69cd57addc7214
  Duddino:
    utACK 5f8c06ea1904856702bcc99a1a69cd57addc7214
  Liquid369:
    tACK 5f8c06ea1904856702bcc99a1a69cd57addc7214

Tree-SHA512: 88007d7302f3b7c3c5b9d446e7d8acc959cd03b0bb27409b1633cb86c57905a4814be148e2e5f6ccaa1da17eccdd44f68f81d00299696d1f47f52f9b12b32ec7


Merge #2949: Dash LLMQ backports part 4

Merge #2949: Dash LLMQ backports part 4

c7e2bebef16aacc965d549f46aacbfeec978502c scripted-diff: Refactor llmq type consensus param names (https://github.com/dashpay/dash/pull/3093) (UdjinM6)
af7bb99ddc0977e7154700c08377b80980f2795d Re-verify invalid IS sigs when the active quorum set rotated (https://github.com/dashpay/dash/pull/3052) (Alexander Block)
be20a71bad6dc06f0e1ba8427783bab3a39973ee Remove recovered sigs from the LLMQ db when corresponding IS locks get confirmed (https://github.com/dashpay/dash/pull/3048) (Alexander Block)
802a933b004a8e36ad70c78e65e6b16d5854b19e Don't wake up select if it was already woken up (https://github.com/dashpay/dash/pull/2863) (Alexander Block)
436300d00d18502b952b4b9928fac574e8415cdd  Disable optimistic send in PushMessage by default (https://github.com/dashpay/dash/pull/2859) (Alexander Block)
44ad484c1f95ff51d39fd37e10b68a9e88e4418e Optimize LLMQs sending of sig shares (https://github.com/dashpay/dash/pull/2704) (Alexander Block)
e01ad46a9664094abdb92b0cce526e852906dbe6 Fix db leaks in LLMQ db (https://github.com/dashpay/dash/pull/2914) (Alexander Block)
d2a2d15e047210482f0877fd589474ac22a16807 Print inputs on which we voted and quorums used for signing (https://github.com/dashpay/dash/pull/2907) (Alexander Block)
dce46adc11d9034d781a1f1ec9577caa844e92f6 Bail out in few more places when blockchain is not synced yet (https://github.com/dashpay/dash/pull/2888) (UdjinM6)
965a4a79154f6cb64d669a044248478f8a440d01 Use lazy BLS signatures more often and don't always verify self-recovered sigs (https://github.com/dashpay/dash/pull/2860) (Alexander Block)
f4a5a040f48d1d618985d419533b363787a9c397 cherry pick https://github.com/dashpay/dash/pull/2889 (UdjinM6)

Pull request description:

  each commit backports a different PR

ACKs for top commit: c7e2bebef16aacc965d549f46aacbfeec978502c
  Duddino:
    utACK c7e2bebef16aacc965d549f46aacbfeec978502c
  Liquid369:
    utACK c7e2bebef16aacc965d549f46aacbfeec978502c

Tree-SHA512: 86425039d01990ff04eea95f5ea4bee4821eaa80c33bab147d5b9407589c799c8293c2da5d5faf10e7e66b65d568444318c87fc274f39b42d2b69b80abafb417


Remove recovered sigs from the LLMQ db when corresponding IS locks ge…

Remove recovered sigs from the LLMQ db when corresponding IS locks get confirmed (https://github.com/dashpay/dash/pull/3048)

 Remove unused overload of RemoveInstantSendLock

 Move deletion of recovered sigs into own method

 Remove recovered sigs for fully confirmed IS locks

 Also remove rs_t entries when removing recovered sigs from the outside

CleanupOldRecoveredSigs already does this as the last step, but when
RemoveRecoveredSig is called from the outside (e.g. from InstantSend),
these keys are not removed. This PR fixes this by storing the write time
into rs_r and later uses it to remove the rs_t entry.

Old entries will be incompatible with this (1 byte written in the past,
4 bytes written now). This checked by comparing the data size with
sizeof(uint32_t).

* Add TODO


Disable optimistic send in PushMessage by default (https://github.co…

 Disable optimistic send in PushMessage by default (https://github.com/dashpay/dash/pull/2859)

 Automatically wake up select() when optimistic send was not used

But only when we know that we are actually inside select() and that it
currenlty is unlikely for it to have selected the node's socket for
sending. We accept race conditions here as the select() timeout
will ensure that we always send the data.

 Don't manually call WakeSelect() in CSigSharesManager::SendMessages

Not needed anymore

* Disable optimistic send in PushMessage by default


Fix db leaks in LLMQ db (https://github.com/dashpay/dash/pull/2914)

Fix db leaks in LLMQ db (https://github.com/dashpay/dash/pull/2914)

 Store rs_t key time in big endian

Also implement ConvertInvalidTimeKeys to convert old entries. We can remove
this later when we know that most MNs have run this code on testnet.

The way we stored the time field in the past lead to CleanupOldRecoveredSigs
iterating the keys in a strange order, causing no deletion at all and the
LLMQ DB filling up.

 Write batch in CleanupOldRecoveredSigs when it gets too large

This avoids RAM filling up and OOM getting triggered.

 Keep track of when a vote was written to the DB and clean up after week

Instead of only deleting when the corresponding recovered sig is deleted.
It sometimes happens that a masternode votes on something but a recovered
sig is never created, which leaves us with a vote that will never be
deleted.

 Apply suggestions from code review

Co-Authored-By: PastaPastaPasta <pasta@dashboost.org>