Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelS committed Jun 2, 2024
1 parent 55db39f commit 194322a
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 26 deletions.
12 changes: 6 additions & 6 deletions docker/build_images_scripts/docker-compose.yaml.template
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: lava

services:
cache:
image: svetekllc/lava:2.0.1-cache
image: svetekllc/lava:v1.2.3-cache
labels:
network: testnet
env_file:
Expand All @@ -25,16 +25,16 @@ services:
restart: unless-stopped

node:
image: svetekllc/lava:v2.0.0-node
image: svetekllc/lava:v1.2.0-node
labels:
network: testnet
env_file:
- node.env
volumes:
- /opt/testnet/lava:/root/.lava
- /opt/lava:/root/.lava
ports:
- '23656:23656'
- '23660:23660'
- '26656:26656'
- '26660:26660'
networks:
- lava
logging:
Expand All @@ -50,7 +50,7 @@ services:
restart: unless-stopped

provider:
image: svetekllc/lava:2.0.1-provider
image: svetekllc/lava:v1.2.3-provider
labels:
network: testnet
env_file:
Expand Down
12 changes: 6 additions & 6 deletions docker/build_images_scripts/node.env.template
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ WALLET="your_wallet_name"
# The password for the wallet, must be at least 8 characters
WALLET_PASS="your_wallet_password"
# The storage mechanism for keys (default: os)
KEYRING="file"
KEYRING_BACKEND="file"

### Set the logging level
# The verbosity of logs output (default: info)
# The verbosity of logs output [trace|debug|info|warn|error|fatal|panic] (default: info)
LOGLEVEL="info"

### Moniker name
Expand All @@ -52,13 +52,13 @@ SEEDS="3a445bfdbe2d0c8ee82461633aa3af31bc2b4dc0@testnet2-seed-node.lavanet.xyz:2
# API port for node communication (default: 1317)
NODE_API_PORT="1317" # Change as necessary
# GRPC port for node communication (default: 9090)
NODE_GRPC_PORT="9090" # Change as necessary
NODE_GRPC_PORT="9090"
# The port for peer-to-peer network communication (default: 26656)
NODE_P2P_PORT="22656" # Change as necessary
NODE_P2P_PORT="26656"
# The port for RPC server to listen on (default: 26657)
NODE_RPC_PORT="22657" # Change as necessary
NODE_RPC_PORT="26657"
# The port for Prometheus metrics (default: 26660)
METRICS_PORT="26660" # Change as necessary
METRICS_PORT="26660"

### Public RPC URL
# The URL to access the public RPC server for the network
Expand Down
4 changes: 2 additions & 2 deletions docker/build_images_scripts/provider.env.template
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ GEOLOCATION="your_geolocation"
WALLET="your_wallet_name"

# The storage mechanism for keys (e.g., os, file, pass)
KEYRING="os"
KEYRING_BACKEND="os"

# The verbosity of logs output
# The verbosity of logs output [trace|debug|info|warn|error|fatal|panic] (default: info)
LOGLEVEL="info"

# The port for Prometheus metrics exposure
Expand Down
21 changes: 9 additions & 12 deletions docker/build_images_scripts/run_node.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,11 @@ init_node() {

# Set keyring-backend and chain-id configuration
$BIN config chain-id $CHAIN_ID --home $CONFIG_PATH
$BIN config keyring-backend $KEYRING --home $CONFIG_PATH
$BIN config keyring-backend $KEYRING_BACKEND --home $CONFIG_PATH
$BIN config node http://localhost:$NODE_RPC_PORT --home $CONFIG_PATH

# Download addrbook and genesis files
if [[ -n $ADDRBOOK_URL ]]
then
wget -O $CONFIG_PATH/config/addrbook.json $ADDRBOOK_URL
fi
[[ -n $ADDRBOOK_URL ]] && wget -O $CONFIG_PATH/config/addrbook.json $ADDRBOOK_URL

wget -O $CONFIG_PATH/config/genesis.json ${GENESIS_URL:-https://raw.githubusercontent.com/lavanet/lava-config/main/testnet-2/genesis_json/genesis.json}

Expand Down Expand Up @@ -103,17 +100,17 @@ state_sync() {

create_account() {
echo -e "\n\e[32m### Create account ###\e[0m"
if [[ "$KEYRING" == "test" ]]; then
$BIN keys add $WALLET --keyring-backend $KEYRING --home $CONFIG_PATH
if [[ "$KEYRING_BACKEND" == "test" ]]; then
$BIN keys add $WALLET --keyring-backend $KEYRING_BACKEND --home $CONFIG_PATH
else
expect -c "
set timeout -1
exp_internal 0
spawn $BIN keys add $WALLET --keyring-backend $KEYRING --home $CONFIG_PATH
spawn $BIN keys add $WALLET --keyring-backend $KEYRING_BACKEND --home $CONFIG_PATH
expect \"Enter keyring passphrase*:\"
send \"$WALLET_PASS\n\"
expect \"Re-enter keyring passphrase\"
expect \"Re-enter keyring passphrase*:\"
send \"$WALLET_PASS\n\"
expect eof
"
Expand Down Expand Up @@ -158,7 +155,7 @@ start_node() {
"--from $WALLET" \
"--geolocation $GEOLOCATION" \
"--home $CONFIG_PATH" \
"--keyring-backend $KEYRING" \
"--keyring-backend $KEYRING_BACKEND" \
"--log_level $LOGLEVEL" \
"--metrics-listen-address 0.0.0.0:${METRICS_PORT:-23001}" \
"--node $PUBLIC_RPC" \
Expand All @@ -175,11 +172,11 @@ set_variable() {
source ~/.bashrc
if [[ ! $ACC_ADDRESS ]]
then
echo 'export ACC_ADDRESS='$(echo $WALLET_PASS | $BIN keys show $WALLET ${KEYRING:+--keyring-backend $KEYRING} -a) >> $HOME/.bashrc
echo 'export ACC_ADDRESS='$(echo $WALLET_PASS | $BIN keys show $WALLET ${KEYRING_BACKEND:+--keyring-backend $KEYRING_BACKEND} -a) >> $HOME/.bashrc
fi
if [[ ! $VAL_ADDRESS ]]
then
echo 'export VAL_ADDRESS='$(echo $WALLET_PASS | $BIN keys show $WALLET ${KEYRING:+--keyring-backend $KEYRING} --bech val -a) >> $HOME/.bashrc
echo 'export VAL_ADDRESS='$(echo $WALLET_PASS | $BIN keys show $WALLET ${KEYRING_BACKEND:+--keyring-backend $KEYRING_BACKEND} --bech val -a) >> $HOME/.bashrc
fi
}

Expand Down

0 comments on commit 194322a

Please sign in to comment.