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

Staking OCW should not create solutions that are too big #7170

@kianenigma

Description

@kianenigma

Currently, the network size is such that the solutions to the NPoS easily fit into a block, both in terms of weight and size (TODO: script to report these easily). Sooner or later, we might reach a point where the solution might not fit into a block. For this, we have permanent solutions:

  1. limit the total number of nominators
  2. DNPoS

But one way or another, if we don't have these limitations, the OCW must be capable of generating a solution that is sane and fits in the block.

The danger is that a malicious actor might generate a lot of nominators, so that the OCW will always generate a solution that is too big to fit. Then, they can submit a mediocre solution on chain which will be accepted. Sadly, we won't fallback to on-chain phragmen either.

This can also be mitigated by implementing the PJR-check #7009.

Metadata

Metadata

Assignees

No one assigned

    Labels

    I2-securityThe client fails to follow expected, security-sensitive, behaviour.U1-asapNo need to stop dead in your tracks, however issue should be addressed as soon as possible.Z6-mentorAn easy task where a mentor is available. Please indicate in the issue who the mentor could be.

    Type

    No type

    Projects

    Status

    ✅ Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions