### Install TON-HTTP-API on Windows Source: https://github.com/neodix42/mylocalton/blob/main/README.md Installs TON-HTTP-API on Windows. This involves downloading Python, ensuring pip is upgraded, installing uvicorn, and then installing or upgrading ton-http-api using pipx. ```bash wget https://www.python.org/ftp/python/3.12.0/python-3.12.0-amd64.exe python -m ensurepip --upgrade pip install uvicorn[standard] start pip3 install -U ton-http-api # or scoop install pipx pipx ensurepath pipx install ton-http-api # or if already installed pipx upgrade ton-http-api ``` -------------------------------- ### Install TON-HTTP-API on Linux Source: https://github.com/neodix42/mylocalton/blob/main/README.md Installs and ensures the latest version of ton-http-api is available globally on Linux systems using pipx. Requires Python 3 and pipx to be installed. ```bash sudo apt install -y python3 sudo apt install -y python3-pip sudo apt install pipx pipx ensurepath pipx install ton-http-api # or if already installed pipx upgrade ton-http-api ``` -------------------------------- ### Install OpenJDK 21 on Linux Source: https://github.com/neodix42/mylocalton/blob/main/README.md Use this command to install OpenJDK 21 on Debian-based Linux distributions. ```bash sudo apt install openjdk-21-jdk ``` -------------------------------- ### Install OpenJDK 21 on Windows using Chocolatey Source: https://github.com/neodix42/mylocalton/blob/main/README.md Use this command to install OpenJDK 21 on Windows via Chocolatey. ```powershell choco install openjdk --version=21.0.2 ``` -------------------------------- ### Install TON-HTTP-API on MacOS Source: https://github.com/neodix42/mylocalton/blob/main/README.md Installs and ensures the latest version of ton-http-api is available globally on MacOS systems using pipx. Requires Python 3.11+ and pipx to be installed via Homebrew. ```bash brew install -q python3 python3 -m ensurepip --upgrade brew install pipx pipx ensurepath pipx install ton-http-api # or if already installed pipx upgrade ton-http-api ``` -------------------------------- ### Install OpenJDK 21 on MacOS using Homebrew Source: https://github.com/neodix42/mylocalton/blob/main/README.md Use this command to install OpenJDK 21 on MacOS via Homebrew. ```bash brew install openjdk@21 ``` -------------------------------- ### MyLocalTon Command-Line Usage Source: https://github.com/neodix42/mylocalton/blob/main/README.md Instructions on how to run MyLocalTon using the command line, with explanations of various parameters. ```APIDOC ## MyLocalTon Command-Line Usage Run MyLocalTon with the following command: `java -jar MyLocalTon-x86-64.jar [nogui] [ton-http-api] [explorer] [ip.addr.xxx.xxx] [test-binaries] [with-validators-N] [custom-binaries=] [debug]` For ARM64 architecture, use: `java -jar MyLocalTon-arm64.jar` ### Parameters * `nogui`: Runs MyLocalTon without a GUI. Useful for Docker or headless servers. * `ton-http-api`: Enables the ton-http-api service on port `8081`. * `explorer`: Enables the native TON blockchain explorer on port `8001`. * `ip.addr.xxx.xxx`: Binds MyLocalTon to a specific IP address instead of `127.0.0.1`. * `with-validators-N`: Starts MyLocalTon with `N` additional validators. * `elections=int,int,int,int,int`: Starts MyLocalTon with specific election timing parameters in seconds: **electedFor**, **electionStartBefore**, **electionEndBefore**, **electionStakesFrozenFor**, and **how often to participate in elections**. * `custom-binaries=absolute-path`: Starts MyLocalTon with custom TON binaries located at the specified absolute path. The folder must contain specific binaries and **smartcont** and lib **folders**. * `debug`: Starts MyLocalTon in debug mode, generating extensive log files. * `data-generator`: Enables the data-generator. More info available [here](https://github.com/neodix42/mylocalton-docker/wiki/Data-(traffic-generation)-container). * `version`: Displays the current version of MyLocalTon. ``` -------------------------------- ### Run MyLocalTon (x86-64) Source: https://github.com/neodix42/mylocalton/blob/main/README.md Execute MyLocalTon for x86-64 architecture. Optional parameters can be appended to customize its behavior. ```bash java -jar MyLocalTon-x86-64.jar [nogui] [ton-http-api] [explorer] [ip.addr.xxx.xxx] [test-binaries] [with-validators-N] [custom-binaries=] [debug] ``` -------------------------------- ### Connect to Lite-Client Source: https://github.com/neodix42/mylocalton/blob/main/README.md Connect to the MyLocalTon lite-client using provided access details and a base64 encoded key. The '-c last' command fetches the latest state. ```bash lite-client -a 127.0.0.1:4443 -b E7XwFSQzNkcRepUC23J2nRpASXpnsEKmyyHYV4u/FZY= -c last ``` -------------------------------- ### Download MyLocalTon for x86-64 Linux/macOS Source: https://github.com/neodix42/mylocalton/blob/main/README.md Use this command to download the MyLocalTon JAR file for x86-64 architecture on Linux or macOS. ```bash wget https://github.com/neodix42/MyLocalTon/releases/latest/download/MyLocalTon-x86-64.jar ``` -------------------------------- ### Download MyLocalTon for arm64 Linux/macOS Source: https://github.com/neodix42/mylocalton/blob/main/README.md Use this command to download the MyLocalTon JAR file for arm64 architecture on Linux or macOS. ```bash wget https://github.com/neodix42/MyLocalTon/releases/latest/download/MyLocalTon-arm64.jar ``` -------------------------------- ### Lite-client Connection Source: https://github.com/neodix42/mylocalton/blob/main/README.md Information on how to connect to the MyLocalTon lite-client using deterministic keys. ```APIDOC ## Lite-client Connection Connect to the lite-client using the following command with your base64 key: `lite-client -a 127.0.0.1:4443 -b E7XwFSQzNkcRepUC23J2nRpASXpnsEKmyyHYV4u/FZY= -c last` Alternatively, use `validator-engine-console` with: `validator-engine-console -a 127.0.0.1:4441 -k /myLocalTon/genesis/bin/certs/client -p /myLocalTon/genesis/bin/certs/server.pub` ``` -------------------------------- ### Run MyLocalTon (ARM64) Source: https://github.com/neodix42/mylocalton/blob/main/README.md Execute MyLocalTon specifically for ARM64 architecture. This command is used when the target system is ARM64-based. ```bash java -jar MyLocalTon-arm64.jar ``` -------------------------------- ### Connect to Validator-Engine-Console Source: https://github.com/neodix42/mylocalton/blob/main/README.md Access the validator-engine-console using specified network addresses and key paths. Ensure the paths to client and server public key are correct. ```bash validator-engine-console -a 127.0.0.1:4441 -k /myLocalTon/genesis/bin/certs/client -p /myLocalTon/genesis/bin/certs/server.pub ``` -------------------------------- ### Symlink Readline Library on MacOS for MacPorts Source: https://github.com/neodix42/mylocalton/blob/main/README.md This command creates a symbolic link for the readline library, which may be necessary for users on MacOS using MacPorts. ```bash mkdir -p /usr/local/opt/readline/lib; ln -s /opt/local/lib/libreadline.8.dylib /usr/local/opt/readline/lib/ ``` -------------------------------- ### Report Issue: Run in Debug Mode Source: https://github.com/neodix42/mylocalton/blob/main/README.md Execute MyLocalTon in debug mode to generate detailed log files for issue reporting. This involves deleting the existing MyLocalTon data folder and rerunning the jar with the 'debug' flag. ```bash java -jar MyLocalTon*.jar debug ``` -------------------------------- ### MyLocalTon HTTP Server Endpoints Source: https://github.com/neodix42/mylocalton/blob/main/README.md Details of the HTTP endpoints provided by the MyLocalTon HTTP server. ```APIDOC ## HTTP Server Endpoints MyLocalTon includes a simple HTTP server with the following endpoints: ### GET http://localhost:8000/localhost.global.config.json **Description**: Serves the TON configuration file, usable with SDK libraries like tonlib or ton4j. ### GET http://localhost:8000/live **Description**: Returns 'OK' when the blockchain is ready. ### POST http://localhost:8000/add-validator **Description**: Adds a node that participates in elections. Up to 5 validators can be added. Supports the GET parameter `participate=true/false`. ``` -------------------------------- ### Patch for RocksDB CMakeLists.txt Source: https://github.com/neodix42/mylocalton/blob/main/src/main/resources/org/ton/mylocalton/binaries/patches/readme.txt This patch modifies the C++ compiler flags in the RocksDB CMakeLists.txt file. It changes the flag from /arch:AVX2 to /arch:AVX to ensure compatibility with CPUs that do not support AVX2 instructions. ```diff third-party\rocksdb\CMakeLists.txt if(MSVC) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /arch:AVX2") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /arch:AVX") ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.