Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Update polkadot inflation to take into account auctions #5872

Merged
merged 12 commits into from
Nov 8, 2022
Prev Previous commit
Next Next commit
Fixes
  • Loading branch information
KiChjang committed Oct 13, 2022
commit b522abe119af873afddb05de2c5e68c5ef67c255
2 changes: 1 addition & 1 deletion runtime/kusama/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,7 @@ impl pallet_staking::EraPayout<Balance> for EraPayout {
.into_iter()
// all active para-ids that do not belong to a system or common good chain is the number
// of parachains that we should take into account for inflation.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this true? what about parathreads which did not secure an auction slot?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the ::parachains() api only returns the list of paras which have upgraded to a parachain. It does not include parathreads.

.filter(|i| i >= LOWEST_PUBLIC_ID)
.filter(|i| *i >= LOWEST_PUBLIC_ID)
.count() as u64;

const MAX_ANNUAL_INFLATION: Perquintill = Perquintill::from_percent(10);
Expand Down
2 changes: 1 addition & 1 deletion runtime/polkadot/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,7 @@ impl pallet_staking::EraPayout<Balance> for EraPayout {
.into_iter()
// all active para-ids that do not belong to a system or common good chain is the number
kianenigma marked this conversation as resolved.
Show resolved Hide resolved
// of parachains that we should take into account for inflation.
.filter(|i| i >= LOWEST_PUBLIC_ID)
.filter(|i| *i >= LOWEST_PUBLIC_ID)
.count() as u64;

const MAX_ANNUAL_INFLATION: Perquintill = Perquintill::from_percent(10);
Expand Down