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

store min-active-bond onchain #12746

Closed
kianenigma opened this issue Nov 20, 2022 · 2 comments · Fixed by #12889
Closed

store min-active-bond onchain #12746

kianenigma opened this issue Nov 20, 2022 · 2 comments · Fixed by #12889
Assignees
Labels
J0-enhancement An additional feature request. Z6-mentor An easy task where a mentor is available. Please indicate in the issue who the mentor could be.

Comments

@kianenigma
Copy link
Contributor

kianenigma commented Nov 20, 2022

two options:

  1. when snapshot is being created, store the minimum voter. Either in EPM or in Staking side.
  2. when collect_exposure, track a map of all nominators, their stake, at the end, take the min.

Option 1 makes a whole lot more sense, so this should be in impl ElectionDataProvider for Staking, in the fn get_npos_voters().

@kianenigma kianenigma added the J0-enhancement An additional feature request. label Nov 20, 2022
@kianenigma kianenigma moved this to 📕 Backlog in (Nominated) Proof of Stake Nov 20, 2022
@kianenigma kianenigma added the J2-unconfirmed Issue might be valid, but it’s not yet known. label Nov 20, 2022
@kianenigma kianenigma moved this from 📕 Backlog to ⌛️ Sometime-soon in (Nominated) Proof of Stake Nov 20, 2022
@kianenigma
Copy link
Contributor Author

This will be almost zero cost for the chain, and it will be great for UIs.

@kianenigma kianenigma added Z6-mentor An easy task where a mentor is available. Please indicate in the issue who the mentor could be. and removed J2-unconfirmed Issue might be valid, but it’s not yet known. labels Dec 5, 2022
gpestana added a commit that referenced this issue Dec 9, 2022
Storing the `min-active-bond` onchain helps the UIs with minimal on-chain costs.

Closes #12746
@gpestana gpestana self-assigned this Dec 9, 2022
@gpestana
Copy link
Contributor

gpestana commented Dec 9, 2022

I took over this issue since no one did it, hopefully it's an easy and quick one.

paritytech-processbot bot pushed a commit that referenced this issue Dec 14, 2022
* Staking: store last min-active-bond on-chain

Storing the `min-active-bond` onchain helps the UIs with minimal on-chain costs.

Closes #12746

* Avoid relying on  sorting to set the

* Addresses PR comments
Repository owner moved this from ⌛️ Sometime-soon to ✅ Done in (Nominated) Proof of Stake Dec 14, 2022
ltfschoen pushed a commit to ltfschoen/substrate that referenced this issue Feb 22, 2023
* Staking: store last min-active-bond on-chain

Storing the `min-active-bond` onchain helps the UIs with minimal on-chain costs.

Closes paritytech#12746

* Avoid relying on  sorting to set the

* Addresses PR comments
ark0f pushed a commit to gear-tech/substrate that referenced this issue Feb 27, 2023
* Staking: store last min-active-bond on-chain

Storing the `min-active-bond` onchain helps the UIs with minimal on-chain costs.

Closes paritytech#12746

* Avoid relying on  sorting to set the

* Addresses PR comments
taqtiqa-mark pushed a commit to subversive-upstream/polkadot-sdk-substrate-frame-staking that referenced this issue Sep 14, 2023
* Staking: store last min-active-bond on-chain

Storing the `min-active-bond` onchain helps the UIs with minimal on-chain costs.

Closes paritytech/substrate#12746

* Avoid relying on  sorting to set the

* Addresses PR comments
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
J0-enhancement An additional feature request. Z6-mentor An easy task where a mentor is available. Please indicate in the issue who the mentor could be.
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants