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

Testnet: Kzgrs config #797

Merged
merged 6 commits into from
Oct 2, 2024
Merged

Testnet: Kzgrs config #797

merged 6 commits into from
Oct 2, 2024

Conversation

bacv
Copy link
Member

@bacv bacv commented Sep 27, 2024

1. What does this PR implement

This PR introduces changes related to the cfgsync utility, specifically adding new functionality for configuration synchronization between nodes. It also includes adjustments to the Docker Compose configurations.

2. Does the code have enough context to be clearly understood?

The code includes documentation and contextual comments where necessary..

3. Who are the specification authors and who is accountable for this PR?

@bacv, Nomos Engineering

4. Is the specification accurate and complete?

N/A

5. Does the implementation introduce changes in the specification?

N/A

Checklist

  • 1. Description added.
  • 2. Context and links to Specification document(s) added.
  • 3. Main contact(s) (developers and specification authors) added
  • 4. Implementation and Specification are 100% in sync including changes. This is critical.
  • 5. Link PR to a specific milestone.

@bacv bacv changed the title Testnet kzgrs config Testnet: Kzgrs config Sep 29, 2024
@bacv bacv added this to the Iteration 7 milestone Sep 30, 2024
@bacv bacv linked an issue Sep 30, 2024 that may be closed by this pull request
3 tasks
@bacv bacv marked this pull request as ready for review September 30, 2024 08:22
@danielSanchezQ
Copy link
Collaborator

Is cfgsync a dispatcher of cfgs for the testnet nodes?

@bacv
Copy link
Member Author

bacv commented Oct 2, 2024

Is cfgsync a dispatcher of cfgs for the testnet nodes?

Yes, cfgsync replaces etcd and bash scripts for syncing the configurations for potentially arbitrary number of nodes in the network. In my opinion the key changes are reflected here:

cfgsync:
container_name: cfgsync
build:
context: .
dockerfile: testnet/Dockerfile
image: nomos:latest
volumes:
- ./testnet:/etc/nomos
entrypoint: /etc/nomos/scripts/run_cfgsync.sh

#!/bin/sh
set -e
export CFG_FILE_PATH="/config.yaml" \
CFG_SERVER_ADDR="http://cfgsync:4400" \
CFG_HOST_IP=$(hostname -i) \
RISC0_DEV_MODE=true
/usr/bin/cfgsync-client && \
exec /usr/bin/nomos-node /config.yaml --with-metrics --log-backend gelf --log-addr graylog:12201

  • When a network is started, the cfgsync-server starts listening for a number of nodes to announce them selves;
  • If correct number of nodes requested config, cfgsync responds to all with the configuration;
  • Node is not started if cfgsync-client returns an error.

Copy link
Collaborator

@danielSanchezQ danielSanchezQ left a comment

Choose a reason for hiding this comment

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

This should be fine. Thanks!

@bacv bacv merged commit 66fc046 into master Oct 2, 2024
9 checks passed
@bacv bacv deleted the testnet-kzgrs-config branch October 2, 2024 11:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Testnet-Iteration 7
2 participants