Commit Graph

23940 Commits

Author SHA1 Message Date
Odysseas Gabrielides
6bacf5423b
feat: v20 evonodes payment adjustment (#5493)
## Issue being fixed or feature implemented
Since v19, Evo nodes are paid 4x blocks in a row.
This needs to be reverted when MN Reward Reallocation activates.

## What was done?
Starting from MN Reward Reallocation activation, Evo nodes are paid one
block in a row (like regular masternodes).
In addition, `nConsecutivePayments` isn't incremented anymore for Evo
nodes.

## How Has This Been Tested?
`feature_llmq_hpmn.py` with MN Reward Reallocation activation.

## Breaking Changes
no

## Checklist:
- [x] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [x] 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)_

---------

Co-authored-by: Konstantin Akimov <knstqq@gmail.com>
2023-07-31 23:52:48 -05:00
PastaPastaPasta
413a2b459a
Merge pull request #5517 from UdjinM6/merge_master_19.3.0
chore: Merge master 19.3.0 back into develop
2023-07-31 12:17:24 -05:00
Konstantin Akimov
359de5a696
feat: improve unit test "IsTriviallyValid" (#5516)
## Issue being fixed or feature implemented
It partially resolves issue https://github.com/dashpay/dash/issues/5471

Better unit tests are needed to validate changes in ProTx implementation
such as this PR: https://github.com/dashpay/dash/pull/5463

## What was done?
- Invalid ProTx transactions are checked more strictly. The flag "tx is
failed" is not enough now for test to succeed, but error code should
matched with expected error.
- Duplicated implementations of tests for "valid" and "invalid
transaction" are changed to more general code.
- Added extra log output with tx ID for easier debug - to see which
exactly tx is failed in test
 - Supported more by 256 txes in one json file

## How Has This Been Tested?
Run unit 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
- [x] I have added or updated relevant unit/integration/functional/e2e
tests
- [x] I have made corresponding changes to the documentation
- [x] I have assigned this pull request to a milestone
2023-07-31 12:15:03 -05:00
UdjinM6
e8fe452837
Merge branch 'master' into merge_master_19.3.0 2023-07-31 19:58:19 +03:00
Konstantin Akimov
9bb1b10871
refactor: improved initialization of members of LLMQContext and related changes (#5150)
LLMQContext uses RAII to initialize all members. Ensured that all
members always initialized correctly in proper order if LLMQContext
exists.

BlockAssembler, CChainState use too many agruments and they are making
wrong assumption that members of LLMQContext can be constructed and used
independently, but that's not true. Instead, let's pass LLMQContext
whenever possible.

## Issue being fixed or feature implemented
https://github.com/dashpay/dash-issues/issues/52

## How Has This Been Tested?
Run unit/functional test and introduce no breaking changes.


## Checklist:
- [x] I have performed a self-review of my own code
- [x] I have made corresponding changes to the documentation
- [x] I have assigned this pull request to a milestone
2023-07-29 20:23:02 -05:00
strophy
5c9896e32e
ci: multi-runner guix builds (#5515)
## Issue being fixed or feature implemented
- We want to enable use of the AWS-hosted GitHub Actions runners, now
that [corresponding
infra](https://github.com/dcginfra/tf-aws-gh-runner/pull/8/files#diff-ad98d33884a302f6c747dc6b326c6b3af3887f2ec25e0bd7a0395f10444818f3)
exists to deploy these runners


## What was done?
Add new labels and workflow dispatch button to allow runner testing


## How Has This Been Tested?
Pending testing in CI


## Breaking Changes
None


## Checklist:
- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas
- [x] I have added or updated relevant unit/integration/functional/e2e
tests
- [x] I have made corresponding changes to the documentation
- [ ] I have assigned this pull request to a milestone _(for repository
code-owners and collaborators only)_
2023-07-28 11:43:31 -05:00
PastaPastaPasta
d9a0b32cbf
Merge pull request #5492 from kittywhiskers/assumeutxo4
backport: merge bitcoin#21391, #19550, #15946, #21230, #21252, #21297, #20605, #21575, #22309, #19762 (assumeutxo backports: part 4)
2023-07-28 00:19:28 -05:00
Kittywhiskers Van Gogh
d40f28edb4 merge bitcoin#19762: Allow named and positional arguments to be used together 2023-07-28 00:18:27 -05:00
Kittywhiskers Van Gogh
4e82a960b6 merge bitcoin#22309: Add missing atomic include 2023-07-28 00:18:27 -05:00
Kittywhiskers Van Gogh
b1643e7c86 merge bitcoin#21575: Create blockstorage module 2023-07-28 00:18:27 -05:00
Kittywhiskers Van Gogh
94b706e402 merge bitcoin#20605: Signal-safe instant shutdown 2023-07-28 00:18:27 -05:00
Kittywhiskers Van Gogh
3450cc755c merge bitcoin#21297: feature_blockfilterindex_prune.py improvements 2023-07-28 00:18:27 -05:00
Kittywhiskers Van Gogh
8cf0748bba merge bitcoin#21252: Intermittent issue in feature_blockfilterindex_prune 2023-07-28 00:18:27 -05:00
Kittywhiskers Van Gogh
e30626dca5 merge bitcoin#21230: Fix NODE_NETWORK_LIMITED_MIN_BLOCKS disconnection 2023-07-28 00:18:27 -05:00
Kittywhiskers Van Gogh
6c09b33479 merge bitcoin#15946: Allow maintaining the blockfilterindex when using prune 2023-07-28 00:18:27 -05:00
Kittywhiskers Van Gogh
b8fc743f1f trivial: consistently use context as the argument name for CoreContext 2023-07-28 00:18:27 -05:00
Kittywhiskers Van Gogh
9307a22117 merge bitcoin#19550: Add getindexinfo RPC 2023-07-28 00:18:27 -05:00
Kittywhiskers Van Gogh
77963ba29d rpc: Prune g_chainman usage within Dash-specific RPC modules 2023-07-28 00:18:27 -05:00
Kittywhiskers Van Gogh
60e93cabeb merge bitcoin#21391: Prune g_chainman usage in RPC modules 2023-07-28 00:18:27 -05:00
Kittywhiskers Van Gogh
bbb6815982 fix: resolve cppcheck shadow variable warning
```
src/governance/governance.cpp:558:18: note: Shadow variable
src/governance/governance.cpp:558:18: warning: Local variable '_' shadows outer function [shadowFunction]
```
2023-07-28 00:18:27 -05:00
UdjinM6
b710fe0836
feat: Enable fallbackfee by default on all networks (#5507)
## Issue being fixed or feature implemented
We have plenty of block space. Having `fallbackfee` disabled by default
is needlessly annoying.

## What was done?
Bump `DEFAULT_FALLBACK_FEE` to `1000`, same as it is on `master`
https://github.com/dashpay/dash/blob/master/src/wallet/wallet.h#L68

## How Has This Been Tested?
run tests, send txes on testnet

## Breaking Changes
should be none

## 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 _(for repository
code-owners and collaborators only)_
2023-07-27 18:47:30 +03:00
thephez
54a8c393cc
chore: correct rpc typo in mempoolentry help (#5512)
## Issue being fixed or feature implemented
RPC help for mempoolentry incorrectly called the "instantsend" field
"time". The "instantsend" and "unbroadcast" fields were also in a
different order than the actual response.

## What was done?
Changed "time" -> "instantsend" and flipped order of
"instantsend"/"unbroadcast"

## How Has This Been Tested?
Built and checked locally

## Breaking Changes
N/A


## 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)_
2023-07-27 09:46:19 -05:00
PastaPastaPasta
a884f0c536
Merge pull request #5506 from UdjinM6/backport_19.3_candidates
[v19.x] Backport 19.3 candidates, v19.3.0 release notes and version bump
2023-07-27 09:23:38 -05:00
UdjinM6
1c81bddf1c
chore: Bump version to 19.3 2023-07-26 13:15:14 +03:00
UdjinM6
9158a16098
doc: Add 19.3 release notes 2023-07-26 13:15:14 +03:00
Samuel Dobson
a850f5ff6f
(Partial) Merge #20125: rpc, wallet: Expose database format in getwalletinfo
624bab00dd2cc8e2ebd77dc0a669bc8d507c3721 test: add coverage for getwalletinfo format field (Jon Atack)
5e737a009234cbd7cf53748d3d28a2da5221192f rpc, wallet: Expose database format in getwalletinfo (João Barbosa)

Pull request description:

  Support for sqlite based wallets was added in #19077. This PR adds the `format` key in `getwalletinfo` response, that can be `bdb` or  `sqlite`.

ACKs for top commit:
  jonatack:
    Tested ACK 624bab00dd2cc8e2ebd77dc0a669bc8d507c3721
  laanwj:
    Code review ACK 624bab00dd2cc8e2ebd77dc0a669bc8d507c3721.
  MarcoFalke:
    doesn't hurt ACK 624bab00dd2cc8e2ebd77dc0a669bc8d507c3721
  hebasto:
    ACK 624bab00dd2cc8e2ebd77dc0a669bc8d507c3721, tested on Linux Mint 20 (x86_64).
  meshcollider:
    utACK 624bab00dd2cc8e2ebd77dc0a669bc8d507c3721

Tree-SHA512: a81f8530f040f6381d33e073a65f281993eccfa717424ab6e651c1203cbaf27794dcb7175570459e7fdaa211565bc060d0a3ecbe70d2b6f9c49b8d5071e4441c
2023-07-26 15:40:19 +05:30
fanquake
1ec0e30afb
Merge #19980: refactor: Some wallet cleanups
9b74461fa293453a9eb0b1717b30b3f7fa778d91 refactor: Assert before dereference in CWallet::GetDatabase (João Barbosa)
021feb3187b207d511561c1f0ffd7f9e5e0c9c1d refactor: Drop redudant CWallet::GetDBHandle (João Barbosa)

Pull request description:

ACKs for top commit:
  achow101:
    Code Review ACK 9b74461fa293453a9eb0b1717b30b3f7fa778d91
  meshcollider:
    utACK 9b74461fa293453a9eb0b1717b30b3f7fa778d91
  ryanofsky:
    Code review ACK 9b74461fa293453a9eb0b1717b30b3f7fa778d91. Changes since last review: rebasing due to conflict, dropping wallet path commit c6a5cd7a64c78b162f545a3467d0fea7dcaadfcc as suggested in discussion, making GetDatabase() const in the earlier commit. Giving more descriptive title like

Tree-SHA512: 68cf3b5e9fe0acb3a5cd081086629989f213f1904cc344e5775767b56759a7d905b1e1c303afbe40f172ff81bf07f3719b59d8f6ec2de3fdd53cd0e2d220fb25
2023-07-26 09:37:53 +05:30
MarcoFalke
d5aecb5167
Merge #20425: fuzz: Make CAddrMan fuzzing harness deterministic
17a5f172fa9ec509b1c3f950ee8dfb6f025534d2 fuzz: Make addrman fuzzing harness deterministic (practicalswift)

Pull request description:

  Make `CAddrMan` fuzzing harness deterministic.

  See [`doc/fuzzing.md`](https://github.com/bitcoin/bitcoin/blob/master/doc/fuzzing.md) for information on how to fuzz Bitcoin Core. Don't forget to contribute any coverage increasing inputs you find to the [Bitcoin Core fuzzing corpus repo](https://github.com/bitcoin-core/qa-assets).

  Happy fuzzing :)

ACKs for top commit:
  Crypt-iQ:
    utACK 17a5f172fa9ec509b1c3f950ee8dfb6f025534d2

Tree-SHA512: 725f983745233e9b616782247fa18847e483c074ca4336a5beea8a9009128c3a74b4d50a12662d8ca2177c2e1fc5fc121834df6b459ac0af43c931d77ef7c4d8
2023-07-26 09:37:53 +05:30
MarcoFalke
a9fb349c25
Merge #20497: [Refactor] Add MAX_STANDARD_SCRIPTSIG_SIZE to policy
e416cfc92bf51f6fd088ab61c2306c5e73877dd0 Add MAX_STANDARD_SCRIPTSIG_SIZE to policy (sanket1729)

Pull request description:

  Bitcoin core has a standardness rule for max satisfaction script sig size.
  This PR adds to the policy header file so that it is documented along with
  along policy rules. The initial reasoning that 1650 is an implicit
  limit(would not reach assuming all other policy rules are being
  followed) is outdated.

  As we now know, bitcoin transactions can have spend conditions are more than
  just signatures and there may exist p2sh transactions involving 100 byte
  preimages that maybe non-standard because of this rule. Because this
  rule is no longer implicit, we should explicitly document it in policy
  header file

ACKs for top commit:
  sipa:
    utACK e416cfc92bf51f6fd088ab61c2306c5e73877dd0
  practicalswift:
    cr ACK e416cfc92bf51f6fd088ab61c2306c5e73877dd0
  theStack:
    Code Review ACK e416cfc92bf51f6fd088ab61c2306c5e73877dd0

Tree-SHA512: 1a91ee23dfb6085807e04dd0687d7a443e0f3e0f52d0a995a6599dff28533b0b599afba2724735d93948a64a3e25d0bc016ce3e771c0bd453eef78b22dc2369d
2023-07-26 09:37:53 +05:30
Wladimir J. van der Laan
331991b0d0
Merge #20964: rpc: Add specific error code for "wallet already loaded"
a6739cc86827759c543bf81f5532ec46e40549c3 rpc: Add specific error code for "wallet already loaded" (Wladimir J. van der Laan)

Pull request description:

  Add a separate RPC error code for "wallet already loaded" to avoid having to match on message to detect this.
  Requested by shesek for rust-bitcoinrpc.

  If concept ACKed needs:
  - [ ]  Release note
  - [x]  A functional test (updated the existing test to make it pass, I think this is enough)

ACKs for top commit:
  jonasschnelli:
    Code Review ACK a6739cc86827759c543bf81f5532ec46e40549c3
  promag:
    Code review ACK a6739cc86827759c543bf81f5532ec46e40549c3.

Tree-SHA512: 9091872e6ea148aec733705d6af330f72a02f23b936b892ac28f9023da7430af6332418048adbee6014305b812316391812039e9180f7f3362d11f206c13b7d0
2023-07-26 09:37:52 +05:30
MarcoFalke
720eb7e352
Merge #20971: test: Work around libFuzzer deadlock
fa39c8a3e8f1090103468780d122a4cf4191bc13 test: Work around libFuzzer deadlock (MarcoFalke)

Pull request description:

  Only required part is `symbolize=0`, but the other changes shouldn't hurt

ACKs for top commit:
  practicalswift:
    cr ACK fa39c8a3e8f1090103468780d122a4cf4191bc13: patch looks correct

Tree-SHA512: 9cddf1de46ad12aea9b8be2c1acb86ba0e07ffdb52f8155d943edf970955551c7cb049a3a6c027846b45dab0dc0966dec42999476ebde50aa761a08dbb751eae
2023-07-26 09:37:52 +05:30
MarcoFalke
8db2aabee0
Merge bitcoin/bitcoin#21989: test: Use COINBASE_MATURITY in functional tests
bfa9309ad606102f24c9bd3c33dfe78949f09418 Use COINBASE_MATURITY constant in functional tests. (Kiminuo)
525448df9dc2ab6b7e960ff138956ae3e2efdf60 Move COINBASE_MATURITY from `feature_nulldummy` test to `blocktools`. (Kiminuo)

Pull request description:

  `COINBASE_MATURITY` constant was added to `feature_nulldummy` test in #21373. This PR moves the constant to `blocktools.py` file and uses the constant in more tests as suggested [here](https://github.com/bitcoin/bitcoin/pull/21373#discussion_r605418462).

  Edit: Goal of this PR is to replace integer constants with `COINBASE_MATURITY` but not necessarily in *all* cases because that would mean to read and fully understand all tests. That's out of my time constraints. Any reports where `COINBASE_MATURITY` should be used are welcome though!

ACKs for top commit:
  theStack:
    ACK bfa9309ad606102f24c9bd3c33dfe78949f09418 🌇

Tree-SHA512: 01f04645f05a39028681f355cf3d42dd63ea3303f76d93c430e0fdce441934358a2d847a54e6068d61932f1b75e1d406f51859b057b3e4b569f7083915cb317f
2023-07-26 09:37:52 +05:30
Wladimir J. van der Laan
84fb354c1b
Merge #20575: Do not run functions with necessary side-effects in assert()
5021810650afc3073c2af6953ff046ad4d27a1fc Make CanFlushToDisk a const member function (practicalswift)
281cf995547f7683a9e9186bc6384a9fb6035d10 Do not run functions with necessary side-effects in assert() (practicalswift)

Pull request description:

  Do not run functions with necessary side-effects in `assert()`.

ACKs for top commit:
  laanwj:
    Code review ACK 5021810650afc3073c2af6953ff046ad4d27a1fc
  sipa:
    utACK 5021810650afc3073c2af6953ff046ad4d27a1fc
  theStack:
    Code Review ACK 5021810650afc3073c2af6953ff046ad4d27a1fc 🟢

Tree-SHA512: 38b7faccc2f16a499f9b7b1b962b49eb58580b2a2bbf63ea49dcc418a5ecc8f21a0972fa953f66db9509c7239af67cfa2f9266423fd220963d091034d7332b96
2023-07-26 09:37:51 +05:30
MarcoFalke
f13be5085b
Merge #21713: Refactor ProcessNewBlock to reduce code duplication
9a0653553a0ec403b4e7c6713466e0c7fa10ec94 Refactor ProcessNewBlock to reduce code duplication (R E Broadley)

Pull request description:

  There are probably a few issues with this code (maybe there's even a reason this code is duplicated as it currently is), so apologies in advance that I'm still a little (maybe very) bad with C++

ACKs for top commit:
  MarcoFalke:
    ACK 9a0653553a0ec403b4e7c6713466e0c7fa10ec94 💻
  promag:
    Code review ACK 9a0653553a0ec403b4e7c6713466e0c7fa10ec94.
  theStack:
    Code-review ACK 9a0653553a0ec403b4e7c6713466e0c7fa10ec94 🌴

Tree-SHA512: f8634ffad4b2370204d1a0945db4e27248b9e579d9912784da432b8ee3303cae424fa9f7500000dcfb31e6d29d04a8f7d322d17a6fe3d4adaddd10c539458a8c
2023-07-26 09:37:51 +05:30
MarcoFalke
e649229046
Merge #20023: test: remove unused constants in functional tests
92e28fa8b2590cce0e8f0adadae80e46cb63a9ef test: remove unused constants in functional tests (Sebastian Falbesoner)

Pull request description:

  This mini-PR gets rid of constants in functional tests that are not used anymore. Found by [vulture ](https://pypi.org/project/vulture/)via the following script that has been lying around here locally for quite some time (I think it was once proposed by practicalswift, but I don't remember the concrete topic/PR):
  ```
  #!/bin/sh
  for F in $(git ls-files -- "*.py"); do vulture "$F" | grep "unused variable"; done
  ```

ACKs for top commit:
  practicalswift:
    ACK 92e28fa8b2590cce0e8f0adadae80e46cb63a9ef: patch looks correct.

Tree-SHA512: 16516abc8014207bcefdf0545dffaecff1fbba66f45b54c02371dcfd1f18194855c6b72598c11b5407009561eafe8048d47af3471f0efb1795d52477d5a0232e
2023-07-26 09:37:51 +05:30
UdjinM6
91d0941217
doc: Archive 19.2 release notes 2023-07-25 23:37:26 +03:00
UdjinM6
580f8db73e
partial: feat: bury v19 activation (#5496)
V19 is active on mainnet/testnet now, no need to check activation bits
anymore. This PR also bumps `MinBIP9WarningHeight` to
post-v19-activation height which should stop `unknown new rules
activated (versionbit 8)` warning from appearing.

Bury v19, bump `MinBIP9WarningHeight`

Run tests, reindex on mainnet/testnet.

n/a

- [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)_
2023-07-25 22:52:52 +03:00
Konstantin Akimov
42dcb3ddca
fix!: making MnEhfTx to comply DIP-0023 (#5505)
## Issue being fixed or feature implemented
Current implementation of MnEhfTx is not matched with DIP-0023, this PR
fixes it. It is a prior work for
https://github.com/dashpay/dash/pull/5469

## What was done?
- requestID is fixed from `clsig{quorumHeight}` to `mnhf{versionBit}` +
fixes for signature validation properly
 - v20 is minimal height to accept MnEHF special transactions
- versionBit is not BLS version - removed unrelated wrong code and
validations
- TxMempool will accept MnEHF transaction even if inputs/outputs are
zeroes and no fee
- implemented python's serialization/deserialization of MnEHF
transactions for future using in functional tests
 

## How Has This Been Tested?
Run functional/unit tests. Beside that there's new functional test in
https://github.com/dashpay/dash/pull/5469 that actually test format of
transaction and signature validation - to be merged later.

## Breaking Changes
Payload of MnEhf tx is changed, related consensus rules are changed.


## Checklist:
- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas
- [x] I have added or updated relevant unit/integration/functional/e2e
tests
- [x] I have made corresponding changes to the documentation
- [x] I have assigned this pull request to a milestone
2023-07-25 21:46:55 +03:00
Odysseas Gabrielides
c96edec318
chore: Added missing sources files in CMake (#5503)
## Issue being fixed or feature implemented
Added missing sources files (index, interfaces, node, logging, util) in
CMake so they can be indexed by IDE.

## What was done?

## 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 _(for repository
code-owners and collaborators only)_
2023-07-25 12:23:56 -05:00
Odysseas Gabrielides
9d89de2898
feat: Check if settings file is empty (#5504)
## Issue being fixed or feature implemented
Fixes issue #5497.

## What was done?
Checks if settings file is empty, and deletes it if that's the case.

It will will be generated with default value `{}` afterwards.

## How Has This Been Tested?
Running Dash Qt on regtest masternode with `--nocleanup` and
`./src/qt/dash-qt --regtest --datadir=`

## Breaking Changes
No

## 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 _(for repository
code-owners and collaborators only)_
2023-07-25 19:14:49 +03:00
UdjinM6
66ef7943f5
fix: Process dsq messages even when CJ is disabled locally or disk space is low (#5498)
Refusing to process `dsq` will result in node not being able to process
`dstx`es later.

n/a

- [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)_
2023-07-25 19:14:46 +03:00
UdjinM6
b7ef43f9dd
fix: start client-side CoinJoin scheduler even when CoinJoin is disabled (#5476)
`IsEnabled()` is checked inside anyway. Not starting the scheduler on
init results in no mixing on nodes with dynamically loaded wallets.

- [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)_
2023-07-25 19:07:53 +03:00
UdjinM6
5b2541b1ff
Merge pull request #5466 from UdjinM6/dashbls_1.3.0
chore: bump `dashbls` subtree to 1.3.0
2023-07-25 19:06:55 +03:00
UdjinM6
804030c56f
fix: Fix trivial validation typo and test (#5465)
`GetVersion` expects `is_basic_scheme_active`, not
`is_bls_legacy_scheme`

see commits

`make check`

luckily only tests are affected

- [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)_
2023-07-25 19:06:42 +03:00
UdjinM6
2c2f81675e
feat(wallet): TopUpKeyPool improvements (#5456)
- make progress calculations sane
- show progress in GUI but only when you need 100+ new keys
- make it stop on shutdown request
- spam less in debug.log

run tests, run `keypoolrefill` with `1100` (add 100 keys, no gui popup)
and `10000` (100+ keys, progress bar) on testnet wallet, check logs,
verify it can be interrupted on shutdown

n/a

- [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)_
2023-07-25 19:02:47 +03:00
UdjinM6
8ef7002679
fix(rpc): Improve upgradetohd (#5455)
Allow `upgradetohd` in IBD, better errors, no GUI lock-up

Pls see individual commits. Most of it is changes in whitespaces, might
want to use ?w=1 to review i.e.
https://github.com/dashpay/dash/pull/5455/files?w=1

run tests, try `upgradetohd` on testnet

n/a

- [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)_
2023-07-25 19:01:36 +03:00
UdjinM6
27e68397d0
fix: Allow tx index to catch up with the block index in TestChainSetup dtor (#5454)
## Issue being fixed or feature implemented
TL;DR: Should hopefully fix crashes like
https://gitlab.com/dashpay/dash/-/jobs/4522256293

In dashd we flush all callbacks first and then destroy `g_txindex`. In
tests we had to move `g_txindex` to `TestChainSetup` and its dtor is
executed first, so the order is broken. It also explains why this crash
happens so rare. In most cases tx index is up to date and you need some
kind of a hiccup for scheduler to lag behind a bit. Basically, between
`g_txindex.reset()` and `FlushBackgroundCallbacks`
`BaseIndex::BlockConnected` finally arrives. But it’s processed on a
(now) null instance hence a crash. If it’s earlier - it’s processed
normally, if it’s later - it’s flushed without execution, so there is a
tiny window to catch this crash.

## What was done?
Give tx index a bit of time to process everything

## How Has This Been Tested?
run tests (but this crash is rare 🤷‍♂️ )

## 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 _(for repository
code-owners and collaborators only)_
2023-07-25 18:54:49 +03:00
UdjinM6
f3dc889e93
feat(qt): refresh the whole wallet instead of processing individual updates for huge notification queues (#5453)
## Issue being fixed or feature implemented
It's super slow for wallets with 100.000s of txes to process lots of
notifications produced by rescan. Skip them all and simply refresh the
whole wallet instead. In my case (500k+ txes testnet wallet) gui update
after `rescanblockchain` time is down from _forever_ to ~30 seconds.
Same for `wipewallettxes true` (#5451 ). Gui update after
`wipewallettxes`/`wipewallettxes false` is instant (cause there are no
txes anymore) vs _forever_ before the patch.


## What was done?
refresh the whole wallet when notification queue is above 10K operations

actual changes (ignoring whitespaces):
d013cb4f5c

## How Has This Been Tested?
running on top of #5451 and #5452 , wiping and rescanning w/ and w/out
this patch.

## Breaking Changes
should be none


## 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 _(for repository
code-owners and collaborators only)_
2023-07-25 18:54:39 +03:00
UdjinM6
ff60d10934
feat: introduce wipewallettxes RPC and wipetxes command for dash-wallet tool (#5451)
## Issue being fixed or feature implemented
Given the hard fork that happened on testnet, there is now lots of the
transactions that were made on the fork that is no longer valid. Some
transactions could be relayed and mined again but some like coinjoin
mixing won't be relayed because of 0 fee and transactions spending
coinbases from the forked branch are no longer valid at all.

## What was done?
Introduce `wipewallettxes` RPC and `wipetxes` command for `dash-wallet`
tool to be able to get rid of some/all txes in the wallet.

## How Has This Been Tested?
run tests, use rpc/command on testnet wallet

## 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 _(for repository
code-owners and collaborators only)_
2023-07-25 18:54:26 +03:00
Odysseas Gabrielides
49e024338a
feat(rpc): Ability to filter HPMNs in masternodelist and protx list rpcs (#5447)
## Issue being fixed or feature implemented
Added the filter `hpmn` for both `masternodelist` and `protx list` rpcs.

## What was done?

## How Has This Been Tested?

Calling this RPC on Testnet.

## 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
- [x] 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)_

---------

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2023-07-25 18:54:16 +03:00