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.
- About
- Getting Started
- Installation
- Changelog
- Usage
- Tests
- Continuous Integration
- Contributing
- Versioning
- Authors
- License
- Acknowledgements
You can grab a copy of Blocktron-Explorer from the following:
git clone https://github.com/Blocktron-Project/blocktron-explorer.git
or using SSH:
git@github.com:Blocktron-Project/blocktron-explorer.git
or download a zip from: https://github.com/Blocktron-Project/blocktron-explorer/archive/master.zip
Once you have the local copy of repo, you can install dependencies by:
npm i
v0.0.1
- Beta build
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:
Blocktron-Nodes can be added to the explorer by clicking the Add Node
button.
Which will open up the url input field as shown:
Then you can enter the url as shown:
once you have entered a vlid url you can click the +
button which will add your node to the explorer as shown:
Note: You can add multiple nodes and interact with them at the same time as shown:
Now you can select your desired node to interact with it.
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:
This tab shows the configuration details of the particular node that you selected:
This tab shows information about the Memory allocated for blocktron-node instance you selected:
This section contains two tabs:
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:
This tab lists the network addresses of the nodes attached to the blockchian of the current node.
This card displays the genesis block on the blockchain of the current node. Every blockchain starts itself from the dummy block called genesis block.
A sample data block will look like the following:
You can mine new blocks by using the Mine
button.
You can force your selected node to reach consensus with other nodes by clicking this button.
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 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
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.
We use SemVer for versioning. For the versions available, see the tags on this repository.
- Sandeep Vattapparambil - Founder, Lead Developer & Maintainer
See also the list of contributors who participates in this project.
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.
Made with ❤️ by Sandeep Vattapparambil.