Launch Iroha
Install the prerequisites:
Run
docker compose
and specify the network configuration file to bring up a network of 4 containerized peers:bash$ docker compose -f configs/swarm/docker-compose.yml up
Depending on your set-up, this might either pull the image from DockerHub, or build the container locally. After this process completes, you'll receive the following output:
[+] Running 9/9 ✔ irohad2 Pulled 6.3s ✔ irohad0 Pulled 6.3s ✔ irohad3 Pulled 6.3s ✔ irohad1 Pulled 6.3s ✔ ec99f8b99825 Already exists 0.0s ✔ d3a0e7f5d646 Pull complete 1.4s ✔ 1b1d5514cbbf Pull complete 2.1s ✔ 86e58c28036c Pull complete 2.3s ✔ 0d3b3367a826 Pull complete 2.5s [+] Running 5/5 ✔ Network swarm_default Created 0.1s ✔ Container swarm-irohad3-1 Created 0.4s ✔ Container swarm-irohad0-1 Created 0.5s ✔ Container swarm-irohad1-1 Created 0.4s ✔ Container swarm-irohad2-1 Created 0.5s Attaching to irohad0-1, irohad1-1, irohad2-1, irohad3-1 irohad0-1 | 2024-07-15T05:51:39.204411Z INFO irohad: Hyperledgerいろは2にようこそ!(translation) Welcome to Hyperledger Iroha! version="2.0.0-pre-rc.21" git_commit_sha="185ef76" peer=ed0120A98BAFB0663CE08D75EBD506FEC38A84E576A7C9B0897693ED4B04FD9EF2D18D@@0.0.0.0:1337 chain=00000000-0000-0000-0000-000000000000 listening_on=0.0.0.0:8080 irohad0-1 | 2024-07-15T05:51:39.204729Z INFO init:start{listen_addr=WithOrigin { value: 0.0.0.0:1337, origin: Env { id: ParameterId(network.address), var: "P2P_ADDRESS" } } idle_timeout=60s}: iroha_p2p::network: Network bound to listener irohad0-1 | 2024-07-15T05:51:39.209730Z INFO init:kura_init: iroha_core::kura: Kura init complete mode=Strict block_count=0 irohad0-1 | 2024-07-15T05:51:39.210006Z INFO init: irohad: Didn't find a state snapshot; creating an empty state irohad0-1 | 2024-07-15T05:51:39.214759Z INFO init: irohad: Telemetry not started due to absent configuration irohad0-1 | 2024-07-15T05:51:39.215234Z INFO iroha_core::sumeragi: Sumeragi has finished loading blocks and setting up the state ... irohad2-1 | 2024-07-15T05:51:39.332824Z INFO consensus: iroha_core::sumeragi::main_loop: Listening for genesis... peer_id=ed01204EE2FCD53E1730AF142D1E23951198678295047F9314B4006B0CB61850B1DB10@@0.0.0.0:1339 role=Leader irohad0-1 | 2024-07-15T05:51:40.478714Z INFO consensus: iroha_core::sumeragi::main_loop: Block committed peer_id=ed0120A98BAFB0663CE08D75EBD506FEC38A84E576A7C9B0897693ED4B04FD9EF2D18D@@0.0.0.0:1337 prev_role=ProxyTail next_role=ValidatingPeer block_hash=a638001762e365280677a5407bac9adaa119c8cb82c8afe377b72f85e71ed4a9 new_height=1 irohad0-1 | 2024-07-15T05:51:40.478761Z INFO consensus: iroha_core::sumeragi::main_loop: Sumeragi initialized peer_id=ed0120A98BAFB0663CE08D75EBD506FEC38A84E576A7C9B0897693ED4B04FD9EF2D18D@@0.0.0.0:1337 role=ValidatingPeer irohad2-1 | 2024-07-15T05:51:42.085522Z INFO consensus: iroha_core::sumeragi::main_loop: Block committed peer_id=ed01204EE2FCD53E1730AF142D1E23951198678295047F9314B4006B0CB61850B1DB10@@0.0.0.0:1339 prev_role=Leader next_role=ProxyTail block_hash=a638001762e365280677a5407bac9adaa119c8cb82c8afe377b72f85e71ed4a9 new_height=1 irohad2-1 | 2024-07-15T05:51:42.085585Z INFO consensus: iroha_core::sumeragi::main_loop: Sumeragi initialized peer_id=ed01204EE2FCD53E1730AF142D1E23951198678295047F9314B4006B0CB61850B1DB10@@0.0.0.0:1339 role=ProxyTail irohad1-1 | 2024-07-15T05:51:42.109788Z INFO consensus: iroha_core::sumeragi::main_loop: Block committed peer_id=ed01209897952D14BDFAEA780087C38FF3EB800CB20B882748FC95A575ADB9CD2CB21D@@0.0.0.0:1338 prev_role=ValidatingPeer next_role=Leader block_hash=a638001762e365280677a5407bac9adaa119c8cb82c8afe377b72f85e71ed4a9 new_height=1 irohad1-1 | 2024-07-15T05:51:42.109858Z INFO consensus: iroha_core::sumeragi::main_loop: Sumeragi initialized peer_id=ed01209897952D14BDFAEA780087C38FF3EB800CB20B882748FC95A575ADB9CD2CB21D@@0.0.0.0:1338 role=Leader irohad3-1 | 2024-07-15T05:51:42.117040Z INFO consensus: iroha_core::sumeragi::main_loop: Block committed peer_id=ed0120CACF3A84B8DC8710CE9D6B968EE95EC7EE4C93C85858F026F3B4417F569592CE@@0.0.0.0:1340 prev_role=ObservingPeer next_role=ObservingPeer block_hash=a638001762e365280677a5407bac9adaa119c8cb82c8afe377b72f85e71ed4a9 new_height=1 irohad3-1 | 2024-07-15T05:51:42.117083Z INFO consensus: iroha_core::sumeragi::main_loop: Sumeragi initialized peer_id=ed0120CACF3A84B8DC8710CE9D6B968EE95EC7EE4C93C85858F026F3B4417F569592CE@@0.0.0.0:1340 role=ObservingPeer irohad0-1 | 2024-07-15T05:52:39.238596Z INFO iroha_core::snapshot: Successfully created a snapshot of state at_height=1 irohad1-1 | 2024-07-15T05:52:39.266902Z INFO iroha_core::snapshot: Successfully created a snapshot of state at_height=1 irohad3-1 | 2024-07-15T05:52:39.276634Z INFO iroha_core::snapshot: Successfully created a snapshot of state at_height=1 irohad2-1 | 2024-07-15T05:52:39.349409Z INFO iroha_core::snapshot: Successfully created a snapshot of state at_height=1
Proceed to the CLI tutorial to check out Iroha's capabilities.
When you're done with the test network, just hit
Control + C
to stop the containers (⌃ + C
on Mac).
Docker Options
You might also be interested in other options for local compilation:
- To test Iroha code quickly, you can use
docker-compose-single.yml
, which starts a container with a single peer. - For testing Iroha code in normal conditions, you can use
docker-compose-local.yml
, which starts 4 connected containers with peers.
INFO
Please note that there is ongoing work to make our configurations for Docker even more customizable with the help of Swarm.
What's Next
Now that you have Iroha up and running, proceed to the CLI tutorial to learn how to work with it.