Skip to content

The web-ui for exploring Blocktron blockchain. Seamlessly interact with your Blocktron-node instance using blocktron-explorer.

License

Notifications You must be signed in to change notification settings

Blocktron-Project/blocktron-explorer

Repository files navigation

logo

blocktron-explorer v0.0.1

blocktron-lib GitHub license Build Status CircleCI CodeFactor Codacy Badge GitHub issues GitHub forks GitHub stars Twitter

Blocktron Explorer is a web-ui for exploring the blocktron blockchain. A single instance of blocktron-explorer can be used to interact and explore all of the blocktron-nodes in the entire distributed blocktron blockchain system. Blocktron Explorer is a single page web application built using ReactJS.

Table of Contents

Getting Started

You can grab a copy of Blocktron-Explorer from the following:

git clone https://github.com/Blocktron-Project/blocktron-explorer.git

or using SSH:

[email protected]:Blocktron-Project/blocktron-explorer.git

or download a zip from: https://github.com/Blocktron-Project/blocktron-explorer/archive/master.zip

Installation

Once you have the local copy of repo, you can install dependencies by:

npm i

Changelog

Usage

Once you have downloaded and installed the project, you have to build it by:

npm run build

or you can run a development setup by:

npm start

Once running, a browser tab will be opened automatically pointing to the url: http://localhost:3000/, which will have the following UI:

startup

Add a Node

Blocktron-Nodes can be added to the explorer by clicking the Add Node button.

addnode

Which will open up the url input field as shown:

addnode

Then you can enter the url as shown:

addnode

once you have entered a vlid url you can click the + button which will add your node to the explorer as shown:

url added

Note: You can add multiple nodes and interact with them at the same time as shown:

multiple nodes

Now you can select your desired node to interact with it.

Overview

Once you have a node selected then overview tab will be active. This tab will how the basic overview of the node with status messages, application port number and node identifier as shown:

overview

Configuration

This tab shows the configuration details of the particular node that you selected:

config

Memory & Resources

This tab shows information about the Memory allocated for blocktron-node instance you selected:

mem

Blockchain Configuration

This section contains two tabs:

Pending Transactions

This tab shows the list of pending transactions in the current node. And also you can add new transactions to the blockchain on this node through the form as shown:

pending

Network Nodes

This tab lists the network addresses of the nodes attached to the blockchian of the current node.

netnode

Genesis Block

This card displays the genesis block on the blockchain of the current node. Every blockchain starts itself from the dummy block called genesis block.

genesis

Data Block

A sample data block will look like the following:

block

Mine

You can mine new blocks by using the Mine button.

mine

Get Consensus

You can force your selected node to reach consensus with other nodes by clicking this button.

consensus

Tests

This project follows a Test Driven Development (TDD). Unit tests are written using Jest, an opensource testing and code coverage framework from facebook opensource. Test spec files can be found inside the test folder. Tests can be run by the command:

npm run test

Note: This includes code/test coverage report also.

Continuous Integration

Continuous Integration services monitor repositories for changes, then automatically run unit tests on your behalf, typically in a containerized environment. To test this setup works in a continuous integration environment, an integration was done with Travis CI & CircleCI. According to the Travis Node.js Documentation, Travis automatically runs npm install and npm test. The only additional thing I had to add to the Travis configuration was to run npm run build before running the tests. The working Travis config looks like this:

language: node_js

node_js:
  - stable

install:
  - npm install

script:
  - npm run build
  - npm test

CircleCI is similar to Travis-CI, but is more extensible and has much more control over the build process. The CircleCI config looks like this:

# Javascript Node CircleCI 2.0 configuration file
# Check https://circleci.com/docs/2.0/language-javascript/ for more details
#
version: 2
jobs:
  build:
    docker:
      # specify the version you desire here
      - image: circleci/node:7.10
      # Specify service dependencies here if necessary
      # CircleCI maintains a library of pre-built images
      # documented at https://circleci.com/docs/2.0/circleci-images/
      # - image: circleci/mongo:3.4.4
    working_directory: ~/repo
    steps:
      - checkout
      # Download and cache dependencies
      - restore_cache:
          keys:
          - v1-dependencies-{{ checksum "package.json" }}
          # fallback to using the latest cache if no exact match is found
          - v1-dependencies-
      - run: yarn install
      - save_cache:
          paths:
            - node_modules
          key: v1-dependencies-{{ checksum "package.json" }}
      # run tests!
      - run: npm run build
      - run: npm test

Contributing

Please read CONTRIBUTING.md for details on contributing to the project and CODE_OF_CONDUCT.md for the process for submitting pull requests to us.

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

Authors

See also the list of contributors who participates in this project.

License

The MIT License

Copyright (c) 2018- Sandeep Vattapparambil, http://www.sandeepv.in

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Acknowledgements

Made with ❤️ by Sandeep Vattapparambil.

About

The web-ui for exploring Blocktron blockchain. Seamlessly interact with your Blocktron-node instance using blocktron-explorer.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages