Commit Graph

25477 Commits

Author SHA1 Message Date
Konstantin Akimov
e7e355ba8b
refactor: make SetNull in CJ classes virtual to prevent warning from compiler 2024-03-06 03:31:49 +07:00
Konstantin Akimov
6bc14a35e5
chore: bump cpp check 2.10 to 2.13 2024-03-06 03:31:49 +07:00
Konstantin Akimov
b4ed65e15e
refactor: add multiple missing const 2024-03-06 03:31:48 +07:00
Konstantin Akimov
add99ea862
refactor: add more consts everywhere as required by cppcheck 2.13.0 2024-03-06 03:31:48 +07:00
Konstantin Akimov
61a6c407fe
fix: re-order asserts in creditpool 2024-03-06 03:31:47 +07:00
Konstantin Akimov
28f7ecc11f
test: tidy up and reorder warnings in lint-cppcheck-dash 2024-03-06 03:31:47 +07:00
Konstantin Akimov
3abeab16d3
refactor: replace multiple C-style casts to reinterpret_cast 2024-03-06 03:31:46 +07:00
Konstantin Akimov
f36bb1f085
style: add semicolumn that the end to ENTER/LEAVE CRITICAL SECTION
It is not required but it looks alien without it
2024-03-06 03:31:46 +07:00
Konstantin Akimov
c23c25d00b
test: supress any_of suggestions in cppcheck-dash
even it maybe useful lint message for some particular case, sometimes it asks
to make an refactoring that will be over-complex.

For example, it asks to refactor external loop to std::any_of:
```
for (const auto& inner_entry : vecEntries) {
    if (ranges::any_of(inner_entry.vecTxDSIn,
                    [&txin](const auto& txdsin){
                            return txdsin.prevout == txin.prevout;
                    })) {
        LogPrint(BCLog::COINJOIN, "CCoinJoinServer::%s -- ERROR: already have this txin in entries\n", __func__);
        nMessageIDRet = ERR_ALREADY_HAVE;
        // Two peers sent the same input? Can't really say who is the malicious one here,
        // could be that someone is picking someone else's inputs randomly trying to force
        // collateral consumption. Do not punish.
        return false;
    }
}
```
That's possible to refactor, but that's unreasonable complexity to have an
lambda inside an lambda... That's unreasonable.
Some other suggestion are also non-trivial.

One more suppression for any_of in llmq/commitment which is false-alarm:

There's used index but linter doesn't see it:
```
for (const auto i : irange::range(members.size(), size_t(llmq_params.size))) {
    if (validMembers[i]) {
        LogPrintfFinalCommitment("q[%s] invalid validMembers bitset. bit %d should not be set\n", quorumHash.ToString(), i);
        return false;
    }
    if (signers[i]) {
        LogPrintfFinalCommitment("q[%s] invalid signers bitset. bit %d should not be set\n", quorumHash.ToString(), i);
        return false;
    }
}
```
2024-03-06 03:31:46 +07:00
Konstantin Akimov
7daa9bea9a
refactor: use std::any_of 2024-03-06 03:31:45 +07:00
Konstantin Akimov
3f1cb8d13d
test: add suppression for state.Invalid() which is widely used by cppcheck is unhappy 2024-03-06 03:31:43 +07:00
pasta
27736114a1
Merge #5924: refactor: subsume CGovernanceTriggerManager into CGovernanceManager
a1636d429a refactor: subsume CGovernanceTriggerManager into CGovernanceManager (Kittywhiskers Van Gogh)

Pull request description:

  ## Issue being fixed or feature implemented
  Having a dedicated manager to manipulate one variable, that relies almost exclusively on another manager doesn't make much sense. Rather than converting it into a unique_ptr, creating an alias and deglob'ing it, it's much easier to subsume it into its dependent manager.

  ## What was done?
  See commit

  ## How Has This Been Tested?
  Built locally; kudos @kwvg. Good idea!

  ## Breaking Changes
  None

  ## Checklist:
    _Go over all the following points, and put an `x` in all the boxes that apply._
  - [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
  - [x] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_

Top commit has no ACKs.

Tree-SHA512: 782aa7861e55675c77cd4ce3ebf5fdf8cfc953e535c6c3d5e98373a89611a86f14cdba0757df153b936ddb77b711472ec78c5b1a64fe596c85e6efcd49dec8fa
2024-03-05 13:16:14 -06:00
Kittywhiskers Van Gogh
a1636d429a
refactor: subsume CGovernanceTriggerManager into CGovernanceManager
Having a dedicated manager to manipulate one variable, that relies
almost exclusively on another manager doesn't make much sense. Rather
than converting it into a unique_ptr, creating an alias and deglob'ing
it, it's much easier to subsume it into its dependent manager.
2024-03-05 13:15:59 -06:00
pasta
8459820478
Merge #5854: refactor: move HD code from CWallet to LegacyScriptPubKeyMan
b5f4411d11 fix: extra logs to distinct WriteHDChain for encrypted/raw batches (Konstantin Akimov)
e8f84afd3e refactor: move BIP39 related code to wallet (Konstantin Akimov)
fa6519f320 refactor: move hdchain to wallet/ because it belongs there (Konstantin Akimov)
392b51b197 refactor: obsolete hdCryptedChain from ScriptPubKeyMan (Konstantin Akimov)
a0389e181f refactor: rename EncryptHDChain to EncryptAndSetHDChain (Konstantin Akimov)
b2143f9346 refactor: re-order public and private methods in scriptpubkeyman (Konstantin Akimov)
a219748f5e refactor: make SetHDChain private in ScriptPubKeyManager (Konstantin Akimov)
f418b9ac62 refactor: move Encrypt chain call inside ScriptPubKeyMan::Encrypt (Konstantin Akimov)
c3754d5183 refactor: move DecryptHDChain from public to private (Konstantin Akimov)
e08b64a1bb refactor: unify SetHDChainSingle and SetCryptedHDChainSingle (Konstantin Akimov)
59a998843b refactor: unify ScriptPubKeyMan's SetHDChain nad SetHDCryptedChain (Konstantin Akimov)
a180d73e5c refactor: unify WalletBatch's WriteHDChain and WriteCryptedHDChain (Konstantin Akimov)
9c8e4584ae refactor: unify SetHDChain and SetCryptedHDChain helpers (Konstantin Akimov)
7b72726b3e refactor: SetCryptedHDChain moved to scriptpubkeyman (Konstantin Akimov)
6993d112f3 feat: extra check failure case CWallet::GenerateNewHDChainEncrypted (Konstantin Akimov)

Pull request description:

  ## Issue being fixed or feature implemented
  During backport bitcoin#17261 significant part of HD chain has been forgotten in CWallet due to our own implementation.

  This PR do not change behaviour of HD wallets, it's just refactoring.

  ## What was done?
  This PR refactor HD wallets implementation:
   - key related stuff is moved from CWallet to LegacyScriptPubKeyMan (to follow-up bitcoin#17261)
   - refactored duplicated code between hdChain and hdCryptedChain
   - modules hdchain and bip39 related moved to wallet/ module

  ## How Has This Been Tested?
  Run unit/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
  - [ ] 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

Top commit has no ACKs.

Tree-SHA512: 763ea6dd9af902dfc4dd99896c1cb16a75e3c0322e806e37ff05bc9229923057c544732ebf9fca705da870568643370867d3f81a46cab1e9d229b2949016c484
2024-03-05 13:10:56 -06:00
pasta
2441489c1a
Merge #5919: backport: bitcoin#18937, #19390, #19473, #19478, #19489, #19596, #19657, #19727, #19816, partial #18638
4e46e6101c Merge #19478: Remove CTxMempool::mapLinks data structure member (MarcoFalke)
be5662a785 Merge #19596: Deduplicate parent txid loop of requested transactions and missing parents of orphan transactions (Wladimir J. van der Laan)
9c3ecd167e Merge #19473: net: Add -networkactive option (MarcoFalke)
0593c1ffcb Merge #19390: doc/REST-interface: Remove stale info (fanquake)
8368bd795e Merge #19816: test: Rename wait until helper to wait_until_helper (fanquake)
063c9b744d Merge #19727: test: Remove unused classes from p2p_leak.py (fanquake)
941b39d9a9 Merge #18937: refactor: s/command/msg_type/ in CNetMsgMaker and CSerializedNetMsg (MarcoFalke)
a89bd562fd Merge #19657: test: Wait until is_connected in add_p2p_connection (Wladimir J. van der Laan)
a11743f009 Merge #19489: test: Fail wait_until early if connection is lost (MarcoFalke)
ad3f424b4d partial Merge #18638: net: Use mockable time for ping/pong, add tests (MarcoFalke)

Pull request description:

  ## Issue being fixed or feature implemented
  Just regular backports from bitcoin v21

  ## What was done?
   - partial bitcoin/bitcoin#18638
   - bitcoin/bitcoin#19489
   - bitcoin/bitcoin#19657
   - bitcoin/bitcoin#18937
   - bitcoin/bitcoin#19727
   - bitcoin/bitcoin#19816
   - bitcoin/bitcoin#19390
   - bitcoin/bitcoin#19473
   - bitcoin/bitcoin#19596
   - bitcoin/bitcoin#19478

  ## How Has This Been Tested?
  Run unit/functional 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
  - [x] I have assigned this pull request to a milestone

Top commit has no ACKs.

Tree-SHA512: a656c7f8b39b0220250268e15e2c1d08272cb0253df555559f21ee142ce9ec9d4807ab3aafb0167c4ed79cc3ca73dc9c5aefd279b75b5901e1cc592f4df74bb0
2024-03-05 13:09:22 -06:00
Konstantin Akimov
b5f4411d11
fix: extra logs to distinct WriteHDChain for encrypted/raw batches 2024-03-06 02:04:25 +07:00
Konstantin Akimov
e8f84afd3e
refactor: move BIP39 related code to wallet 2024-03-06 02:04:25 +07:00
Konstantin Akimov
fa6519f320
refactor: move hdchain to wallet/ because it belongs there 2024-03-06 02:04:25 +07:00
Konstantin Akimov
392b51b197
refactor: obsolete hdCryptedChain from ScriptPubKeyMan 2024-03-06 02:04:24 +07:00
Konstantin Akimov
a0389e181f
refactor: rename EncryptHDChain to EncryptAndSetHDChain 2024-03-06 02:04:24 +07:00
Konstantin Akimov
b2143f9346
refactor: re-order public and private methods in scriptpubkeyman 2024-03-06 02:04:24 +07:00
Konstantin Akimov
a219748f5e
refactor: make SetHDChain private in ScriptPubKeyManager 2024-03-06 02:04:23 +07:00
Konstantin Akimov
f418b9ac62
refactor: move Encrypt chain call inside ScriptPubKeyMan::Encrypt 2024-03-06 02:04:23 +07:00
Konstantin Akimov
c3754d5183
refactor: move DecryptHDChain from public to private 2024-03-06 02:04:23 +07:00
Konstantin Akimov
e08b64a1bb
refactor: unify SetHDChainSingle and SetCryptedHDChainSingle 2024-03-06 02:04:22 +07:00
Konstantin Akimov
59a998843b
refactor: unify ScriptPubKeyMan's SetHDChain nad SetHDCryptedChain 2024-03-06 02:04:22 +07:00
Konstantin Akimov
a180d73e5c
refactor: unify WalletBatch's WriteHDChain and WriteCryptedHDChain 2024-03-06 02:04:21 +07:00
Konstantin Akimov
9c8e4584ae
refactor: unify SetHDChain and SetCryptedHDChain helpers 2024-03-06 02:04:21 +07:00
Konstantin Akimov
7b72726b3e
refactor: SetCryptedHDChain moved to scriptpubkeyman 2024-03-06 02:04:21 +07:00
Konstantin Akimov
6993d112f3
feat: extra check failure case CWallet::GenerateNewHDChainEncrypted
To unify code with GenerateNewHDChain
2024-03-06 02:04:20 +07:00
MarcoFalke
4e46e6101c
Merge #19478: Remove CTxMempool::mapLinks data structure member
296be8f58e02b39a58f017c52294aceed22c3ffd Get rid of unused functions CTxMemPool::GetMemPoolChildren, CTxMemPool::GetMemPoolParents (Jeremy Rubin)
46d955d196043cc297834baeebce31ff778dff80 Remove mapLinks in favor of entry inlined structs with iterator type erasure (Jeremy Rubin)

Pull request description:

  Currently we have a peculiar data structure in the mempool called maplinks. Maplinks job is to track the in-pool children and parents of each transaction. This PR can be primarily understood and reviewed as a simple refactoring to remove this extra data structure, although it comes with a nice memory and performance improvement for free.

  Maplinks is particularly peculiar because removing it is not as simple as just moving it's inner structure to the owning CTxMempoolEntry. Because TxLinks (the class storing the setEntries for parents and children) store txiters to each entry in the mempool corresponding to the parent or child, it means that the TxLinks type is "aware" of the boost multiindex (mapTx) it's coming from, which is in turn, aware of the entry type stored in mapTx. Thus we used maplinks to store this entry associated data we in an entirely separate data structure just to avoid a circular type reference caused by storing a txiter inside a CTxMempoolEntry.

  It turns out, we can kill this circular reference by making use of iterator_to multiindex function and std::reference_wrapper. This allows us to get rid of the maplinks data structure and move the ownership of the parents/child sets to the entries themselves.

  The benefit of this good all around, for any of the reasons given below the change would be acceptable, and it doesn't make the code harder to reason about or worse in any respect (as far as I can tell, there's no tradeoff).

  ### Simpler ownership model
  No longer having to consistency check that mapLinks did have records for our CTxMempoolEntry, impossible to have a mapLinks entry outlive or incorrectly die before a CTxMempoolEntry.

  ### Memory Usage
  We get rid of a O(Transactions) sized map in the mempool, which is a long lived data structure.

  ### Performance
  If you have a CTxMemPoolEntry, you immediately know the address of it's children/parents, rather than having to do a O(log(Transactions)) lookup via maplinks (which we do very often). We do it in *so many* places that a true benchmark has to look at a full running node, but it is easy enough to show an improvement in this case.

  The ComplexMemPool shows a good coherence check that we see the expected result of it being 12.5% faster / 1.14x faster.
  ```
  Before:
  # Benchmark, evals, iterations, total, min, max, median
  ComplexMemPool, 5, 1, 1.40462, 0.277222, 0.285339, 0.279793

  After:
  # Benchmark, evals, iterations, total, min, max, median
  ComplexMemPool, 5, 1, 1.22586, 0.243831, 0.247076, 0.244596
  ```
  The ComplexMemPool benchmark only checks doing addUnchecked and TrimToSize for 800 transactions. While this bench does a good job of hammering the relevant types of function, it doesn't test everything.

  Subbing in 5000 transactions shows a that the advantage isn't completely wiped out by other asymptotic factors (this isn't the only bottleneck in growing the mempool), but it's only a bit proportionally slower (10.8%, 1.12x), which adds evidence that this will be a good change for performance minded users.

  ```
  # Benchmark, evals, iterations, total, min, max, median
  ComplexMemPool, 5, 1, 59.1321, 11.5919, 12.235, 11.7068

  # Benchmark, evals, iterations, total, min, max, median
  ComplexMemPool, 5, 1, 52.1307, 10.2641, 10.5206, 10.4306
  ```
  I don't think it's possible to come up with an example of where a maplinks based design would have better performance, but it's something for reviewers to consider.

  # Discussion
  ## Why maplinks in the first place?

  I spoke with the author of mapLinks (sdaftuar) a while back, and my recollection from our conversation was that it was implemented because he did not know how to resolve the circular dependency at the time, and there was no other reason for making it a separate map.

  ## Is iterator_to weird?

  iterator_to is expressly for this purpose, see https://www.boost.org/doc/libs/1_51_0/libs/multi_index/doc/tutorial/indices.html#iterator_to

  >  iterator_to provides a way to retrieve an iterator to an element from a pointer to the element, thus making iterators and pointers interchangeable for the purposes of element pointing (not so for traversal) in many situations. This notwithstanding, it is not the aim of iterator_to to promote the usage of pointers as substitutes for real iterators: the latter are specifically designed for handling the elements of a container, and not only benefit from the iterator orientation of container interfaces, but are also capable of exposing many more programming bugs than raw pointers, both at compile and run time. iterator_to is thus meant to be used in scenarios where access via iterators is not suitable or desireable:
  >
  >     - Interoperability with preexisting APIs based on pointers or references.
  >     - Publication of pointer-based interfaces (for instance, when designing a C-compatible library).
  >     - The exposure of pointers in place of iterators can act as a type erasure barrier effectively decoupling the user of the code from the implementation detail of which particular container is being used. Similar techniques, like the famous Pimpl idiom, are used in large projects to reduce dependencies and build times.
  >     - Self-referencing contexts where an element acts upon its owner container and no iterator to itself is available.

  In other words, iterator_to is the perfect tool for the job by the last reason given. Under the hood it should just be a simple pointer cast and have no major runtime overhead (depending on if the function call is inlined).

  Edit by laanwj: removed at sign from the description

ACKs for top commit:
  jonatack:
    re-ACK 296be8f per `git range-diff ab338a19 3ba1665 296be8f`, sanity check gcc 10.2 debug build is clean.
  hebasto:
    re-ACK 296be8f58e02b39a58f017c52294aceed22c3ffd, only rebased since my [previous](https://github.com/bitcoin/bitcoin/pull/19478#pullrequestreview-482400727) review (verified with `git range-diff`).

Tree-SHA512: f5c30a4936fcde6ae32a02823c303b3568a747c2681d11f87df88a149f984a6d3b4c81f391859afbeb68864ef7f6a3d8779f74a58e3de701b3d51f78e498682e
2024-03-06 02:00:40 +07:00
Wladimir J. van der Laan
be5662a785
Merge #19596: Deduplicate parent txid loop of requested transactions and missing parents of orphan transactions
4c0731f9c50b0556f8a57b912c8f295c7a9ea89c Deduplicate missing parents of orphan transactions (Suhas Daftuar)
81961762439fb72fc2ef168164689ddc29d7ef94 Rewrite parent txid loop of requested transactions (Suhas Daftuar)

Pull request description:

  I noticed a couple of places recently where we loop over all inputs of a transaction in order to do some processing on the txids we find in those inputs.  There may be thousands of inputs in a transaction, and the same txid may appear many times.  In a couple of places in particular, we loop over those txids and add them to a rolling bloom filter; doing that multiple times for the same txid wastes entries in that filter.

  This PR fixes that in two places relating to transaction relay: one on the server side, where we look for parent transactions of a tx that we are delivering to a peer to ensure that getdata requests for those parents will succeed; and the other on the client side, where when we process an orphan tx we want to loop over the parent txids and ensure that all are eventually requested from the peer who provided the orphan.

  This addresses a couple of [related](https://github.com/bitcoin/bitcoin/pull/19109#discussion_r455197217) [comments](https://github.com/bitcoin/bitcoin/pull/19109#discussion_r456820373) left in #19109.

ACKs for top commit:
  laanwj:
    Code review ACK 4c0731f9c50b0556f8a57b912c8f295c7a9ea89c
  jonatack:
    ACK 4c0731f9c50b0556f8a57b912c8f295c7a9ea89c
  ajtowns:
    ACK 4c0731f9c50b0556f8a57b912c8f295c7a9ea89c

Tree-SHA512: 8af9df7f56c6e54b5915519d7d5465e081473ceb1bcc89bbebf83e78722cf51ff58145e588cf57126bce17071a8053273f4bcef0ad8166bec83ba14352e40f5d
2024-03-06 02:00:40 +07:00
MarcoFalke
9c3ecd167e
Merge #19473: net: Add -networkactive option
2aac093a3d60e446b85eebdf170ea6bed77bec92 test: Add test coverage for -networkactive option (Hennadii Stepanov)
3c58129b1293742a49aa196cb210ff345a7339e6 net: Log network activity status change unconditionally (Hennadii Stepanov)
62fe6aa87e4cdd8b06207abc1387c68d7bfc04c1 net: Add -networkactive option (Hennadii Stepanov)

Pull request description:

  Some Bitcoin Core activity is completely local (offline), e.g., reindexing.

  The `setnetworkactive` RPC command is already present. This PR adds the corresponding command-line argument / config option, and allows to start the client with disabled p2p network by providing `-networkactive=0` or `-nonetworkactive`.

  This was done while reviewing #16981.

ACKs for top commit:
  MarcoFalke:
    re-ACK 2aac093a3d60e446b85eebdf170ea6bed77bec92 🏠
  LarryRuane:
    ACK 2aac093a3d60e446b85eebdf170ea6bed77bec92

Tree-SHA512: 446d791b46d7b556d7694df7b1f88cd4fbc09301fe4eaf036b45cb8166ed806156353cc03788a07b633d5887d5eee30a7c02a2d4307141c8ccc75e0a88145636
2024-03-06 02:00:39 +07:00
fanquake
0593c1ffcb
Merge #19390: doc/REST-interface: Remove stale info
fd9c213c6e42cedd8a03c2f721ff46790cded76b doc/REST-interface: Remove stale info (Luke Dashjr)

Pull request description:

  Clean merge to 0.19+

ACKs for top commit:
  fanquake:
    ACK fd9c213c6e42cedd8a03c2f721ff46790cded76b
  MarcoFalke:
    ACK fd9c213c6e42cedd8a03c2f721ff46790cded76b

Tree-SHA512: ac3ffaa72226380ed8b8ab505518d0dc4350bfcc4625dfd27a2350fbb972a8d2bb4255307926eb331c49232023bcb283a659f0d87e4ecbf654982341242f7d36
2024-03-06 02:00:39 +07:00
fanquake
8368bd795e
Merge #19816: test: Rename wait until helper to wait_until_helper
fa1cd9e1ddc6918c3d600d36eadea71eebb242b6 test: Remove unused lock arg from BitcoinTestFramework.wait_until (MarcoFalke)
fad2794e93b4f5976e81793a4a63aa03a2c8c686 test: Rename wait until helper to wait_until_helper (MarcoFalke)
facb41bf1d1b7ee552c627f9829b4494b817ce28 test: Remove unused p2p_lock in VersionBitsWarningTest (MarcoFalke)

Pull request description:

  This avoids confusion with the `wait_until` member functions, which should be preferred because they take the appropriate locks and scale the timeout appropriately on their own.

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

Tree-SHA512: 319d400085606a4c738e314824037f72998e6657d8622b363726842aba968744f23c56d27275dfe506b8cbbb6e97fc39ca1d325db05d4d67df0e8b35f2244d5c
2024-03-06 02:00:39 +07:00
fanquake
063c9b744d
Merge #19727: test: Remove unused classes from p2p_leak.py
ed5cd12869e0691a785199d2d977ce5879095180 test: Distinguish between nodes(bitcoind) and peers(mininodes) in p2p_leak.py (Dhruv Mehta)
f6f082b9343522bc8005f23937ac6ecf56548c98 test: remove `CNodeNoVersionIdle` from p2p_leak.py (Dhruv Mehta)
45cf55ccac94689e48dd0648ed2401918a778024 test: remove `CNodeNoVersionMisbehavior` from p2p_leak.py (Dhruv Mehta)

Pull request description:

  - Removes `CNodeNoVersionMisbehavior` per recommendation at https://github.com/bitcoin/bitcoin/pull/19657#issuecomment-669926458
  - Removes `CNodeNoVersionIdle` because it is similarly unnecessary
  - As someone new to the codebase, I found it easier to understand it if `no_version_disconnect_node` tries to overwhelm the peer with any message that is not version/verack.
  - Per recommendation at https://github.com/bitcoin/bitcoin/pull/19727#pullrequestreview-468093555, made a clear distinction between nodes(bitcoind) and peers(mininode interface implementations)

ACKs for top commit:
  jnewbery:
    tested ACK ed5cd12869e0691a785199d2d977ce5879095180
  amitiuttarwar:
    utACK ed5cd12869

Tree-SHA512: 310a24c91fd837e7f65177edb55fe6142fb3559fae7867c5cdd9c9a23b1a02202b935ca9a82633fa7649f3de2fa221f6da906a7b5e499fc20f7254085033757d
2024-03-06 02:00:38 +07:00
MarcoFalke
941b39d9a9
Merge #18937: refactor: s/command/msg_type/ in CNetMsgMaker and CSerializedNetMsg
51e9393c1f6c9eaac554f821f5327f63bd09c8cf refactor: s/command/msg_type/ in CNetMsgMaker and CSerializedNetMsg (Sebastian Falbesoner)

Pull request description:

  Follow-up PR for #18533 -- another small step towards getting rid of the confusing "command" terminology. Also see PR #18610 which tackled the functional tests.

ACKs for top commit:
  MarcoFalke:
    ACK 51e9393c1f6c9eaac554f821f5327f63bd09c8cf

Tree-SHA512: bb6f05a7be6823d5c4eab1d05b31fee944e700946827ad9425d59a3957fd879776c88c606319cbe9832d9451b275baedf913b71429ea3e01e4e82bf2d419e819
2024-03-06 02:00:38 +07:00
Wladimir J. van der Laan
a89bd562fd
Merge #19657: test: Wait until is_connected in add_p2p_connection
fa4dfd215f62e88d668311701735c332c264fa2a test: Wait until is_connected in add_p2p_connection (MarcoFalke)

Pull request description:

  Moving the wait_until from the individual test scripts to the test framework simplifies two tests

ACKs for top commit:
  jnewbery:
    Code review ACK fa4dfd215f62e88d668311701735c332c264fa2a
  theStack:
    ACK fa4dfd215f 

Tree-SHA512: 36eda7eb323614a4c4f9215f1d7b40b9f9c4036d1c08eb701ea705f3e2986fdabd2fc558965a6aadabeed861034aeaeef3c00f968ca17ed7a27e42e506cda87d
2024-03-06 02:00:38 +07:00
MarcoFalke
a11743f009
Merge #19489: test: Fail wait_until early if connection is lost
faa9a74c9e99eb43ba0d27fa906767ee88011aeb test: Fail wait_until early if connection is lost (MarcoFalke)

Pull request description:

  Calling `minonode.wait_until` needs a connection to make progress (e.g. waiting for an inv), unless the mininode waits for the initial connection or for a disconnection. So for test development and failure debugging, fail early in all `wait_until`, unless opted out.

ACKs for top commit:
  jnewbery:
    Code review ACK faa9a74c9e99eb43ba0d27fa906767ee88011aeb.

Tree-SHA512: 4be850b96e23b87bc2ff42c028a5045d6f5cdbc9482ce6a6ba01cc5eb26710dab9e2ed547c363aac4bd5825151ee9996fb797261420b631bceeddbfa698d1dec
2024-03-06 02:00:37 +07:00
MarcoFalke
ad3f424b4d
partial Merge #18638: net: Use mockable time for ping/pong, add tests
fa3365430c5fb57d7c0b5f2bce9fbbe290be93c3 net: Use mockable time for ping/pong, add tests (MarcoFalke)
faab4aaf2fa1153c6d76efc8113fa01b06943ece util: Add count_microseconds helper (MarcoFalke)

Pull request description:

  Switch `CNode::m_ping_start` and `CNetMessage::m_time` to mockable time, so that tests can be added.

  Mockable time is also type-safe, since it uses `std::chrono`

ACKs for top commit:
  jonatack:
    Code review re-ACK fa33654 re-read code, verified rebase per `git range-diff 4b5c919 fa94d6f fa33654`, previous tested ACKs still valid
  troygiorshev:
    ACK fa3365430c5fb57d7c0b5f2bce9fbbe290be93c3

Tree-SHA512: 7d632bd6019ce7c882029e71b667a61517e783af82755a85dd979ef09380934e172dec8b8f91d57b200a30a6e096aeaf01f19fee7f3aed0e0e871c72eb44d70e
2024-03-06 02:00:30 +07:00
pasta
2616454c22
Merge #5925: chore: merge master back into develop
0737d7e8db chore: set IS_RELEASE to true (pasta)

Pull request description:

  ## Issue being fixed or feature implemented
  No-diff merge master back into develop

  ## What was done?
  `git checkout develop && git merge master --no-commit` then `git reset` to suppress changes and finally `git commit -m "Merge branch 'master' into develop" --allow-empty`

  ## How Has This Been Tested?

  ## Breaking Changes

  ## 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
  - [x] I have assigned this pull request to a milestone

Top commit has no ACKs.

Tree-SHA512: 8f80bee5d42ee9adc8de2091f2ab6095d4c7cca1e98e856731be5e11c01507fbb944dcb22fa8a19462be11e3f20e19df36784258fb472d9063bc06829d5fb392
2024-03-05 12:40:22 -06:00
pasta
5b03156f36
Merge branch 'master' into develop 2024-03-05 12:15:23 -06:00
pasta
47a8f75c16
Merge #5922: chore: bump version to v21.0.0; allow breaking changes from here out
ef8c951eb0 chore: bump version to v21.0.0; allow breaking changes from here out (pasta)

Pull request description:

  ## Issue being fixed or feature implemented
  Now that v20.1 has been branched; bump to v21; allow us to start merging in breaking changes

  ## What was done?
  Bumped version

  ## How Has This Been Tested?

  ## Breaking Changes

  ## Checklist:
    _Go over all the following points, and put an `x` in all the boxes that apply._
  - [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
  - [x] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_

Top commit has no ACKs.

Tree-SHA512: 8f80bee5d42ee9adc8de2091f2ab6095d4c7cca1e98e856731be5e11c01507fbb944dcb22fa8a19462be11e3f20e19df36784258fb472d9063bc06829d5fb392
2024-03-05 12:09:39 -06:00
pasta
ef8c951eb0
chore: bump version to v21.0.0; allow breaking changes from here out 2024-03-05 12:09:15 -06:00
pasta
f41a113263
Merge #5916: backport: trivial 2024 03 01
2018b459cc Merge bitcoin-core/gui#683: doc: Drop no longer relevant comment (Hennadii Stepanov)
5d666eba1b Merge bitcoin/bitcoin#25548: gui: Check for readlink buffer overflow and handle gracefully (fanquake)
76b31fcf60 Merge bitcoin/bitcoin#26377: test: Make `system_tests/run_command` test locale and platform agnostic (MacroFake)
462498a365 Merge bitcoin/bitcoin#26394: Fix typo in comment SHA256->SHA512 (glozow)
e308de0dac Merge bitcoin/bitcoin#26206: test: check importing wallets when blocks are pruned throw an error (MacroFake)
d509165193 Merge bitcoin/bitcoin#24467: doc: minor improvements in getutxos REST endpoint synopsis (fanquake)
c70aa4218e Merge bitcoin/bitcoin#26188: test: silence TSAN false positive in coinstatsindex_initial_sync (fanquake)
1c66022e18 Merge bitcoin/bitcoin#25322: build: Fix `capnp` package build for Android (fanquake)
ee44732376 Merge bitcoin/bitcoin#26284: Fix comment typos (MacroFake)
f9b526bd31 Merge bitcoin/bitcoin#26209: Update leveldb subtree (fanquake)
233429a784 Merge bitcoin/bitcoin#24084: doc: add information about status code 404 for some endpoints (rest) (fanquake)

Pull request description:

  ## Issue being fixed or feature implemented
  Trivial backports

  ## What was done?
    _Describe your changes in detail_

  ## How Has This Been Tested?
  Haven't; waiting for CI

  ## Breaking Changes
    _Please describe any breaking changes your code introduces_

  ## 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
  - [ ] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_

Top commit has no ACKs.

Tree-SHA512: 8a8cea121fe4f89dc72176f15aee728f913e7d6dba01182e6da7568bda775ed6005346cb481478a62880b39caff82b6e242d0282ff95eb73cfad21c7c7c4f445
2024-03-05 10:48:00 -06:00
Hennadii Stepanov
2018b459cc
Merge bitcoin-core/gui#683: doc: Drop no longer relevant comment
5d332da2cfdc67d69a165119c6ff598e29b28afa doc: Drop no longer relevant comment (Hennadii Stepanov)

Pull request description:

  The comment was introduced in 4cf3411056, and since 7e4bd19785ff9120b7242ff9f15231868aaf7db4 it has been no longer relevant.

ACKs for top commit:
  jarolrod:
    ACK 5d332da2cfdc67d69a165119c6ff598e29b28afa

Tree-SHA512: 6d32561336993b1ff7d7c524d090ac52aefb40078ed706ca4c6d5026cc3f63244c49c0e00e45ff192ba0e9f1527faf63249aa18bc8aa677b9e053d387e0f4027
2024-03-05 10:40:38 -06:00
fanquake
5d666eba1b
Merge bitcoin/bitcoin#25548: gui: Check for readlink buffer overflow and handle gracefully
e049fd76f0d57c1e6400fbfbaf4cc6ebe540f16f Bugfix: Check for readlink buffer overflow and handle gracefully (Luke Dashjr)

Pull request description:

  If readlink returns the size of the buffer, an overflow may have (safely) occurred.
  Pass a buffer size of MAX_PATH+1 (the size of the actual buffer) to detect this scenario.

ACKs for top commit:
  hebasto:
    ACK e049fd76f0d57c1e6400fbfbaf4cc6ebe540f16f.

Tree-SHA512: 188bace79cbe556efe7782e46b870c02729b07b104a9316b0f7d50013504972e85baf507403d2d6060bb2bf3e13f40d735bddd18255d97a60810208c3de87691
2024-03-05 10:40:38 -06:00
MacroFake
76b31fcf60
Merge bitcoin/bitcoin#26377: test: Make system_tests/run_command test locale and platform agnostic
884304e6c6a250719a64752fe52d1283cd5e36ab test: Make `system_tests/run_command` locale agnostic (Hennadii Stepanov)

Pull request description:

  Fixes bitcoin/bitcoin#26368.

ACKs for top commit:
  Sjors:
    tACK 884304e6c6a250719a64752fe52d1283cd5e36ab

Tree-SHA512: 76d4941e02b3b119dcf4dacbe60ef45a9dc8cf775bdb31b5291cd8147665285d41caaf1f5688abdfc9a47c393ddb535af7b11af839660d30ef30f1ca0d936133
2024-03-05 10:40:38 -06:00
glozow
462498a365
Merge bitcoin/bitcoin#26394: Fix typo in comment SHA256->SHA512
0cc23fc60374512b3c4be888d98a7dbdd3a0c931 Fix typo in comment SHA256->SHA512 (Elichai Turkel)

Pull request description:

  The comment says it's the SHA-256 state, while it's actually the SHA-512 state

ACKs for top commit:
  andrewtoth:
    ACK 0cc23fc60374512b3c4be888d98a7dbdd3a0c931
  aureleoules:
    ACK 0cc23fc60374512b3c4be888d98a7dbdd3a0c931

Tree-SHA512: 4e390ceefb847d3bbe4f5caab390a4fdd14892fe443f58c32b08b3444fccd611cff22938c3dfa611dfd2497736f779fae4165497b4208e48aa8fc9d2236f943b
2024-03-05 10:40:37 -06:00
MacroFake
e308de0dac
Merge bitcoin/bitcoin#26206: test: check importing wallets when blocks are pruned throw an error
4aff7a48a4e0f1075306f181a276b8a74c857022 test: check importing wallets when blocks are pruned throw an error (brunoerg)

Pull request description:

  This PR adds test coverage for the following error:
  437b608df2/src/wallet/rpc/backup.cpp (L513-L518)

ACKs for top commit:
  andrewtoth:
    ACK 4aff7a48a4e0f1075306f181a276b8a74c857022

Tree-SHA512: fbbf6056cb3759f726b8a5ff25fca51bf47e973e5d655ec164e2bec88e2dbd3b243677869d2cf33af268ea635ca0f2e9f737c4734077fc5a936ac3a24ad4b88b
2024-03-05 10:40:37 -06:00