Docker configuration¶
Installation and execution of docker smart contracts configures in the docker-engine of the node configuration file.
# Docker smart contracts settings
docker-engine {
# Docker smart contracts enabled flag
enable = no
# Basic auth credentials for docker host
docker-auth {
username = "some user"
password = "some password"
}
# Optional connection string to docker host
# docker-host = "unix:///var/run/docker.sock"
# Optional string to node REST API if we use remote docker host
# node-rest-api = "https://clinton.wavesenterprise.com/node-0"
# Run for integration tests
integration-tests-mode-enable = no
# Execution settings
execution-limits {
# Contract execution timeout
timeout = 60s
# Memory limit in Megabytes
memory = 512
# Memory swap value in Megabytes (see https://docs.docker.com/config/containers/resource_constraints/)
memory-swap = 0
}
# Reuse once created container on subsequent executions
reuse-containers = yes
# Remove container with contract after specified duration passed
remove-container-after = 10m
# Allows net access for all contracts
allow-net-access = no
# Remote registries auth information
remote-registries = []
# Check registry auth on node startup
check-registry-auth-on-startup = yes
#Authorization timeout for the contract
contract-auth-expires-in = 1m
# Contract execution messages cache settings
contract-execution-messages-cache {
# Time to expire for messages in cache
expire-after = 60m
# Max number of messages in buffer. When the limit is reached, the node processes all messages in batch
max-buffer-size = 10
# Max time for buffer. When time is out, the node processes all messages in batch
max-buffer-time = 100ms
}
}
Parameters:
enable- the Docker smart contracts option activation (yes/no).docker-auth- the authorization parameters with login/password section.docker-host- a Docker host URL address.node-rest-api- the REST API address if you are using the remote Docker host.integration-tests-mode-enable- the integration tests run option (yes/no).execution-limits- the Docker contracts run limits section:timeout- a timeout for the smart contract execution;memory- a memory limit for a smart contract in megabytes;memory-swap- a memory swap value in megabytes.
reuse-containers- reuse option for the existing Docker contract.remove-container-after- container remove option after contract execution (yes/no).allow-net-access- the option which allows network access for all smart contracts (yes/no).remote-registries- a list of remote registry repositories for the Docker contracts run.check-registry-auth-on-startup- the option which checks the registry repositories authorization during the node start (yes/no).contract-auth-expires-in- a timeout for the Docker contract authorization token.contract-execution-messages-cache- the contract execution messages cache settings section. When the limit is reached, the node processes all messages in batch:expire-after- a time period to expire for messages in cache;max-buffer-size- a maximum number of messages in buffer;max-buffer-time- a maximum time period in milliseconds of messages in buffer.