From 11f6d3ca142274e3a2cbcea565e957f7ac36ad04 Mon Sep 17 00:00:00 2001 From: Matan Markind Date: Mon, 24 Jun 2024 20:55:24 +0300 Subject: [PATCH] feat(consensus): add README to help running milestone 1 --- crates/sequencing/papyrus_consensus/README.md | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 crates/sequencing/papyrus_consensus/README.md diff --git a/crates/sequencing/papyrus_consensus/README.md b/crates/sequencing/papyrus_consensus/README.md new file mode 100644 index 0000000000..31c2ae9796 --- /dev/null +++ b/crates/sequencing/papyrus_consensus/README.md @@ -0,0 +1,20 @@ +# papyrus-consensus + +Milestone 1 - consensus without voting. + +How to run: +1. Start by running any nodes which are validators for block "0", to avoid them missing the proposal. + 1. The block 0 proposer is hard coded as ID 0. + +Boot Node - this must be run first: +``` +CONSENSUS_VALIDATOR_ID=1 cargo run --package papyrus_node --bin papyrus_node -- --network.#is_none false --base_layer.node_url --storage.db_config.path_prefix +``` +- This will log `local_peer_id` which is used by other nodes. (Alternatively pass `network.secret_key` to have a fixed peer id). + +Other Nodes - the last run should use `CONSENSUS_VALIDATOR_ID=0`. +``` +CONSENSUS_VALIDATOR_ID= cargo run --package papyrus_node --bin papyrus_node -- --network.#is_none false --network.tcp_port --network.bootstrap_peer_multiaddr.#is_none false --rpc.server_address 127.0.0.1: --monitoring_gateway.server_address 127.0.0.1: --storage.db_config.path_prefix --base_layer.node_url --network.bootstrap_peer_multiaddr /ip4/127.0.0.1/tcp/10000/p2p/ +``` + +UNIQUE - a value unique among all nodes running locally.