Waves is a decentralized platform that allows any user to issue, transfer, swap and trade custom blockchain tokens on an integrated peer-to-peer exchange. You can find more information about Waves at waves.tech and in the official documentation.
This Docker image is focused on fast and convenient deployment of Waves Node.
The image contains scripts and configs to run Waves Node for mainnet, testnet or stagenet networks.
If you need to run node in private network, see Waves private node section.
GitHub repository: https://github.com/wavesplatform/Waves/tree/master/docker
It is highly recommended to read more about Waves Node configuration before running the container.
./build-with-docker.sh && docker build -t wavesplatform/wavesnode docker (from the repository root) - builds an image with the current local repository
You can specify following arguments when building the image:
| Argument | Default value | Description |
|---|---|---|
INCLUDE_GRPC |
true |
Whether to include gRPC server files in the image. |
Note: All build arguments are optional.
-
The image supports Waves Node config customization. To change a config field use corresponding JVM options. JVM options can be sent to JVM using
JAVA_OPTSenvironment variable. Please refer to (complete configuration file) to get the full path of the configuration item you want to change.docker run -v /docker/waves/waves-data:/var/lib/waves -v /docker/waves/waves-config:/etc/waves -p 6869:6869 -p 6862:6862 -e JAVA_OPTS="-Dwaves.rest-api.enable=yes -Dwaves.wallet.password=myWalletSuperPassword" -ti wavesplatform/wavesnode -
Waves Node is looking for a config in the directory
/etc/waves/waves.confwhich can be mounted using Docker volumes. For custom networks, correct configuration file must be provided when running container. If you useCUSTOMnetwork and/etc/waves/waves.confis NOT found Waves Node container will exit. -
You can use custom config to override or the whole configuration. For additional information about Docker volumes mapping please refer to
Managing dataitem. -
You can override the default executable by using the following syntax:
docker run -it wavesplatform/wavesnode [command] [args]
The following environment variables can be passed to the container:
| Env variable | Description |
|---|---|
WAVES_WALLET_SEED |
Base58 encoded seed, sets -Dwaves.wallet.seed system property. |
WAVES_WALLET_PASSWORD |
Password for the wallet file, sets -Dwaves.wallet.password system property. |
WAVES_LOG_LEVEL |
Node stdout logging level. Available values: OFF, ERROR, WARN, INFO, DEBUG, TRACE. More details about logging are available here. |
WAVES_HEAP_SIZE |
Default Java Heap Size limit in -X Command-line Options notation (-Xmx=[your value]). More details here. |
WAVES_NETWORK |
Waves Blockchain network. Available values are mainnet, testnet, stagenet. |
JAVA_OPTS |
Additional Waves Node JVM configuration options. |
All environment variables are optional, however you need to specify at least the desired network and wallet password (via environment variables, additional system properties defined in the JAVA_OPTS environment variable, or in the config file).
We recommend to store the blockchain state as well as Waves configuration on the host side. As such, consider using Docker volumes mapping to map host directories inside the container:
Example:
- Create a directory to store Waves data:
mkdir -p /docker/waves
mkdir /docker/waves/waves-data
mkdir /docker/waves/waves-config
Once container is launched it will create:
- three subdirectories in
/docker/waves/waves-data:
/docker/waves/waves-data/log - Waves Node logs
/docker/waves/waves-data/data - Waves Blockchain state
/docker/waves/waves-data/wallet - Waves Wallet data
/docker/waves/waves-config/waves.conf- default Waves config
-
If you already have Waves Node configuration/data - place it in the corresponding directories
-
Add the appropriate arguments to
docker runcommand:
docker run -v /docker/waves/waves-data:/var/lib/waves -v /docker/waves/waves-config:/etc/waves -e WAVES_NETWORK=stagenet -e WAVES_WALLET_PASSWORD=myWalletSuperPassword -ti wavesplatform/wavesnode
If you are a Waves Blockchain newbie and launching Waves Node for the first time be aware that after launch it will start downloading the whole blockchain state from the other nodes. During this download it will be verifying all blocks one after another. This procedure can take some time.
You can speed this process up by downloading a compressed blockchain state from our official resources, extract it and mount inside the container (as discussed in the previous section). In this scenario Waves Node skips block verifying. This is a reason why it takes less time. This is also a reason why you must download blockchain state only from our official resources.
Note: We do not guarantee the state consistency if it's downloaded from third-parties.
Example:
mkdir -p /docker/waves/waves-data
wget -qO- http://blockchain-stagenet.wavesnodes.com/blockchain_last.tar --show-progress | tar -xvf - -C /docker/waves/waves-data
docker run -v /docker/waves/waves-data:/var/lib/waves wavesplatform/Node -e WAVES_NETWORK=stagenet -e WAVES_WALLET_PASSWORD=myWalletSuperPassword -ti wavesplatform/wavesnode
-
REST-API interaction with Node. Details are available here.
-
Waves Node communication port for incoming connections. Details are available here.
Example: Below command will launch a container:
- with REST-API port enabled and configured on the socket
0.0.0.0:6870 - Waves node communication port enabled and configured on the socket
0.0.0.0:6868 - Ports
6868and6870mapped from the host to the container
docker run -v /docker/waves/waves-data:/var/lib/waves -v /docker/waves/waves-config:/etc/waves -p 6870:6870 -p 6868:6868 -e JAVA_OPTS="-Dwaves.network.declared-address=0.0.0.0:6868 -Dwaves.rest-api.port=6870 -Dwaves.rest-api.bind-address=0.0.0.0 -Dwaves.rest-api.enable=yes" -e WAVES_WALLET_PASSWORD=myWalletSuperPassword -e WAVES_NETWORK=stagenet -ti wavesplatform/wavesnode
Check that REST API is up by navigating to the following URL from the host side: http://localhost:6870/api-docs/index.html
You can run custom extensions in this way:
- Copy all lib/*.jar files from extension to any directory, lets say
plugins - Add extension class to configuration file, lets say
local.conf, located inconfigdirectory containing alsowaves.conf:
waves.extensions += com.johndoe.WavesExtension- Run
docker run -v "$(pwd)/plugins:/usr/share/waves/lib/plugins" -v "$(pwd)/config:/etc/waves" -i wavesplatform/wavesnode
The image is useful for developing dApps and other smart contracts on Waves blockchain.
To run the node,
docker run -d --name waves-private-node -p 6869:6869 wavesplatform/waves-private-node
To view node API documentation, open http://localhost:6869/
If you want to keep the blockchain state, then just stop the container instead of killing it, and start it again when needed:
docker stop waves-private-node
docker start waves-private-node
The node is configured with:
- faster generation of blocks (10 sec interval)
- all features pre-activated
- custom chain id - R
- api_key
waves-private-node - default miner account with all Waves tokens (you can distribute these tokens to other accounts as you wish):
rich account: Seed text: waves private node seed with waves tokens Seed: TBXHUUcVx2n3Rgszpu5MCybRaR86JGmqCWp7XKh7czU57ox5dgjdX4K4 Account seed: HewBh5uTNEGLVpmDPkJoHEi5vbZ6uk7fjKdP5ghiXKBs Private account key: 83M4HnCQxrDMzUQqwmxfTVJPTE9WdE7zjAooZZm2jCyV Public account key: AXbaBkJNocyrVpwqTzD4TpUY8fQ6eeRto9k1m2bNCzXV Account address: 3M4qwDomRabJKLZxuXhwfqLApQkU592nWxF
Full node configuration is available on Github in waves.custom.conf: https://github.com/wavesplatform/Waves/blob/master/docker/private/waves.custom.conf
You can use the following tags:
latest- current version of MainnetvX.X.X- specific version of Waves Node