Bulwark Re-Stake#173
Open
hodlforjesus wants to merge 6 commits intobulwark-crypto:masterfrom
hodlforjesus:fb-restake
Open
Bulwark Re-Stake#173hodlforjesus wants to merge 6 commits intobulwark-crypto:masterfrom hodlforjesus:fb-restake
hodlforjesus wants to merge 6 commits intobulwark-crypto:masterfrom
hodlforjesus:fb-restake
Conversation
akshaynexus
reviewed
Aug 5, 2019
| // 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) { | ||
|
|
akshaynexus
reviewed
Aug 5, 2019
| } | ||
| } | ||
| // 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.
doesn't this achieve the same as the code deleted above?
Contributor
Author
There was a problem hiding this comment.
Yes the amount didn't change but I wanted to group the logic together.
akshaynexus
reviewed
Aug 5, 2019
| // 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) |
akshaynexus
reviewed
Aug 5, 2019
| 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.
this adds more incentive to stake grind, but in a different way,might wanna see how this plays out on a testnet
akshaynexus
reviewed
Aug 5, 2019
| #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.
What is this spork used for?its not used anywhere in this pr afaik
Contributor
Author
There was a problem hiding this comment.
This one is for another upcoming feature Penple is looking into.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.