veriblock-pop-cpp
C++11 Libraries for leveraging VeriBlock Proof-Of-Proof blockchain technology.
altintegration::PopPayoutsParams Struct Reference

Defines config for POP payouts. More...

Detailed Description

Definition at line 24 of file alt_chain_params.hpp.

#include <alt_chain_params.hpp>

+ Collaboration diagram for altintegration::PopPayoutsParams:

Public Member Functions

double startOfSlope () const noexcept
 we start decreasing rewards after this score More...
 
double slopeNormal () const noexcept
 we decrease reward coefficient for this value for each additional score point above startOfDecreasingLine More...
 
double slopeKeystone () const noexcept
 slope for keystone rounds More...
 
uint32_t keystoneRound () const noexcept
 among all rounds, this number represents round for keystone blocks. More...
 
uint32_t payoutRounds () const noexcept
 total number of payout rounds. More...
 
uint32_t flatScoreRound () const noexcept
 we use this round number to pay flat reward (does not depend on pop difficulty) More...
 
bool useFlatScoreRound () const noexcept
 should we use flat rewards at all More...
 
const std::vector< double > & roundRatios () const noexcept
 we have these payout modifiers for different rounds. More...
 
double maxScoreThresholdNormal () const noexcept
 limit block score to this value More...
 
double maxScoreThresholdKeystone () const noexcept
 limit block with keystones score to this value More...
 
uint32_t difficultyAveragingInterval () const noexcept
 collect this amount of blocks BEFORE the block to calculate pop difficulty More...
 
const std::vector< double > & relativeScoreLookupTable () const noexcept
 reward score table we score each VeriBlock and lower the reward for late blocks More...
 
int32_t getPopPayoutDelay () const noexcept
 number of blocks in ALT between endorsed block and payout block More...
 

Public Attributes

double mStartOfSlope = 1.0
 
double mSlopeNormal = 0.2
 
double mSlopeKeystone = 0.21325
 
uint32_t mKeystoneRound = 3
 
uint32_t mPayoutRounds = 4
 
uint32_t mFlatScoreRound = 2
 
bool mUseFlatScoreRound = true
 
double mMaxScoreThresholdNormal = 2.0
 
double mMaxScoreThresholdKeystone = 3.0
 
uint32_t mDifficultyAveragingInterval = 50
 
int32_t mPopPayoutDelay = 50
 
std::vector< double > mRoundRatios {0.97, 1.03, 1.07, 3.00}
 
std::vector< double > mLookupTable
 

Member Function Documentation

◆ difficultyAveragingInterval()

uint32_t altintegration::PopPayoutsParams::difficultyAveragingInterval ( ) const
inlinenoexcept

Definition at line 67 of file alt_chain_params.hpp.

67 {
68 return mDifficultyAveragingInterval;
69 }

◆ flatScoreRound()

uint32_t altintegration::PopPayoutsParams::flatScoreRound ( ) const
inlinenoexcept

Definition at line 45 of file alt_chain_params.hpp.

45{ return mFlatScoreRound; }

◆ getPopPayoutDelay()

int32_t altintegration::PopPayoutsParams::getPopPayoutDelay ( ) const
inlinenoexcept

Definition at line 78 of file alt_chain_params.hpp.

78{ return mPopPayoutDelay; }

◆ keystoneRound()

uint32_t altintegration::PopPayoutsParams::keystoneRound ( ) const
inlinenoexcept

we use this round number to detect keystones.

Definition at line 37 of file alt_chain_params.hpp.

37{ return mKeystoneRound; }

◆ maxScoreThresholdKeystone()

double altintegration::PopPayoutsParams::maxScoreThresholdKeystone ( ) const
inlinenoexcept

Definition at line 62 of file alt_chain_params.hpp.

62 {
63 return mMaxScoreThresholdKeystone;
64 }

◆ maxScoreThresholdNormal()

double altintegration::PopPayoutsParams::maxScoreThresholdNormal ( ) const
inlinenoexcept

Definition at line 57 of file alt_chain_params.hpp.

57 {
58 return mMaxScoreThresholdNormal;
59 }

◆ payoutRounds()

uint32_t altintegration::PopPayoutsParams::payoutRounds ( ) const
inlinenoexcept

we have this number of rounds eg rounds 0, 1, 2, 3, total is 4

Definition at line 41 of file alt_chain_params.hpp.

41{ return mPayoutRounds; }

◆ relativeScoreLookupTable()

const std::vector< double > & altintegration::PopPayoutsParams::relativeScoreLookupTable ( ) const
inlinenoexcept

Definition at line 73 of file alt_chain_params.hpp.

73 {
74 return mLookupTable;
75 }

◆ roundRatios()

const std::vector< double > & altintegration::PopPayoutsParams::roundRatios ( ) const
inlinenoexcept

Keystone round has the highest multiplier

Definition at line 52 of file alt_chain_params.hpp.

52 {
53 return mRoundRatios;
54 }

◆ slopeKeystone()

double altintegration::PopPayoutsParams::slopeKeystone ( ) const
inlinenoexcept

Definition at line 33 of file alt_chain_params.hpp.

33{ return mSlopeKeystone; }

◆ slopeNormal()

double altintegration::PopPayoutsParams::slopeNormal ( ) const
inlinenoexcept

Definition at line 30 of file alt_chain_params.hpp.

30{ return mSlopeNormal; }

◆ startOfSlope()

double altintegration::PopPayoutsParams::startOfSlope ( ) const
inlinenoexcept

Definition at line 26 of file alt_chain_params.hpp.

26{ return mStartOfSlope; }

◆ useFlatScoreRound()

bool altintegration::PopPayoutsParams::useFlatScoreRound ( ) const
inlinenoexcept

Definition at line 48 of file alt_chain_params.hpp.

48{ return mUseFlatScoreRound; }

Member Data Documentation

◆ mDifficultyAveragingInterval

uint32_t altintegration::PopPayoutsParams::mDifficultyAveragingInterval = 50

Definition at line 91 of file alt_chain_params.hpp.

◆ mFlatScoreRound

uint32_t altintegration::PopPayoutsParams::mFlatScoreRound = 2

Definition at line 87 of file alt_chain_params.hpp.

◆ mKeystoneRound

uint32_t altintegration::PopPayoutsParams::mKeystoneRound = 3

Definition at line 85 of file alt_chain_params.hpp.

◆ mLookupTable

std::vector<double> altintegration::PopPayoutsParams::mLookupTable
Initial value:
{
1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000,
1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000, 1.00000000,
0.48296816, 0.31551694, 0.23325824, 0.18453616, 0.15238463, 0.12961255,
0.11265630, 0.09955094, 0.08912509, 0.08063761, 0.07359692, 0.06766428,
0.06259873, 0.05822428, 0.05440941, 0.05105386, 0.04807993, 0.04542644,
0.04304458, 0.04089495, 0.03894540, 0.03716941, 0.03554497, 0.03405359,
0.03267969, 0.03141000, 0.03023319, 0.02913950, 0.02812047, 0.02716878,
0.02627801, 0.02544253, 0.02465739, 0.02391820, 0.02322107, 0.02256255,
0.02193952, 0.02134922}

Definition at line 96 of file alt_chain_params.hpp.

◆ mMaxScoreThresholdKeystone

double altintegration::PopPayoutsParams::mMaxScoreThresholdKeystone = 3.0

Definition at line 90 of file alt_chain_params.hpp.

◆ mMaxScoreThresholdNormal

double altintegration::PopPayoutsParams::mMaxScoreThresholdNormal = 2.0

Definition at line 89 of file alt_chain_params.hpp.

◆ mPayoutRounds

uint32_t altintegration::PopPayoutsParams::mPayoutRounds = 4

Definition at line 86 of file alt_chain_params.hpp.

◆ mPopPayoutDelay

int32_t altintegration::PopPayoutsParams::mPopPayoutDelay = 50

Definition at line 92 of file alt_chain_params.hpp.

◆ mRoundRatios

std::vector<double> altintegration::PopPayoutsParams::mRoundRatios {0.97, 1.03, 1.07, 3.00}

Definition at line 94 of file alt_chain_params.hpp.

◆ mSlopeKeystone

double altintegration::PopPayoutsParams::mSlopeKeystone = 0.21325

Definition at line 84 of file alt_chain_params.hpp.

◆ mSlopeNormal

double altintegration::PopPayoutsParams::mSlopeNormal = 0.2

Definition at line 83 of file alt_chain_params.hpp.

◆ mStartOfSlope

double altintegration::PopPayoutsParams::mStartOfSlope = 1.0

Definition at line 82 of file alt_chain_params.hpp.

◆ mUseFlatScoreRound

bool altintegration::PopPayoutsParams::mUseFlatScoreRound = true

Definition at line 88 of file alt_chain_params.hpp.


The documentation for this struct was generated from the following file: