Skip to content

Commit

Permalink
implement new assignment algorithm and lazy issuance (#68)
Browse files Browse the repository at this point in the history
* Revert "[ceremonies/#65] generate random meetup indices (#73)"

This reverts commit 47282e2.

* new assignment, lazy issuance, random locations

* [ceremonies/#75] use random coprime for assignment

* [ceremonies] fix no_std compilation and `fn find_coprime_below`

* [ceremonies] print error in `generate_meetup_assignment_params`

* [ceremonies] use checked math operations in `checked_ceil_division`, `assignment_fn`

* [ceremonies] extract most math functions to primitives

* [ceremonies] move `mod_inv` to math module

* [ceremonies] fix randomness in `generate_assignment_function_params` -> introduces failing tests

* [ceremonies] remove unnecessary loc_ix >= 0 comparison for u64 type

* [ceremonies] fix failing tests by fixing `pick_non_zero_u32`

* [ceremonies] minor cleanup

* [ceremonies] add tests for `get_greatest_common_denominator`

* [primitives/random_number_generator] simplify pick_non_zero_u32

* [ceremonies/math] fix-no std compilation; successfully compiles with the node.

* [ceremonies] remove unnecessary result in `generate_all_meetup_assignment_params`

* [ceremonies] add test `generate_meetup_assignment_params_is_random`

Co-authored-by: Nicolas Jakob <jakobnicolas@gmail.com>
Co-authored-by: Christian Langenbacher <clangenb+gh@protonmail.ch>
  • Loading branch information
3 people committed Dec 11, 2021
1 parent f701ef1 commit 14b5897
Show file tree
Hide file tree
Showing 16 changed files with 1,284 additions and 455 deletions.
19 changes: 10 additions & 9 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion balances/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "pallet-encointer-balances"
version = "0.7.0"
version = "0.8.0"
authors = ["encointer.org <alain@encointer.org> and Parity Technologies <admin@parity.io>"]
edition = "2018"

Expand Down
2 changes: 1 addition & 1 deletion bazaar/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "pallet-encointer-bazaar"
version = "0.7.0"
version = "0.8.0"
authors = ["encointer.org <alain@encointer.org>"]
edition = "2018"

Expand Down
3 changes: 2 additions & 1 deletion ceremonies/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "pallet-encointer-ceremonies"
version = "0.7.0"
version = "0.8.0"
authors = ["encointer.org <alain@encointer.org>"]
edition = "2018"

Expand All @@ -24,6 +24,7 @@ sp-std = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate

[dev-dependencies]
approx = "0.5.0"
itertools = "0.10.0"
rstest = "0.6.4"
sp-core = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "master" }
sp-io = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "master" }
Expand Down

0 comments on commit 14b5897

Please sign in to comment.