-
Notifications
You must be signed in to change notification settings - Fork 41
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
Gensis: Use proper inflation config and eligiblity ratio #960
Gensis: Use proper inflation config and eligiblity ratio #960
Conversation
Codecov Report
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more @@ Coverage Diff @@
## main #960 +/- ##
==========================================
- Coverage 94.51% 94.39% -0.13%
==========================================
Files 93 93
Lines 21148 21060 -88
==========================================
- Hits 19989 19880 -109
- Misses 1159 1180 +21
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
Apart from few questions rest looks good. |
Co-authored-by: Vivek Pandya <vivekvpandya@gmail.com>
@Chralt98 seems like our CodeCov token is expired. Can you add a new one? |
I never added a CodeCov token. According to this https://docs.codecov.com/docs/frequently-asked-questions#where-is-the-repository-upload-token-found the token should not be required for public repositories. https://github.com/codecov/codecov-action#usage
Added PR #962 |
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.
Ok, this seems like a useful genesis config for the parachain-staking pallet (especially if we want to migrate over to Polkadot).
Currently this is the staking rate on Zeitgeist:
staking_rate = staking_amount / total_issuance
staking_amount
: query fromparachainStaking -> total
total_issuance
: query frombalances -> totalIssuance
staking_rate = 172185525432272240 / 1021933231948330118 approx. = 16,85%
So with the current inflation plan, we would get an annual inflation of 5% currently.
Although I am personally not a big fan of inflating a currency at all. But it is what it is.
Co-authored-by: Chralt <chralt.developer@gmail.com>
Applies proper configuration for
parachain-staking
at genesis.The inflation config initialization is adjusted in respect to one pr from moonbeam and the latest state of the code. The new code properly derives per-round inflation based on annual inflation and expected staking amounts. The total inflation based on expected staking amounts now looks like that:
The changes allow allow to configure different
InflationConfig
for each network. This won't affect the running networks and can be readjusted once a new network is about to be spawned.Besides that, the
EligibilityRatio
is set to1
, meaning that only one collator is selected per block (unless he timeouts). Anything else can lead to network congestion.