A Explorer tool for EOS.IO (Testnet) Some of the content might be outdated, Feel free to PR if you like to fix it.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore
LICENSE
README.md
api.js
index.html

README.md

eosmonitor.info

A Simple Explorer tool for EOS.IO (Testnet)

Intro

Functions:

  1. get_info to check latest Chain status
  2. List last 10 Accounts, Blocks, Transactions, Messages
  3. Query Account info by _id or Account Name
  4. List last 10 Transactions & Messages for Account
  5. Query Block, Transaction & Message by _id or block_id, transaction_id

For each testnet, it need a host to run eosd for replay chain data and push to mongodb.

eosmonitor.info connect to Testnet1.eos.io. If you like to include your testnet into it, you can setup the backend API and raise a Issue or PR to add the Endpoint into frontend page.

Data flow:

EOS Testnet -> local eosd -> mongodb -> nodejs api -> frontend page

This system relay on local eosd and the mongodb it connect to. If the eosd process crashed, mongodb will not refreshing. When you restart eosd, it take a while to sync from tesetnet and replay. During sync process, the explorer/monitor only display the latest data in mongodb.

As of today (2018/01/22), testnet1.eos.io chain have 5.951GB data in mongodb database.

11,482    Accounts
1,993,315 Blocks
1,311,566 Transactions
1,317,227 Messages

Background

EOS.IO

Block.One

EOS on CoinMarketCap

EOS Go - Blockchain Launch Community

EOS.IO Github

Document

Register for Testnet1.eos.io

Build eosd, enable mongodb support in db_plugin

Getting EOS code

Install MongoDB support !!! Please Note to change mongo-c-driver version from 1.8.0 to latest.

# current version
wget https://github.com/mongodb/mongo-c-driver/releases/download/1.9.4/mongo-c-driver-1.9.4.tar.gz

# OLD wget https://github.com/mongodb/mongo-c-driver/releases/download/1.8.0/mongo-c-driver-1.8.0.tar.gz

REF

This is the part that missing in official wiki document.

Make a full build to compile db_plugin with mongodb

Check the build log to see anything mentions MongoDB or DB Schema.

Test eosd with MongoDB

Run eosd test with mongodb

$EOS_HOME\tests\eosd_run_mongodb_test.sh

Check stderr.txt for error messages

Run mongodb client to explorer the Database "EOStest" generated by test script. If you find Collections "Accounts", "Blocks", "Messages", "Transactions", we are ready to go.

$ mongo

> show dbs
EOStest  0.078GB
admin    (empty)
local    0.078GB

> use EOStest
switched to db EOStest

> show collections
Accounts
Blocks
Messages
Transactions
system.indexes

Modify config.ini to enable db_plugin and mongodb-url, run eosd and connect to a testnet (testnet1.eos.io) endpoint.

There is a script & config.ini for testnet connection in $EOS_HOME/script/ dir.

access-control-allow-origin = *
access-control-allow-headers = *

http-server-address = 0.0.0.0:8888
p2p-listen-endpoint = 0.0.0.0:9877
p2p-server-address = <server public ip address>:9877
allowed-connection = any
p2p-peer-address = p2p-testnet1.eos.io:9876

plugin = eosio::db_plugin
mongodb-uri = mongodb://localhost:27017/EOSmain

!!! IMPORTANT !!! Mongodb open 27017 port without password by default. Please make sure you are only allow traffic from localhost and not listen to 0.0.0.0.

I run eosd, mongodb and NodeJs API on the same EC2 instance and use AWS Security Group inbound rules to cover this issue.

Install and launch Backend API

After eosd start it began to sync and push data into mongoDB.

Install express and moongodb dependency

npm install -S express mongodb

Single file app.js for the API part.

$ node api.js

To running on production environment, you should put more bells and whistles like

  1. pm2 or supervisor for process management;

  2. Nginx reverse proxy;

  3. Load balancer for mulitple instances.

Front end page

Change the Testnet Endpoint URL in "index.html" and place it to anywhere that can host static web page. eosmonitor.info use AWS S3 bucket with Static website hosting.

Summary

This is simple tool for eos developer, not follow engineering best practices.

Welcome to contribute and deploy your own node.

Cheers!

To support: ETH: 0x6603a0f83BfaFdA520694e23daA9aDd8d794ba10