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

fix(localnet): don't transition to epoch 3 #668

Merged
merged 1 commit into from
Dec 17, 2024

Conversation

ptrus
Copy link
Member

@ptrus ptrus commented Dec 16, 2024

Transitioning to epoch should be enough.

There remains one (very) occasional issue (which I cannot reliably reproduce), where requests to keymanager fail with:

{"caller":"grpc.go:203","err":"rpc error: code = Unknown desc = key manager failure: call failed: key manager is not initialized","level":"error","method":"/oasis-core.RuntimeClient/Query","module":"grpc/internal","msg":"request failed","req_seq":5566,"ts":"2024-12-13T09:16:02.867419593Z"}

Update: The above issue is now resolved as well.

@ptrus ptrus requested a review from kostko as a code owner December 16, 2024 13:13
@ptrus ptrus requested a review from matevz December 16, 2024 13:13
@ptrus ptrus marked this pull request as draft December 16, 2024 13:22
@ptrus ptrus force-pushed the ptrus/feature/startup-keymanager-epoch2 branch 4 times, most recently from 25e9083 to f039aae Compare December 17, 2024 08:39
fi

echo -n .
notice_debug -l "Setting epoch to 1..."
${OASIS_NODE_BINARY} debug control set-epoch --epoch 1 -a unix:${OASIS_NODE_SOCKET}

# Transition to the next epoch when the KM generates ephemeral secret.
# Transition to the next epoch only when the keymanager has re-registered with updated extra_info.
# This ensures that we wait until the master secret has been generated and published.
Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks to @peternose, we figured out the occasional remaining problem during the bootstrap. It was not sufficient to wait for ephemeral secret to be generated, but also that the master secrets are generated and published. We now do this by ensuring the KM re-registers with the updated extra_info.

@ptrus ptrus marked this pull request as ready for review December 17, 2024 08:59
@ptrus ptrus force-pushed the ptrus/feature/startup-keymanager-epoch2 branch from f039aae to d6ed9f7 Compare December 17, 2024 09:02
docker/common/start.sh Outdated Show resolved Hide resolved
docker/common/start.sh Outdated Show resolved Hide resolved
if [[ "${PARATIME_NAME}" == "sapphire" ]]; then
notice_debug -l "Waiting for key manager to generate ephemeral secret..."
Copy link
Contributor

Choose a reason for hiding this comment

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

You should still wait for ephemeral secret to be generated and proposed, as this is done concurrently. Although this will usually take less time than master secret generation and confirmation.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks, updated

@ptrus ptrus force-pushed the ptrus/feature/startup-keymanager-epoch2 branch 4 times, most recently from e8345be to fb331f7 Compare December 17, 2024 12:20
@ptrus ptrus requested a review from peternose December 17, 2024 12:21
@ptrus ptrus force-pushed the ptrus/feature/startup-keymanager-epoch2 branch from fb331f7 to 23db06b Compare December 17, 2024 12:22
@ptrus ptrus force-pushed the ptrus/feature/startup-keymanager-epoch2 branch from 23db06b to d56fb00 Compare December 17, 2024 12:25
@ptrus ptrus merged commit d6e869f into main Dec 17, 2024
6 checks passed
@ptrus ptrus deleted the ptrus/feature/startup-keymanager-epoch2 branch December 17, 2024 12:39
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.

2 participants