Commit Graph

24217 Commits

Author SHA1 Message Date
fanquake
e4c9cb5371
Merge bitcoin/bitcoin#28571: depends: fix unusable memory_resource in macos qt build
848eec09363d1ba8198376eb9654b1a69e3541aa depends: fix unusable memory_resource in macos qt build (fanquake)

Pull request description:

  See https://codereview.qt-project.org/c/qt/qtbase/+/482392.

  Fixes #28566.

ACKs for top commit:
  hebasto:
    ACK 848eec09363d1ba8198376eb9654b1a69e3541aa.

Tree-SHA512: dd902f7abb09bda3800d78fe58937b4426d974c24ba321b979eba0d6da30fa0c661b4ed629afab827df8f9ab599efc7a288e9f381ec2b3c69d1063d4d4f73f9e
2023-10-12 16:47:57 +03:00
fanquake
c956c5ed8d
Merge bitcoin/bitcoin#28543: build, macos: Fix qt package build with new Xcode 15 linker
79ef528511f0cbbe0a7097ef031f2964aaccfe5c build, macos: Fix `qt` package build with new Xcode 15 linker (Hennadii Stepanov)

Pull request description:

  Fixes https://github.com/bitcoin/bitcoin/issues/28541 by backporting an upstream [patch](cdf64b0e47).

  Guix build:
  ```
  x86_64
  b37713bc8a526662eac3d9535924f4a4d2893c58f9c12d3c7599e761e6ff677c  guix-build-79ef528511f0/output/arm64-apple-darwin/SHA256SUMS.part
  0befb524181aa10e1635a2616a8bed53f51beafa4f0d495d3bf52a64cbd2d977  guix-build-79ef528511f0/output/arm64-apple-darwin/bitcoin-79ef528511f0-arm64-apple-darwin-unsigned.tar.gz
  9cba170f2ffe542c33fdd1ac52b7684dd6301e91d32aa45af7b4ce8769d88d4a  guix-build-79ef528511f0/output/arm64-apple-darwin/bitcoin-79ef528511f0-arm64-apple-darwin-unsigned.zip
  04556309266c791ae4d7409359222c88cd7aeb569566f7ef4d29816148a5b7e4  guix-build-79ef528511f0/output/arm64-apple-darwin/bitcoin-79ef528511f0-arm64-apple-darwin.tar.gz
  51229df8e104a2ffcd5c5b3f81f7585e1258ef10461d136948ea2a2d690a920d  guix-build-79ef528511f0/output/dist-archive/bitcoin-79ef528511f0.tar.gz
  3fe216a05561f2fe7229ddf186ff495b29a5cc31b6f35f407187573d072c5743  guix-build-79ef528511f0/output/x86_64-apple-darwin/SHA256SUMS.part
  961d71104e61a2baf727576eb2da630697bb4f109f66e73be5c96add25378d12  guix-build-79ef528511f0/output/x86_64-apple-darwin/bitcoin-79ef528511f0-x86_64-apple-darwin-unsigned.tar.gz
  5598f514d065756ac376e2f3c4f8e758bfba53a43ddef778f106456de1536073  guix-build-79ef528511f0/output/x86_64-apple-darwin/bitcoin-79ef528511f0-x86_64-apple-darwin-unsigned.zip
  5360ae1f1b7d96a44a33b2c87708b466e4a7bf3f9de0fc58bccbbcdb21ee254e  guix-build-79ef528511f0/output/x86_64-apple-darwin/bitcoin-79ef528511f0-x86_64-apple-darwin.tar.gz
  ```

Top commit has no ACKs.

Tree-SHA512: e3a0f7a578b30a216cc84c8ac6a0eeac3f59b02525e1eb5a9f5512bc9a049a1b17d3feb140259ffe5d2197279c74594126b85112aa596df9013f74bb1047c298
2023-10-12 16:47:52 +03:00
UdjinM6
5ed0e3fe88
Revert "depends|qt: Fix build on Mojave (10.14.6)"
This reverts commit 489770a35f.
2023-10-12 16:47:44 +03:00
Odysseas Gabrielides
5ca6382bfa
test: correct calculation of coinbasevalue in feature_asset_locks.py (#5603)
## Issue being fixed or feature implemented
Fixed a problem forgotten in #5588 in feature_asset_locks.py.

## What was done?
Avoid floating operations when calculating `coinbasevalue`

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

---------

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2023-10-11 08:13:29 -05:00
Odysseas Gabrielides
bf84e370fd
fix: Testnet syncing mn_rr (#5608)
## Issue being fixed or feature implemented
Since `mn_rr` is already active on Testnet, because of #5588, syncing
from develop is broken.

## What was done?
Temporary disabled changes of #5588 for Testnet.
This should be dropped when Testnet will be re-organised for Platform.

## How Has This Been Tested?
Syncing 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
- [ ] 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-10-09 11:34:02 -05:00
UdjinM6
30f3f50928
fix: Let CDeterministicMN::ToJson() return correct collateralAddress for spent collaterals (#5607)
## Issue being fixed or feature implemented
Historical masternode data returned via rpcs like `protx listdiff` can
be broken because some collaterals might be spent already and
`GetUTXOCoin` wasn't able to get any info.

## What was done?
Use `GetTransaction` as a fallback.

## How Has This Been Tested?
run tests

## Breaking Changes
n/a

## Checklist:
- [x] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have added or updated relevant unit/integration/functional/e2e
tests
- [ ] I have made corresponding changes to the documentation
- [x] I have assigned this pull request to a milestone _(for repository
code-owners and collaborators only)_
2023-10-09 11:14:51 -05:00
UdjinM6
2004a855d9
fix!: avoid float calculations in PlatformShare (#5604)
## Issue being fixed or feature implemented
avoid potential discrepancies in block reward calculations

## What was done?
use integers (int64_t) only when dealing with block rewards, no
float/double

## How Has This Been Tested?
run tests

## Breaking Changes
might fork off on devnets that use previous version

## 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-10-09 09:15:23 -05:00
PastaPastaPasta
ce9cfff0d6
Merge pull request #5469 from knst/mnehf
feat!: masternode node hard-fork activation DIP-0023
2023-10-06 11:02:41 -05:00
Konstantin Akimov
f7705cdf72 fix: scan quorums instead just using verified sigs 2023-10-06 11:02:15 -05:00
UdjinM6
4b046bb608 use deployment nStartTime as a signal expiration mark, adjust tests
if a signal is mined prior to nStartTime then it means it was mined for one of the previous deployments with the same bit and we can ignore it
2023-10-06 11:02:15 -05:00
Konstantin Akimov
d83dbd287a fix: fix previous commit with fixes 2023-10-06 11:02:15 -05:00
Konstantin Akimov
5e31bd5545 refactor: multiple fixes, cleanups, improvements and refactorings 2023-10-06 11:02:15 -05:00
Konstantin Akimov
13f28a0194 fix: mark invalid EHF tx in mempool 2023-10-06 11:02:15 -05:00
Konstantin Akimov
92be5e0be7 fix: now EHF transactions expires after nExpiryEHF blocks 2023-10-06 11:02:15 -05:00
Konstantin Akimov
3973f2b925 feat: update functional tests for Mn EHF - to use same bit more than once 2023-10-06 11:02:15 -05:00
Konstantin Akimov
7b18bc8368 fix: EHF takes care not only about nTimeOut but about nStartTime also 2023-10-06 11:02:15 -05:00
Konstantin Akimov
5d9085f8cb Update src/chainparams.cpp
Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2023-10-06 11:02:15 -05:00
Konstantin Akimov
df4c366e6b fix: logs in chainparams moved out from if(fJustCheck) 2023-10-06 11:02:15 -05:00
Konstantin Akimov
5bcbcc8dc2 docs: documented UpdateMNActivationParam 2023-10-06 11:02:15 -05:00
Konstantin Akimov
ef14b53b3d feat: add functional test for unknown and invalid version bits of EHF release 2023-10-06 11:02:15 -05:00
Konstantin Akimov
0878e184da fix: check MnEHF earlier 2023-10-06 11:02:15 -05:00
Konstantin Akimov
628ce18139 feat: let unknown deployments to be mined in blocks 2023-10-06 11:02:15 -05:00
Konstantin Akimov
bb8d06ae84 fix: conflict resolve due to new fuzz test (versionbits) and -Wno-reorder compile flag 2023-10-06 11:02:15 -05:00
Konstantin Akimov
4e03666ec9 Update src/chainparams.cpp
Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2023-10-06 11:02:15 -05:00
Konstantin Akimov
2c4597db9f feat: improve functional tests for MnEHF to check block reconsideration 2023-10-06 11:02:15 -05:00
Konstantin Akimov
b85a497cca feat: new functional test for feature MnEHF 2023-10-06 11:02:15 -05:00
Konstantin Akimov
33ab3187b2 feat: add CMNHFManager and logic to make hard-forks accordingly received signals 2023-10-06 11:02:15 -05:00
Konstantin Akimov
c8d84a8c33 fix: MnEHF transaction should be accepted to mempool bypass fee limits 2023-10-06 11:02:15 -05:00
Konstantin Akimov
612faa8868 feat: imlemented new hard-fork mechanism that uses MN Activation Height
Altough, it's still disabled because no calls of related methods after processing MnEHF tx
2023-10-06 11:02:15 -05:00
PastaPastaPasta
5e5b571be6
Merge pull request #5601 from PastaPastaPasta/backport-23573
backport: Merge bitcoin/bitcoin#23573: refactor: cast bool operands to int to silence compiler warning
2023-10-06 09:10:44 -05:00
fanquake
0e09936748 Merge bitcoin/bitcoin#23573: refactor: cast bool operands to int to silence compiler warning
ab22a71429f0f47b3c3582a303c07940aa59cd3e refactor: cast bool to int to silence compiler warning (Jon Atack)

Pull request description:

  This fixes a compiler warning:
  ```
  node/interfaces.cpp:544:16: warning: use of bitwise '&' with boolean operands [-Wbitwise-instead-of-logical]
          return FillBlock(ancestor, ancestor_out, lock, active) & FillBlock(block1, block1_out, lock, active) & FillBlock(block2, block2_out, lock, active);
                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                                                                                               &&
  node/interfaces.cpp:544:16: note: cast one or both operands to int to silence this warning
  node/interfaces.cpp:544:16: warning: use of bitwise '&' with boolean operands [-Wbitwise-instead-of-logical]
          return FillBlock(ancestor, ancestor_out, lock, active) & FillBlock(block1, block1_out, lock, active) & FillBlock(block2, block2_out, lock, active);
                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                                                 &&
  node/interfaces.cpp:544:16: note: cast one or both operands to int to silence this warning
  2 warnings generated.
  ```

ACKs for top commit:
  sipa:
    utACK ab22a71429f0f47b3c3582a303c07940aa59cd3e
  theStack:
    Concept and code-review ACK ab22a71429f0f47b3c3582a303c07940aa59cd3e
  shaavan:
    ACK ab22a71429f0f47b3c3582a303c07940aa59cd3e

Tree-SHA512: 84e5aeabc1514a7586ac7c78a8eff1d15a5967dced7b2485b266b6fd79a530e1b22d99ded0a5df39f7806d3c5fd6d9752f08a722cc3be17850a6242c4022ab03
2023-10-06 09:10:31 -05:00
Konstantin Akimov
1c66ac3f2a
refactor: remove start/count in bls-worker funcs due to spanification (#5599)
## Issue being fixed or feature implemented
Follow-up changes for this PR:
https://github.com/dashpay/dash/pull/5586/


## What was done?
Span has already "pointer + start + length", extra start/count variables
in function signatures are just duplicates.


## 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
2023-10-05 08:06:27 -05:00
UdjinM6
c814dcaaea
fix: Move CreditPoolDiff checks out of ProcessSpecialTxsInBlock, use correct block reward (#5594)
## Issue being fixed or feature implemented
The block reward calculation logic in `SetTarget` doesn't work on
superblocks.

## What was done?
Move `CreditPoolDiff` checks out of `ProcessSpecialTxsInBlock` to use
correct block reward.

## How Has This Been Tested?
run tests

## Breaking Changes
n/a, sb blocks should now be processed correctly, non-sb blocks
shouldn't be affected

## 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-10-04 12:47:21 -05:00
UdjinM6
1dd4b09990
fix(qt): fix 3 gui issues (#5596)
## Issue being fixed or feature implemented
fix 3 gui issues reported about beta2

## What was done?
pls see individual commits

## How Has This Been Tested?
to test ad0c0eb591 (there were no css
issues on my machine with locally compiled binaries): compile, run

to test 09800cff8f: run beta2 guix
compiled binaries with css from this PR e.g. on macos:
`/path/to/Dash-Qt.app/Contents/MacOS/Dash-Qt --regtest --debug-ui
--custom-css-dir=/path/to/dash/src/qt/res/css`

before 139d70701c:
<img width="224" alt="Screenshot 2023-09-30 at 22 02 32"
src="https://github.com/dashpay/dash/assets/1935069/b7a26ae9-f87f-4dde-b1f6-9eb796c22495">
after 139d70701c:
<img width="229" alt="Screenshot 2023-09-30 at 22 02 59"
src="https://github.com/dashpay/dash/assets/1935069/57d92e97-b25d-4035-9d1b-da373e51a574">

## 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-10-04 09:47:08 -05:00
PastaPastaPasta
b27765f358
refactor: further spanification of Dash code (#5586)
## Issue being fixed or feature implemented
Use Spans instead of const std::vector<T>&

## What was done?
Replaced with Span

## How Has This Been Tested?
Building, ran a few tests

## Breaking Changes
Should be none, please review potential lifetime issues in bls_worker;
it scares me a bit and I don't understand how we know these won't
dangle.

## 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-10-03 09:52:33 -05:00
Odysseas Gabrielides
e72eb40024
feat!: Block Reward Reallocation (Doubling Treasury) (#5588)
## Issue being fixed or feature implemented
Implementation of accepted proposal:
https://www.dashcentral.org/p/TREASURY-REALLOCATION-60-20-20

## What was done?
Once Masternode Reward Location Reallocation activates:
- Treasury is bumped to 20% of block subsidy.
- Block reward shares are immediately set to 75% for MN and 25% miners.
(Previous reallocation periods are dropped)
MN reward share should be 75% of block reward in order to represent 60%
of the block subsidy. (according to the proposal)
- `governancebudget` is returned from `getgovernanceinfo` RPC.

## How Has This Been Tested?
`block_reward_reallocation_tests`

## 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
- [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-10-03 09:32:53 -05:00
thephez
39412cf074
chore(rpc): adjust field type in getwalletinfo help (#5591)
## Issue being fixed or feature implemented
Help reported incorrect field type 

## What was done?
Change field from string to num


## How Has This Been Tested?
Tested 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
- [ ] I have assigned this pull request to a milestone _(for repository
code-owners and collaborators only)_
2023-10-02 09:02:05 -05:00
PastaPastaPasta
8eda85a451
refactor: make all ToJson functions return a UniValue instead of return by reference; add nodiscard (#5592)
## Issue being fixed or feature implemented
Return by reference is generally not ideal, and especially as there is
only one return path per function, all returns will be done via NRVO.
Additionally, call sites are simpler now.

## What was done?
Refactored to return by value


## How Has This Been Tested?
Building

## Breaking Changes
Should be 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)_
2023-09-29 12:56:52 -05:00
PastaPastaPasta
7ca61abed0
refactor: remove some now unneeded cppcheck suppressions (#5589)
## Issue being fixed or feature implemented
Unneeded suppressions were present

## What was done?
Removed them

## How Has This Been Tested?
Running linter

## 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)_
2023-09-29 07:53:22 -05:00
UdjinM6
c034ff0c26
fix: debug rpc should return a list of active debug categories, not all of them (#5585)
## Issue being fixed or feature implemented
This restores previous behaviour which was changed/broken here
e554d3a02e (diff-0ba691cbdd97c095286e9373ed8d5be87d559234440487956326965e16cbb421R75)

## What was done?
Fix `debug` rpc results

## How Has This Been Tested?
Run rpc, check results

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

---------

Co-authored-by: PastaPastaPasta <6443210+PastaPastaPasta@users.noreply.github.com>
2023-09-28 07:47:45 -05:00
PastaPastaPasta
2958aacf5d
Merge pull request #5577 from kwvg/bitcore_idx
refactor: cleanup {address,spent}index, remove platform-specific types, split out timestamp index
2023-09-26 20:56:48 -05:00
Kittywhiskers Van Gogh
93ddd3f7e8 refactor: consolidate P2PK{H} types to P2PK_OR_P2PKH 2023-09-25 22:57:42 +05:30
Kittywhiskers Van Gogh
f011c31b1a refactor: make AddressType a strong enum, remove uint8_t for address_type
Co-authored-by: Konstantin Akimov <knstqq@gmail.com>
2023-09-25 22:57:42 +05:30
Kittywhiskers Van Gogh
c65a10f349 refactor: use structure binding in for loop in rpc/misc
Co-authored-by: Konstantin Akimov <knstqq@gmail.com>
2023-09-25 22:57:41 +05:30
Kittywhiskers Van Gogh
109f57c83e refactor: use range-based loops instead of iterators
Co-authored-by: Konstantin Akimov <knstqq@gmail.com>
2023-09-25 22:57:41 +05:30
Kittywhiskers Van Gogh
b08a6343a7 refactor: add missing headers to {address,timestamp}index 2023-09-25 22:57:41 +05:30
Kittywhiskers Van Gogh
f47021a536 refactor: remove more code duplication from (dis)connect operations 2023-09-25 20:28:56 +05:30
Kittywhiskers Van Gogh
b29ef2eb4a refactor: deduplicate scriptPubKey trimming, index operations 2023-09-25 20:28:56 +05:30
Kittywhiskers Van Gogh
51203a83dc refactor: use static_cast for (de)serializing bool 2023-09-25 20:28:55 +05:30
Kittywhiskers Van Gogh
0cc321cd8c refactor: move CAddressIndex* out of spentindex 2023-09-25 20:25:34 +05:30