GithubHelp home page GithubHelp logo

isabella232 / tezblock Goto Github PK

View Code? Open in Web Editor NEW

This project forked from airgap-it/tezblock

0.0 0.0 0.0 16.98 MB

tezblock is a block explorer for Tezos.

Home Page: https://tezblock.io

License: MIT License

Dockerfile 0.12% JavaScript 2.21% TypeScript 79.40% Shell 0.34% HTML 16.44% SCSS 1.49%

tezblock's Introduction

tezblock

tezblock is a block explorer for Tezos, an open-source platform for assets and applications, backed by a global community of validators, researchers, and builders. tezblock is being built by Papers, the team behind AirGap.

๐Ÿ‘‰ tezblock.io for the live version.

Local Deployment

tezblock depends on the Conseil protocol indexer. Follow the steps to deploy Conseil locally or read through the README in the Conseil GitHub repository.

Build and deploy Conseil

Clone the Conseil repository and cd into the cloned folder.

git clone https://github.com/Cryptonomic/Conseil.git
cd Conseil

Build the Conseil docker image

docker build -t conseil .

Edit docker-compose.yml by changing the image value for the conseil and lorre services to conseil in order to use the docker image built in the previous step, or just leave the preconfigured value to use the published image.

Edit docker-compose.yml by changing the XTZ_Scheme, XTZ_Host, XTZ_Port and XTZ_Network values to point to your own Tezos node, or just leave the preconfigured value to use the Cryptonomic node.

Optional - Conseil performance optimization

To increase performance, uncomment the following line in the docker-compose.yml file:

"./sql/conseil.sql:/docker-entrypoint-initdb.d/conseil.sql"

Edit the sql/conseil.sql file by adding:

  • ALTER ROLE conseiluser SET search_path TO tezos,public;
  • ALTER DATABASE "conseil-local" SET search_path TO tezos,public;
  • CREATE INDEX ix_accounts_history_account_id ON tezos.accounts_history USING hash (account_id);
  • CREATE INDEX ix_operations_level ON tezos.operations USING hash (level);
  • CREATE INDEX ix_operations_level_kind ON tezos.operations USING btree (level,kind);
  • CREATE INDEX ix_operations_manager_pubkey ON tezos.operations USING hash (manager_pubkey);
  • CREATE INDEX ix_operations_operation_group_hash ON tezos.operations USING hash (operation_group_hash);

Run the Conseil instance

docker-compose up -d

Setup local Tezos node

To run a Tezos node locally, clone Nautilus:

git clone https://github.com/airgap-it/Nautilus.git

From the cloned repository, run:

bash ./docker/nautilus.sh -t

The above command will create and start a docker container with a Tezos node running in archive mode. The docker image name is tezos-node-local.

Build and deploy tezblock

Clone the tezblock repository and cd into the cloned folder.

git clone https://github.com/airgap-it/tezblock
cd tezblock

Edit the src/environments/environment.ts and src/environments/environment.prod.ts files and change:

  • MAINNET_RPC_URL URL to the JSON RPC interface of a Tezos node
  • MAINNET_CONSEIL_URL URL of a running Conseil service
  • MAINNET_CONSEIL_API_KEY API key for the Conseil service
  • MAINNET_TARGET_URL Value can be set to the URL tezblock will be accessible from. Only needed if switching between the different network deployments is desired, otherwise this can be ignored

If support for test networks is needed, edit the testnet specific values, or ignore them otherwise.

From the root of the tezblock folder, execute the following command to build tezblock:

yarn install
yarn build

To start tezblock on http://localhost:4200, execute:

yarn start

tezblock's People

Contributors

acharl avatar andreasgassmann avatar andrewpaulicek avatar bb4l avatar dcale avatar godenzim avatar pascuin avatar tischlu avatar

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.