Docker-compose based configuration to easily run locally deployed dev/test network.
Latest config files support node
v6.* For older node versions use the
v1.* tags of this repository.
This repository provide two setups described below:
- Single node configuration in devmode (default) -- good for smart contracts testing and node API features
- 3 Node configuration - good to test p2p, consensus etc. features
Single node configuration uses the devmode plugin in default configuration.
The 3 node configuration uses the
mean15-generic miner (fastest generic miner).
As the beneficiary key-pair is publicly available, this setup should not be connected to public networks.
All local network nodes are configured with the same beneficiary account (for more details on beneficiary see configuration documentation):
- public key: ak_twR4h7dEcUtc2iSEDv8kB7UFJJDGiEDQCXr85C3fYF8FdVdyo
- private key secret:
- key-pair binaries can be found in
/node/keys/beneficiarydirectory of this repository
The configuration uses a proxy server to allow CORS and URL routing.
All APIs (external, internal and state channels websocket) are exposed to the docker host, the URL pattern is as follows:
- external/internal API - http://$DOCKER_HOST_ADDRESS:8080/nodeX
- channels API - ws://$DOCKER_HOST_ADDRESS:8080/nodeX/channel
For example if one wants to use
node1 API on local docker host the address is: http://localhost:8080/node1/v2/status
Also the node1 is always available without URL path suffix, for example:
Also node1 have the standard port bindings as well:
- port 3013 - External API
- port 3113 - Internal API
- port 3014 - State Channels API
- port 3313 - Dev Mode plugin
Single Node Configuraiton (default)
To use a Single Node Configuration start the containers with the docker-compose command. Example:
docker-compose up -d
Check if the node is running:
To destroy the network:
To cleanup the associated docker volumes,
-v option could be used:
docker-compose down -v
More details can be found in
3 Node configuration
To start the 3 node configuration use the additional docker-compose config:
docker-compose -f docker-compose.multi.yml up -d
For example to access
node2 API (status), assuming docker host address is
3 node configuration uses the
aeternity/aeternity:latest image by default, it will be pulled from docker hub if it's not found locally.
To change what node version is used set
IMAGE_TAG environment variable, e.g.:
IMAGE_TAG=v4.0.0 docker-compose up -d
This configuration is known to work with node versions >= 5.0.0
The devmode (single node) configuration uses the
aeternity/aeternity:latest-bundle by default which included the devmode plugin
The image can be changed (i.e. to specific version) by setting
IMAGE_TAG environment variable.
By default the 3 nodes localnet has set default mine rate of 1 block per 15 seconds.
It can be changed by setting
AETERNITY_MINE_RATE environment variable.
The variable is in milliseconds, so to set 1 block per 10 seconds use:
AETERNITY_MINE_RATE=10000 docker-compose -f docker-compose.multi.yml up
This configuration includes 3 genesis pre-funded accounts:
Wallets for the accounts can be found in the aepp template repository.