-
Notifications
You must be signed in to change notification settings - Fork 2
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
Add option to start in a pre-jumpstarted state to genesis config #1162
Add option to start in a pre-jumpstarted state to genesis config #1162
Conversation
I am having a strange problem following making these changes to the chainspec. In tests, if i make any api or rpc call to the chain, even something as simple as getting current block number with rpc, i get this error:
I have tried building this branch with docker compose, and everything is working fine, i can register and sign messages with the test CLI. So it seems it related to the test setup, not the chainspec itself. So i also tried reverting the change which makes bob, charlie, and dave's chain contact their TSS nodes (changing it back to To be sure this is an issue with the TSS test setup and not the chain, i changed to the branch this PR is based off ( Update: this is now fixed - the issue was that the helper function which started the chain nodes returned the api and rpc, but not the test node context itself. Dropping that when the function returned meant that the process was stopped. |
This is a sub-PR of #1147 and targets that branch.
To speed things up in our signing tests we mock the jumpstart DKG and use pre-generated keyshares. Changes in #1147 mean that the way we were mocking the jumpstart no longer works, because sending the jumpstart extrinsic will trigger an actual jumpstart DKG.
This fixes that by offering the option to start the chain in a pre-jumpstarted state.
The pre-generated keyshares are still used, but since we know who the initial signers are, we only need one set and can remove the extra ones we created to get around the problem of DKG signers being chosen randomly.
It should also make the signing tests slightly faster as we no longer need the jump start and jump start confirmation extrinsics to go through before we can sign.
I am also hoping it will shed light on the problems i am having resharing, as we wont have the problem of needing to time the reshare to happen after DKG.
The downside is, i couldn't figure out how to do this without adding an extra chainspec type, which complicates the code a bit.