Compare commits

..

4 Commits

Author SHA1 Message Date
PastaPastaPasta
4579374efd
Merge a04d178a31 into ad7a373529 2024-12-19 22:22:51 +00:00
pasta
ad7a373529
Merge #6498: docs: fixes for Release Notes v22.0.0 and v21.0.0
Some checks failed
Label Merge Conflicts / main (push) Failing after 11s
Guix Build / build-image (push) Failing after 1m30s
Guix Build / build (aarch64-linux-gnu) (push) Has been skipped
Guix Build / build (arm-linux-gnueabihf) (push) Has been skipped
Guix Build / build (arm64-apple-darwin) (push) Has been skipped
Guix Build / build (powerpc64-linux-gnu) (push) Has been skipped
Guix Build / build (riscv64-linux-gnu) (push) Has been skipped
Guix Build / build (x86_64-apple-darwin) (push) Has been skipped
Guix Build / build (x86_64-linux-gnu) (push) Has been skipped
Guix Build / build (x86_64-w64-mingw32) (push) Has been skipped
Check Merge Fast-Forward Only / check_merge (push) Successful in 1m21s
CI / Build Image (push) Failing after 2m3s
CI / Build Dependencies (arm-linux, arm-linux-gnueabihf) (push) Has been skipped
CI / Build Dependencies (linux64, x86_64-pc-linux-gnu) (push) Has been skipped
CI / Build (arm-linux, arm-linux, arm-linux-gnueabihf) (push) Has been skipped
CI / Build (linux64, linux64, x86_64-pc-linux-gnu) (push) Has been skipped
CI / Build (linux64_cxx20, linux64, x86_64-pc-linux-gnu) (push) Has been skipped
CI / Build (linux64_fuzz, linux64, x86_64-pc-linux-gnu) (push) Has been skipped
CI / Build (linux64_nowallet, linux64, x86_64-pc-linux-gnu) (push) Has been skipped
CI / Build (linux64_sqlite, linux64, x86_64-pc-linux-gnu) (push) Has been skipped
CI / Build (linux64_tsan, linux64, x86_64-pc-linux-gnu) (push) Has been skipped
CI / Build (linux64_ubsan, linux64, x86_64-pc-linux-gnu) (push) Has been skipped
d75ee3a9e1 docs: fixes for Release Notes v22.0.0 and v21.0.0 (Konstantin Akimov)

Pull request description:

  ## Issue being fixed or feature implemented
  I noticed that we announced in current release new RPC `quorum platformsign` which has been actually released with v21.
  Though, in release notes for v21 it has a wrong name.

  ## What was done?
  Removed `quorum platformsign` from v22 release notes; fixed name in v21.
  Also mentioned build for Freebsd and minor typo `s/MN_R/MN_RR/` with name of forks on regtest.

  ## How Has This Been Tested?
  N/A

  ## 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

ACKs for top commit:
  UdjinM6:
    utACK d75ee3a9e1

Tree-SHA512: 2d2309e81607c25a512577c96f15ee36b04b585c5751dc1500f2b432d90fc19e70f1b72cf1f7bf843abf854b7869481765902c7c61e9ea7e21b087a126c49a99
2024-12-19 16:22:31 -06:00
pasta
a04d178a31
perf: use unordered_set / unordered_map where order isn't relevant
Did a few quickbench to ensure there isn't some advantage to using the "worse" data structure at small sizes.
set: https://quick-bench.com/q/ApPAGguzG2F9AnqM2GkgDAXCzX4
map: https://quick-bench.com/q/PXDdF0HVGpiSmC9Hh5FUSTp0uJU

Using unordered_map did show a tiny insertion regression for ~expected sizes on masternodes, but it appears that only 1 access will compensate for that overhead, and each su,

some perf results I have are here, show that this std::set usage is causing an imo unacceptably high cpu usage.
```
-    9.18%     0.00%  d-mncon      dashd                [.] CConnman::ThreadOpenMasternodeConnections(CDeterministicMNManager&, CMasternodeMetaMan&, CMasternodeSync&)::{lambda()#▒
   - CConnman::ThreadOpenMasternodeConnections(CDeterministicMNManager&, CMasternodeMetaMan&, CMasternodeSync&)::{lambda()#1}::operator()() const                                 ▒
      + 6.16% CConnman::IsMasternodeOrDisconnectRequested(CService const&)                                                                                                        ▒
      - 2.66% std::set<CService, std::less<CService>, std::allocator<CService> >::count(CService const&) const                                                                    ▒
         - std::_Rb_tree<CService, CService, std::_Identity<CService>, std::less<CService>, std::allocator<CService> >::find(CService const&) const                               ▒
            - 2.02% std::_Rb_tree<CService, CService, std::_Identity<CService>, std::less<CService>, std::allocator<CService> >::_M_lower_bound(std::_Rb_tree_node<CService> const▒
               + 1.99% std::less<CService>::operator()(CService const&, CService const&) const                                                                                    ▒
            + 0.62% std::less<CService>::operator()(CService const&, CService const&) const
```
2024-12-19 16:20:35 -06:00
Konstantin Akimov
d75ee3a9e1
docs: fixes for Release Notes v22.0.0 and v21.0.0
platformsign has been released in v21 and name there is wrong: platformsign vs signplatform
2024-12-19 21:22:09 +07:00
5 changed files with 24 additions and 16 deletions

View File

@ -86,10 +86,10 @@ likely require a reindex.
- **glibc Requirement**
- The minimum required glibc to run Dash Core is now **2.31**. This means that **RHEL 8** and **Ubuntu 18.04 (Bionic)** are no longer supported.
## New RPCs
- **FreeBSD Improvements**
- Fixed issues with building Dash Core on FreeBSD.
- **`quorum platformsign`**
- A new subcommand has been introduced, offering a structured way to perform platform-related quorum signing operations.
## New RPCs
- **`coinjoinsalt`**
- Allows manipulation of a CoinJoin salt stored in a wallet.
@ -153,7 +153,7 @@ likely require a reindex.
## Devnet Breaking Changes
- **Hardfork Activation Changes**
- `BRR` (`realloc`), `DIP0020`, `DIP0024`, `V19`, `V20`, and `MN_R` hardforks are now activated at **block 2** instead of block **300** on devnets.
- `BRR` (`realloc`), `DIP0020`, `DIP0024`, `V19`, `V20`, and `MN_RR` hardforks are now activated at **block 2** instead of block **300** on devnets.
- **Implications:**
- Breaking change.
- Inability to sync on devnets created with earlier Dash Core versions and vice versa.

View File

@ -235,7 +235,7 @@ Remote Procedure Calls (RPCs)
support for coin selection and a custom fee rate. The `send` RPC is experimental
and may change in subsequent releases. Using it is encouraged once it's no
longer experimental: `sendmany` and `sendtoaddress` may be deprecated in a future release.
- A new `quorum signplatform` RPC is added for Platform needs. This composite command limits Platform to only request signatures from the Platform quorum type. It is equivalent to `quorum sign <platform type>`.
- A new `quorum platformsign` RPC is added for Platform needs. This composite command limits Platform to only request signatures from the Platform quorum type. It is equivalent to `quorum sign <platform type>`.
### RPC changes
- `createwallet` has an updated argument list: `createwallet "wallet_name" ( disable_private_keys blank "passphrase" avoid_reuse descriptors load_on_startup )`

View File

@ -11,9 +11,9 @@
#include <bls/bls.h>
#include <bls/bls_ies.h>
#include <bls/bls_worker.h>
#include <saltedhasher.h>
#include <sync.h>
#include <util/underlying.h>
#include <saltedhasher.h>
#include <optional>
#include <unordered_set>

View File

@ -653,7 +653,8 @@ uint256 DeterministicOutboundConnection(const uint256& proTxHash1, const uint256
return proTxHash2;
}
std::unordered_set<uint256, StaticSaltedHasher> GetQuorumConnections(const Consensus::LLMQParams& llmqParams, CDeterministicMNManager& dmnman, const CSporkManager& sporkman,
std::unordered_set<uint256, StaticSaltedHasher> GetQuorumConnections(
const Consensus::LLMQParams& llmqParams, CDeterministicMNManager& dmnman, const CSporkManager& sporkman,
gsl::not_null<const CBlockIndex*> pQuorumBaseBlockIndex, const uint256& forMember, bool onlyOutbound)
{
if (IsAllMembersConnectedEnabled(llmqParams.type, sporkman)) {
@ -677,7 +678,9 @@ std::unordered_set<uint256, StaticSaltedHasher> GetQuorumConnections(const Conse
return GetQuorumRelayMembers(llmqParams, dmnman, pQuorumBaseBlockIndex, forMember, onlyOutbound);
}
std::unordered_set<uint256, StaticSaltedHasher> GetQuorumRelayMembers(const Consensus::LLMQParams& llmqParams, CDeterministicMNManager& dmnman, gsl::not_null<const CBlockIndex*> pQuorumBaseBlockIndex,
std::unordered_set<uint256, StaticSaltedHasher> GetQuorumRelayMembers(const Consensus::LLMQParams& llmqParams,
CDeterministicMNManager& dmnman,
gsl::not_null<const CBlockIndex*> pQuorumBaseBlockIndex,
const uint256& forMember, bool onlyOutbound)
{
auto mns = GetAllQuorumMembers(llmqParams.type, dmnman, pQuorumBaseBlockIndex);

View File

@ -5,16 +5,16 @@
#ifndef BITCOIN_LLMQ_UTILS_H
#define BITCOIN_LLMQ_UTILS_H
#include <llmq/params.h>
#include <sync.h>
#include <gsl/pointers.h>
#include <uint256.h>
#include <llmq/params.h>
#include <saltedhasher.h>
#include <sync.h>
#include <uint256.h>
#include <map>
#include <set>
#include <vector>
#include <unordered_set>
#include <vector>
class CConnman;
class CBlockIndex;
@ -36,8 +36,13 @@ namespace utils
std::vector<CDeterministicMNCPtr> GetAllQuorumMembers(Consensus::LLMQType llmqType, CDeterministicMNManager& dmnman, gsl::not_null<const CBlockIndex*> pQuorumBaseBlockIndex, bool reset_cache = false);
uint256 DeterministicOutboundConnection(const uint256& proTxHash1, const uint256& proTxHash2);
std::unordered_set<uint256, StaticSaltedHasher> GetQuorumConnections(const Consensus::LLMQParams& llmqParams, CDeterministicMNManager& dmnman, const CSporkManager& sporkman, gsl::not_null<const CBlockIndex*> pQuorumBaseBlockIndex, const uint256& forMember, bool onlyOutbound);
std::unordered_set<uint256, StaticSaltedHasher> GetQuorumRelayMembers(const Consensus::LLMQParams& llmqParams, CDeterministicMNManager& dmnman, gsl::not_null<const CBlockIndex*> pQuorumBaseBlockIndex, const uint256& forMember, bool onlyOutbound);
std::unordered_set<uint256, StaticSaltedHasher> GetQuorumConnections(
const Consensus::LLMQParams& llmqParams, CDeterministicMNManager& dmnman, const CSporkManager& sporkman,
gsl::not_null<const CBlockIndex*> pQuorumBaseBlockIndex, const uint256& forMember, bool onlyOutbound);
std::unordered_set<uint256, StaticSaltedHasher> GetQuorumRelayMembers(const Consensus::LLMQParams& llmqParams,
CDeterministicMNManager& dmnman,
gsl::not_null<const CBlockIndex*> pQuorumBaseBlockIndex,
const uint256& forMember, bool onlyOutbound);
std::set<size_t> CalcDeterministicWatchConnections(Consensus::LLMQType llmqType, gsl::not_null<const CBlockIndex*> pQuorumBaseBlockIndex, size_t memberCount, size_t connectionCount);
bool EnsureQuorumConnections(const Consensus::LLMQParams& llmqParams, CConnman& connman, CDeterministicMNManager& dmnman, const CSporkManager& sporkman,