Commit Graph

24029 Commits

Author SHA1 Message Date
Konstantin Akimov
63ed462c54
feat: auto generation EHF and spork+EHF activation for MN_RR (#5597)
Implementation EHF mechanism, part 4. Previous changes are: 
 - https://github.com/dashpay/dash/pull/4577
 - https://github.com/dashpay/dash/pull/5505
 - https://github.com/dashpay/dash/pull/5469

## Issue being fixed or feature implemented
Currently MN_RR is activated automatically by soft-fork activation after
v20 is activated.
It is not flexible enough, because platform may not be released by that
time yet or in opposite it can be too long to wait.
Also, any signal of EHF requires manual actions from MN owners to sign
EHF signal - it is automated here.

## What was done?
New spork `SPORK_24_MN_RR_READY`; new EHF manager that sign EHF signals
semi-automatically without manual actions; and send transaction with EHF
signal when signal is signed to network.
Updated rpc `getblockchaininfo` to return information about of EHF
activated forks.
Fixed function `IsTxSafeForMining` in chainlock's handler to skip
transactions without inputs (empty `vin`).

## How Has This Been Tested?
Run unit/functional tests. Some tests have been updated due to new way
of MN_RR activation: `feature_asset_locks.py`, `feature_mnehf.py`,
`feature_llmq_evo.py` and unit test `block_reward_reallocation_tests`.


## Breaking Changes
New way of MN_RR activation.

## 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
- [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>
Co-authored-by: PastaPastaPasta <6443210+PastaPastaPasta@users.noreply.github.com>
2023-10-17 22:31:40 -05:00
Odysseas Gabrielides
cecf63e0b7
feat!: exclude fees when calculating platformReward (#5612)
## Issue being fixed or feature implemented
Calculation of `platformReward` should ignore fees and rely only on
Block subsidy.

cc @QuantumExplorer 

## What was done?
From now on, the following formula is applied:
```
blockReward = blockSubsidy + feeReward
masternodeReward = masternodeShare(blockSubsidy)
platformReward = platformShare(masternodeReward)
masternodeReward += masternodeShare(feeReward)
```


## How Has This Been Tested?


## Breaking Changes
`plaftormReward` differs in networks where `mn_rr` is already active

## 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
- [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: UdjinM6 <UdjinM6@users.noreply.github.com>
2023-10-17 22:07:37 -05:00
Odysseas Gabrielides
848ed765e0
feat!: constant subsidy base for blocks in v20 (#5611)
## Issue being fixed or feature implemented
Currently, the `nSubsidyBase` calculation relies on difficulty. This
leads to variable Block Subsidity.
When Platform will be live, it would constantly require blocks
difficulty in order to calculate the `platformReward` (which relies on
Block Subsidy)

cc @QuantumExplorer 

## What was done?
Starting from v20 activation, `nSubsidyBase` will no longer rely on
difficulty and will be constant to 5.

## How Has This Been Tested?


## Breaking Changes
Block rewards will differ.

## 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
- [x] I have assigned this pull request to a milestone _(for repository
code-owners and collaborators only)_
2023-10-17 15:50:23 -05:00
Konstantin Akimov
1e7ac15a37
fix: correct quorum for Asset Unlock (withdrawal) transactions (#5618)
## Issue being fixed or feature implemented
Signature for withdrawal (asset unlock) transaction should be validated
against platform quorum (100_67) but not same as currently against EHF
quorum (400_85).



## What was done?
Updates type of quorum in chainparams for Asset Unlock (withdrawal)
transactions to same as platform's quorum.

It is first part of changes to fix devnet, testnet and mainnet. For
regnet is still used incorrect quorum due to non-trivial changes in
functional test `feature_assetlocks.py`; these changes would be provided
in next PR.

## How Has This Been Tested?
Run unit/functional test.

## Breaking Changes
Yes, quorum for validation of Asset Unlock (withdrawal) transaction is
changed.

## 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-17 15:44:31 -05:00
PastaPastaPasta
833ce4c3d5
Merge pull request #5614 from knst/refactor-block-subsidy
refactor: simplifying and de-globalization of GetMasternodePayment and GetBlockSubsidy
2023-10-17 08:26:04 -05:00
Konstantin Akimov
6007180dbe refactor: change flag fSuperblockPartOnly to a new function GetSuperblockSubsidyInner 2023-10-17 08:25:51 -05:00
Konstantin Akimov
85287cfeaf refactor: get rid usage of global ::ChainstateActive() and ::ChainActive() from block_reward_reallocation_tests.cpp 2023-10-17 08:25:51 -05:00
Konstantin Akimov
a699ad187d refactor: removing usage of ::ChainActive::Tip() form masternode/payments 2023-10-17 08:25:51 -05:00
Konstantin Akimov
4cf13d77c3 refactor: proper BIP9 bury of BRR - follow-up "Harden BRR activation (#4726)" 2023-10-17 08:25:51 -05:00
PastaPastaPasta
7ad7cbf98a
perf: pass around a cached block hash during block validation (#5613)
this change saw a ~38% performance improvement in header sync reindex

reproduce via `time ./src/qt/dash-qt --nowallet --testnet --reindex
--stopatheight=5`

On Develop this took average of 1:48 to finish, on this branch it took
1:07

## Issue being fixed or feature implemented
Slow header / block validation

## What was done?
Pass around cached block hash

## How Has This Been Tested?
Reindexed testnet

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

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2023-10-16 12:05:03 -05:00
PastaPastaPasta
13b99e2401
Merge pull request #5610 from UdjinM6/wip_xcode15
build: make depends compilable with Xcode 15 on macos
2023-10-15 07:50:20 -05:00
UdjinM6
aa7ba58804
fix(depends): make it compilable with Xcode 15 on macos 2023-10-12 18:57:46 +03:00
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