Skip to content

Commit 6a31f4c

Browse files
perf(idkg): [CON-1575] reduce the number of signature share validations (#9907)
This PR reduces the number of signature share validations from `N` to `f+1`, which are enough to aggregate the full signature. The strategy is very similar to the one done in #6526 to reduce the number of dealing supports: we introduce an in-memory map that keeps track for each `RequestId`, the set of share signers already validated. Once that set reaches a cardinality of `f+1`, we stop validating more signature shares for that `RequestId`. We follow the same approach as in #7069 to do all that in parallel: check with shared access to the lock, then perform the cryptographic validation and if valid, check again with exclusive access to the lock. --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent e822267 commit 6a31f4c

4 files changed

Lines changed: 331 additions & 53 deletions

File tree

rs/consensus/idkg/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ ic-consensus-mocks = { path = "../mocks" }
3535
ic-interfaces-mocks = { path = "../../interfaces/mocks" }
3636
ic-crypto-interfaces-sig-verification = { path = "../../crypto/interfaces/sig_verification" }
3737
ic-crypto-temp-crypto = { path = "../../crypto/temp_crypto" }
38+
ic-crypto-test-utils-canister-threshold-sigs = { path = "../../crypto/test_utils/canister_threshold_sigs" }
3839
ic-crypto-test-utils-crypto-returning-ok = { path = "../../crypto/test_utils/crypto_returning_ok" }
3940
ic-crypto-test-utils-reproducible-rng = { path = "../../crypto/test_utils/reproducible_rng" }
4041
ic-crypto-tree-hash = { path = "../../crypto/tree_hash" }

0 commit comments

Comments
 (0)