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 Global Disputes #682

Merged
merged 211 commits into from
Nov 11, 2022
Merged

Implement Global Disputes #682

merged 211 commits into from
Nov 11, 2022

Conversation

Chralt98
Copy link
Member

@Chralt98 Chralt98 commented Jun 21, 2022

Fixes #654 Fixes #489

Problem
There is no implementation for voting on multiple outcomes.
Solution
https://github.com/zeitgeistpm/zeitgeist/blob/0f197fcf68e087043dc97b494924acf7cb7bd72f/zrml/global-disputes/README.md

  • Quick reminder: You need to run with --features with-global-disputes on battery station to get the global disputes system working.

@Chralt98 Chralt98 added the s:in-progress The pull requests is currently being worked on label Jun 21, 2022
@Chralt98 Chralt98 self-assigned this Jun 21, 2022
primitives/src/constants.rs Outdated Show resolved Hide resolved
@Chralt98 Chralt98 added s:review-needed The pull request requires reviews s:in-progress The pull requests is currently being worked on and removed s:in-progress The pull requests is currently being worked on s:review-needed The pull request requires reviews labels Nov 4, 2022
@Chralt98 Chralt98 added s:review-needed The pull request requires reviews and removed s:in-progress The pull requests is currently being worked on labels Nov 4, 2022
debug_assert!(false);
}

// because of division remainders allow some dust
Copy link
Contributor

Choose a reason for hiding this comment

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

But you shouldn't assume that remainder <= 100. If there are more than 100 outcome owners, this is no longer true. I would either remove the warning completely or check if remainder != reward_account_free_balance.checked_rem(&owners_len_in_balance). I think I'd go with the first option. While I like that you add some sanity checks, I don't think it's good style to clutter the code with lots of assumptions.

@Chralt98 Chralt98 added s:in-progress The pull requests is currently being worked on and removed s:review-needed The pull request requires reviews labels Nov 10, 2022
@Chralt98 Chralt98 added s:review-needed The pull request requires reviews and removed s:in-progress The pull requests is currently being worked on labels Nov 10, 2022
maltekliemann
maltekliemann previously approved these changes Nov 10, 2022
Copy link
Contributor

@maltekliemann maltekliemann left a comment

Choose a reason for hiding this comment

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

👍

@sea212 sea212 added s:accepted This pull request is ready for merge and removed s:review-needed The pull request requires reviews labels Nov 10, 2022
@Chralt98 Chralt98 merged commit 31a123a into main Nov 11, 2022
@Chralt98 Chralt98 deleted the chralt98-global-disputes branch November 11, 2022 09:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
i:spec-changed ⚠️ Implies change in spec version i:transactions-changed ⚠️ Implies change in transaction version s:accepted This pull request is ready for merge
Projects
None yet
4 participants