Skip to content
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

Simplify Staking Extension session handler test #634

Merged
merged 1 commit into from
Feb 13, 2024

Conversation

HCastano
Copy link
Collaborator

Opening this up since I was a bit slow to re-review the original PR in
#630, sorry lol.

Jesse's argument against calling the new_session_handler directly is that we'd lose the
top level new_session call.

However, since we use the MockSessionHandler, and its implementation of new_session
is just a very thin wrapper around new_session_handler (which only sets the validator
set based off the session number anyways) I think it makes sense for us to just call the
new_session_handler directly.

Additionally, since these tests are basically stateless I've remove some redundant ones
(e.g, assigning two authories) since the test result would always end up as
signing_group[n] => input_validators[n] anyways.

Copy link

vercel bot commented Feb 13, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
entropy-core ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 13, 2024 3:05am

@HCastano
Copy link
Collaborator Author

Test failure looks Wasm related, any ideas here @ameba23?

@ameba23
Copy link
Contributor

ameba23 commented Feb 13, 2024

Test failure looks Wasm related, any ideas here @ameba23?

This isn't wasm related. The test is comparing two synedrion keyshares before and after storing a keyshare, to check that the new one has successfully clobbered the old one (current keyshare should not equal orginal keyshare).

But i am really confused as to why the changes here to the staking extension test would cause that to fail.

@ameba23
Copy link
Contributor

ameba23 commented Feb 13, 2024

I am gonna try re-running CI to see if its some random race-condition type thing. It passes locally my end, but i have not re-built the entropy binary on this branch.

@ameba23
Copy link
Contributor

ameba23 commented Feb 13, 2024

Looks like it passes. So this PR is fine - but we have an issue with the store_share_test. We do actually already have #466 but i actually think this is unrelated to that as its a different error.

I just made a new issue: #635 - it actually looks very simple to fix.

Copy link
Contributor

@ameba23 ameba23 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💯

@HCastano
Copy link
Collaborator Author

This isn't wasm related. The test is comparing two synedrion keyshares before and after storing a keyshare, to check that the new one has successfully clobbered the old one (current keyshare should not equal orginal keyshare).

But i am really confused as to why the changes here to the staking extension test would cause that to fail.

Gotcha. Yeah I saw that it was during the Node test runs, which is why I assumed it was Wasm related.

Thanks for opening that other issue btw.

@HCastano HCastano merged commit 295b2ac into master Feb 13, 2024
10 checks passed
@HCastano HCastano deleted the hc/simplify-session-handler-test branch February 13, 2024 17:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants