-
Notifications
You must be signed in to change notification settings - Fork 714
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Consensus] New block rewards #2763
Conversation
fe1c0ad
to
703e7a5
Compare
some additional changes to address the issues with the regression test suite: Index: test/functional/test_framework/test_framework.py
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/test/functional/test_framework/test_framework.py b/test/functional/test_framework/test_framework.py
--- a/test/functional/test_framework/test_framework.py (revision fe1c0adfaff413b7ce03793e8d012e0334dab0d7)
+++ b/test/functional/test_framework/test_framework.py (date 1657598250506)
@@ -1630,7 +1630,7 @@
self.minerPos = 4
self.remoteDMN1Pos = 5
- self.extra_args = [["-nuparams=v5_shield:249", "-nuparams=v6_evo:250", "-whitelist=127.0.0.1"]] * self.num_nodes
+ self.extra_args = [["-nuparams=v5_shield:249", "-nuparams=PIVX_v5.5:250", "-nuparams=v6_evo:250", "-whitelist=127.0.0.1"]] * self.num_nodes
for i in [self.remoteOnePos, self.remoteTwoPos, self.remoteDMN1Pos]:
self.extra_args[i] += ["-listen", "-externalip=127.0.0.1"]
self.extra_args[self.minerPos].append("-sporkkey=932HEevBSujW2ud7RfB1YF91AFygbBRQj3de3LyaCRqNzKKgWXi")
Index: src/consensus/upgrades.cpp
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/src/consensus/upgrades.cpp b/src/consensus/upgrades.cpp
--- a/src/consensus/upgrades.cpp (revision fe1c0adfaff413b7ce03793e8d012e0334dab0d7)
+++ b/src/consensus/upgrades.cpp (date 1657591085736)
@@ -62,6 +62,10 @@
/*.strInfo =*/ "New staking rules",
},
{
+ /*.strName =*/ "PIVX_v5.5",
+ /*.strInfo =*/ "New rewards structure",
+ },
+ {
/*.strName =*/ "v6_evo",
/*.strInfo =*/ "Deterministic Masternodes",
},
Index: test/functional/tiertwo_dkg_errors.py
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/test/functional/tiertwo_dkg_errors.py b/test/functional/tiertwo_dkg_errors.py
--- a/test/functional/tiertwo_dkg_errors.py (revision fe1c0adfaff413b7ce03793e8d012e0334dab0d7)
+++ b/test/functional/tiertwo_dkg_errors.py (date 1657597464929)
@@ -15,7 +15,7 @@
def set_test_params(self):
self.set_base_test_params()
- self.extra_args = [["-nuparams=v5_shield:1", "-nuparams=v6_evo:130", "-debug=llmq", "-debug=dkg", "-debug=net"]] * self.num_nodes
+ self.extra_args = [["-nuparams=v5_shield:1", "-nuparams=PIVX_v5.5:130", "-nuparams=v6_evo:130", "-debug=llmq", "-debug=dkg", "-debug=net"]] * self.num_nodes
self.extra_args[0].append("-sporkkey=932HEevBSujW2ud7RfB1YF91AFygbBRQj3de3LyaCRqNzKKgWXi")
def reset_simerror(self, node): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After some more internal testing, here is some additional feedback:
- A couple minor logic issues lead to inconsistency between block reward, budget value, and MN payment amount in terms of at which block they change.
- Suggest to include regtest in the rewards change process by transitioning away from the static 250 PIV block reward to the new block reward at the suggested changeover height (+1).
- During testing, after the new reward structure was activated, the GUI started labeling MN rewards as Budget payments, as the logic for that assumes any MN payment above
consensus.nMNBlockReward
must be a budget payment.
I've added budget unit test cases for v5.5 activation. |
Commits have been added for switching the protocol enforcement spork and adding a masternode payment amount unit test. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK 7887920
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK 7887920
I have reviewed these changes.
Downloaded, built (in release and debug), and reviewed the code without material issues. |
Adjust block rewards for staking, masternode and budget to change to new values when V5.5 upgrade block is reached.
Adds UPGRADE_V5.5 block height value to chainparams, currently set to placeholder values for mainnet and testnet.
Adds nNewMNBlockReward value to chainparams--note the planned refactoring to call Params().GetConsensus().nMNBlockReward directly would need to be rethought or wait until after change has taken effect since there are now two parameters which is selected in GetMasternodePayment.
Unit tests for these changes are still WIP.