Congiure gas price in console stack

This commit is contained in:
Prathamesh Musale 2024-10-25 13:49:08 +05:30
parent 5adbbbc0c5
commit 707e289223
7 changed files with 28 additions and 6 deletions

View File

@ -140,7 +140,7 @@
RECEIVER_ADDRESS= RECEIVER_ADDRESS=
AMOUNT= AMOUNT=
laconic-so deployment --dir stage2-deployment exec laconicd "laconicd tx bank send alice ${RECEIVER_ADDRESS} ${AMOUNT}alnt --from alice --fees 1000000alnt" laconic-so deployment --dir stage2-deployment exec laconicd "laconicd tx bank send alice ${RECEIVER_ADDRESS} ${AMOUNT}alnt --from alice --fees 1000alnt"
``` ```
* Check balance: * Check balance:

View File

@ -9,7 +9,8 @@ services:
CERC_LACONICD_USER_KEY: ${CERC_LACONICD_USER_KEY} CERC_LACONICD_USER_KEY: ${CERC_LACONICD_USER_KEY}
CERC_LACONICD_BOND_ID: ${CERC_LACONICD_BOND_ID} CERC_LACONICD_BOND_ID: ${CERC_LACONICD_BOND_ID}
CERC_LACONICD_GAS: ${CERC_LACONICD_GAS:-200000} CERC_LACONICD_GAS: ${CERC_LACONICD_GAS:-200000}
CERC_LACONICD_FEES: ${CERC_LACONICD_FEES:-200000alnt} CERC_LACONICD_FEES: ${CERC_LACONICD_FEES:-200alnt}
CERC_LACONICD_GASPRICE: ${CERC_LACONICD_GASPRICE:-0.001alnt}
volumes: volumes:
- ../config/laconic-console/cli/create-config.sh:/app/create-config.sh - ../config/laconic-console/cli/create-config.sh:/app/create-config.sh
- laconic-registry-data:/laconic-registry-data - laconic-registry-data:/laconic-registry-data

View File

@ -7,6 +7,7 @@ services:
CERC_MONIKER: ${CERC_MONIKER:-TestnetNode} CERC_MONIKER: ${CERC_MONIKER:-TestnetNode}
CERC_CHAIN_ID: ${CERC_CHAIN_ID:-laconic_9000-1} CERC_CHAIN_ID: ${CERC_CHAIN_ID:-laconic_9000-1}
CERC_PEERS: ${CERC_PEERS} CERC_PEERS: ${CERC_PEERS}
MIN_GAS_PRICE: ${MIN_GAS_PRICE:-0.001}
CERC_LOGLEVEL: ${CERC_LOGLEVEL:-info} CERC_LOGLEVEL: ${CERC_LOGLEVEL:-info}
volumes: volumes:
- laconicd-data:/root/.laconicd - laconicd-data:/root/.laconicd

View File

@ -21,6 +21,7 @@ echo "Env:"
echo "Moniker: $CERC_MONIKER" echo "Moniker: $CERC_MONIKER"
echo "Chain Id: $CERC_CHAIN_ID" echo "Chain Id: $CERC_CHAIN_ID"
echo "Persistent peers: $CERC_PEERS" echo "Persistent peers: $CERC_PEERS"
echo "Min gas price: $MIN_GAS_PRICE"
echo "Log level: $CERC_LOGLEVEL" echo "Log level: $CERC_LOGLEVEL"
NODE_HOME=/root/.laconicd NODE_HOME=/root/.laconicd
@ -46,6 +47,7 @@ sed -i "s/^persistent_peers *=.*/persistent_peers = \"$CERC_PEERS\"/g" $NODE_HOM
echo "Starting laconicd node..." echo "Starting laconicd node..."
laconicd start \ laconicd start \
--api.enable \ --api.enable \
--minimum-gas-prices=${MIN_GAS_PRICE}alnt \
--rpc.laddr="tcp://0.0.0.0:26657" \ --rpc.laddr="tcp://0.0.0.0:26657" \
--gql-playground --gql-server \ --gql-playground --gql-server \
--log_level $CERC_LOGLEVEL \ --log_level $CERC_LOGLEVEL \

View File

@ -83,9 +83,14 @@ Instructions for running laconic registry CLI and console
# Gas limit for txs (default: 200000) # Gas limit for txs (default: 200000)
CERC_LACONICD_GAS= CERC_LACONICD_GAS=
# Max fees for txs (default: 200000alnt) # Max fees for txs (default: 200alnt)
CERC_LACONICD_FEES= CERC_LACONICD_FEES=
# Gas price to use for txs (default: 0.001alnt)
# Use for auto fees calculation, gas and fees not required to be set in that case
# Reference: https://git.vdb.to/cerc-io/laconic-registry-cli#gas-and-fees
CERC_LACONICD_GASPRICE=
# Console configuration # Console configuration
# Laconicd (hosted) GQL endpoint (default: http://localhost:9473) # Laconicd (hosted) GQL endpoint (default: http://localhost:9473)

View File

@ -122,6 +122,9 @@ Instructions for running a laconicd testnet full node and joining as a validator
# Output log level (default: info) # Output log level (default: info)
CERC_LOGLEVEL= CERC_LOGLEVEL=
# Minimum gas price in alnt to accept for transactions (default: "0.001")
MIN_GAS_PRICE
``` ```
* Inside the `laconic-console-deployment` deployment directory, open `config.env` file and set following env variables: * Inside the `laconic-console-deployment` deployment directory, open `config.env` file and set following env variables:
@ -143,9 +146,14 @@ Instructions for running a laconicd testnet full node and joining as a validator
# Gas limit for txs (default: 200000) # Gas limit for txs (default: 200000)
CERC_LACONICD_GAS= CERC_LACONICD_GAS=
# Max fees for txs (default: 200000alnt) # Max fees for txs (default: 200alnt)
CERC_LACONICD_FEES= CERC_LACONICD_FEES=
# Gas price to use for txs (default: 0.001alnt)
# Use for auto fees calculation, gas and fees not required to be set in that case
# Reference: https://git.vdb.to/cerc-io/laconic-registry-cli#gas-and-fees
CERC_LACONICD_GASPRICE=
# Console configuration # Console configuration
# Laconicd (hosted) GQL endpoint (default: http://localhost:9473) # Laconicd (hosted) GQL endpoint (default: http://localhost:9473)

View File

@ -126,6 +126,8 @@
* Inside the `testnet-laconicd-deployment` deployment directory, open `config.env` file and set following env variables: * Inside the `testnet-laconicd-deployment` deployment directory, open `config.env` file and set following env variables:
```bash ```bash
CERC_CHAIN_ID=laconic_9000-1
# Comma separated list of nodes to keep persistent connections to # Comma separated list of nodes to keep persistent connections to
# Example: "node-1-id@laconicd.laconic.com:26656" # Example: "node-1-id@laconicd.laconic.com:26656"
# Use the provided node id # Use the provided node id
@ -205,6 +207,7 @@ laconic-so deployment --dir testnet-laconicd-deployment start
```bash ```bash
KEY_NAME=alice KEY_NAME=alice
CHAIN_ID=laconic_9000-1
# Restore existing key with mnemonic seed phrase # Restore existing key with mnemonic seed phrase
# You will be prompted to enter mnemonic seed # You will be prompted to enter mnemonic seed
@ -245,7 +248,7 @@ laconic-so deployment --dir testnet-laconicd-deployment start
```bash ```bash
laconic-so deployment --dir testnet-laconicd-deployment exec laconicd "laconicd tx staking create-validator my-validator.json \ laconic-so deployment --dir testnet-laconicd-deployment exec laconicd "laconicd tx staking create-validator my-validator.json \
--fees 500000alnt \ --fees 500000alnt \
--chain-id=laconic_9000-1 \ --chain-id=$CHAIN_ID \
--from $KEY_NAME" --from $KEY_NAME"
``` ```
@ -290,6 +293,8 @@ laconic-so deployment --dir testnet-laconicd-deployment start
* A testnet stage1 node * A testnet stage1 node
* For setting up a fresh testnet2 node, follow [Join as a validator](#join-as-a-validator-on-stage1), but use testnet2 chain id (`laconic-testnet-2`)
### Setup ### Setup
* Stop the stage1 node: * Stop the stage1 node:
@ -377,7 +382,7 @@ laconic-so deployment --dir testnet-laconicd-deployment start
See [Check status](#check-status) to follow sync status of your node See [Check status](#check-status) to follow sync status of your node
See [Join as testnet validator](#create-validator-using-cli) to join as a validator using laconicd CLI See [Join as testnet validator](#create-validator-using-cli) to join as a validator using laconicd CLI (use chain id `laconic-testnet-2`)
### Clean up ### Clean up