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

Docker compose mixnet #467

Merged
merged 14 commits into from
Oct 19, 2023
Merged

Docker compose mixnet #467

merged 14 commits into from
Oct 19, 2023

Conversation

bacv
Copy link
Member

@bacv bacv commented Oct 17, 2023

Docker compose configs for running mixnet and libp2p nodes. The number of libp2p nodes can be configures, the number of mixnet nodes is static (3 nodes).

The mixnodes are using the same key pair, seems to be working.

To run the testnet: docker compose up
To connect to the testnet, the bootstrap node can be used, ports 3000 and 8080 should be exposed to the host machine.
If more nodes need to be accessible from the host machine, the instructions are in the testnet/README.md.

@bacv bacv added the testnet label Oct 17, 2023
@bacv bacv added this to the Nomos testnet (playground) milestone Oct 17, 2023
@bacv bacv self-assigned this Oct 17, 2023
@@ -26,7 +26,7 @@ nomos-http = { path = "../../nomos-services/http", features = ["http"] }
nomos-consensus = { path = "../../nomos-services/consensus", features = ["libp2p"] }
nomos-storage = { path = "../../nomos-services/storage", features = ["sled"] }
nomos-libp2p = { path = "../../nomos-libp2p" }
nomos-da = { path = "../../nomos-services/data-availability" }
nomos-da = { path = "../../nomos-services/data-availability", features = ["libp2p"] }
Copy link
Member Author

Choose a reason for hiding this comment

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

Added this because it was not possible to build nomos-node with cargo build -p nomos-node.

@@ -11,7 +11,7 @@ services:
- ./testnet:/etc/nomos
environment:
- NET_NODE_KEY=${DOCKER_COMPOSE_BOOSTRAP_NET_NODE_KEY:-1000000000000000000000000000000000000000000000000000000000000000}
command: /etc/nomos/config.yaml
command: /etc/nomos/bootstrap_config.yaml
Copy link
Contributor

Choose a reason for hiding this comment

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

we may need to add the following for the bootstrap? because the bootstrap node will try to connect to mix-node-2:7778 when it starts up.

depends_on:
  - etcd
  - mix-node-0
  - mix-node-1
  - mix-node-2

Plus, we should merge #445. Unless, the bootstrap node will be sometimes not able to connect to the mix-node-2.

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'll rebase it on #455, if it makes any difference I'll merge this after #455 is in master.

Copy link
Contributor

Choose a reason for hiding this comment

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

For testing in my local, I added a 3s sleep temporarily before connecting to mix-node-2:7778. The bootstrap node was connected with mix-node-2 successfully. And, I saw that messages were broadcasted to all nomos-nodes (both bootstrap and node-1) succesfully.

But, even though the vote from node-1 (for the view 0) was delivered to the bootstrap node (the first leader), it didn't propose the next block. I'm taking a look at details. I guess that tally didn't meet but I don't know why yet.

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 think thats related to tree overlay and the next leader being offline. You did a fix in integration tests for that, I'm thinking of adding a command to nomos-cli that would return the topology, includong next leader, when a node config is provided. I'll do this in new PR.

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 tally is set to 1, it should be configurable via the .env. I'll update in a sec.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think I found the reason why the tally for the view 0 is not met.

When we run the bootstrap node, we don't configure the overlay.nodes. We need to configure it as we do for subsequents nodes (by configure_node.sh).

I observed that messages were delivered between two nodes successfully. But, the committee ID (that we use as a recipient when sending messages) were different between two nodes, because of the reason above.

Copy link
Contributor

@youngjoon-lee youngjoon-lee left a comment

Choose a reason for hiding this comment

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

All scripts and docker compose looks good to me! Thank you!

Apart from that, I'll debug https://github.com/logos-co/nomos-node/pull/467/files#r1365252239

@bacv bacv merged commit 3ca39d3 into master Oct 19, 2023
4 of 6 checks passed
@bacv bacv deleted the docker-compose-mixnet branch May 30, 2024 09:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants