-
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
Reshare in a spawned task and fix propagation pallet rotate keyshares endpoint lookup key #1185
Conversation
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.
Nice finds! I know how much of a pain this has been to fix.
I agree with the approach of fixing this in the TSS, seems more reasonable long term.
Also thanks for splitting this out into its own PR.
@@ -369,7 +369,7 @@ pub fn new_full_base( | |||
); | |||
offchain_db.local_storage_set( | |||
sp_core::offchain::StorageKind::PERSISTENT, | |||
b"rotate_keyshares", | |||
b"rotate_network_key", |
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.
Ah, is this the key you're saying is incorrect?
So even with an extended timeout this wasn't going to work then?
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.
This was incorrect. But im not sure if it actually makes a difference in production, since if the lookup fails it defaults to 127.0.0.1:3001/rotate_network_key
, which is usually what we want. I think its only in our test setup that we need to set a custom endpoint.
Maybe worth adding a |
When fixing the reshare test in #1162 i found two problems which mean the resharing will not work in production.
I have fixed these in #1162 - but since that PR makes quite some changes to our test setup, and still needs some cleaning up, i wanted to put the fixes in a separate PR, so its clear what they are, and so it could be used for a fix for our current testnet (resharing will not work without these fixes).
If we want to fix things with a runtime upgrade and not need to update the TSS code, we could bump up the timeout instead of spawning a task for the reshare. But i think long term it is better to use a separate task, because amount of time the reshare takes depends on many factors.