Skip to content
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

Update Polkadot ideal staking rate #26

Merged
merged 17 commits into from Oct 21, 2023

Conversation

kianenigma
Copy link
Contributor

relay/polkadot/src/lib.rs Outdated Show resolved Hide resolved
@bkchr bkchr mentioned this pull request Oct 17, 2023
relay/polkadot/src/lib.rs Show resolved Hide resolved
@@ -130,7 +130,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_name: create_runtime_str!("polkadot"),
impl_name: create_runtime_str!("parity-polkadot"),
authoring_version: 0,
spec_version: 9430,
spec_version: 1_000_000,
Copy link
Member

@ggwpez ggwpez Oct 19, 2023

Choose a reason for hiding this comment

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

@liamaharon i dont see a warning in the try-runtime-cli that the spec version did not increase when i use the runtime from master (1dc04eb).
Could you check please?

Copy link
Contributor

Choose a reason for hiding this comment

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

That's no good.. Will check it tomorrow and write back here.

Copy link
Contributor

Choose a reason for hiding this comment

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

Screenshot 2023-10-23 at 10 21 40

It does check and log a warning, but maybe you missed it because it logs before running the migrations and is easily missed.

I've created an issue to move the warning log to after the migrations execute and make it more obvious paritytech/try-runtime-cli#45

relay/polkadot/src/lib.rs Show resolved Hide resolved
if let Ref::Ongoing(ref_status) = reff {
Some((idx, ref_status))
} else {
None
Copy link
Member

Choose a reason for hiding this comment

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

We can eventually clean all the old Referenda, or? Currently they just seem to bloat storage.

relay/polkadot/src/lib.rs Outdated Show resolved Hide resolved
bkchr and others added 4 commits October 19, 2023 23:57
The new society is at the same index as the old one, but has different `calls`.
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
total_stakable: Balance,
max_annual_inflation: Perquintill,
period_fraction: Perquintill,
auctioned_slots: u64,
Copy link
Member

Choose a reason for hiding this comment

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

I dont remember the current status, but back when this was originally written, i believe the auctioned slots counter was not exactly correct.

has this logic been updated?

/// See <https://forum.polkadot.network/t/adjusting-polkadots-ideal-staking-rate-calculation/3897>.
fn polkadot_era_payout(
total_staked: Balance,
total_stakable: Balance,
Copy link
Member

Choose a reason for hiding this comment

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

i also think it would be sensible to peek in on what this value currently is on Polkadot and ensure it makes sense.

@bkchr bkchr merged commit 7bd91e8 into polkadot-fellows:main Oct 21, 2023
5 checks passed
@ggwpez ggwpez mentioned this pull request Nov 2, 2023
1 task
bkchr added a commit that referenced this pull request Nov 20, 2023
In the PR we bump versions for all dependacy crates from `polkadot-sdk`
and apply all required changes

Changes:
- `parachains_runtime_api_impl` `v5` -> `v7`,
  - from paritytech/polkadot-sdk#1543;
- `Consideration` setup for preimage pallet instances,
  - from  paritytech/polkadot-sdk#1363;
- `experimental` feature removed for `pallet-society`, `pallet-xcm`,
`runtime-common` crates,
  - from paritytech/polkadot-sdk#1503;
- `pallet_election_provider_multi_phase::Config::SignedDepositBase` set
to `GeometricDepositBase`,
  - from paritytech/polkadot-sdk#1547;
- support `open_outbound_hrmp_channel_for_benchmarks_or_tests` func
rename,
  - from paritytech/polkadot-sdk#1422;
- missing weight functions added for `runtime_parachains_hrmp` and
`pallet_preimage`;

TODO:
- [x] Deleted the Copy&paste para scheduler migration from
#26 in
b666613. This should be applied in the
next runtime upgrade, but i did not properly check yet.

---------

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Co-authored-by: Bastian Köcher <git@kchr.de>
Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants