Run a Localnet with Validator
Last updated
Last updated
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.
Follow steps in
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:
See below for an example of the partial output. Make a note of the Test dir
from the output.
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:
After starting your localnet, you will see the following:
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 under Endless_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.
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.