-
Notifications
You must be signed in to change notification settings - Fork 16
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
Additional Key Handover Tests #3165
Conversation
Codecov Report
@@ Coverage Diff @@
## main #3165 +/- ##
==========================================
+ Coverage 68.52% 68.54% +0.01%
==========================================
Files 314 314
Lines 48816 48858 +42
Branches 48816 48858 +42
==========================================
+ Hits 33453 33488 +35
- Misses 10603 10606 +3
- Partials 4760 4764 +4
... and 1 file with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
// Accounts (3), (4) and (5) will receive the key as the result of this ceremony. | ||
// (Note that (3) appears in both sets.) | ||
let new_set: BTreeSet<_> = all_account_ids.iter().skip(2).take(3).cloned().collect(); | ||
assert!(sharing_subset.is_subset(&original_set)); | ||
|
||
// Perform a regular keygen to generate initial keys: | ||
let (initial_key, mut key_infos) = keygen::generate_key_data::<Scheme>( | ||
original_set.clone().into_iter().collect(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
original_set.clone().into_iter().collect(), | |
original_set.clone(), |
type Scheme = BtcSigning; | ||
type Point = <Scheme as CryptoScheme>::Point; | ||
type Scalar = <Point as ECPoint>::Scalar; | ||
fn to_account_id_set<T: AsRef<[u8]>>(ids: T) -> BTreeSet<AccountId> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could be worth moving this into helpers so we can use it in other places. Could make the ACCOUNT_IDS
lazy_static use it.
The db tests could use it, but it will need to be outside of helpers so we can put it under the "test" feature flag. Maybe we need a "common_helpers" file.
We can do it in another PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, let me make another PR.
* origin/main: feat: witness XCallNative and XCallToken (#3171) Additional Key Handover Tests (#3165) refactor/chore: remove db migration from 0 to 1 (#3166) fix: use correct stage name for PubkeyShares0 PRO-259 (#3167) ci: add timeout to post-checks ⏳ (#3169) chore: parallel post-check and publish (#3168) fix: add missing features on dep in utils (#3164) Moved multisig to its own crate (#3147) Refactor/database (#3150) fix: correct addresses for localnets (#3162) refactor/scc (#3078) fix: remove cancel workflow (#3160) refactor: remove epoch authority count (#3154) chore: remove mentions of sui (#3158) fix: remove duplicate role check (#3157) chore: remove unused quickcheck dep (#3156) feat: refactor Chainflip trait (#3144) chore: remove unused CFE deps (#3152) # Conflicts: # state-chain/pallets/cf-swapping/src/mock.rs
Closes #3041
(commit names are self-explanatory)