Run a Localnet with Validator
You can run a localnet of the Endless blockchain. This localnet will not be connected to the Endless devnet. It will run on your local machine, independent of other Endless networks. You can use this localnet for testing and development purposes.
The rest of this document describes:
How to start your localnet with a single validator node, and
How to start a Faucet service and attach it to your localnet.
Using the Endless pre-compile binary
Follow steps in Install the Endless CLI
With your development environment ready, now you can start your testnet network. Before you proceed, make a note of the following:
To start your testnet locally, run the following command:
endless node run-local-testnet
See below for an example of the partial output. Make a note of the
Test dir
from the output.... ... ... Completed generating configuration: Log file: "/private/var/folders/gn/m74t8ylx55z935q8wx035qn80000gn/T/b3adc18c144bfcc78a1541953893bc1c/validator.log" Test dir: "/private/var/folders/gn/m74t8ylx55z935q8wx035qn80000gn/T/b3adc18c144bfcc78a1541953893bc1c/0/node.yaml" Endless root key path: "/private/var/folders/gn/m74t8ylx55z935q8wx035qn80000gn/T/b3adc18c144bfcc78a1541953893bc1c/mint.key" Waypoint: 0:47e676b5fe38ebe2aec6053db7b3daa0b805693d6422e3475e46e89499464ecf ChainId: 223 REST API endpoint: 0.0.0.0:8080 Fullnode network: /ip4/0.0.0.0/tcp/7180 Endless is running, press ctrl-c to exit
NOTE: The above command starts a localnet with a single validator node. The command runs endless-node
from a genesis-only ledger state. If you want to reuse the ledger state produced by a previous run of endless-node
, then use:
endless node run-local-testnet --config <config-path>
Interacting with the local test testnet
After starting your localnet, you will see the following:
Completed generating configuration:
Log file: "/tmp/694173aa3bbe019499bbd5cf3fe0e2fc/validator.log"
Test dir: "/tmp/694173aa3bbe019499bbd5cf3fe0e2fc/0/node.yaml"
Endless root key path: "/tmp/694173aa3bbe019499bbd5cf3fe0e2fc/mint.key"
Waypoint: 0:197bc8b76761622c2d2054d8bf93c1802fa0eb4bc55f0f3d4442878fdecc297f
ChainId: 223
REST API endpoint: 0.0.0.0:8080
Fullnode network: /ip4/0.0.0.0/tcp/7180
Endless is running, press ctrl-c to exit
Use the Endless CLI tool to interact with your localnet. The above output contains information you will use for starting the Endless CLI tool:
Endless root key path
: The root key (also known as the mint or faucet key) controls the account that can mint tokens. Available in the docker compose folder underEndless_root_key
.Waypoint
: A verifiable checkpoint of the blockchain (available in the docker compose folder under waypoint.txt)REST API endpoint
: The endpoint for the REST service, e.g.,http://127.0.0.1:8080
.ChainId
: The chain ID uniquely distinguishes this network from other blockchain networks.
Next steps
At this point, you will have a special root account at 0x1
that can perform the mint operation. Follow up with:
Your first transaction to learn how to submit transactions.
Your first Move module to learn how to create Move modules.
Interacting with the Endless Blockchain to learn how to mint coins.
Last updated