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

implement prioritized disputes selection #4533

Open
EclesioMeloJunior opened this issue Feb 11, 2025 · 0 comments
Open

implement prioritized disputes selection #4533

EclesioMeloJunior opened this issue Feb 11, 2025 · 0 comments
Assignees
Labels
A-tooBig issue or PR needs to be broken down to smaller parts. C-complex Complex changes across multiple modules. Possibly will require additional research. S-subsystems-common

Comments

@EclesioMeloJunior
Copy link
Member

EclesioMeloJunior commented Feb 11, 2025

Description

Disputes are an important inherent data component, so we should implement the algorithm that selects relevant disputes and new votes, so we can provide to the runtime relevant information.

How the prioritization works?

Generally speaking disputes can be described as:

  • Active vs Inactive
  • Known vs Unknown onchain
  • Offchain vs Onchain
  • Concluded onchain vs Unconcluded onchain

Provisioner fetches all disputes from dispute-coordinator and separates them in multiple partitions, see struct PartitionedDisputes. Each partition has got a priority implicitly assigned to it and the disputes are selected based on this priority (e.g. disputes in partition 1, then if there is space - disputes from partition 2 and so on)

Flow

  1. Retrieve on chain disputes, if the runtime does not support the Disputes method then return empty
  2. Retrieve recent disputes, these are disputes offchain tracked by disputes-coordinator subsytems (filter confimed, concluded and disputes that already exists on chain)
  3. Partition recent disputes
  4. Vote selection, selects the votes from PartitionedDisputes which should be sent to the runtime, votes which are already known on chain are filtered out, the result should be sorted by (Session Index, Candidate Hash) (runtime requirement).

Links

@EclesioMeloJunior EclesioMeloJunior added A-tooBig issue or PR needs to be broken down to smaller parts. C-complex Complex changes across multiple modules. Possibly will require additional research. S-subsystems-common labels Feb 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-tooBig issue or PR needs to be broken down to smaller parts. C-complex Complex changes across multiple modules. Possibly will require additional research. S-subsystems-common
Projects
None yet
Development

No branches or pull requests

1 participant