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

[Staking] Extra check for Virtual Stakers #5791

Open
Ank4n opened this issue Sep 20, 2024 · 0 comments
Open

[Staking] Extra check for Virtual Stakers #5791

Ank4n opened this issue Sep 20, 2024 · 0 comments
Assignees
Labels
I9-optimisation An enhancement to provide better overall performance in terms of time-to-completion for a task. T2-pallets This PR/Issue is related to a particular pallet.

Comments

@Ank4n
Copy link
Contributor

Ank4n commented Sep 20, 2024

In staking, virtual stakers are system generated keys to manage ledger for pool accounts. These accounts do not need to exist (and will not exist unless some account transfers funds to it to mess with the system).

Only pallets (trusted modules) have access to create these type of stakers via the trait StakingUnchecked. pallet-staking does not do any validation on it.

Defensively, we could add the following

  • ensure nonce (transaction count) of virtual_staker is zero. Since this account is keyless, it can never sign its own transaction.
  • Try state check to ensure all existing virtual_stakers have zero nonce.
@Ank4n Ank4n added the I9-optimisation An enhancement to provide better overall performance in terms of time-to-completion for a task. label Sep 20, 2024
@Ank4n Ank4n self-assigned this Sep 20, 2024
@Ank4n Ank4n added the T2-pallets This PR/Issue is related to a particular pallet. label Sep 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I9-optimisation An enhancement to provide better overall performance in terms of time-to-completion for a task. T2-pallets This PR/Issue is related to a particular pallet.
Projects
Status: 📕 Backlog
Development

No branches or pull requests

1 participant