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: adding multiple signatures on metagraph messages #63

Merged
merged 1 commit into from
Jan 10, 2025

Conversation

IPadawans
Copy link
Member

Changes

  • Added additional signature to staking and owner message when deploying a metagraph

@IPadawans IPadawans self-assigned this Jan 8, 2025
@IPadawans IPadawans requested a review from AlexBrandes January 8, 2025 19:00
Copy link
Member

@AlexBrandes AlexBrandes left a comment

Choose a reason for hiding this comment

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

How is this functionality used? Is there a CLI command? We need to document where the files are expected to be found and how to use the command, if it isn't already documented.

@@ -197,7 +197,7 @@
shell: |
rm -f /home/{{ ansible_user }}/code/{{ all_nodes[0].key_file.name }}

- name: Send fees p12 files to nodes
- name: Send primary fees p12 files to nodes
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
- name: Send primary fees p12 files to nodes
- name: Send primary snapshot fee p12 file to nodes

Copy link
Member Author

Choose a reason for hiding this comment

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

👍🏼

when: not (staking_p12_file_name is undefined or staking_p12_file_name == "") and staking_p12_file.stat.exists

- name: Send additional fees p12 files to nodes
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
- name: Send additional fees p12 files to nodes
- name: Send snapshot fee p12 file to additional nodes

Copy link
Member Author

Choose a reason for hiding this comment

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

👍🏼

@@ -69,6 +69,17 @@
msg: "File /home/{{ ansible_user }}/code/metagraph-l0/{{ owner_p12_file_name }} does not exist"
when: not (owner_p12_file_name is undefined or owner_p12_file_name == "") and not owner_file.stat.exists

- name: Check if additional owner file exists
Copy link
Member

Choose a reason for hiding this comment

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

What's the additional owner file? Isn't there just one file that represents the owner?

Copy link
Member Author

Choose a reason for hiding this comment

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

The name wasn't good enough, it's just a second file to sign the message and this file should be one of the 3 peerIds, I'll rename to be more clear, sorry

@@ -247,9 +325,9 @@
ignore_errors: true
when: should_run_genesis

- name: Wait 2 minutes before starting the metagraph
- name: Wait 10 minutes before starting the metagraph
Copy link
Member

Choose a reason for hiding this comment

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

10 minutes seems like a long time. Why do we need to wait that long?

Copy link
Member Author

Choose a reason for hiding this comment

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

I forgot to change, it can be only 5. We need at least 5 so network can proceed without the metagraph a bit and we have a period where we can send the messages before producing snapshots

@IPadawans
Copy link
Member Author

How is this functionality used? Is there a CLI command? We need to document where the files are expected to be found and how to use the command, if it isn't already documented.

@AlexBrandes This follows the current flow of remote-deploy and remote-start, so users won’t need to take any additional steps. The goal of this ticket is to automate the process of generating the second signature. When the feature was first released (at least on testnet and integrationnet), a single signer was sufficient to send the message. However, with the recent changes, a majority signature is required for the message to be valid. This ticket handles the generation of the second signature and attaches it to the current message/JSON before sending.

@IPadawans IPadawans force-pushed the adding-multiple-signatures-messages branch from e4b3d54 to cc6170c Compare January 9, 2025 11:55
@IPadawans IPadawans requested a review from AlexBrandes January 9, 2025 12:54
@IPadawans IPadawans merged commit 1049b2c into main Jan 10, 2025
1 check passed
@IPadawans IPadawans deleted the adding-multiple-signatures-messages branch January 10, 2025 17:28
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