-
Notifications
You must be signed in to change notification settings - Fork 212
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support for
snapshots export
command (#9563)
closes: #9100 closes: #9425 Until we have better layering of the snapshots extensions in cosmos-sdk, this replaces the implementation of the `snapshots export` command to initiate the snapshot creation through our front-running mechanism used for state-sync. Drive-by cleanup of the root command as well to address #9425 None, None Communicate to validators that we fixed the command and that it's usable as expected with any cosmos chain. Added an integration test since this only modifies the command line handling Manually tested with the following ``` cd packages/cosmic-swingset make scenario2-setup make scenario2-run-chain agd --home t1/n0 snapshots export rm -rf t1/n0/data/application.db t1/n0/data/agoric agd --home t1/n0 snapshot restore $snapshot_height 2 make scenario2-run-chain ``` Since we replace the upstream sdk command handling, any future changes upstream would have to be reflected in the override.
- Loading branch information
1 parent
6f7ea64
commit a54db22
Showing
6 changed files
with
149 additions
and
48 deletions.
There are no files selected for viewing
13 changes: 13 additions & 0 deletions
13
a3p-integration/.yarn/patches/@agoric-synthetic-chain-npm-0.1.0-148de716a6.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
diff --git a/dist/upgrade-test-scripts/env_setup.sh b/dist/upgrade-test-scripts/env_setup.sh | ||
index 617a0fbe7efdfa457e28fc52806dba1b323930d8..25f52a6cf133dca830bd0dcd47c91700e6a8effe 100755 | ||
--- a/dist/upgrade-test-scripts/env_setup.sh | ||
+++ b/dist/upgrade-test-scripts/env_setup.sh | ||
@@ -100,7 +100,7 @@ killAgd() { | ||
AGD_PID=$(cat $HOME/.agoric/agd.pid) | ||
kill $AGD_PID | ||
rm $HOME/.agoric/agd.pid | ||
- wait $AGD_PID || true | ||
+ tail --pid=$AGD_PID -f /dev/null || true | ||
} | ||
|
||
provisionSmartWallet() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
a3p-integration/proposals/a:upgrade-15/state-sync-snapshots-test.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/bin/bash | ||
|
||
source /usr/src/upgrade-test-scripts/env_setup.sh | ||
|
||
set -e | ||
|
||
killAgd | ||
agd snapshots export | ||
SNAPSHOT_DETAILS=$(agd snapshots list | head -n1 | sed -E 's/height: ([0-9]+) format: ([0-9]+) chunks: [0-9]+/\1 \2/') | ||
echo found snapshot $SNAPSHOT_DETAILS | ||
rm -rf /root/.agoric/data/application.db /root/.agoric/data/agoric | ||
agd snapshots restore $SNAPSHOT_DETAILS | ||
|
||
startAgd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,5 @@ | |
# The effects of this step are not persisted in further proposal layers. | ||
|
||
yarn ava | ||
|
||
./state-sync-snapshots-test.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters