Skip to content

Commit

Permalink
Add more pruning configs (#767)
Browse files Browse the repository at this point in the history
  • Loading branch information
roy-dydx authored Nov 7, 2023
1 parent 228bf6f commit 32e07b2
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion protocol/testing/snapshotting/snapshot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,14 @@ sleep 10
dydxprotocold init --chain-id=${CHAIN_ID} --home /dydxprotocol/chain/local_node local_node
curl -X GET ${genesis_file_rpc_address}/genesis | jq '.result.genesis' > /dydxprotocol/chain/local_node/config/genesis.json

# Set pruning to prune all but the last two states. Prevents snapshots from getting too big.
# Prune snapshots to prevent them from getting too big. We make 3 changes:
# Prune all app state except last 2 blocks
sed -i 's/pruning = "default"/pruning = "everything"/' /dydxprotocol/chain/local_node/config/app.toml
# Tendermint pruning is decided by picking the most restrictive of multiple factors.
# Make the custom config setting as permissive as possible.
sed -i 's/min-retain-blocks = 0/min-retain-blocks = 2/' /dydxprotocol/chain/local_node/config/app.toml
# Do not index tx_index.db
sed -i 's/indexer = "kv"/indexer = "null"/' /dydxprotocol/chain/local_node/config/config.toml

setup_cosmovisor

Expand Down

0 comments on commit 32e07b2

Please sign in to comment.