soramitsu / iroha2-block-explorer-backend

Designing a Better World Through Decentralized Technologies
2 stars 5 forks source link

Iroha 2 Blockchain Explorer Backend

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.

Demo

Check out the Hyperledger Iroha 2 Blockchain Explorer Demo video here.

Installation

To set up the Iroha 2 blockchain explorer backend, follow these steps:

  1. Install Rust 1.70.0

  2. 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.

  3. Build the explorer backend binary:

cargo build --release
  1. 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.

Running the Backend

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:

Feel free to adjust the command and options according to your specific setup and requirements.

Check the API

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!

API

Refer to Block Explorer API.

Tools

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)