Skip allocation of LPS tokens for early supports account (#27)

Reviewed-on: #27
Co-authored-by: Nabarun <nabarun@deepstacksoft.com>
Co-committed-by: Nabarun <nabarun@deepstacksoft.com>
This commit is contained in:
Nabarun 2025-06-18 18:56:57 +00:00 committed by nabarun
parent 3ac0306145
commit 53d2362a59
3 changed files with 18 additions and 29 deletions

View File

@ -51,9 +51,6 @@
```bash ```bash
export EXPORTED_STATE_PATH=$CWD/testnet-state.json export EXPORTED_STATE_PATH=$CWD/testnet-state.json
export LPS_DISTRIBUTION_PATH=~/cerc/laconicd-stack/data/distribution.json export LPS_DISTRIBUTION_PATH=~/cerc/laconicd-stack/data/distribution.json
# Test address that does not exist on testnet chain
export EARLY_SUPPORTS_ACC_ADDR=laconic1gwytamfk3m5n0gsawh5vpwxkwd3vapmvzpp6nz
``` ```
- Copy the example variables file: - Copy the example variables file:
@ -65,7 +62,7 @@
- Run playbook to use exported state for generating mainnet genesis: - Run playbook to use exported state for generating mainnet genesis:
```bash ```bash
ansible-playbook -v -i localhost, -c local ~/cerc/laconicd-stack/playbooks/first-validator/generate-genesis.yml -e "exported_state_path=$EXPORTED_STATE_PATH" -e "lps_distribution_path=$LPS_DISTRIBUTION_PATH" -e "early_supports_acc_address=$EARLY_SUPPORTS_ACC_ADDR" ansible-playbook -v -i localhost, -c local ~/cerc/laconicd-stack/playbooks/first-validator/generate-genesis.yml -e "exported_state_path=$EXPORTED_STATE_PATH" -e "lps_distribution_path=$LPS_DISTRIBUTION_PATH"
``` ```
- Genesis file will be generated in output directory along with a file specifying the staking amount - Genesis file will be generated in output directory along with a file specifying the staking amount
@ -179,9 +176,6 @@
export CWD=$(pwd) export CWD=$(pwd)
export DATA_DIRECTORY=$CWD export DATA_DIRECTORY=$CWD
export MAINNET_DEPLOYMENT_DIR=mainnet-laconicd-deployment export MAINNET_DEPLOYMENT_DIR=mainnet-laconicd-deployment
# Test address that does not exist on testnet chain
export EARLY_SUPPORTS_ACC_ADDR=laconic1gwytamfk3m5n0gsawh5vpwxkwd3vapmvzpp6nz
``` ```
- Enable TMKMS in the laconicd node configuration: - Enable TMKMS in the laconicd node configuration:
@ -242,8 +236,6 @@
lockup_account_address=$(laconic-so deployment --dir $DATA_DIRECTORY/$MAINNET_DEPLOYMENT_DIR exec laconicd 'laconicd query auth module-account lps_lockup -o json | jq -r .account.value.base_account.address') lockup_account_address=$(laconic-so deployment --dir $DATA_DIRECTORY/$MAINNET_DEPLOYMENT_DIR exec laconicd 'laconicd query auth module-account lps_lockup -o json | jq -r .account.value.base_account.address')
laconic-so deployment --dir $DATA_DIRECTORY/$MAINNET_DEPLOYMENT_DIR exec laconicd "laconicd query bank balances $lockup_account_address" laconic-so deployment --dir $DATA_DIRECTORY/$MAINNET_DEPLOYMENT_DIR exec laconicd "laconicd query bank balances $lockup_account_address"
laconic-so deployment --dir $DATA_DIRECTORY/$MAINNET_DEPLOYMENT_DIR exec laconicd "laconicd query bank balances $EARLY_SUPPORTS_ACC_ADDR"
``` ```
- Copy the genesis file to [config](./config) folder: - Copy the genesis file to [config](./config) folder:

View File

@ -125,8 +125,6 @@
# File path where LPS distribution JSON file will be created # File path where LPS distribution JSON file will be created
export LPS_DISTRIBUTION_PATH=<absolute/path/to/distribution.json> export LPS_DISTRIBUTION_PATH=<absolute/path/to/distribution.json>
export EARLY_SUPPORTS_ACC_ADDR=<account-address-controlled-by-laconic-foundation>
# Parent directory where the deployment directory will be setup (required for generating genesis) # Parent directory where the deployment directory will be setup (required for generating genesis)
export DATA_DIRECTORY= export DATA_DIRECTORY=
``` ```
@ -173,7 +171,7 @@
- Run playbook for generating mainnet genesis file with gentx: - Run playbook for generating mainnet genesis file with gentx:
```bash ```bash
ansible-playbook -i localhost, -c local ~/cerc/laconicd-stack/playbooks/first-validator/generate-genesis.yml -e "exported_state_path=$EXPORTED_STATE_PATH" -e "lps_distribution_path=$LPS_DISTRIBUTION_PATH" -e "early_supports_acc_address=$EARLY_SUPPORTS_ACC_ADDR" ansible-playbook -i localhost, -c local ~/cerc/laconicd-stack/playbooks/first-validator/generate-genesis.yml -e "exported_state_path=$EXPORTED_STATE_PATH" -e "lps_distribution_path=$LPS_DISTRIBUTION_PATH"
``` ```
- When prompted for private key, use key of the existing account that was exported in [export-testnet.md](./export-testnet.md#export-testnet-state) - When prompted for private key, use key of the existing account that was exported in [export-testnet.md](./export-testnet.md#export-testnet-state)
@ -311,16 +309,6 @@
laconic-so deployment --dir $DATA_DIRECTORY/$MAINNET_DEPLOYMENT_DIR exec laconicd "laconicd query bank balances $lockup_account_address" laconic-so deployment --dir $DATA_DIRECTORY/$MAINNET_DEPLOYMENT_DIR exec laconicd "laconicd query bank balances $lockup_account_address"
``` ```
- Query the early supports account balance:
```bash
# Set the early supports account address
export EARLY_SUPPORTS_ACC_ADDR=<account-address-controlled-by-laconic-foundation>
# Check balance
laconic-so deployment --dir $DATA_DIRECTORY/$MAINNET_DEPLOYMENT_DIR exec laconicd "laconicd query bank balances $EARLY_SUPPORTS_ACC_ADDR"
```
## Publish required artifacts ## Publish required artifacts
- Run the following steps in machine where the genesis file and staking amount files were generated (machine 3) - Run the following steps in machine where the genesis file and staking amount files were generated (machine 3)

View File

@ -11,15 +11,22 @@ NODE_HOME="/root/.laconicd"
EARLY_SUPPORTS_ACC_ADDRESS=${EARLY_SUPPORTS_ACC_ADDRESS} EARLY_SUPPORTS_ACC_ADDRESS=${EARLY_SUPPORTS_ACC_ADDRESS}
if [ -z "$EARLY_SUPPORTS_ACC_ADDRESS" ]; then # Skipping early supports account allocation
echo "EARLY_SUPPORTS_ACC_ADDRESS not provided, exiting..." # if [ -z "$EARLY_SUPPORTS_ACC_ADDRESS" ]; then
exit 1 # echo "EARLY_SUPPORTS_ACC_ADDRESS not provided, exiting..."
fi # exit 1
# fi
# lps allocations # lps allocations
# Total supply: 129600 lps # Total supply: 129600 lps
EARLY_SUPPORTS_ALLOC="25920" # Early supports: 25920 lps (20% of total supply)
LOCKUP_ALLOC="103680" # Lockup: 103680 lps (80% of total supply) # Old plan, will allocate 100% to lockup module instead
# EARLY_SUPPORTS_ALLOC="25920" # Early supports: 25920 lps (20% of total supply)
# LOCKUP_ALLOC="103680" # Lockup: 103680 lps (80% of total supply)
LOCKUP_ALLOC="129600" # Lockup: 129600 lps (100% of total supply)
LPS_LOCKUP_MODULE_ACCOUNT="lps_lockup" LPS_LOCKUP_MODULE_ACCOUNT="lps_lockup"
LPS_DENOM="lps" LPS_DENOM="lps"
@ -44,8 +51,10 @@ update_genesis '.app_state["gov"]["params"]["expedited_threshold"]="1.0000000000
# Set normal threshold to 99% since it needs to be lesser than expedited threshold # Set normal threshold to 99% since it needs to be lesser than expedited threshold
update_genesis '.app_state["gov"]["params"]["threshold"]="0.990000000000000000"' update_genesis '.app_state["gov"]["params"]["threshold"]="0.990000000000000000"'
# Skipping early supports account allocation
# laconicd genesis add-genesis-account $EARLY_SUPPORTS_ACC_ADDRESS $EARLY_SUPPORTS_ALLOC$LPS_DENOM --keyring-backend $KEYRING --append
# Perform lps allocations # Perform lps allocations
laconicd genesis add-genesis-account $EARLY_SUPPORTS_ACC_ADDRESS $EARLY_SUPPORTS_ALLOC$LPS_DENOM --keyring-backend $KEYRING --append
laconicd genesis add-genesis-lockup-account lps_lockup $distribution_file $LOCKUP_ALLOC$LPS_DENOM laconicd genesis add-genesis-lockup-account lps_lockup $distribution_file $LOCKUP_ALLOC$LPS_DENOM
# Ensure that resulting genesis file is valid # Ensure that resulting genesis file is valid