Skip to content

Conversation

@hodlforjesus
Copy link
Contributor

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.

// 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) {

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)

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?

Copy link
Contributor Author

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.

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)

Choose a reason for hiding this comment

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

nit, stake spelling mistake

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

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

#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

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

Copy link
Contributor Author

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.

Choose a reason for hiding this comment

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

Ok

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.

2 participants