Skip to content

Conversation

@JaredTate
Copy link

This pull request updates RegTest network settings to the same settings I used in my recent video where I demonstrated a fix for the DGB mining reward decay to go to 0 instead of 1. Also in this pull request, I provide the 1-line fix to make sure the reward goes to 0 and does not stay at 1 infinitely.

Here is a link to the video where I demo the test & prove this fix: https://www.youtube.com/watch?v=BcOOxoHXJ0I

The main issue is caused by 1 line of code:
if (nSubsidy < COIN) { nSubsidy = COIN; }

Simply needs to be changed to:

if (nSubsidy < COIN) { nSubsidy = o; }

In addition to the regest changes I also changed a few more variables locally to speed up the previous DGB hardfork points. These local changes if anyone wants to test themselves were below, bottom line of each was test change to make network simulate changes faster with regtest mining. Note the below changes are not in this PR, this is just for reference.

if  (nHeight < 1440)
if (nHeight < 3)

else if (nHeight < 5760)
else if (nHeight < 6)

int64_t months = blocks * BLOCK_TIME_SECONDS / SECONDS_PER_MONTH;
int64_t months = blocks * 1;```

@ycagel ycagel requested review from SmartArray, gto90, j50ng and ycagel March 2, 2023 18:22
@JaredTate JaredTate changed the base branch from feature/8.22.0 to develop March 12, 2023 21:30
gto90
gto90 previously approved these changes Mar 12, 2023
Copy link
Member

@gto90 gto90 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK

BouwmanR
BouwmanR previously approved these changes Mar 12, 2023
Copy link

@BouwmanR BouwmanR left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cACK

j50ng
j50ng previously approved these changes Mar 12, 2023
Copy link

@j50ng j50ng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Concept ACK

ycagel
ycagel previously approved these changes Mar 13, 2023
Copy link
Member

@ycagel ycagel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cACK

@SmartArray
Copy link

SmartArray commented Mar 13, 2023

Just tested the changes. These new parameters cause a lot of failed tests when rebased against develop.
I suggest we should leave the regtest params unchanged because MultiAlgo is definitely not covered in most of the functional tests and it would be painful to do that now. It's not a requirement to change these parameters, is it?

I would also suggest a second PR in which we just change the default value for easyPow to true (this argument needs to be removed then in all functional tests)

The fix of setting the emission to 0 instead of COIN is good of course. Jared, can you amend your latest commit?

@JaredTate JaredTate dismissed stale reviews from ycagel, j50ng, BouwmanR, and gto90 via e35b548 March 13, 2023 16:38
@JaredTate JaredTate changed the title RegTest Update & Reward to 0 Code Reward to 0 Code Mar 13, 2023
Copy link

@SmartArray SmartArray left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK

Copy link
Member

@ycagel ycagel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cACK

@JaredTate JaredTate requested review from gto90 and j50ng March 13, 2023 16:48
Copy link

@j50ng j50ng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cACK

@SmartArray SmartArray merged commit a2b9c99 into DigiByte-Core:develop Mar 13, 2023
SmartArray pushed a commit that referenced this pull request Apr 1, 2023
SmartArray pushed a commit that referenced this pull request Apr 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants