-
Notifications
You must be signed in to change notification settings - Fork 335
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
Fix genesis chain specs #1046
Fix genesis chain specs #1046
Conversation
…ocks per round configured
No description provided. |
It looks to me as if constructing the InflationInfo requires reading the Round storage, but it is not set yet since that happens on build_genesis. Either hardcode them or import parachain_staking and mark build it as min: Perbill::from_parts(Perbill::from_percent(4).deconstruct() / ::DefaultBlocksPerRound::get()), |
So essentially, if you dont wanna change the way InflationInfo is consctructed, I suggest something like:
|
The build is failing. Seems like we could use parachainstaking's Config trait. But I wonder why the compiler says it is ambiguous... Is there some other meaning of |
I think the trait has to be in scope. I'm going to export it from the runtime. |
Just use moonbase_runtime::DefaultBlocksPerRound::get() |
One more TS test failing, it should've failed in the base PR, but the genesis inflation wasn't updated. |
@4meta5 It still doesn't compile, think about compiling locally before pushing, because the CI takes too long to give you the compilation errors:
|
Yeah, I usually don't compile the node locally because it takes a long time. I'll start compiling locally to speed this up. |
@4meta5 there are still other compilation errors, the CI is not made to serve you as a compiler, but to ensure that there are no omissions, you must compile locally otherwise you risk having too many round trips with the CI |
Understood, compiling locally now. Usually doesn't take as many tries as today...
I don't really get this risk, but I'm compiling the node locally now and will debug locally before the next commit. |
* Increases staking delays * Fix comments * Update runtime rust tests to reflect MinCollatorStk changes * fix rust tests (2x longer rounds) * fix moonbeam and moonriver tests * Fix genesis chain specs (#1046) * fix genesis chain_specs so round inflation is set based on default blocks per round configured * fix build * use gorka suggestion to use associated type instead of storage item * fix units * export ParachainStakingConfigTrait from runtime to use in chainspecs * fix * revert export use direct const getter * unused import * try TS inflation genesis config * fix arithmetic * fix annual to round inflation in genesis * fix * fix * pub mod inflation * compiles still TS tests off * fix ts Co-authored-by: Stephen Shelton <steve@brewcraft.org> Co-authored-by: nanocryk <6422796+nanocryk@users.noreply.github.com> Co-authored-by: librelois <c@elo.tf> Co-authored-by: Amar Singh <asinghchrony@protonmail.com>
Fixes genesis chain specs so they reflect runtime configured blocks per round.
Also fixes a problem discovered wherein the per-round inflation genesis config for all networks wasn't set correctly. It assumed that inflation per round = annuual inflation / number of rounds per year. That isn't correct, @girazoki corrected this assumption a long time ago in
parachain_staking::inflation
.On top of #1030