teztracker

command module
v0.0.0-...-80b2b3e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 26, 2021 License: MIT Imports: 16 Imported by: 0

README

TezTracker

TezTracker is an open-source Tezos explorer based on the Conseil indexer. Developed and supported by Everstake team.

Project overwiew

Programming language: Go v1.15.2

DB: Postgres 12

Indexer: Conseil

Tezos Node: mainnet.tezos.org.ua

Server struct:

  1. API server
  2. Daemons which process specific additional information which not presented by indexer

Local deployment

Environment variables

All the project variables should be configured by the environment.

Environment variables are divided into 2 groups:

  1. Conseil variables

    Database Config:

     DB_HOST - default: db
     DB_USER - default: user
     DB_PASSWORD - default: password
     DB_DATABASE - default: conseil
    

    Tezos Node Config:

     XTZ_SCHEME - http or https, default : http
     XTZ_HOST - default: node
     XTZ_PORT - default 8732
    

    Also Conseil can be configured for the Carthage testnet by adding CARTHAGENET_ prefix

  2. TezTracker API server variables

     	TEZTRACKER_PORT	- api port
     	TEZTRACKER_API_DOCUMENTATION_PORT - api port of documentation ui    
     	TEZTRACKER_MAINNET_SQLCONNECTIONSTRING - raw Postgres connection string. example: postgresql://user:pass@127.0.0.1:5432/conseil?sslmode=disable
     	TEZTRACKER_LOG_LEVEL - default: info
     	TEZTRACKER_COUNTERINTERVALHOURS - update interval of chain counters. example: 2
     	TEZTRACKER_FUTURERIGHTSINTERVALMINUTES - check interval of future baking/endorsement rights
     	TEZTRACKER_SNAPSHOTCHECKINTERVALMINUTES - check interval of snapshots
     	TEZTRACKER_DOUBLEBAKINGCHECKINTERVALMINUTES - check interval of double baking operations
     	TEZTRACKER_DOUBLEENDORSEMENTCHECKINTERVALMINUTES - check interval of double endorsement operations
     TEZTRACKER_ASSETSPARSEINTERVALMINUTES - parse interval of assets operations
     TEZTRACKER_VOTINGROLLSINTERVALMINUTES - parse interval of voting rolls
    
Build and deploy Conseil

TezTracker relies on the Conseil indexer. Follow the instructions provided below to deploy Conseil or read through the README in the Conseil GitHub repository.
Current explorer state works with 2020-july-release-24 Conseil release, so use correct conseil.sql file for db init.

Clone the teztracker repository and cd into the cloned folder.

git clone https://github.com/everstake/teztracker
cd teztracker

Configure Conseil environment variables.

Build the Conseil docker image:

docker-compose build conseil-lorre

Run the Conseil instance

docker-compose up -d conseil-lorre
Tezos Node

We recommend using public archive nodes from mainnet.tezos.org.ua for saving you time and disc space.

Build and deploy TezTracker

Clone the teztracker repository and cd into the cloned folder.

git clone https://github.com/everstake/teztracker
cd teztracker

If support for multiple networks is needed add SQLCONNECTIONSTRING with a required tezos net instead of MAINNET.

Manualy exec sql migrations from /repos/migrations on PostgreSQL Conseil DB.

From the root of the teztracker folder, execute the following command to build teztracker on Docker:

docker-compose build api-server

To start teztracker on localhost, execute:

docker-compose up -d api-server
Serve TezTracker API documentation

From the root of the teztracker folder, execute the following command to build swagger api documentation on Docker:

docker-compose build api-documentation

To serve documentation on localhost, execute:

docker-compose up -d api-documentation

Full api documentation can be found at https://teztracker.everstake.one/docs

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
api
gen
restapi
Package restapi TezTracker API Schemes: http ws Host: localhost BasePath: / Version: 0.0.1 Consumes: - application/json Produces: - application/json - text/csv swagger:meta
Package restapi TezTracker API Schemes: http ws Host: localhost BasePath: / Version: 0.0.1 Consumes: - application/json Produces: - application/json - text/csv swagger:meta
account/mock_account
Package mock_account is a generated GoMock package.
Package mock_account is a generated GoMock package.
block/mock_block
Package mock_block is a generated GoMock package.
Package mock_block is a generated GoMock package.
nft
operation/mock_operation
Package mock_operation is a generated GoMock package.
Package mock_operation is a generated GoMock package.
operation_groups/mock_operation_group
Package mock_operation_groups is a generated GoMock package.
Package mock_operation_groups is a generated GoMock package.
cmc
mock_service
Package mock_services is a generated GoMock package.
Package mock_services is a generated GoMock package.
nft
ws

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL