Commit Graph

26873 Commits

Author SHA1 Message Date
Kittywhiskers Van Gogh
dacf859218
refactor: make pdsNotificationInterface a unique_ptr, rename 2024-09-13 13:06:22 +00:00
Konstantin Akimov
42dffe8541
chore: improve logging of functional tests feature_governance.py
The comments are converted to logs for better understanding of progress
2024-09-13 16:07:49 +07:00
Konstantin Akimov
0351469bb5
refactor: removed duplicated meaningless condition from Check mnhftx 2024-09-13 15:51:58 +07:00
Konstantin Akimov
922b796800
feat: simplify and speedup feature_governance.py test by generating less blocks 2024-09-13 15:50:58 +07:00
Kittywhiskers Van Gogh
1376289b11
merge bitcoin#27467: skip netgroup diversity follow-up 2024-09-13 08:14:34 +00:00
Kittywhiskers Van Gogh
a52b3a3bf0
merge bitcoin#27374: skip netgroup diversity of new connections for tor/i2p/cjdns 2024-09-13 08:14:33 +00:00
MarcoFalke
d891d3c95c
(partial) Merge bitcoin/bitcoin#24339: rpc: Improve RPC help by explicitly mentioning output types
c821ab8be8dffb749853c05e05cb515c11e6328a Use `GetAllOutputTypes` in `getblock` RPC function (Kiminuo)
d970a85d335202cc85f6604f794c43af6645673f Move `GetAllOutputTypes` function from `rpc/rawtransaction.cpp` to `rpc/util.{h|cpp}` (Kiminuo)

Pull request description:

  This PR attempts to replicate 0ccf9b2e55/src/rpc/rawtransaction.cpp (L547) to one other place (at the moment) so that users have better idea what RPC methods can actually return.

  I created this PR as a follow-up to the idea mentioned here https://github.com/bitcoin/bitcoin/pull/23320#discussion_r732458112 (resolved).

ACKs for top commit:
  kristapsk:
    re-ACK c821ab8be8dffb749853c05e05cb515c11e6328a

Tree-SHA512: 5ff66a41ad7c43ec769f4a99933d2d070feea7c617286d94b6f9bfa1a2547a42211915778210a89074ad4b14d99f34852cc6871efed5e6f1e2ffedd40d669386
2024-09-12 20:24:10 +05:30
fanquake
237279950b
Merge bitcoin/bitcoin#23001: doc: Enable TLS in links in documentation
9bdda50151dd808cbad094d457bf0ed7939a7c87 Enable TLS in links in documentation (Jeremy Rand)

Pull request description:

  This PR enables TLS in several documentation links, which improves security.

ACKs for top commit:
  fanquake:
    ACK 9bdda50151dd808cbad094d457bf0ed7939a7c87

Tree-SHA512: 9d04d8771a9daf3c3b9914ff324e2eabfdf3ff5ae7f7dc92b84a1f3527010ceb860e73873a8f24d6051763eb472d9ea324ccbd6129a40318a520ca88c05f0586
2024-09-12 20:24:08 +05:30
MarcoFalke
e4c8ea5061
Merge bitcoin/bitcoin#24139: Avoid unsigned integer overflow in bitcoin-tx
faa75fa19335e3e826efa4f2280609a2db34425d Avoid unsigned integer overflow in bitcoin-tx (MarcoFalke)

Pull request description:

  While `npos` means "largest unsigned value" and adding `1` to it yields `0`, it may be clearer to just assign `0` to it and only increment otherwise.

  This also allows to remove a file-wide suppression for `unsigned-integer-overflow`.

ACKs for top commit:
  hebasto:
    ACK faa75fa19335e3e826efa4f2280609a2db34425d, I have reviewed the code and it looks OK, I agree it can be merged.
  theStack:
    Code-review ACK faa75fa19335e3e826efa4f2280609a2db34425d

Tree-SHA512: c24436641e5d801341c948b812c7f711d5dff70efdf04af00fd3221f4b81d93f25608dddaa36230ba81ca7ab0d18bdd957095d4561e22621e4d69017934f0a16
2024-09-12 20:24:08 +05:30
fanquake
98f7e82d07
Merge bitcoin/bitcoin#24433: doc: Explain that feedback needs to be addressed
fa694f61ab21cb973843e5234a6aeacd4a957e05 doc: Explain that feedback needs to be addressed (MarcoFalke)
fa0819eea380047c9d7404895d3e4e8ea37930bb doc: Move peer-review paragraph to right section (MarcoFalke)
fa2b65b3583e7e7ffa892bf2453720b0d2bd7904 doc: Add link to release-process.md in CONTRIBUTING.md (MarcoFalke)

Pull request description:

  Generally, the pull request author is expected to reply to all comments or iterate the code before merge. Of course, it is allowed to reject feedback, but it should not be done by silently ignoring it.

  Clarify this in the docs.

  Also, some minor copy edits.

ACKs for top commit:
  michaelfolkson:
    ACK fa694f61ab21cb973843e5234a6aeacd4a957e05
  Sjors:
    ACK fa694f61ab21cb973843e5234a6aeacd4a957e05
  jamesob:
    ACK fa694f61ab
  prayank23:
    ACK fa694f61ab
  brunoerg:
    ACK fa694f61ab21cb973843e5234a6aeacd4a957e05
  w0xlt:
    ACK fa694f6

Tree-SHA512: 339d6f252395664442f4bfb73d839314de8c9b0fdc8900a1c4a67b1cef9c73ecb98c7587a842dd5a36a4a3efbd8270d2162962013893706313f7ef34491db18c
2024-09-12 20:24:08 +05:30
Kittywhiskers Van Gogh
ab11e0f998
merge bitcoin#27324: bitcoin#27257 follow-ups 2024-09-12 14:42:57 +00:00
Kittywhiskers Van Gogh
9023dd25af
merge bitcoin#27257: End friendship of CNode, CConnman and ConnmanTestMsg 2024-09-12 14:42:57 +00:00
Kittywhiskers Van Gogh
3465df2689
merge bitcoin#27264: Improve diversification of new connections 2024-09-12 14:42:57 +00:00
Kittywhiskers Van Gogh
d3f5b3881b
merge bitcoin#26888: simplify the call to vProcessMsg.splice() 2024-09-12 14:42:57 +00:00
Kittywhiskers Van Gogh
d9e56f3e78
merge bitcoin#25962: Add CNodeOptions and increase constness 2024-09-12 14:42:57 +00:00
Kittywhiskers Van Gogh
79e67fd96a
merge bitcoin#25814: simplify GetLocalAddress() 2024-09-12 14:42:57 +00:00
Kittywhiskers Van Gogh
6d4945418a
partial bitcoin#25472: Increase MS Visual Studio minimum version
contains:
- 630c1711 (excl. changes to mempool as they haven't been backported
  yet)
2024-09-12 14:42:57 +00:00
Kittywhiskers Van Gogh
54bb3a438f
merge bitcoin#25500: Move inbound eviction logic to its own translation unit 2024-09-12 14:42:57 +00:00
Kittywhiskers Van Gogh
b50febc0f0
merge bitcoin#24531: Use designated initializers 2024-09-12 14:42:56 +00:00
pasta
17110f50b3
Merge #6254: backport: merge bitcoin#25678, #26040, #26847, #25619, #27214, #26261, #27745, #27529, #28341, partial bitcoin#25331 (addrman backports: part 4)
e544d3c741 fmt: apply `clang-format-diff.py` suggestions, satisfy linter (Kittywhiskers Van Gogh)
7da74ffcd5 merge bitcoin#28341: Use HashWriter over legacy CHashWriter (Kittywhiskers Van Gogh)
c798b496cd merge bitcoin#27529: fix `feature_addrman.py` on big-endian systems (Kittywhiskers Van Gogh)
7d149c97be merge bitcoin#27745: select addresses by network follow-up (Kittywhiskers Van Gogh)
1d82994383 merge bitcoin#26261: cleanup `LookupIntern`, `Lookup` and `LookupHost` (Kittywhiskers Van Gogh)
231ff82c2e merge bitcoin#27214: Enable selecting addresses by network (Kittywhiskers Van Gogh)
e82559516c merge bitcoin#25619: avoid overriding non-virtual ToString() in CService and use better naming (Kittywhiskers Van Gogh)
2e9b48a910 merge bitcoin#26847: track AddrMan totals by network and table, improve precision of adding fixed seeds (Kittywhiskers Van Gogh)
79a550ec15 merge bitcoin#26040: comment "add only reachable addresses to addrman" (Kittywhiskers Van Gogh)
1adb635ec6 merge bitcoin#25678: skip querying dns seeds if -onlynet disables IPv4 and IPv6 (Kittywhiskers Van Gogh)
2d99be0aea partial bitcoin#25331: Add HashWriter without ser-type and ser-version (Kittywhiskers Van Gogh)

Pull request description:

  ## Additional Information

  * Dependent on https://github.com/dashpay/dash/pull/6243

  * Dependent on https://github.com/dashpay/dash/pull/5167

  ## Breaking Changes

  None observed.

  ## Checklist:

  - [x] I have performed a self-review of my own code
  - [x] I have commented my code, particularly in hard-to-understand areas **(note: N/A)**
  - [x] I have added or updated relevant unit/integration/functional/e2e tests
  - [x] I have made corresponding changes to the documentation **(note: N/A)**
  - [x] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_

ACKs for top commit:
  UdjinM6:
    utACK e544d3c741

Tree-SHA512: 63f014142c39c47bda3ac85dc6afeee8f2bfec71f033631bca16d41bb0785f4b090b3c860ddc3b3cf6c4a23558d3d102144fc83b065130c3f9ab91d0de8e4457
2024-09-12 09:41:30 -05:00
fanquake
71689fe6dc
(partial) Merge bitcoin/bitcoin#22981: doc: Fix incorrect C++ named args
fac49470ca36ff944a613f4358386bf8e0967427 doc: Fix incorrect C++ named args (MarcoFalke)

Pull request description:

  Incorrect named args are source of bugs, like #22979.

  Fix that by correcting them and adjust the format, so that clang-tidy can check it.

ACKs for top commit:
  fanquake:
    ACK fac49470ca36ff944a613f4358386bf8e0967427 - `run-clang-tidy` works for me now.

Tree-SHA512: 2694e17a1586394baf30bbc479a913e4bad361221e8470b8739caf30aacea736befc73820f3fe56f6207d9f5d969323278d43a647f58c3497e8e44cad79f8934
2024-09-12 18:57:30 +05:30
MarcoFalke
2b71a9b030
Merge bitcoin/bitcoin#23755: rpc: Quote user supplied strings in error messages
fa24a3df8796cbf4eeb35d950a4c848d605e5b22 rpc: Quote user supplied strings in error messages (MarcoFalke)

Pull request description:

  I can't see a downside doing this and this fixes a fuzzing crash

  Background:

  This is a follow-up to commit 926fc2a0d4ff64cf2ff8e1dfa64eca2ebd24e090, which introduced the "starts_with-hack". Maybe an alternative to the hack would be to assign a unique error code to internal bugs? However, I think this can be done in an separate pull request and the changes here make sense even on their own.

ACKs for top commit:
  fanquake:
    ACK fa24a3df8796cbf4eeb35d950a4c848d605e5b22 - to fix the fuzzers.

Tree-SHA512: d998626406a64396a037a6d1fce22fce3dadb7567c2f9638e450ebe8fb8ae77d134e15dd02555326732208f698d77b0028bc62be9ceee9c43282b61fe95fccbd
2024-09-12 18:57:19 +05:30
Hennadii Stepanov
5a441b38de
(partial) Merge bitcoin-core/gui#409: Fix window title of wallet loading window
01bff8f0494ba1c02c087b7186c892785f326fd9 qt: Fix WalletControllerActivity progress dialog title (Shashwat)

Pull request description:

  Throughout the GUI, the title of the window, tells about the purpose of the window. This was not true for the title of wallet loading wallet.
  This PR fixes this issue by renaming the wallet loading window title to 'Open Wallet'

  Changes introduced in this PR (Runned Bitcoin-GUI on signet network)

  |Master|PR|
  |---|---|
  |![Screenshot from 2021-08-24 00-02-18](https://user-images.githubusercontent.com/85434418/130500309-2f0af2c9-55f0-4609-a92b-3156800fa92e.png)|![Screenshot from 2021-09-07 18-19-10](https://user-images.githubusercontent.com/85434418/132351394-1ee4a36c-3ba9-4d1a-a8f3-f17804fb856a.png)|

ACKs for top commit:
  jarolrod:
    ACK 01bff8f
  hebasto:
    ACK 01bff8f0494ba1c02c087b7186c892785f326fd9, tested on Linux Mint 20.2 (Qt 5.12.8).

Tree-SHA512: cd21c40752eb1c0afb5ec61b8a40e900bc3aa05749963f7957ece6024e4957f5bb37e0eb4f95aac488f5e08aea51fe13b023b05d8302a08c88dcc6790410ba64
2024-09-12 18:57:20 +05:30
W. J. van der Laan
49c87e93a6
Merge bitcoin/bitcoin#23142: Return false on corrupt tx rather than asserting
0ab4c3b27265401c59e40adc494041927dc9dbe3 Return false on corrupt tx rather than asserting (Samuel Dobson)

Pull request description:

  Takes up #19793

  Rather than asserting, we log an error and return CORRUPT so that the user is informed. This type of error isn't critical so it isn't worth `assert`ing.

ACKs for top commit:
  achow101:
    ACK 0ab4c3b27265401c59e40adc494041927dc9dbe3
  laanwj:
    Code review ACK 0ab4c3b27265401c59e40adc494041927dc9dbe3
  ryanofsky:
    Code review ACK 0ab4c3b27265401c59e40adc494041927dc9dbe3. There may be room for more improvements later like better error messages or easier recovery options, but changing from an assert to an error seems like a clear improvement, and this seems to avoid all the pitfalls of the last PR that tried this.

Tree-SHA512: 4a1a412e7c473d176c4e09123b85f390a6b0ea195e78d28ebd50b13814b7852f8225a172511a2efb6affb555b11bd4e667c19eb8c78b060c5444b62f0fae5f7a
2024-09-12 18:57:19 +05:30
Kittywhiskers Van Gogh
e544d3c741
fmt: apply clang-format-diff.py suggestions, satisfy linter
Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2024-09-12 06:36:44 +00:00
Kittywhiskers Van Gogh
7da74ffcd5
merge bitcoin#28341: Use HashWriter over legacy CHashWriter 2024-09-11 18:34:07 +00:00
Kittywhiskers Van Gogh
c798b496cd
merge bitcoin#27529: fix feature_addrman.py on big-endian systems 2024-09-11 18:34:07 +00:00
Kittywhiskers Van Gogh
7d149c97be
merge bitcoin#27745: select addresses by network follow-up 2024-09-11 18:34:07 +00:00
Kittywhiskers Van Gogh
1d82994383
merge bitcoin#26261: cleanup LookupIntern, Lookup and LookupHost 2024-09-11 18:34:06 +00:00
Kittywhiskers Van Gogh
231ff82c2e
merge bitcoin#27214: Enable selecting addresses by network 2024-09-11 16:18:47 +00:00
Kittywhiskers Van Gogh
e82559516c
merge bitcoin#25619: avoid overriding non-virtual ToString() in CService and use better naming 2024-09-11 16:18:46 +00:00
Kittywhiskers Van Gogh
2e9b48a910
merge bitcoin#26847: track AddrMan totals by network and table, improve precision of adding fixed seeds 2024-09-11 16:18:46 +00:00
Kittywhiskers Van Gogh
79a550ec15
merge bitcoin#26040: comment "add only reachable addresses to addrman" 2024-09-11 16:18:46 +00:00
Kittywhiskers Van Gogh
1adb635ec6
merge bitcoin#25678: skip querying dns seeds if -onlynet disables IPv4 and IPv6 2024-09-11 16:18:46 +00:00
Kittywhiskers Van Gogh
2d99be0aea
partial bitcoin#25331: Add HashWriter without ser-type and ser-version
includes:
- faa5425629d35708326b255570c51139aef0c8c4
2024-09-11 16:18:46 +00:00
pasta
96685be685
Merge #5167: refactor(stats): modernize statsd::StatsdClient, make global unique_ptr
cc998abec1 fmt: apply `clang-format-diff.py` suggestions (Kittywhiskers Van Gogh)
0401c581eb stats: `const`-ify variables and arguments (Kittywhiskers Van Gogh)
9f96723774 stats: stop using error codes, switch over to `bool` (Kittywhiskers Van Gogh)
1a81979c1e stats: initialize socket after we have a valid socket address (Kittywhiskers Van Gogh)
dbbfc8d766 stats: use `Socks` wrapper, use `CService` to generate our `sockaddr` (Kittywhiskers Van Gogh)
2def905044 stats: move init logic into constructor (Kittywhiskers Van Gogh)
4bc727cd6c stats: clean up randomization code, move `FastRandomContext` inward (Kittywhiskers Van Gogh)
840241eefd stats: cleanup error logging, improve code sanity (Kittywhiskers Van Gogh)
85890ddb13 docs: add copyright notice to source file, update notice in header (Kittywhiskers Van Gogh)
a9d1b1494d stats: move `_StatsdClientData` variables into `StatsdClient` (Kittywhiskers Van Gogh)
30c30c1397 stats: fetch all arguments needed when constructing `g_stats_client` (Kittywhiskers Van Gogh)
5133d88415 stats: s/statsClient/g_stats_client/g (Kittywhiskers Van Gogh)
f81951dd00 stats: make `statsClient` a `std::unique_ptr`, denote as global variable (Kittywhiskers Van Gogh)

Pull request description:

  ## Additional Information

  Support for transmitting stats to a Statsd server has been courtesy of Statoshi ([repo](https://github.com/jlopp/statoshi)), implemented Dec, 2020 by [dash#2515](https://github.com/dashpay/dash/pull/2515) but since then, it hasn't gotten much attention aside from benefiting from codebase-wide changes and the occasional compiler appeasement. This pull request aims to give our statistics code some TLC.

  Changes include:

  * Limiting initialization to solely during construction and moving the responsibility of fetching arguments outside of `statsd::StatsdClient`.
  * Using the RAII `Socks` wrapper as early as possible (we still need to construct a raw socket ourselves but this is done in the initializer and control is moved to the wrapper and everywhere else, the wrapper is used)
  * Utilizing existing networking code to generate the socket address
    * This lets us trivially allow IPv6 connections as the responsibility to construct it safely is moved to `CService`.
  * Using `std::string` and our string manipulation capabilities (replacing `snprintf` with `strprintf`), replacing platform-specific types (replacing `short` with `uint16_t`).

  ## Breaking Changes

  None observed.

  ## Checklist:

  - [x] I have performed a self-review of my own code
  - [x] I have commented my code, particularly in hard-to-understand areas **(note: N/A)**
  - [x] I have added or updated relevant unit/integration/functional/e2e tests **(note: N/A)**
  - [x] I have made corresponding changes to the documentation **(note: N/A)**
  - [x] I have assigned this pull request to a milestone

ACKs for top commit:
  PastaPastaPasta:
    utACK [cc998ab](cc998abec1)
  UdjinM6:
    utACK cc998abec1

Tree-SHA512: 433c92160d6ac7ebb8582ada3cbb65ead7913618266b773619a528c90dfe0e286aafa46dc3b0bca62f246938e5948a732080e2cddba942d3627f007ca6efcc1f
2024-09-11 11:17:52 -05:00
pasta
f2645df7d3
Merge #6262: chore: add stats as a pull request header type and scope
4faf35f749 chore: add `stats` as a pull request header scope (Kittywhiskers Van Gogh)

Pull request description:

  ## Additional Information

  Would allow tagging https://github.com/dashpay/dash/pull/5167, https://github.com/dashpay/dash/pull/6267 and https://github.com/dashpay/dash/pull/6237 as `feat(stats)`.

  ## Breaking Changes

  None.

  ## Checklist:

  - [x] I have performed a self-review of my own code **(note: N/A)**
  - [x] I have commented my code, particularly in hard-to-understand areas **(note: N/A)**
  - [x] I have added or updated relevant unit/integration/functional/e2e tests **(note: N/A)**
  - [x] I have made corresponding changes to the documentation **(note: N/A)**
  - [x] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_ **(note: N/A)**

ACKs for top commit:
  PastaPastaPasta:
    utACK 4faf35f749
  UdjinM6:
    utACK 4faf35f749
  thephez:
    utACK 4faf35f749

Tree-SHA512: 25cc28792351852b9e920d980b8814d93274bc53d22ce63fb1a5bf32821b10902d22b384a408e1c4a7b97239e53e235c45ac008d0f82e1afe5d6071b392acb47
2024-09-11 11:11:11 -05:00
Kittywhiskers Van Gogh
4faf35f749
chore: add stats as a pull request header scope 2024-09-11 15:08:28 +00:00
Kittywhiskers Van Gogh
cc998abec1
fmt: apply clang-format-diff.py suggestions 2024-09-11 15:02:10 +00:00
pasta
6019a8708f
Merge #6260: backport: merge bitcoin#20018, #22141, #22221, #22653, #23054, #23398, #23175, #22362, #23769, #23936, #24238, #24331 (auxiliary backports: part 15)
6c7335e002 merge bitcoin#24331: Revert back `MoveFileExW` call for MinGW-w64 (Kittywhiskers Van Gogh)
15e794bdd8 merge bitcoin#24238: use arc4random on OpenBSD (Kittywhiskers Van Gogh)
e039aecbdc merge bitcoin#23936: Add and use EnsureArgsman helper (Kittywhiskers Van Gogh)
b4bfacfd24 merge bitcoin#23769: Disallow copies of CChain (Kittywhiskers Van Gogh)
5b66688160 merge bitcoin#22362: Drop only invalid entries when reading banlist.json (Kittywhiskers Van Gogh)
109c963f6a merge bitcoin#23175: Add CJDNS network to -addrinfo and -netinfo (Kittywhiskers Van Gogh)
d57c96ea37 merge bitcoin#23398: add return message to savemempool RPC (Kittywhiskers Van Gogh)
22e59fb464 merge bitcoin#23054: Use C++11 member initializer in CTxMemPoolEntry (Kittywhiskers Van Gogh)
d158063b6d merge bitcoin#22653: Rename JoinErrors and re-use it (Kittywhiskers Van Gogh)
e24324d266 merge bitcoin#22221: Pass block reference instead of pointer to PeerManagerImpl::BlockRequested (Kittywhiskers Van Gogh)
68657efc03 merge bitcoin#22141: net processing: Remove hash and fValidatedHeaders from QueuedBlock (Kittywhiskers Van Gogh)
c0e6792e27 merge bitcoin#20018: ProcessAddrFetch(-seednode) is unnecessary if -connect is specified (Kittywhiskers Van Gogh)

Pull request description:

  ## Additional Information

  * When backporting [bitcoin#23054](https://github.com/bitcoin/bitcoin/pull/23054), `sigOpCount` and `nSigOpCountWithAncestors` were switched from `unsigned int` to `int64_t`. This change was done to prevent integer narrowing when accepting the `int64_t` taken from the constructor.

    This isn't a problem upstream as the same changes were as part of [bitcoin#8149](https://github.com/bitcoin/bitcoin/pull/8149/files#diff-8a2230436880b65a205db9299ab2e4e4adb1d4069146791b5db566f3fb752adaL90-L107), which was omitted but the type changes remain valid as sigop count cannot be a negative number.

  ## Breaking Changes

  None observed.

  ## Checklist:

  - [x] I have performed a self-review of my own code
  - [x] I have commented my code, particularly in hard-to-understand areas **(note: N/A)**
  - [x] I have added or updated relevant unit/integration/functional/e2e tests
  - [x] I have made corresponding changes to the documentation **(note: N/A)**
  - [x] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_

ACKs for top commit:
  PastaPastaPasta:
    utACK 6c7335e002
  UdjinM6:
    utACK 6c7335e002

Tree-SHA512: 29cae42dd82235305d3558562bae346170e742ce0b65897e396b331294b39cad0dd831fa9a09b34780a67844e55292e5b4e784cf544a894cc3f8897afe617ca1
2024-09-11 09:53:26 -05:00
Kittywhiskers Van Gogh
0401c581eb
stats: const-ify variables and arguments
We cannot convert `DEFAULT_STATSD*` to `std::string_view`s as they're
being used as default arguments and `GetArgs` expects `std::string`s
2024-09-11 14:37:58 +00:00
Kittywhiskers Van Gogh
9f96723774
stats: stop using error codes, switch over to bool 2024-09-11 14:34:53 +00:00
Kittywhiskers Van Gogh
1a81979c1e
stats: initialize socket after we have a valid socket address
As creating the socket is now the last step, we don't need
`m_init` anymore. We can just see if a socket is successfully
constructed and take that as our validity indicator.

We'll also move it out of the inner `send` function so we can bail out
before we bother with all the string processing and manipulation.
2024-09-11 14:34:20 +00:00
Kittywhiskers Van Gogh
dbbfc8d766
stats: use Socks wrapper, use CService to generate our sockaddr 2024-09-11 14:34:20 +00:00
Kittywhiskers Van Gogh
2def905044
stats: move init logic into constructor
Also, add log messages to inform us if we're skipping initialization or
it has successfully been initialized.
2024-09-11 14:34:19 +00:00
Kittywhiskers Van Gogh
4bc727cd6c
stats: clean up randomization code, move FastRandomContext inward
We can skip the computationally expensive dice-roll if our sample rate
is zero as that means we should never send it. Also get rid of the
`FastRandomContext::operator()` that isn't used anywhere else in the
codebase.
2024-09-11 14:34:19 +00:00
Kittywhiskers Van Gogh
840241eefd
stats: cleanup error logging, improve code sanity
- Use `uint16_t` instead of `short`, `int64_t` instead of `size_t`
- Get rid of the `errmsg` buffer and use `LogPrintf` to report errors
- Use `strprintf` instead of `snprintf`
- Rephrase networking error logs to allow inclusion of error strings
2024-09-11 14:33:55 +00:00
pasta
4d312b5456
Merge #6252: test: Improve tests robustness
0c5179462e test: rework feature_governance_cl.py (UdjinM6)
11ac0819da feat: bump_mocktime also bumps schedulers now (UdjinM6)
1937f503fe feat: regtest-only: do not auto-reset mnsync after 1h (UdjinM6)

Pull request description:

  ## Issue being fixed or feature implemented
  1. The original idea behind forced reset was to help desktop clients which go into sleep/hibernation mode from time to time to sync with no issues once they are online again. For regtest however it doesn't do anything good and only causes issues.
  2. We rely on schedulers a lot, bumping them should let nodes behave more like on a real network.
  3. Forcing mnsync to skip governance votes doesn't always work as we'd expect cause we don't control connection creation. To make it more deterministic create a proposal that should get into one superblock only. This way both the proposal and the trigger will expire/be deleted after another superblock meaning we can be 100% sure the isolated node never gets any of them and can only sync thanks to chainlock.

  ## What was done?

  ## How Has This Been Tested?
  run tests

  ## Breaking Changes
  n/a

  ## Checklist:
  - [x] 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:
  knst:
    utACK 0c5179462e

Tree-SHA512: 9a40eeaba880f3f27f86736e92afa19a4ecb2a2d157bc42b65dd9da0d4109c9cd1d83a5abdf1ec16be2f8a8b31821fb700a7f0d2265c094fd4fdff7f18bc6ec7
2024-09-11 08:19:02 -05:00
pasta
48c7f98b1a
doc: drop trailing whitespace 2024-09-11 08:15:08 -05:00
UdjinM6
697743d77b
test: add missing import 2024-09-11 08:11:08 -05:00