Commit Graph

23029 Commits

Author SHA1 Message Date
Kittywhiskers Van Gogh
4a5dd420cf test: set default wallet name for sqlite and pass-through build type
implements portions of 6f36242389bd3e7eacf594ce90491e8ccca70f3a and adds missing changes from c4a29d0a90b821c443c10891d9326c534d15cf97
2023-02-17 14:21:19 -06:00
Kittywhiskers Van Gogh
aaa7ffc1b1 merge bitcoin#20458: add is_bdb_compiled helper 2023-02-17 14:21:19 -06:00
Kittywhiskers Van Gogh
33ae65f2fd partial #20262: skip --descriptor tests if sqlite is not compiled
doesn't include logic for descriptor wallets as they haven't been implemented yet
2023-02-17 14:21:19 -06:00
Kittywhiskers Van Gogh
daa40ea8c6 ci: add sqlite-only linux64 test build 2023-02-17 14:21:19 -06:00
Odysseas Gabrielides
0923511c25
feat(llmq): llmq_test_platform threshold adjustment (#5204)
## Issue being fixed or feature implemented

## What was done?
As discussed with Platform team, threshold for `llmq_test_platform`
needed to be 67%. Therefore, the size went from 4 members to 3 (while
keeping threshold to 2)

## 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
- [x] I have added or updated relevant unit/integration/functional/e2e
tests
- [ ] I have made corresponding changes to the documentation

**For repository code-owners and collaborators only**
- [x] I have assigned this pull request to a milestone
2023-02-17 13:20:56 -06:00
Odysseas Gabrielides
a3918451d0
feat(rpc): masternode status and count RPCs adjusted for HPMNs (#5206)
## Issue being fixed or feature implemented

## What was done?
-  `masternode status` now returns the type as well
- `masternode count` now returns in addition total and total enabled MNs
per type.


## How Has This Been Tested?
Added functional tests


## 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
- [x] I have added or updated relevant unit/integration/functional/e2e
tests
- [x] I have made corresponding changes to the documentation

**For repository code-owners and collaborators only**
- [x] I have assigned this pull request to a milestone
2023-02-17 12:29:46 -06:00
UdjinM6
33703a5f2f
fix/tests: fix inconsistencies in getaddressinfo, add tests (#5196)
## Issue being fixed or feature implemented
fixes an issue mentioned
[here](https://github.com/dashpay/dash/pull/5177#pullrequestreview-1293957617)

## What was done?
added missing implementation for `pubkeys`, added help text for
`addresses`, implemented some tests

## How Has This Been Tested?
`./src/test/test_dash -t wallet_tests/rpc_getaddressinfo`

## 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
- [ ] I have made corresponding changes to the documentation

**For repository code-owners and collaborators only**
- [x] I have assigned this pull request to a milestone
2023-02-16 21:39:23 +03:00
Konstantin Akimov
2083380bc3
refactor: introduce enum class for MnType and clean up implementation accordingly (#5200)
## Issue being fixed or feature implemented
expressions like `nType == MnType::HighPerformance.index` look pretty
confusing in current implementation of 4k HPMN.

Changing `uint8_t` index to `enum class MnType : uint8_t` give pros:
- switch inside GetMnType() and any similar code will show a compiler
warning if any type is missing.
- instead "MnType::HighPerformance.index" you can write
MnType::HighPerformance
 - you can remove confusing `.index` from MnType

But also Cons:
- instead `log("%d", nType)` you need to write `log("%d",
static_cast<int>(nType))`;

## What was done?
Introduced new enum class MnType and rewritten generating
Regular/HighPerformance objects with params (description, collateral
amount, etc).

Also were added attributes [[no_discard]] for related code.

## How Has This Been Tested?
Run unit/functional tests

## Breaking Changes
No breaking changes.

## Checklist:
- [x] I have performed a self-review of my own code
- [x] I have assigned this pull request to a milestone

---------

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2023-02-16 14:05:01 +02:00
thephez
919f6306fe
feat(qt): add MN type to MN tab (#5201)
## Issue being fixed or feature implemented
Added a "Type" column on the masternode tab so it's easy to distinguish
between regular and HPMN

## What was done?
Added column with type

## How Has This Been Tested?
Built locally and tried on devnet with an HPMN registered

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

**For repository code-owners and collaborators only**
- [x] I have assigned this pull request to a milestone

---------

Co-authored-by: Odysseas Gabrielides <odysseas.gabrielides@gmail.com>
2023-02-15 22:59:54 +02:00
PastaPastaPasta
50f16bc753
Merge pull request #5169 from knst/bc-bp-mempool
backport:  merge bitcoin#15748, #18541, #19848, #17407 [redo], #14384, #17477, #19826, #19556, #19854  -- deglobalisation of mempool
2023-02-15 00:08:12 -06:00
Wladimir J. van der Laan
7dcdc95613 Merge #19854: Avoid locking CTxMemPool::cs recursively in simple cases
020f0519ec66d9626255b938e1c6c3f7f9aa4017 refactor: CTxMemPool::IsUnbroadcastTx() requires CTxMemPool::cs lock (Hennadii Stepanov)
7c4bd0387a01a0c3e2938d530dba3c882e4d8f2b refactor: CTxMemPool::GetTotalTxSize() requires CTxMemPool::cs lock (Hennadii Stepanov)
fa5fcb032b6ed04c49ee465235288b8059fa805e refactor: CTxMemPool::ClearPrioritisation() requires CTxMemPool::cs lock (Hennadii Stepanov)
7140b31b90cbd84d75eedb3e395d0d55f83b5b95 refactor: CTxMemPool::ApplyDelta() requires CTxMemPool::cs lock (Hennadii Stepanov)
66e47e5e506043fbb9b4e487b44bf992985709c9 refactor: CTxMemPool::UpdateChild() requires CTxMemPool::cs lock (Hennadii Stepanov)
939807768acd508932f2efabee660d56324a73df refactor: CTxMemPool::UpdateParent() requires CTxMemPool::cs lock (Hennadii Stepanov)

Pull request description:

  This is another step to transit `CTxMemPool::cs` from `RecursiveMutex` to `Mutex`.

  Split out from #19306.
  Only trivial thread safety annotations and lock assertions added. No new locks. No behavior change.

  Refactoring `const uint256` to `const uint256&` was [requested](https://github.com/bitcoin/bitcoin/pull/19647#discussion_r468471022) by **promag**.

  Please note that now, since #19668 has been merged, it is safe to apply `AssertLockHeld()` macros as they do not swallow compile time Thread Safety Analysis warnings.

ACKs for top commit:
  promag:
    Core review ACK 020f0519ec66d9626255b938e1c6c3f7f9aa4017.
  jnewbery:
    Code review ACK 020f0519ec66d9626255b938e1c6c3f7f9aa4017
  vasild:
    ACK 020f0519e

Tree-SHA512: a31e389142d5a19b25fef0aaf1072a337278564528b5cc9209df88ae548a31440e1b8dd9bae0169fd7aa59ea06e22fe5e0413955386512b83ef1f3e7d941e890
2023-02-15 00:07:39 -06:00
MarcoFalke
c618e5cdf8 Merge #19556: Remove mempool global
fafb381af8279b2d2ca768df0bf68d7eb036a2f9 Remove mempool global (MarcoFalke)
fa0359c5b30730744aa8a7cd9ffab79ded91041f Remove mempool global from p2p (MarcoFalke)
eeee1104d78eb59a582ee1709ff4ac2c33ee1190 Remove mempool global from init (MarcoFalke)

Pull request description:

  This refactor unlocks some nice potential features, such as, but not limited to:
  * Removing the fee estimates global (would avoid slightly fragile workarounds such as #18766)
  * Making the mempool optional for a "blocksonly" operation mode

  Even absent those features, the new code without the global should be easier to maintain, read and write tests for.

ACKs for top commit:
  jnewbery:
    utACK fafb381af8279b2d2ca768df0bf68d7eb036a2f9
  hebasto:
    ACK fafb381af8279b2d2ca768df0bf68d7eb036a2f9, I have reviewed the code and it looks OK, I agree it can be merged.
  darosior:
    ACK fafb381af8279b2d2ca768df0bf68d7eb036a2f9

Tree-SHA512: a2e696dc377e2e81eaf9c389e6d13dde4a48d81f3538df88f4da502d3012dd61078495140ab5a5854f360a06249fe0e1f6a094c4e006d8b5cc2552a946becf26
2023-02-15 00:07:39 -06:00
MarcoFalke
c7960add55 Merge #19826: Pass mempool reference to chainstate constructor
fa0572d0f3b083b4c8e2e883a66e2b198c6779f1 Pass mempool reference to chainstate constructor (MarcoFalke)

Pull request description:

  Next step toward #19556

  Instead of relying on the mempool global, each chainstate is given a reference to a mempool to keep up to date with the tip (block connections, disconnections, reorgs, ...)

ACKs for top commit:
  promag:
    Code review ACK fa0572d0f3b083b4c8e2e883a66e2b198c6779f1.
  darosior:
    ACK fa0572d0f3b083b4c8e2e883a66e2b198c6779f1
  hebasto:
    ACK fa0572d0f3b083b4c8e2e883a66e2b198c6779f1, reviewed and tested on Linux Mint 20 (x86_64).

Tree-SHA512: 12184d33ae5797438d03efd012a07ba3e4ffa0d817c7a0877743f3d7a7656fe279280c751554fc035ccd0058166153b6c6c308a98b2d6b13998922617ad95c4c
2023-02-15 00:07:39 -06:00
Wladimir J. van der Laan
97b7ecb256 Merge #17477: Remove the mempool's NotifyEntryAdded and NotifyEntryRemoved signals
e57980b4738c10344baf136de3e050a3cb958ca5 [mempool] Remove NotifyEntryAdded and NotifyEntryRemoved callbacks (John Newbery)
2dd561f36124972d2364f941de9c3417c65f05b6 [validation] Remove pool member from ConnectTrace (John Newbery)
969b65f3f527631ede1a31c7855151e5c5d91f8f [validation] Remove NotifyEntryRemoved callback from ConnectTrace (John Newbery)
5613f9842b4000fed088b8cf7b99674c328d15e1 [validation] Remove conflictedTxs from PerBlockConnectTrace (John Newbery)
cdb893443cc16edf974f099b8485e04b3db1b1d7 [validation interface] Remove vtxConflicted from BlockConnected (John Newbery)
1168394d759b13af68acec6d5bfa04aaa24561f8 [wallet] Notify conflicted transactions in TransactionRemovedFromMempool (John Newbery)

Pull request description:

  These boost signals were added in #9371, before we had a `TransactionRemovedFromMempool` method in the validation interface. The `NotifyEntryAdded` callback was used by validation to build a vector of conflicted transactions when connecting a block, which the wallet was notified of in the `BlockConnected` CValidationInterface callback.

  Now that we have a `TransactionRemovedFromMempool` callback, we can fire that signal directly from the mempool for conflicted transactions.

  Note that #9371 was implemented to ensure `-walletnotify` events were fired for these conflicted transaction. We inadvertently stopped sending these notifications in #16624 (Sep 2019 commit 7e89994). We should probably fix that, but in a different PR.

ACKs for top commit:
  jonatack:
    Re-ACK e57980b
  ryanofsky:
    Code review ACK e57980b4738c10344baf136de3e050a3cb958ca5, no code changes since previous review, but helpful new code comments have been added and the PR description is now more clear about where the old code came from

Tree-SHA512: 3bdbaf1ef2731e788462d4756e69c42a1efdcf168691ce1bbfdaa4b7b55ac3c5b1fd4ab7b90bcdec653703600501b4224d252cfc086aef28f9ce0da3b0563a69
2023-02-15 00:07:39 -06:00
Wladimir J. van der Laan
fa57cb9512 Merge #14384: Fire TransactionRemovedFromMempool callbacks from mempool
e20c72f9f076681def325b5b5fa53bccda2b0eab Fire TransactionRemovedFromMempool from mempool (251)

Pull request description:

  This pull request fires TransactionRemovedFromMempool callbacks from the mempool and cleans up a bunch of code.

  It also resolves the `txmempool -> validation -> validationinterface -> txmempool` circular dependency.

  Ideally, `validationinterface` is a dumb component that doesn't have any knowledge of the sub-systems it sends its notifications to. The commit that aims to resolve this circular dependency by moving `txmempool` specific code out of `validationinterface` to `txmempool` where it belongs.

ACKs for top commit:
  jnewbery:
    ACK e20c72f9f076681def325b5b5fa53bccda2b0eab

Tree-SHA512: 354c3ff1113b21a0b511d80d604edfe3846dddae3355e43d1387f68906e54bf5dc01e7c029edc0b8e635b500b2ab97ee50362e2486eb4319f7347ee9a9e6cef3
2023-02-15 00:07:39 -06:00
Konstantin Akimov
88633ca6dc fix: re-run a script from backport bitcoin#17407 2023-02-15 00:07:39 -06:00
MarcoFalke
1503e896b0 Merge #19848: Remove mempool global from interfaces
fa9ee52556f493e4a896e2570ca1a3102d777d9a doc: Add doxygen comment to IsRBFOptIn (MarcoFalke)
faef4fc9b4990e563022b6ab595cb02c4060c216 Remove mempool global from interfaces (MarcoFalke)
fa831684e54783f6b40533ca218eb7636bdae667 refactor: Add IsRBFOptInEmptyMempool (MarcoFalke)

Pull request description:

  The chain interface has an `m_node` member, which has a pointer to the mempool global. Use the pointer instead of the global to prepare the removal of the mempool global. See #19556

ACKs for top commit:
  jnewbery:
    utACK fa9ee52556
  darosior:
    ACK fa9ee52
  hebasto:
    re-ACK fa9ee52556f493e4a896e2570ca1a3102d777d9a, since my [previous](https://github.com/bitcoin/bitcoin/pull/19848#pullrequestreview-482403942) review:

Tree-SHA512: 11b4c1446f0860a743fdaa67f95c52bf0262d0a4f888be0eaf07ee497448965d32be414111bf016bd568f2989cde923430e3a3889e224057b73c499f06de7199
2023-02-15 00:07:39 -06:00
MarcoFalke
a85255ea06 Merge #18541: rpc: Make verifychain default values static, not depend on global args
fad691cafe083743a26f434488990f060ae4ac45 rpc: Make verifychain default values static, not depend on global args (MarcoFalke)

Pull request description:

  This fixes several issues:

  * The documentation is not compile-time static and depends on run-time arguments, making it impossible to host it on a static resource like a website or pdf. See also a similar change in the wallet rpc code: #18499
  * The same call (relying on default values) will run different code on different machines, depending on the command line args that were used to start the server. This might lead to hard-to-debug-remote issues.

  This is a small behaviour change, and I will add release notes.

ACKs for top commit:
  theStack:
    ACK fad691cafe
  promag:
    Code review ACK fad691cafe083743a26f434488990f060ae4ac45.

Tree-SHA512: 1c7a253ff0ec13a973b10d3777b71c70954ded5805b65a3ab06317327014de4cd0601d71d30c6ce89a581722c150cb5567acc1bd3e0c789cb51bab6ef0dcfc4a
2023-02-15 00:07:39 -06:00
MeshCollider
c999483d63 Merge #15748: [rpc] remove dead mining code
1b46a4889 [cleanup] Remove unused CReserveKey (John Newbery)
9819ad6d0 [rpc] simplify generate RPC (John Newbery)

Pull request description:

  Removes dead code from after the generate method was removed

ACKs for commit 1b46a4:
  MarcoFalke:
    utACK 1b46a4889f894d63062454fb9f4c2e88689a9d75
  meshcollider:
    utACK 1b46a4889f
  scravy:
    utACK 1b46a48
  Empact:
    utACK 1b46a4889f

Tree-SHA512: d1fab1bf76ac3036b85cf33be89868bc016f912575545ecaa16f958397b0ec4f1ce4de8fe254d4f21aabeea9c83a8928530cc520de26af0d1a8bdb4ca0f2cb77
2023-02-15 00:07:39 -06:00
Odysseas Gabrielides
aa8462b060
feat!: 4k collateral high performance masternode implementation (#5039)
## Issue being fixed or feature implemented


## What was done?
Implementation of 4k collateral HPMN.

## How Has This Been Tested?

## Breaking Changes

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

**For repository code-owners and collaborators only**
- [x] I have assigned this pull request to a milestone

---------

Co-authored-by: thephez <thephez@users.noreply.github.com>
Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
Co-authored-by: pasta <pasta@dashboost.org>
Co-authored-by: PastaPastaPasta <6443210+pastapastapasta@users.noreply.github.com>
Co-authored-by: UdjinM6 <1935069+Udjinm6@users.noreply.github.com>
Co-authored-by: Konstantin Akimov <545784+knst@users.noreply.github.com>
2023-02-14 12:48:33 -06:00
UdjinM6
c8a7e69015
fix/tests: fix legacy param usage in bls generate and bls fromsecret, add tests (#5195)
## Issue being fixed or feature implemented
`legacy` param is either ignored (wrong param index) or rejected (can't
use `RPCTypeCheckArgument`/`get_bool()` for params not listed in
`vRPCConvertParams` and we can't add them there either because they have
no exact indexes)

## What was done?
switched to `ParseBoolV`, added unit tests

## How Has This Been Tested?
`./src/test/test_dash -t rpc_tests/rpc_bls`

## 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
- [x] I have added or updated relevant unit/integration/functional/e2e
tests
- [ ] I have made corresponding changes to the documentation

**For repository code-owners and collaborators only**
- [x] I have assigned this pull request to a milestone
2023-02-13 10:30:31 -06:00
Konstantin Akimov
11f67cba23
style: adjust template of new PR (#5193)
## Issue being fixed or feature implemented
Currently template for "New pull request" have a lot of instruction that
are formatted as comments by html/markdown tag.
It makes this instruction to append in the final commit message when
pull request is merged because they are invisible for reviewer (marked
as comment).

With new template the messages would be more likely to be cleaned up
before merging.


## What was done?
Replaced commented text in template to cursive test (italic)


## How Has This Been Tested?
By clicking "Preview" on GitHub


## Breaking Changes
No breaking changes, it's trivial change


## Checklist:
- [x] I have performed a self-review of my own code
- [x] I have assigned this pull request to a milestone
2023-02-12 21:15:23 -06:00
UdjinM6
cf0ec1c32c
fix: 5072 follow-ups (#5197)
## Issue being fixed or feature implemented
fixing a few trivial issues we missed while reviewing #5072 

## What was done?
see code

## How Has This Been Tested?
tests are  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

**For repository code-owners and collaborators only**
- [x] I have assigned this pull request to a milestone
2023-02-12 20:12:53 -06:00
Konstantin Akimov
2b61dd8673
fix: get rid of [most] clang warnings during build on linux (#5186)
## Issue being fixed or feature implemented
Build on linux with clang produce a lot of warnings.
Some of them are fixed in this PR.

## What was done?
Fixed several types of warnings:
 - order of member initialization in constructors
 - mixing signed/unsigned wariables
 - moved static functions from header to cpp file
 - other fixes

## How Has This Been Tested?
Set up clang build on Linux + run build + unit/functional tests.

## Breaking Changes
Should not be breaking changes


## Checklist:
- [x] I have performed a self-review of my own code
- [x] I have assigned this pull request to a milestone
2023-02-10 20:25:11 -06:00
UdjinM6
146dd1055f
Merge pull request #5177 from knst/bc-bp-missing-1
backport: bitcoin#13815, #14822, #15238, #15452, #15660, #15899, 15947, 16047, 16095
2023-02-10 23:36:18 +03:00
Wladimir J. van der Laan
2d13a4b190 Merge #15452: Replace CScriptID and CKeyID in CTxDestination with dedicated types
78e407ad0c26190a22de1bc8ed900164a44a36c3 GetKeyBirthTimes should return key ids, not destinations (Gregory Sanders)
70946e7fee54323ce6a5ea8aeb377e2c7c790bc6 Replace CScriptID and CKeyID in CTxDestination with dedicated types (Gregory Sanders)

Pull request description:

  The current usage seems to be an overloading of meanings. `CScriptID` is used in the wallet as a lookup key, as well as a destination, and `CKeyID` likewise. Instead, have all destinations be dedicated types.

  New types:
  `CScriptID`->`ScriptHash`
  `CKeyID`->`PKHash`

ACKs for commit 78e407:
  ryanofsky:
    utACK 78e407ad0c26190a22de1bc8ed900164a44a36c3. Only changes are removing extra CScriptID()s and fixing the test case.
  Sjors:
    utACK 78e407a
  meshcollider:
    utACK 78e407ad0c

Tree-SHA512: 437f59fc3afb83a40540da3351507aef5aed44e3a7f15b01ddad6226854edeee762ff0b0ef336fe3654c4cd99a205cef175211de8b639abe1130c8a6313337b9
2023-02-10 23:34:57 +03:00
MeshCollider
faa6f770d9 Merge #15899: rpc: Document iswitness flag and fix bug in converttopsbt
fa499b5f027f77c0bf13699852c8c06f78e27bef rpc: bugfix: Properly use iswitness in converttopsbt (MarcoFalke)
fa5c5cd141f0265a5693234690ac757b811157d8 rpc: Switch touched RPCs to IsValidNumArgs (MarcoFalke)

Pull request description:

  When a serialized transaction has inputs, there is no risk in only trying to deserialize it with witness allowed. (This is how all transactions from p2p are deserialized.) In fact, it would avoid a common issue where a transaction with inputs can be deserialized in two ways:
  * Fixes #12989
  * Fixes #15872
  * Fixes #15701
  * Fixes #13738
  * ...

  When a serialized transaction has no inputs, there is no risk in only trying to deserialze it with witness disallowed. (A transaction without inputs can't have corresponding witness data)

ACKs for commit fa499b:
  meshcollider:
    utACK fa499b5f02
  ryanofsky:
    utACK fa499b5f027f77c0bf13699852c8c06f78e27bef. Changes since last review: consolidating commits and making iswitness documentation the same across methods.
  PastaPastaPasta:
    utACK fa499b5f027f77c0bf13699852c8c06f78e27bef

Tree-SHA512: a64423a3131f3f0222a40da557c8b590c9ff01b45bcd40796f77a1a64ae74c6680a6be9d01ece95c492dfbcc7e2810409d2c2b336c2894af00bb213972fc85c6
2023-02-10 23:34:57 +03:00
Wladimir J. van der Laan
0a44cfee12 Merge #16047: doc: analyzepsbt description in doc/psbt.md
d5dc66e28046a146b6fdf10ed119dfe4e96af995 doc: fix/improve analyzepsbt in doc/psbt.md (Jon Atack)

Pull request description:

  - fix: replace "RPC" with "PSBT"

  - output includes the current status of the analyzed psbt's inputs

  - apply "if possible" to the fee as well as to the estimated weight and feerate, since the fee is only shown if all utxo slots in the psbt have been filled

  - add "final" to the estimated weight and feerate

ACKs for commit d5dc66:
  laanwj:
    ACK d5dc66e28046a146b6fdf10ed119dfe4e96af995
  fanquake:
    utACK d5dc66e

Tree-SHA512: 61ff1ef45ec34182613b300d21cc2b17a28d1e955f70848f5be1a40c82009fe3000db3332d2cfca1833d7c881b61cc4ebc9fc779238f76d38e9e3f706cfb3551
2023-02-10 23:34:57 +03:00
Wladimir J. van der Laan
06dad4ca98 Merge #15947: Install bitcoin-wallet manpage
00d110463aed12ecdc6e9c2bf47d9ef61d19fa9d Install bitcoin-wallet manpage. (Daniel Kraft)

Pull request description:

  This change marks the already-existing `bitcoin-wallet.1` manpage file for installation together with the others.  Previously, only `bitcoind.1`, `bitcoin-cli.1`, `bitcoin-tx.1` and `bitcoin-qt.1` would be installed.

ACKs for commit 00d110:
  laanwj:
    utACK 00d110463aed12ecdc6e9c2bf47d9ef61d19fa9d
  practicalswift:
    utACK 00d110463aed12ecdc6e9c2bf47d9ef61d19fa9d

Tree-SHA512: ca846e414548f1dc774f460edca2e17d7d619c7e6f0d18db0c58c09e04f9d43c6964fcf2bacb5b1eae94de9c5fdda86abf258ef6b78b0f693715d070dfc10f08
2023-02-10 23:34:57 +03:00
MarcoFalke
39b82fb541 Merge #16095: Catch by reference not value in wallettool
ae7faf20d5 Exceptions should be caught by reference, not by value. (Kristaps Kaupe)

Pull request description:

  Fixes this warning with GCC8/GCC9:
  ```
  wallet/wallettool.cpp: In function ‘std::shared_ptr<CWallet> WalletTool::LoadWallet(const string&, const boost::filesystem::path&)’:
  wallet/wallettool.cpp:62:25: warning: catching polymorphic type ‘const class std::runtime_error’ by value [-Wcatch-value=]
       } catch (const std::runtime_error) {
                           ^~~~~~~~~~~~~
  ```
  Related to #15822.

ACKs for commit ae7faf:
  practicalswift:
    utACK ae7faf20d5fb3e2415ccadc37100dfc44aa0cd94

Tree-SHA512: 07eb774b3296c0b66ac5040269bff6cd8ba0294c8c95cc08c595efbd535260ff0010fa430ca057eeccd7b38c0a981a3d7a95b675d9e2996853c013dc0bfe8127
2023-02-10 23:34:57 +03:00
Konstantin Akimov
9ab8acaf2d Merge #15660: [qa] Overhaul p2p_compactblocks.py
7813eb1db1 [qa] Overhaul p2p_compactblocks.py (Suhas Daftuar)

+ extra fixes for pull request #1966 (compact blocks)

Pull request description:

  Remove tests of:
   - compactblock behavior in a simulated pre-segwit version of bitcoind
     This should have been removed a long time ago, as it is not generally
     necessary for us to test the behavior of old nodes (except perhaps if we
     want to test that upgrading from an old node to a new one behaves properly)

   - compactblock behavior during segwit upgrade (ie verifying that network
     behavior before and after activation was as expected)
     This is unnecessary to test now that segwit activation has already happened.

ACKs for commit 7813eb:
  jnewbery:
    utACK 7813eb1db132c023902ad945995cc32a325893ca

Tree-SHA512: cadf035e6f822fa8cff974ed0c2e88a1d4d7da559b341e574e785fd3d309cc2c98c63bc05479265dc00550ae7b77fc3cbe815caae7f68bcff13a04367dca9b52
2023-02-10 23:34:57 +03:00
MarcoFalke
d15c58f1df Merge #15238: [QA] remove some magic mining constants in functional tests
b651ef7e1c submitheader: more directly test missing prev block header (Gregory Sanders)
1e7f741745 remove some magic mining constants in functional tests (Gregory Sanders)

Pull request description:

  The fewer magic numbers the better.

  Also more directly tested a `submitheader` case of bad previous blockhash.

Tree-SHA512: 52b01a6aa199fa909eea4e9e84409a901933e545724e33149cc4132c82168199fd678809b6d94d95c9ff6ad02238a9552363620d13b8beaa5d4b67ade9ef425c
2023-02-10 23:34:57 +03:00
Konstantin Akimov
206304d016 Merge bitcoin#14822: bench: Destroy wallet txs instead of leaking their memory 2023-02-10 23:34:57 +03:00
Konstantin Akimov
2919b9af4d Merge bitcoin#13815: util: Add [[nodiscard]] to all {Decode,Parse}[...](...) functions returning bool 2023-02-10 23:34:57 +03:00
Odysseas Gabrielides
59db773eac
fix: Dmnstate unserialize fix (#5192)
## Issue being fixed or feature implemented

## What was done?
Currently, `CDeterministicMNStateDiff` is unserialized incorrectly when
the bit of `Field_pubKeyOperator` is on.
Why? Because it attempts to read all other fields as
`CBLSLazyPublicKey`.

`if (obj.fields & Field_pubKeyOperator) {\ // ---> This check is always
true for all the fields

READWRITE(CBLSLazyPublicKeyVersionWrapper(const_cast<CBLSLazyPublicKey&>(obj.state.pubKeyOperator),
true)); \
        }`

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

**For repository code-owners and collaborators only**
- [x] I have assigned this pull request to a milestone
2023-02-10 12:34:33 -06:00
Konstantin Akimov
f26c479e23
fix: using checkMalleable in serialization of CBLSSignatureVersionWrapper (#5189)
## Issue being fixed or feature implemented
This changes are required, because constructor
`CBLSSignatureVersionWrapper` doesn't work as expected.
You may pass `checkMalleable = false` in constructor, but it will be
used `true` as default argument anyway


## What was done?
- fixed using flag `checkMalleable` in `CBLSSignatureVersionWrapper`
- removed unused `checkMalleable` in `ConstCBLSPublicKeyVersionWrapper`
- fixed order initialization in constructor (eliminate clang warning)
- re-ordered class members to reduce memory usage



## How Has This Been Tested?
Run functional/unit tests

## Breaking Changes
It changes API behavior but does it break anything?


## Checklist:
- [x] I have performed a self-review of my own code
- [x] I have assigned this pull request to a milestone
2023-02-10 14:14:57 +02:00
UdjinM6
2b702f8e84
fix/tests: fix masternode payments rpc, add tests (#5191)
## Issue being fixed or feature implemented
it was picking the wrong DMN as a payee...

## What was done?
see code and notes

## How Has This Been Tested?
run tests

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

**For repository code-owners and collaborators only**
- [x] I have assigned this pull request to a milestone
2023-02-10 13:21:05 +02:00
UdjinM6
f12983cce7
fix(qt): Ignore change output in reassignAmounts (#5182)
## Issue being fixed or feature implemented
#5180 

## What was done?
`reassignAmounts` was behaving incorrectly when change and recipient
address were the same. Ignore change output should fix it.

## How Has This Been Tested?
To reproduce #5180: create a tx which sends to some address but has a
custom change address set to the very same address too (enable "custom
change address" checkbox and paste an address there), make sure the
"subtract fee from amount" checkbox is enabled. The problem should go
away when the patch is applied.

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

**For repository code-owners and collaborators only**
- [ ] I have assigned this pull request to a milestone
2023-02-09 03:19:49 +03:00
Konstantin Akimov
d07678c5ae
fix: using BLSDKG_GenerateContributions in benchmark (#5188)
## Issue being fixed or feature implemented
BLSDKG_InitDKG used twice. Instead, once should be used
BLSDKG_GenerateContributions



## What was done?
Replaced BLSDKG_InitDKG to BLSDKG_GenerateContributions


## How Has This Been Tested?
With patch (completely other numbers for
`BLSDKG_GenerateContributions`):
```
|       12,400,083.80 |               80.64 |   22.4% |      0.14 | 〰️ `BLSDKG_GenerateContributions_simple_10` (Unstable with ~54.3 iters. Increase `minEpochIterations` to e.g. 543)
|       72,281,069.33 |               13.83 |    1.5% |      0.81 | `BLSDKG_GenerateContributions_simple_50`
|       36,100,161.96 |               27.70 |    2.5% |      0.40 | `BLSDKG_InitDKG_simple_10`
|      124,084,124.30 |                8.06 |    1.9% |      1.35 | `BLSDKG_InitDKG_simple_50`
```
Without patch (same number for InitDKG and GenerateContributions):
```
|       36,636,218.34 |               27.30 |    0.9% |      0.41 | `BLSDKG_GenerateContributions_simple_10`
|      124,856,040.60 |                8.01 |    2.8% |      1.37 | `BLSDKG_GenerateContributions_simple_50`
|       36,886,990.17 |               27.11 |    1.2% |      0.40 | `BLSDKG_InitDKG_simple_10`
|      120,018,476.30 |                8.33 |    2.5% |      1.30 | `BLSDKG_InitDKG_simple_50`
```

## Breaking Changes
no breaking changes


## Checklist:
- [x] I have performed a self-review of my own code
- [x] I have assigned this pull request to a milestone
2023-02-08 14:48:26 -06:00
Odysseas Gabrielides
97d94520d0
refactor: remove protx_update_service_legacy (#5185)
<!--
*** Please remove the following help text before submitting: ***

Provide a general summary of your changes in the Title above

Pull requests without a rationale and clear improvement may be closed
immediately.

Please provide clear motivation for your patch and explain how it
improves
Dash Core user experience or Dash Core developer experience
significantly:

* Any test improvements or new tests that improve coverage are always
welcome.
* All other changes should have accompanying unit tests (see
`src/test/`) or
functional tests (see `test/`). Contributors should note which tests
cover
modified code. If no tests exist for a region of modified code, new
tests
  should accompany the change.
* Bug fixes are most welcome when they come with steps to reproduce or
an
explanation of the potential issue as well as reasoning for the way the
bug
  was fixed.
* Features are welcome, but might be rejected due to design or scope
issues.
If a feature is based on a lot of dependencies, contributors should
first
  consider building the system outside of Dash Core, if possible.
-->

## Issue being fixed or feature implemented
<!--- Why is this change required? What problem does it solve? -->
<!--- If it fixes an open issue, please link to the issue here. -->
Removed RPC `protx update_service_legacy` since this RPC parses BLS
private key (instead of BLS public key).
BLS scheme do not affect private keys, contrary to public keys.

## What was done?
<!--- Describe your changes in detail -->


## How Has This Been Tested?
<!--- Please describe in detail how you tested your changes. -->
<!--- Include details of your testing environment, and the tests you ran
to -->
<!--- see how your change affects other areas of the code, etc. -->


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

**For repository code-owners and collaborators only**
- [x] I have assigned this pull request to a milestone
2023-02-07 19:33:40 +02:00
Odysseas Gabrielides
ce51386f9f
fix: added missing specific_legacy_bls_scheme (#5184)
<!--
*** Please remove the following help text before submitting: ***

Provide a general summary of your changes in the Title above

Pull requests without a rationale and clear improvement may be closed
immediately.

Please provide clear motivation for your patch and explain how it
improves
Dash Core user experience or Dash Core developer experience
significantly:

* Any test improvements or new tests that improve coverage are always
welcome.
* All other changes should have accompanying unit tests (see
`src/test/`) or
functional tests (see `test/`). Contributors should note which tests
cover
modified code. If no tests exist for a region of modified code, new
tests
  should accompany the change.
* Bug fixes are most welcome when they come with steps to reproduce or
an
explanation of the potential issue as well as reasoning for the way the
bug
  was fixed.
* Features are welcome, but might be rejected due to design or scope
issues.
If a feature is based on a lot of dependencies, contributors should
first
  consider building the system outside of Dash Core, if possible.
-->
Passing the `specific_legacy_bls_scheme` flag when parsing BLS public
key was missing.
(Affected RPC was: `protx update_registrar_legacy`)

## Issue being fixed or feature implemented
<!--- Why is this change required? What problem does it solve? -->
<!--- If it fixes an open issue, please link to the issue here. -->


## What was done?
<!--- Describe your changes in detail -->


## How Has This Been Tested?
<!--- Please describe in detail how you tested your changes. -->
<!--- Include details of your testing environment, and the tests you ran
to -->
<!--- see how your change affects other areas of the code, etc. -->


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

**For repository code-owners and collaborators only**
- [x] I have assigned this pull request to a milestone
2023-02-07 19:33:13 +02:00
PastaPastaPasta
3f802035fd
Merge pull request #5072 from kittywhiskers/sqlite
backport: merge bitcoin#20130, #19077, #20156, #20216, #20308, #20324, #20202, #20275, #21634, #21540, #21962, #25378, #23112 (sqlite)
2023-02-07 10:54:05 -06:00
Kittywhiskers Van Gogh
ca962a6e42 merge bitcoin#23112: enable SQLite extended result codes 2023-02-07 10:53:33 -06:00
Kittywhiskers Van Gogh
dc7ad45131 merge bitcoin#25378: sqlite 3380500 in depends 2023-02-07 10:53:33 -06:00
Kittywhiskers Van Gogh
f3407ce3f3 merge bitcoin#21962: dedup sqlite PRAGMA access 2023-02-07 10:53:33 -06:00
Kittywhiskers Van Gogh
b2d22d9b3f merge bitcoin#21540: refactor: dedup sqlite statement preparations/deletions 2023-02-07 10:53:33 -06:00
Kittywhiskers Van Gogh
9795605d3b merge bitcoin#21634: Skip SQLite fsyncs while testing 2023-02-07 10:53:33 -06:00
Kittywhiskers Van Gogh
6900545ca8 merge bitcoin#20275: List all wallets in non-SQLite and non-BDB builds 2023-02-07 10:53:33 -06:00
Kittywhiskers Van Gogh
9c4f84efc5 merge bitcoin#20324: Set DatabaseStatus::SUCCESS in MakeSQLiteDatabase 2023-02-07 10:53:33 -06:00
Kittywhiskers Van Gogh
7758b424f2 merge bitcoin#20308: Set bilingual error completely 2023-02-07 10:53:33 -06:00