Skip to content

Commit

Permalink
local-network: a common config for Waves nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
vsuharnikov committed Sep 12, 2024
1 parent 933cfbe commit 61f3eb7
Show file tree
Hide file tree
Showing 11 changed files with 22 additions and 71 deletions.
6 changes: 3 additions & 3 deletions local-network/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ See [./deploy](./deploy/).
# Keys

* Node HTTP API Key: `testapi`
* CL accounts (see [genesis-template.conf](./configs/wavesnode/common/genesis-template.conf) for more information):
* CL accounts (see [genesis-template.conf](configs/wavesnode/genesis-template.conf) for more information):
* Node wallet seed:
* wavesnode-1: `devnet-1`
* wavesnode-2: `devnet-2`
Expand Down Expand Up @@ -100,5 +100,5 @@ See [Besu configuration](configs/besu/).

## How to change Waves initial miners or time between blocks

1. Update [genesis-template.conf](./configs/wavesnode/common/genesis-template.conf).
2. [genesis.conf](./configs/wavesnode/common/genesis.conf) will be updated in [restart.sh](./restart.sh).
1. Update [genesis-template.conf](configs/wavesnode/genesis-template.conf).
2. [genesis.conf](configs/wavesnode/genesis.conf) will be updated in [restart.sh](./restart.sh).
File renamed without changes.
15 changes: 0 additions & 15 deletions local-network/configs/wavesnode/common/logback.xml

This file was deleted.

5 changes: 5 additions & 0 deletions local-network/configs/wavesnode/logback.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<included>
<property name="logback.file.level" value="TRACE"/>
<property name="default.pattern" value="%d{HH:mm:ss.SSS}:${NODE_NUMBER} %.-1level [%.-12thread] %logger{0} - %msg%n"/>
</included>
3 changes: 0 additions & 3 deletions local-network/configs/wavesnode/waves-1.conf

This file was deleted.

7 changes: 0 additions & 7 deletions local-network/configs/wavesnode/waves-2.conf

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,9 @@ waves {
l2 {
chain-contract = "3FdaanzgX4roVgHevhq8L8q42E7EZL9XTQr"

execution-client-address = "http://"${EXECUTION_CLIENT}":8551"
execution-client-address = "http://ec-"${NODE_NUMBER}":8551"
jwt-secret-file = /etc/secrets/jwtsecret

network {
bind-address = "0.0.0.0"
port = 6865
Expand Down Expand Up @@ -159,7 +161,10 @@ waves {
units.ConsensusClient
]

wallet.password = ""
wallet {
seed = ${WAVES_WALLET_SEED}
password = ""
}
}

kamon.enable = no
Expand Down
15 changes: 5 additions & 10 deletions local-network/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,12 @@ services:
- "127.0.0.1:16869:6869"
environment:
- WAVES_HEAP_SIZE=2g
- JAVA_OPTS=-Dwaves.config.directory=/etc/waves -Dlogback.file.level=TRACE
- NODE_NUMBER=1
- EXECUTION_CLIENT=ec-1
- WAVES_WALLET_SEED=HnyGuCEnV1A # devnet-1, addr: 3FNraPMYcfuGREcxorNSEBHgNLjmYtaHy9e
volumes:
- ./configs/wavesnode:/etc/waves:ro
- ./configs/ec-common/jwtsecret-1.hex:/etc/secrets/jwtsecret:ro
- ./logs/wavesnode-1:/var/log/waves
- ./configs/wavesnode/common:/etc/waves/common:ro
- ./configs/wavesnode/common/logback.xml:/etc/waves/logback.xml:ro
- ./configs/wavesnode/waves-1.conf:/etc/waves/waves.conf:ro
depends_on:
ec-1:
condition: service_healthy
Expand All @@ -60,13 +58,10 @@ services:
- "127.0.0.1:26869:6869"
environment:
- WAVES_HEAP_SIZE=2g
- JAVA_OPTS=-Dwaves.config.directory=/etc/waves -Dlogback.file.level=TRACE
- NODE_NUMBER=2
- EXECUTION_CLIENT=ec-2
- WAVES_WALLET_SEED=HnyGuCEnV1B # devnet-2, addr: 3FSrRN8X7cDsLyYTScS8Yf8KSwZgJBwf1jU
volumes:
- ./configs/wavesnode/common:/etc/waves/common:ro
- ./configs/wavesnode/common/logback.xml:/etc/waves/logback.xml:ro
- ./configs/wavesnode/waves-2.conf:/etc/waves/waves.conf:ro
- ./configs/wavesnode:/etc/waves:ro
- ./configs/ec-common/jwtsecret-2.hex:/etc/secrets/jwtsecret:ro
- ./logs/wavesnode-2:/var/log/waves
depends_on:
Expand Down
4 changes: 2 additions & 2 deletions local-network/genesis-update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ else
fi

java -cp "${DIR}/.cache/waves.jar" com.wavesplatform.GenesisBlockGenerator \
"${DIR}/configs/wavesnode/common/genesis-template.conf" \
"${DIR}/configs/wavesnode/common/genesis.conf" > /dev/null
"${DIR}/configs/wavesnode/genesis-template.conf" \
"${DIR}/configs/wavesnode/genesis.conf" > /dev/null

echo "Genesis config updated"

This file was deleted.

0 comments on commit 61f3eb7

Please sign in to comment.