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 duplicte keys creation #228

Merged
merged 1 commit into from
Jul 12, 2024
Merged

Fix duplicte keys creation #228

merged 1 commit into from
Jul 12, 2024

Conversation

jmoreira-valory
Copy link
Collaborator

This PR fixes key management as follows.

Previously, keys for a service were freshly created, but only stored once the service mint-activation-registration process was successful on-chain.

If that proces broke somewhere, the middleware would create new fresh keys for the service agents, which would lead to duplicate keys on the .operate/keys folder.

The current approach creates fresh keys when the Service object is created (not loaded from an existing file). Therefore, keys are always stored in the config.json file upon service creation. This will ensure that no duplicate keys are created if the on-chain process fails.

Note: this uncovered an issue with the front-end #227

Copy link
Collaborator

@solarw solarw left a comment

Choose a reason for hiding this comment

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

lgtm

@jmoreira-valory jmoreira-valory merged commit 93cfa1a into main Jul 12, 2024
4 checks passed
@jmoreira-valory jmoreira-valory deleted the fix/duplicate_keys branch November 13, 2024 16:24
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.

4 participants