Giter Site home page Giter Site logo

pinkdiamond1 / evernode-se Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tonlabs/evernode-se

0.0 1.0 0.0 2.93 MB

Local Node for Everscale DApp development and testing

Home Page: https://hub.docker.com/r/tonlabs/local-node

License: Apache License 2.0

Shell 0.50% JavaScript 0.21% Rust 96.00% CSS 0.07% Makefile 0.21% HTML 0.56% Batchfile 0.08% Dockerfile 0.32% Solidity 2.03% Procfile 0.01%

evernode-se's Introduction

Evernode Startup Edition (SE)

Ever OS Local Node for Everscale DApp development and testing.

Have a question? Get quick help in our channel:

Channel on Telegram

What is Evernode Startup Edition?

Evernode Startup Edition (SE) is a local instance of Ever OS that developer can run on their machine in one click.

At the moment we publish Evernode SE only as a docker image. But you can access non-docker builds of SE in community repos:

Use-cases

  • Test your applications locally
  • Test your contracts
  • Run SE remotely on a server and test your application on a light local network from different devices.

How to install

Pre-requisites

Attention! Docker daemon must be running.

Instal via EVERDEV Development Environment

If you have EVERDEV installed globally on your machine, run this command

$ everdev se start

Checkout other Evernode SE commands accessible from EVERDEV. You can also access these commands from EVERDEV VS Code Extension.

Install via docker command

Run this command

$ docker run -d --name local-node -e USER_AGREEMENT=yes -p80:80 tonlabs/local-node

To check that SE has been installed successfully check its local playground at http://0.0.0.0/graphql. For Windows, use http://127.0.0.1/graphql or http://localhost/graphql.

If you specified another port then add it to the local url http://0.0.0.0:port/graphql

Find out more about GraphQL API.

How to change the blockchain configuration

Evernode SE loads the blockchain configuration (config params) during its start from the configuration file blockchain.conf.json instead of special smart contract, which stores various config params in the real networks.

In order to change some of these params, do the following:

  1. Get blockchain.conf.json file and store it to the host's filesystem accessible by docker. In our example we store it at /home/user/blockchain.conf.json.
  2. Edit the downloaded file, changing parameters you need. If one of the parameters is omitted or renamed, Evernode SE will not start.
  3. Create a new docker container, overriding its configuration file (its path in the image is /ton-node/blockchain.conf.json) with the file from the host's filesystem. Change /home/user/blockchain.conf.json to correct path pointing to the edited blockchain configuration file:
$ docker run -d --name local-node -e USER_AGREEMENT=yes -p80:80 \
     -v /home/user/blockchain.conf.json:/ton-node/blockchain.conf.json \
     tonlabs/local-node

How to work with logs

By default, Evernode SE logs the most of the information to the console, which is accessible by the next command:

$ docker logs local-node

More verbose logging is configured to /ton-node/log/ directory inside the running docker container. By default, there are two files: ton-node.log for all logging and tvm.log for tracing of TVM execution: code, stack, control registers, gas, etc.

Logging configuration is stored in /ton-node/log_cfg.yml file. In order to change the default logging verbosity of other parameters, you can configure logging in several ways:

  1. In the running container by changing /ton-node/log_cfg.yml file:
$ docker exec -it local-node bash
bash-5.0# vi /ton-node/log_cfg.yml

(in order to exit from VI editor with saving changes press the ESC key, then type :wq and press the ENTER key)

Note: log_cfg.yml file is normally scanned for changes every 30 seconds, so all changes made to this file in running container will be applied only after the scan.

Note: after recreation of the container, all changes made in its files will be lost, so use the second way, if you need to keep them.

  1. Before starting of the container, download and edit a copy of log_cfg.yml file, then mount this file to container's file system in docker run command:
$ docker run -d --name local-node -e USER_AGREEMENT=yes -p80:80 \
     -v /home/user/log_cfg.yml:/ton-node/log_cfg.yml \
     tonlabs/local-node

After starting of Evernode SE, you can edit this file in your file system without restart.

More information about log4rs configuration in the log4rs documentation.

How to connect to Evernode SE Graphql API from SDK

Attention at the moment there are a few differences in SE behaviour comparing with a real TON blockchain. Read about them before you start implemennting. Please note that we plan to upgrade the SE behaviour in the next releases so that it will work the same way as a real network.

To connect to local blockchain from your application specify localhost in SDK Client network config.

Evernode SE components

TON Live explorer

TON Live explorer runs on the same IP and port as Evernode SE, just open http://ip_address:port (e.g. http://127.0.0.1)

How to build docker image locally

In order to build and use Evernode Startup Edition you need Docker. To build docker image, run from the repository root:

Linux/Mac:

./build.sh

Windows:

build.cmd

evernode-se's People

Contributors

alexeyvavilin avatar artem-zhdanov avatar atomxy avatar bvscd avatar d3p avatar elasticlove1 avatar igorkoval avatar ilyar avatar joydark avatar sumrachek avatar tonjen avatar yaroslavser avatar

Watchers

 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.