GithubHelp home page GithubHelp logo

aergoio / aergoscan Goto Github PK

View Code? Open in Web Editor NEW
5.0 7.0 1.0 2.59 MB

Aergo Blockchain Explorer

Home Page: http://aergoscan.io

Dockerfile 0.59% JavaScript 26.91% HTML 0.42% Vue 71.17% Shell 0.11% SCSS 0.80%

aergoscan's Introduction

aergoscan

A web application to monitor the current state of the aergo blockchain.

Can be run locally. You can find the deployed application at http://aergoscan.io

The docker-compose file included in this repo is not meant for production use.

Running locally

  1. Install Docker if you haven't already. If you are on Linux, you may also have to install docker-compose.
  2. docker-compose up

This will start a webserver, API backend, and blockchain indexer.

If you also want a local Aergo testnet with zero configuration, try docker-compose -f docker-compose.yml -f docker-compose.node.yml up.

The webserver is accessible at http://127.0.0.1:8080

Configuration

You can change most of the bound ports in the docker-compose.yml file. For example, change the nginx.ports 8080:80 to bind to another port than 8080 on your local machine.

The aergo local node can be configured using aergo/config.toml. After changing values, run docker-compose build and restart the containers.

The default configuration launches a local testnet (a block producer with a block time of 1 second) with testmode enabled (meaning balances are not verified when sending transactions). To connect to an existing network, you can also disable enablebp and add peers through the npaddpeers setting.

Alternatively you can just connect to any already running node by setting the environment variable AERGO_NODE=ip_address:port when building and running the containers. Make sure this address is reachable from your browser and from within the Docker container. Again, don't forget to build. For example

AERGO_NODE=192.168.0.123:7845 docker-compose up --build

Reindex meta db

This contains an indexer that syncs a database with blockchain meta data. It attempts to sync correctly even during reorganizations, but sometimes it can fail. In that case you can resync the database by starting the indexer with AERGOSCAN_REINDEX=true.

AERGOSCAN_REINDEX=true docker-compose up

Scripts for testing

# Start a node with specified version, in testmode (optional)
docker run --rm -p 7845:7845 -v /path/to/aergo/home/:/aergo/ aergo/node:0.10.1 aergosvr --config /aergo/testmode.toml

# Start aergoscan listening on that node
AERGO_NODE=192.168.0.123:7845 AERGOSCAN_REINDEX=true docker-compose up --build

Wait until indexer is connected to the node (new blocks are being shown in the log), then open 127.0.0.1:8080 in the browser and create some test transactions.

Quick deployment

See DEPLOYMENT.md

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.