entropyxyz / entropy-core

Protocol and cryptography development.
https://docs.entropy.xyz/
GNU Affero General Public License v3.0
9 stars 1 forks source link

Selecting initial validators for jumpstart DKG #1052

Closed ameba23 closed 1 week ago

ameba23 commented 2 weeks ago

In trying to write an end-to-end test https://github.com/entropyxyz/entropy-core/issues/1010 i found there is an issue with how we select who performs the initial jumpstart DKG.

Currently the entire validator set is selected. Which works great as long as there are n validators. If there are more than n, we need a way to select n to be the initial signer committee.

This issue is currently not picked up by our tests, because the jumpstart test uses the development chainspec, with 3 TSS nodes, and n = 3. If we try to run this test using the integration test chainspec with 4 TSS nodes, the test fails.

In order to do a full test with both a jump start and a reshare, we need 4 TSS nodes.

This means we need a way to select n initial nodes from the validator set. We could do this deterministically using block number. This means that whoever submits the jump start extrinsic can choose who these validators are by waiting until a particular block.

Other options would be:

ameba23 commented 2 weeks ago

I made a draft PR where we select validators using block number - im not sure if it is the best solution but it at least serves to demonstrate what i am talking about.