Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upProof of Growth Community Changes (PoG2) #366
Conversation
mempko
added some commits
Jun 12, 2018
mempko
added
the
WIP
label
Jun 13, 2018
mempko
added some commits
Jun 13, 2018
mempko
changed the title from
Feature/pog2
to
Proof of Growth Community Changes
Jul 2, 2018
mempko
added some commits
Jul 2, 2018
src/chainparams.cpp
| @@ -326,6 +334,14 @@ class CTestNetParams : public CChainParams | ||
| consensus.imp_miner_reward_for_every_x_blocks = 10; //invite every 10 minutes at a minumum, 144 per day. | ||
| consensus.imp_weights = {60, 40}; | ||
| // PoG v2 settings. | ||
| consensus.pog2_blockheight = 100000; |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
src/chainparams.cpp
| consensus.pog2_blockheight = 300000; | ||
| consensus.pog2_total_winning_ambassadors = 15; | ||
| consensus.pog2_ambassador_percent_cut = 50; //50% | ||
| consensus.pog2_pow_target_timespan = 5 * 60 * 60; // every 5 hours |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
src/pog2/cgs.cpp
| int height, | ||
| Entrants& entrants) | ||
| { | ||
| assert(prefviewcache); |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
tonypizzicato
Jul 9, 2018
Contributor
why do we use prefviewcache here if we pass db to this function?
tonypizzicato
Jul 9, 2018
Contributor
why do we use prefviewcache here if we pass db to this function?
src/pog2/cgs.cpp
| assert(c.amount >= 0); | ||
| double age_scale = AgeScale(height, c); | ||
| CAmount amount = std::floor(age_scale * c.amount); |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
tonypizzicato
Jul 9, 2018
Contributor
is my computation right here:
10 MRT coins would be accounted in aged balance only after 480 blocks?
tonypizzicato
Jul 9, 2018
Contributor
is my computation right here:
10 MRT coins would be accounted in aged balance only after 480 blocks?
src/pog2/select.cpp
| [height,¶ms](const Entrant& e) { | ||
| assert(height >= e.beacon_height); | ||
| const double age = height - e.beacon_height; | ||
| return age <= params.pog2_new_distribution_age; |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
src/validation.cpp
| if(pindex && pindex->nHeight > 0) { | ||
| auto height = prefviewdb->GetReferralHeight(refOut->GetAddress()); | ||
| if(height > 0) { |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
mempko
Aug 5, 2018
Contributor
no, in this case GetReferralHeight returns -1 if it isn't indexed in the DB. It's lazy indexed on demand. Which is reasonable since the height is immutable once in the chain.
mempko
Aug 5, 2018
Contributor
no, in this case GetReferralHeight returns -1 if it isn't indexed in the DB. It's lazy indexed on demand. Which is reasonable since the height is immutable once in the chain.
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
tonypizzicato
Aug 6, 2018
Contributor
ok, then it should be if (height == -1)
why would we insert to cache if it's already there?
tonypizzicato
Aug 6, 2018
Contributor
ok, then it should be if (height == -1)
why would we insert to cache if it's already there?
src/validation.cpp
| assert(height >= params.pog2_blockheight); | ||
| assert(prefviewdb != nullptr); | ||
| static size_t max_embassador_lottery = 0; |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
src/validation.cpp
| pog2::Entrants entrants; | ||
| // unlikely that the candidates grew over 50% since last time. | ||
| auto reserve_size = max_embassador_lottery * 1.5; |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
src/validation.cpp
| referral::NoviteRange novite_range{0,0}; | ||
| const bool pog2 = pindex->nHeight >= chainparams.GetConsensus().pog2_blockheight; | ||
| if (validate || pog2) { |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
src/validation.cpp
| assert(height >= 0); | ||
| assert(prefviewcache); | ||
| static size_t max_embassador_lottery = 0; |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
src/pog2/cgs.cpp
| assert(height >= 0); | ||
| assert(c.height <= height); | ||
| double age = Age(height, c) / TWO_DAYS; |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
mempko
added some commits
Aug 7, 2018
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
adilwali
Aug 9, 2018
Contributor
I have built a small simulator for this, and will be playing with many new custom growth patterns on TestNet.
|
I have built a small simulator for this, and will be playing with many new custom growth patterns on TestNet. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
adilwali
Aug 9, 2018
Contributor
Using the new PoG in concert with getAddressRank and getAddressLeaderboard has empowered us to test many (many many) permutations of the PoG2 algorithms.
Using multiple sets of slots is a huge win, and allows us to reward two different types of positive actors:
- Those with significant stake.
- Those who have worked to grow the community.
Since we do not allow double-selection, this will end up allowing Growth miners two paths toward earning mining rewards in Merit.
|
Using the new PoG in concert with Using multiple sets of slots is a huge win, and allows us to reward two different types of positive actors:
Since we do not allow double-selection, this will end up allowing Growth miners two paths toward earning mining rewards in Merit. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
adilwali
Aug 9, 2018
Contributor
I will post some visuals as soon as I can. But the distributions are looking decidedly more robust and inclusive. This approach also feels like it is the most future-proof as the network reaches hundreds of thousands and eventually millions of users.
|
I will post some visuals as soon as I can. But the distributions are looking decidedly more robust and inclusive. This approach also feels like it is the most future-proof as the network reaches hundreds of thousands and eventually millions of users. |
mempko
added some commits
Aug 9, 2018
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
adilwali
Aug 13, 2018
Contributor
Keeping the pool makes sense for now. But it's also something we could easily bring back in PoG3 if it's needed. Today, it only provides incremental utility.
Over time, of course, an eligibility pool will become a lot more interesting. (Requiring certain community size or a certain trust score in order to be considered could further strengthen the community.)
|
Keeping the pool makes sense for now. But it's also something we could easily bring back in PoG3 if it's needed. Today, it only provides incremental utility. Over time, of course, an eligibility pool will become a lot more interesting. (Requiring certain community size or a certain trust score in order to be considered could further strengthen the community.) |
mempko commentedJun 13, 2018
•
edited
Edited 22 times
-
mempko
edited Aug 15, 2018 (most recent)
-
mempko
edited Aug 9, 2018
-
mempko
edited Aug 9, 2018
-
mempko
edited Aug 4, 2018
-
mempko
edited Aug 4, 2018
-
mempko
edited Jul 19, 2018
-
mempko
edited Jul 19, 2018
-
mempko
edited Jul 4, 2018
-
mempko
edited Jul 4, 2018
-
mempko
edited Jul 4, 2018
-
mempko
edited Jul 2, 2018
-
mempko
edited Jul 2, 2018
-
mempko
edited Jul 2, 2018
-
mempko
edited Jul 2, 2018
-
mempko
edited Jul 2, 2018
-
mempko
edited Jul 2, 2018
-
mempko
edited Jul 2, 2018
-
mempko
edited Jul 2, 2018
-
mempko
edited Jul 2, 2018
-
mempko
edited Jul 2, 2018
-
mempko
edited Jul 2, 2018
-
mempko
edited Jul 2, 2018
-
mempko
created Jun 13, 2018
Community Polled changes to PoG and invite distribution.