Use zstd to compress testnet state file (#12)

Part of https://www.notion.so/Create-stacks-for-mainnet-1f2a6b22d4728034be4be2c51decf94e

Co-authored-by: IshaVenikar <ishavenikar7@gmail.com>
Reviewed-on: #12
Co-authored-by: ishavenikar <ishavenikar@noreply.git.vdb.to>
Co-committed-by: ishavenikar <ishavenikar@noreply.git.vdb.to>
This commit was merged in pull request #12.
This commit is contained in:
ishavenikar
2025-06-09 08:51:38 +00:00
committed by nabarun
co-authored by IshaVenikar
parent 6733aa7318
commit 7a94eb2a03
3 changed files with 14 additions and 14 deletions
+6 -6
View File
@@ -9,13 +9,13 @@
```bash
cargo install tmkms --features=softsign --version=0.14.0
```
- Install `gzip` using `sudo apt install gzip`
- testnet-state.gz ([exported testnet state](./run-first-validator.md#export-testnet-state))
- Install `zstd` using `sudo apt install zstd`
- testnet-state.zst ([exported testnet state](./run-first-validator.md#export-testnet-state))
- LPS distribution Google spreadsheet URL or CSV file path
## Steps
- In current working directory demo, keep exported `testnet-state.gz` file from prerequisites
- In current working directory demo, keep exported `testnet-state.zst` file from prerequisites
- Fetch stack:
@@ -40,10 +40,10 @@
- Extract the testnet-state JSON file
```
gzip -dc $CWD/testnet-state.gz > $CWD/testnet-state.json
zstd -dc $CWD/testnet-state.zst > $CWD/testnet-state.json
# Remove zip folder
rm -rf testnet-state.gz
# Remove zst folder
rm -rf testnet-state.zst
```
- Set envs:
+6 -6
View File
@@ -5,7 +5,7 @@
- [ansible](playbooks/README.md#ansible-installation)
- [laconic-so](https://github.com/cerc-io/stack-orchestrator/?tab=readme-ov-file#install)
- LPS distribution Google spreadsheet URL or CSV file path
- Install `gzip` using `sudo apt install gzip`
- Install `zstd` using `sudo apt install zstd`
## Export testnet state
@@ -35,7 +35,7 @@
~/cerc/laconicd-stack/scripts/export-testnet-state.sh <absolute-path-to-testnet-deployment>
```
- The compressed gzip will be generated at `<absolute-path-to-testnet-deployment>/export/testnet-state.gz`
- The compressed zst file will be generated at `<absolute-path-to-testnet-deployment>/export/testnet-state.zst`
## Generate mainnet genesis file
@@ -45,15 +45,15 @@
laconic-so fetch-stack git.vdb.to/cerc-io/laconicd-stack --git-ssh --pull
```
- Copy over compressed `testnet-state.gz` file to target machine
- Copy over compressed `testnet-state.zst` file to target machine
- Extract the testnet-state JSON file
```
gzip -dc <path-to-compressed-file>/testnet-state.gz > testnet-state.json
zstd -dc <path-to-compressed-file>/testnet-state.zst > testnet-state.json
# Remove zip folder
rm -rf <path-to-compressed-file>/testnet-state.gz
# Remove zst folder
rm -rf <path-to-compressed-file>/testnet-state.zst
```
- Generate LPS lockup distribution JSON file