-
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
Clean up registration related tests in pallet-registry
#1021
Conversation
} | ||
|
||
#[test] | ||
fn it_fails_empty_program_list() { |
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.
Do we not want to replace this with a similar test for register_on_chain
? Did you do that somewhere and i missed it?
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 added in a previous PR
pallets/registry/src/tests.rs
Outdated
}, | ||
); | ||
|
||
assert_ok!(Registry::register( |
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.
Why still test the old flow here? Isn't it about to be removed?
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.
I had initially removed it in this PR but reverted it since I figured it would be better to remove the whole confirmation flow in a different PR (which would include the removal on the TSS side as well).
I guess why the diff is a little confusing is that I moved it to be closer to the other registration tests, maybe I should move it back to keep the diff smaller
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.
⭐ Great that change program instance and change modification account now work with the new registration flow.
Approving pending getting the TSS tests to pass. It looks like the problem is that they use the pre-registered accounts which are currently only registered with the old flow. I guess we need to add them to the RegisteredOnChain
map, giving them each a derivation path, and update their verifying keys in the entropy-shared
constants.
I'm not sure if it is an issue that one of them is eve, and eve is also the pre-registered network parent key. So probably we shouldn't change eve's verification key. 😆
The other option would be to get rid of the pre-registered accounts and actually register in those tests. Since they are maybe not so helpful now that we don't need to do a per-user DKG anymore.
These tests are failing because we don't have the `RegisteredOnChain` struct pre-populated. Since we're going to be updating everything to the new registration flow soon it doesn't make much sense to fix this here.
@ameba23 yeah this is probably what I'm going to end up doing, but in the PR where I actually remove the old registration flow. It's a bit annoying to populate them in genesis anyways. I'm going to |
This cleans up some of the tests in the Registry pallet related to registration. The idea
was to make sure that any old tests were still valid for the new registration flow, or
where discarded.