{"id":21529183,"url":"https://github.com/everx-labs/evernode-se","last_synced_at":"2025-04-10T03:42:30.095Z","repository":{"id":37425070,"uuid":"328714341","full_name":"everx-labs/evernode-se","owner":"everx-labs","description":"Local Node for DApp development and testing in TVM blockchains (Everscale, TON, Venom, etc)","archived":false,"fork":false,"pushed_at":"2024-09-18T17:06:02.000Z","size":11411,"stargazers_count":52,"open_issues_count":4,"forks_count":28,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-03-24T04:51:39.317Z","etag":null,"topics":["blockchain","everscale","everscale-blockchain","local","node","solidity","testing","testing-tools","ton","toncoin","venom","venom-blockchain","venom-developer-program"],"latest_commit_sha":null,"homepage":"https://docs.evercloud.dev/products/simple-emulator-se","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/everx-labs.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-01-11T15:50:49.000Z","updated_at":"2025-03-23T16:20:05.000Z","dependencies_parsed_at":"2024-02-05T22:32:37.120Z","dependency_job_id":"95862820-461f-4a0d-9d1e-910af42be9a7","html_url":"https://github.com/everx-labs/evernode-se","commit_stats":null,"previous_names":["everx-labs/evernode-se","tonlabs/evernode-se"],"tags_count":55,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/everx-labs%2Fevernode-se","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/everx-labs%2Fevernode-se/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/everx-labs%2Fevernode-se/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/everx-labs%2Fevernode-se/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/everx-labs","download_url":"https://codeload.github.com/everx-labs/evernode-se/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248154964,"owners_count":21056541,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["blockchain","everscale","everscale-blockchain","local","node","solidity","testing","testing-tools","ton","toncoin","venom","venom-blockchain","venom-developer-program"],"created_at":"2024-11-24T01:56:09.298Z","updated_at":"2025-04-10T03:42:30.066Z","avatar_url":"https://github.com/everx-labs.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Evernode Simple Emulator (SE)\n\nLocal Node with GraphQL API for DApp development and testing in TVM compatible blockchains (Everscale, Venom, TON, Gosh, etc.).\n\n**Have a question? Get quick help in our channel:**\n\n[![Channel on Telegram](https://img.shields.io/badge/chat-on%20telegram-9cf.svg)](https://t.me/ever_sdk)\n\n- [Evernode Simple Emulator (SE)](#evernode-simple-emulator-se)\n  - [What is Evernode Simple Emulator?](#what-is-evernode-simple-emulator)\n  - [Use-cases](#use-cases)\n  - [How to install](#how-to-install)\n    - [Pre-requisites](#pre-requisites)\n    - [Install via EVERDEV Development Environment](#install-via-everdev-development-environment)\n    - [Install via docker command](#install-via-docker-command)\n  - [How to change the blockchain configuration](#how-to-change-the-blockchain-configuration)\n  - [How to work with logs](#how-to-work-with-logs)\n  - [How to connect to Evernode SE Graphql API from SDK](#how-to-connect-to-evernode-se-graphql-api-from-sdk)\n  - [Evernode SE components](#evernode-se-components)\n  - [Ever Live explorer](#ever-live-explorer)\n  - [How to build docker image locally](#how-to-build-docker-image-locally)\n    - [Linux/Mac:](#linuxmac)\n    - [Windows:](#windows)\n  - [Memory limits](#memory-limits)\n- [SE live control (REST API)](#se-live-control-rest-api)\n- [Note for SE Developers](#note-for-se-developers)\n- [Troubleshooting](#troubleshooting)\n  - [Error: connect ENOENT /var/run/docker.sock](#error-connect-enoent-varrundockersock)\n  - [Ever.live at localhost isn't available](#everlive-at-localhost-isnt-available)\n\n## What is Evernode Simple Emulator?\n\nEvernode Simple Emulator (SE) is a local instance of Evernode Platform that developer can run on their machine in one click to test applications locally. \n\nAt the moment we publish Evernode SE only as\na [docker image](https://hub.docker.com/r/everx-labs/local-node).\nBut you can access non-docker builds of SE in community repos:\n\n## Use-cases\n\n- Test your applications locally\n- Test your contracts\n- Run SE remotely on a server and test your application on a light local network from different devices.\n\n## How to install\n\n### Pre-requisites\n\n- Latest [Docker](https://www.docker.com/get-started) installed\n\n**Attention!** [Docker daemon](https://docs.docker.com/config/daemon/start/) must be running.\n\n### Install via EVERDEV Development Environment\n\nIf you have [EVERDEV installed globally on your machine](https://github.com/everx-labs/everdev), run\nthis command\n\n```commandline\n$ everdev se start\n```\n\n[Checkout other Evernode SE commands accessible from EVERDEV](https://docs.everos.dev/everdev/command-line-interface/evernode-platform-startup-edition-se).\n\n### Install via docker command\n\nRun this command\n\n```commandline\n$ docker run -d --name local-node -e USER_AGREEMENT=yes -p80:80 tonlabs/local-node\n```\n\nTo check that SE has been installed successfully check its local playground\nat http://0.0.0.0/graphql.\nFor Windows, use http://127.0.0.1/graphql or http://localhost/graphql.\n\nIf you specified another port then add it to the local url `http://0.0.0.0:port/graphql`\n\n[Find out more about GraphQL API](https://docs.evercloud.dev/reference/graphql-api).\n\n## How to change the blockchain configuration\n\nEvernode SE loads the blockchain configuration (config params) during its start from the\nconfiguration file\n[blockchain.conf.json](docker/ton-node/blockchain.conf.json) instead of special smart contract,\nwhich stores\nvarious config params in the real networks.\n\nIn order to change some of these params, do the following:\n\n1. Get [blockchain.conf.json](docker/ton-node/blockchain.conf.json) file and store it to the host's\n   filesystem\n   accessible by docker. In our example we store it at `/home/user/blockchain.conf.json`.\n2. Edit the downloaded file, changing parameters you need. If one of the parameters is omitted or\n   renamed, Evernode SE will not start.\n3. Create a new docker container, overriding its configuration file\n   (its path in the image is `/ton-node/blockchain.conf.json`) with the file from the host's\n   filesystem.\n   Change `/home/user/blockchain.conf.json` to correct path pointing to the edited blockchain\n   configuration file:\n\n```commandline\n$ docker run -d --name local-node -e USER_AGREEMENT=yes -p80:80 \\\n     -v /home/user/blockchain.conf.json:/ton-node/blockchain.conf.json \\\n     tonlabs/local-node\n```\n4. All the subsequent config changes will require only restart of the created container. \n\n## How to work with logs\n\nBy default, Evernode SE logs the most of the information to the console, which is accessible by the\nnext command:\n\n```commandline\n$ docker logs local-node\n```\n\nMore verbose logging is configured to `/ton-node/log/` directory inside the running docker\ncontainer.\nBy default, there are two files: `ton-node.log` for all logging and `tvm.log` for tracing of TVM\nexecution:\ncode, stack, control registers, gas, etc.\n\nLogging configuration is stored in `/ton-node/log_cfg.yml` file by default,\nbut you can change this path with ton-node-config file in `log_path` field.\nIn order to change the default logging verbosity of other parameters, \nyou can configure logging in several ways:\n\n1. In the running container by changing `/ton-node/log_cfg.yml` file:\n\n```commandline\n$ docker exec -it local-node bash\nbash-5.0# vi /ton-node/log_cfg.yml\n```\n\n(in order to exit from VI editor with saving changes press the `ESC` key, then type `:wq` and press\nthe `ENTER` key)\n\nNote: `log_cfg.yml` file is normally scanned for changes every 30 seconds, so all changes made to\nthis file in running\ncontainer will be applied only after the scan.\n\nNote: after recreation of the container, all changes made in its files will be lost, so use the\nsecond way, if you need\nto keep them.\n\n2. Before starting of the container, download and edit a copy\n   of [log_cfg.yml](./docker/ton-node/log_cfg.yml) file, then\n   mount this file to container's file system in `docker run` command:\n\n```commandline\n$ docker run -d --name local-node -e USER_AGREEMENT=yes -p80:80 \\\n     -v /home/user/log_cfg.yml:/ton-node/log_cfg.yml \\\n     tonlabs/local-node\n```\n\nAfter starting of Evernode SE, you can edit this file in your file system without restart.\n\nMore information about log4rs\nconfiguration [in the log4rs documentation](https://docs.rs/log4rs/1.0.0/log4rs/).\n\n## How to connect to Evernode SE Graphql API from SDK\n\n**Attention** at the moment there are a\nfew [differences in SE behaviour comparing with a real TON blockchain](https://docs.evercloud.dev/products/simple-emulator-se#23854b)\n. Read about them before you start implemennting. Please note that we plan to upgrade the SE\nbehaviour in the next releases so that it will work the same way as a real network.\n\nTo connect to local blockchain from your\napplication specify [SE endpoints](https://docs.evercloud.dev/products/simple-emulator-se/endpoint) in SDK Client [network config](https://docs.everos.dev/ever-sdk/guides/installation/configure_sdk).\n.\n\n## Evernode SE components\n\n* [EverX implementation of TON VM written in Rust](https://github.com/everx-labs/ever-vm)\n* [ArangoDB database](https://www.arangodb.com/)\n* [GraphQL endpoint with web playground](https://docs.evercloud.dev/reference/graphql-api)\n* [Ever.live blockchain explorer](https://ever.live)\n* [Pre-deployed high-performance Giver, ABI v2](contracts)\n\n## Ever Live explorer\n\nEver 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)\n\n## How to build docker image locally\n\nIn order to build and use Evernode Simple Emulator you need Docker.\nTo build docker image, run from the repository root:\n\n### Linux/Mac:\n\n```commandline\n./build.sh\n```\n\n### Windows:\n\n```commandline\nbuild.cmd\n```\n\n## Memory limits\n\nEvernode SE needs about 1Gb of memory but it is not limited to this value. There is an instance of\nArangoDB inside and GraphQL server running in NodeJS environment which can require more memory\nduring the high load over a long period of time. If there is a need to hardly limit memory \nconsumption then you can change default setting for these services. ArangoDB config is placed at\n`/arango/config` and GraphQL server entrypoint is at `/q-server/entrypoint`. There is some minimum \nrequired memory limits are preconfigured in `./memory/config` for ArangoDB and `./memory/entrypoint`.\nYou can copy them to `evernode-se` container with the following commands\n```commandline\ndocker cp ./memory/config evernode-se:/arango/config\ndocker cp ./memory/entrypoint evernode-se:/q-server/entrypoint\n```\nMemory configuration values for ArangoDB can be found in [official documentation](https://www.arangodb.com/docs/3.10/administration-reduce-memory-footprint.html)\n\n*Note* Node engine also consumes memory and can not be limited. So during the work memory\nconsumption will be slightly increasing.\n\n**Warning** Memory limitation affects Evernode SE performance so use it only if necessary \n\n# SE live control (REST API)\n\nEvernode SE has special REST endpoint `/se` that allows to perform *live* control over\nrunning Evernode SE instance.\n\nWhile the Evernode SE is running it has several properties that effect node behaviour:\n\n- `gen_time_delta` – each time the node issues new block it sets the block's `gen_utime`\n  to `now() + gen_time_delta`. When the node starts it sets the `gen_time_delta` to `0`.\n- `seq_mode` – if this mode is on then evernode SE produces separate block for each transaction\n  and each block has unique `gen_utime`, equals to the `gen_utime` of the previous block + 1. \n  \nSE control commands (must be sent using POST HTTP method):\n\n- `/se/increase-time?delta=\u003cseconds\u003e` – increase `gen_time_delta` by\n  specified \u003cseconds\u003e value.\n\n- `/se/reset-time` – resets `gen_time_delta` to `0`.\n\n- `/se/time-delta` – returns current `gen_time_delta` value.\n\n- `/se/seq-mode-on` – turns on the sequential mode.\n- `/se/seq-mode-off` – turns off the sequential mode.\n- `/se/time` – returns current node time with included time delta. If seq mode is on then returned \n  time is a time of the next block.\n\n# Note for SE Developers\n\nThis repository contains several useful tools for SE development and debugging.\nDev tools resided in `dev` folder and requires [Node.js](https://nodejs.org) to execute (so you have to run `npm i`\ninside this folder to prepare dev tools).\n\nIf you want to debug SE without docker you have to run evernode-se with following additional\ncomponents:\n\n- Q Server (required to communicate with [ever-sdk](https://github.com/everx-labs/ever-sdk)):\n    - Checkout `ever-q-server` from [official repository](https://github.com/everx-labs/ever-q-server).\n    - Inside `ever-q-server` folder run:\n        ```commandline\n        npm i\n        ```\n    - Inside `evernode-se` folder run:\n        ```commandline\n        node path-to-q-server/index --config ./dev/q-server.json\n        ```\n\n- Arango DB (required to `ever-q-server`):\n    - Download and install from [official site](https://www.arangodb.com/download-major).\n    - Start Arango DB Server.\n    - For the first time or if you want to reset database to initial state run:\n        ```commandline\n        node ./dev/reset-db\n        ```\n\n- Evernode SE in debug mode\n    ```commandline\n    cargo run --release --bin evernode_se -- --workdir ./docker/ton-node --config ton-node.conf.json --blockchain-config blockchain.conf.json\n    ```\n\n# Troubleshooting\n\n## Error: connect ENOENT /var/run/docker.sock\n\nGetting this error means docker service is not running or missing due to incorrect Docker installation, partiularly in the case of Docker Desktop. Try reinstalling Docker and making sure the [daemon](https://docs.docker.com/config/daemon/start/) is running.\n\n## Ever.live at localhost isn't available\n\nIf you use certain adblockers, after you have started Evernode SE the Ever Live explorer at http://127.0.0.1/landing might fail to load (you get a rotating icon and varous warnings and errors in the console).\n\n![](troubleshooting.jpg)\n\nTry disabling the adblockers for the SE Ever Live explorer.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feverx-labs%2Fevernode-se","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feverx-labs%2Fevernode-se","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feverx-labs%2Fevernode-se/lists"}