-
Notifications
You must be signed in to change notification settings - Fork 86
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
Spike: Use raft consensus for networking #1591
Comments
After directly identifying a required change in semantics of our
Notes so far:
|
Continued and got the networked
Its likely slow because the current state of the branch is still invoking Next steps
Notes from today are in the logbook: https://github.com/cardano-scaling/hydra/wiki/Logbook-2024-H1#sn-on-using-etcd-for-networking |
Persisted some of the original thoughts about Network component properties in #1649. Also, this updated architecture diagram also mentions the same properties and displays how etcd is embedded in the hydra-node: |
Got the etcd-based network now running in our fault injection test suite, both locally and using github actions: https://github.com/cardano-scaling/hydra/actions/runs/10998675568 Notes from making it work:
Next steps:
|
To run the package drop tests locally, we just need to use the instructions from fault tolerance github action (also updated on this branch). Also persisted here for easy reproducibility. Fault injectionBuild the pumba-compatible docker image: nix build .#docker-hydra-node-for-netem
./result | docker load Set up a local devnet like in https://hydra.family/head-protocol/docs/getting-started/, but using the updated local cd demo
./prepare-devnet.sh
docker compose up -d cardano-node
sudo chmod a+w devnet/node.socket
export CARDANO_NODE_SOCKET_PATH=devnet/node.socket
./seed-devnet.sh $(which cardano-cli) $(which hydra-node) Start the pumba compatible hydra nodes: docker compose -f docker-compose.yaml -f docker-compose-netem.yaml up -d hydra-node-{1,2,3} Now we can run the workload with: mkdir -p benchmarks
nix run .#hydra-cluster.components.benchmarks.bench-e2e -- demo \
--output-directory=benchmarks \
--scaling-factor=100 \
--timeout=1000s \
--testnet-magic 42 \
--node-socket=devnet/node.socket \
--hydra-client=localhost:4001 \
--hydra-client=localhost:4002 \
--hydra-client=localhost:4003 While this runs, we can start dropping packets from alice with, e.g. 10 percent likelihood: nix run github:noonio/pumba/noon/add-flake -- -l debug netem \
--duration 20m \
--target 172.16.238.20 \
--target 172.16.238.30 \
loss --percent 10 \
"re2:hydra-node-1" And/or drop packets to alice with, e.g. 10 percent likelihood: nix run github:noonio/pumba/noon/add-flake -- -l debug netem \
--duration 20m |
--target 172.16.238.10 \
loss --percent 10 \
"re2:hydra-node-" |
Solved the two scenarios:
Kept notes in the logbook and will summarize findings tomorrow: https://github.com/cardano-scaling/hydra/wiki/Logbook-2024-H1#2024-09-26 |
Summary of Raft-based network using etcd
Approach
Performance
|
Why
We created a new test suite about resilience of our network stack in #1532 (see also #1106, #1436, #1505). With this in place, we can now explore various means to reach our goal of a crash-tolerant network layer.
This fairly old research paper explored various consensus protocols used in blockchain space and reminds us of the correspondence between consensus and broadcasts:
Furthermore, it listed at least one of these early, permissioned blockchains that achieved crash-tolerance of$t < n/2$ by simply using etcd with its Raft consensus algorithm.
What
hydra-node
network connected throughetcd
How
Hydra.Network.Etcd
network component that implementsbroadcast
using the replicated log ofetcd
--peerfrom command lineetcdwhen startingThe text was updated successfully, but these errors were encountered: