diff --git a/docs/demo.md b/docs/demo.md index 6a04efd..e6a81f8 100644 --- a/docs/demo.md +++ b/docs/demo.md @@ -9,12 +9,13 @@ ```bash cargo install tmkms --features=softsign --version=0.14.0 ``` -- testnet-state.json ([exported testnet state](./run-first-validator.md#export-testnet-state)) +- Install `gzip` using `sudo apt install gzip` +- testnet-state.gz ([exported testnet state](./run-first-validator.md#export-testnet-state)) - distribution.json (JSON containing the `lps_lockup` distribution) ## Steps -- In current working directory demo, keep exported `testnet-state.json` and `distribution.json` file from prerequisites +- In current working directory demo, keep exported `testnet-state.gz` and `distribution.json` file from prerequisites - Fetch stack: @@ -28,6 +29,15 @@ export CWD=$(pwd) ``` +- Copy over compressed file before this + + ``` + gzip -dc $CWD/testnet-state.gz > $CWD/testnet-state.json + + # Remove zip folder + rm -rf testnet-state.gz + ``` + - Set envs: ```bash diff --git a/docs/run-first-validator.md b/docs/run-first-validator.md index 8e212f5..cdeac55 100644 --- a/docs/run-first-validator.md +++ b/docs/run-first-validator.md @@ -4,6 +4,7 @@ - [ansible](playbooks/README.md#ansible-installation) - [laconic-so](https://github.com/cerc-io/stack-orchestrator/?tab=readme-ov-file#install) +- Install `gzip` using `sudo apt install gzip` ## Export testnet state @@ -33,7 +34,7 @@ ~/cerc/laconicd-stack/scripts/export-testnet-state.sh ``` - - The file will be generated in `/export/testnet-state.json` + - The compressed gzip will be generated at `/export/testnet-state.gz` ## Generate mainnet genesis file @@ -43,6 +44,15 @@ laconic-so fetch-stack git.vdb.to/cerc-io/laconicd-stack --git-ssh --pull ``` +- Copy over compressed file before this + + ``` + gzip -dc /export/testnet-state.gz > testnet-state.json + + # Remove zip folder + rm -rf /export/testnet-state.gz + ``` + - Copy over the exported `testnet-state.json` file to target machine - Copy over the LPS lockup distribution `distribution.json` file to target machine diff --git a/scripts/export-testnet-state.sh b/scripts/export-testnet-state.sh index 8a2a74e..757f4d4 100755 --- a/scripts/export-testnet-state.sh +++ b/scripts/export-testnet-state.sh @@ -19,7 +19,7 @@ OUTPUT_DIR=${TESTNET_DEPLOYMENT_DIR}/export mkdir -p $OUTPUT_DIR # Export state from testnet chain -testnet_state_file="$OUTPUT_DIR/testnet-state.json.gz" +testnet_state_file="$OUTPUT_DIR/testnet-state.gz" docker run -it \ -v ${TESTNET_DEPLOYMENT_DIR}/data/laconicd-data:/root/testnet-deployment/.laconicd \ cerc/laconicd:local bash -c "laconicd export --home /root/testnet-deployment/.laconicd" \