-
Notifications
You must be signed in to change notification settings - Fork 26
db-analyser: add DumpStakeDistributions pass #1421
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
base: main
Are you sure you want to change the base?
Conversation
Blue line: This graph shows that the 551 pools that have been in the top 90% of every epoch from 506 to 543 (ie 190 days) have controlled more than 88% of stake in every epoch. Red line: Even if all of those pools' individual least-stake epochs were instead simultaneous, that lower bound is 81.77% cumulative stake. I think that suggests the stake is quite stable within these 551 pools over the past 190 days. |
7c956a4
to
b4d17e1
Compare
$ (\ss -> show eno : show (SL.pdTotalActiveStake pd) : show (Map.size mp) : ss) | ||
$ [ show (keyhash, SL.individualTotalPoolStake x, SL.individualPoolStake x) | ||
| (keyhash, x) <- Map.assocs mp |
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.
AFAIK pdTotalActiveStake
and individualTotalPoolStake
are only used for Conway voting stuff, so individualTotalPoolStake / pdTotalActiveStake
does not necessarily equal individualPoolStake
, which is used for leader election:
Line 521 in 43c1fef
maybe 0 SL.individualPoolStake $ |
Line 48 in 43c1fef
. map (second (PoolStake . SL.individualPoolStake)) |
So I think it makes sense to either ignore them here or make this explicit in the output somehow.
I looked at all epochs until 544, and so far, we apparently didn't have a difference here, no idea how likely it is for a difference to arise in the future.
See IntersectMBO/cardano-ledger#4324 (comment), cc @lehins for confirmation.
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.
AFAIK pdTotalActiveStake and individualTotalPoolStake are only used for Conway voting stuff
That statement is not quite correct.
IndividualPoolStake
that is extracted from PoolDistr
as it is done in consensus, will not have any voting related stake within it. However, the version of this in DRep pulser will have proposal deposits added to that stake. The issue was that the haddock for individualTotalPoolStake
should not have stated anything about proposal deposits.
I looked at all epochs until 544, and so far, we apparently didn't have a difference here, no idea how likely it is for a difference to arise in the future.
So, individualTotalPoolStake / pdTotalActiveStake should always equal individualPoolStake for leader election, unless you are looking into the version from pulser.
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.
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.
Idea for another thing to plot: the statistical distance/total variation distance of the stake distributions over time (potentially eliding the top 90%). This is what the researchers use in the Praos paper (Definition 15, Theorem 11) for their notion of stake shift, as well as in their later paper "Stake Shift in Major Cryptocurrencies: An Empirical Study".
Concretely, the stake shift
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.
Great, thank you. I'll compute
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.
A new pass in
db-analyser
and a bash/awk script for post-processing its output.