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

go/worker/keymanager: Speed up secret generation in tests #5422

Merged
merged 1 commit into from
Oct 31, 2023

Conversation

peternose
Copy link
Contributor

Description
When a key manager node is the sole member of the committee, it generates master and ephemeral secrets immediately rather than at a random block within an epoch. In tests, this allows us to transition to the next epoch earlier, as soon as all required secrets are generated.

Tests
This change can be seen in the logs, when running a single key manager node:

{"caller":"worker.go:1136","epoch":1,"height":30,"level":"debug","module":"worker/keymanager","msg":"block height for generating secrets selected","ts":"2023-10-31T19:34:45.56695587Z"}
{"caller":"worker.go:635","epoch":2,"generation":0,"height":22,"level":"info","module":"worker/keymanager","msg":"generating master secret","ts":"2023-10-31T19:34:46.973834368Z"}

Observe that the secret was generated at height 22, and not at height 30.

@peternose peternose marked this pull request as ready for review October 31, 2023 20:32
@peternose peternose enabled auto-merge October 31, 2023 20:50
@peternose peternose added the c:testing Category: testing label Oct 31, 2023
When a key manager node is the sole member of the committee, it generates
master and ephemeral secrets immediately rather than at a random block
within an epoch. In tests, this allows us to transition to the next epoch
earlier, as soon as all required secrets are generated.
@peternose peternose force-pushed the peternose/trivial/generate-km-secrets-immediately branch from 896fbf6 to b577a0b Compare October 31, 2023 21:02
@peternose peternose merged commit 357eab8 into master Oct 31, 2023
1 check passed
@peternose peternose deleted the peternose/trivial/generate-km-secrets-immediately branch October 31, 2023 21:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c:testing Category: testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants