-
Notifications
You must be signed in to change notification settings - Fork 57
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
Bulwark Re-Stake #173
base: master
Are you sure you want to change the base?
Bulwark Re-Stake #173
Conversation
@@ -915,6 +916,7 @@ int GetIXConfirmations(uint256 nTXHash) { | |||
// introduced to help nodes establish a consistent view of the coin | |||
// age (trust score) of competing branches. | |||
bool GetCoinAge(const CTransaction& tx, const unsigned int nTxTime, uint64_t& nCoinAge) { | |||
|
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.
nit, trailing space
} | ||
} | ||
// Ensure the output of the stake is above min amount (100 for BWK) | ||
if (block.vtx[1].vout[1].nValue < minStakeAmount) |
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.
doesn't this achieve the same as the code deleted above?
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.
Yes the amount didn't change but I wanted to group the logic together.
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.
Ok
// If you have not previously staked on this input then you will have to wait longer for your stake to mature. | ||
// This penalizes "Stake Grinding" and gives reason to leave stakes alone reducing traffic on the network. | ||
if (IsSporkActive(SPORK_25_BWK_RESTAKE) && block.GetBlockTime() >= GetSporkValue(SPORK_25_BWK_RESTAKE)) { | ||
// Time is doubled if it's not a basic steak (without split) |
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.
nit, stake spelling mistake
@@ -1704,8 +1707,17 @@ bool CWallet::SelectStakeCoins(std::set<std::pair<const CWalletTx*, unsigned int | |||
if (out.tx->vout[out.i].nValue < nStakeAmount) | |||
continue; | |||
|
|||
//For Bulwark Re-staking since we know if a tx is previous stake it'll be considered re-stake resulting in various advantages |
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.
this adds more incentive to stake grind, but in a different way,might wanna see how this plays out on a testnet
@@ -47,6 +47,8 @@ using namespace boost; | |||
#define SPORK_21_ENABLE_ZEROCOIN 10020 | |||
#define SPORK_22_ZEROCOIN_MAINTENANCE_MODE 10021 | |||
#define SPORK_23_STAKING_REQUIREMENTS 10022 | |||
#define SPORK_24_QUERY_NODES 10023 |
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.
What is this spork used for?its not used anywhere in this pr afaik
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.
This one is for another upcoming feature Penple is looking into.
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.
Ok
Bulwark's "Re-Stake". Because Bulwark stores metadata identifying stake in tx we know that previously this was a POS reward
If you have not previously staked on this input then you will have to wait longer for your stake to mature.
This penalizes "Stake Grinding" and gives reason to leave stakes alone reducing traffic on the network.