Commit 5d4a1b4
authored
feat(NNS): Parallelize dkg calls in recovery CUP creation (#4634)
This PR parallelises the calls to `create_initial_dkg_dealings` and
`compute_initial_i_dkg_dealings` during subnet recovery.
The rationale is that soon we will migrate the
`compute_initial_i_dkg_dealings` call to the `reshare_chain_key`
endpoint, which also supports resharing VetKD keys. Unlike existing IDKG
reshares, a VetKD reshare can take up to two DKG intervals after the
call has been made, since under the hood it uses the Remote NiDKG
protocol, the same one that `create_initial_dkg_dealings` uses.
If we didn't parallelizs these calls, creating a recovery CUP could
potentially take more than 4 DKG intervals since we would do two rounds
of Remote NiDKG.
There is a similar situation in `create_subnet`, however, I decided not
to parallelize this because:
1. The call sites of `ceate_initial_dkg_dealings` and
`compute_initial_i_dkg_dealings` is further apart, which would require
more code reshuffling
2. There is less time pressure when creating a Subnet than when
recovering one, so the additional 2 DKG intervals are less of an issue.
Nonetheless, if you think it makes sense to also parallelise
`create_subnet`, let me know.1 parent 4813af2 commit 5d4a1b4
1 file changed
+12
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | 100 | | |
110 | 101 | | |
111 | 102 | | |
| |||
115 | 106 | | |
116 | 107 | | |
117 | 108 | | |
118 | | - | |
119 | | - | |
120 | | - | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
| |||
0 commit comments