This readme provides an overview of the Iroha 2 blockchain explorer backend and instructions on how to install, run, and utilize the explorer's backend features.
Check out the Hyperledger Iroha 2 Blockchain Explorer Demo video here.
To set up the Iroha 2 blockchain explorer backend, follow these steps:
Install Rust 1.70.0
For full functionality of the explorer backend, build Iroha v2.0.0-pre-rc.9
and ensure it is running. You can find the build instructions for Iroha here.
Build the explorer backend binary:
cargo build --release
To prepare the Iroha client configuration, you have two options:
Option 1: Define the client configuration manually.
To configure Iroha client, refer to Configuration Reference or Iroha documentation.
Option 2: Copy the configuration file from explorer-deploy-dev-tool.
To run the Iroha 2 blockchain explorer backend, you have two options:
Option 1: Execute the following command in your terminal:
./target/release/iroha2_explorer_web \
-c /path/to/client_config.json \
-p 8080 # may be env PORT, default is 4000
Option 2:
Alternatively, you can use the cargo run
command with additional options.
This command will display the help information, including the available options and their descriptions.
cargo run -- -h
Here is a breakdown of the options you can use:
-c, --client-config <CLIENT_CONFIG>
: Specifies the path to the iroha_client
JSON configuration file. The default path is set to client_config.json
if not provided explicitly.
-h, --help
: Prints the help information, which provides an overview of the available options.
-p, --port <PORT>
: Allows you to specify the port number on which the server will listen. You can set the port by providing the value after the flag, for example, -p 8080
. If you don't provide this flag, the default 4000 port will be used. Additionally, you can set the PORT
environment variable to specify the port.
-V, --version
: Prints the version information of the Iroha 2 Explorer Backend.
Feel free to adjust the command and options according to your specific setup and requirements.
Ensure that the explorer backend is functioning correctly by executing the following command:
> curl http://localhost:4000/api/v1
Welcome to Iroha 2 Block Explorer!
Refer to Block Explorer API.
The following tools are available in conjunction with the Iroha 2 blockchain explorer:
Tool Name | Description |
---|---|
genesis-gen | Genesis generator (a tool to generate sample data). |
explorer-deploy-dev-tool | A tool for automating the deployment of Iroha and the explorer. ( This tool is provided as a reference for setting up the project locally, but please note that it may be out of date and its functionality might not align with the current version of Iroha and the Explorer) |