Agoric / agoric-sdk

monorepo for the Agoric Javascript smart contract platform
Apache License 2.0
326 stars 205 forks source link

new `snapshots export` command should fail early if exporting historical height #9600

Closed mhofman closed 3 months ago

mhofman commented 3 months ago

Describe the bug

9563 replaced the cosmos snapshots export command to support it (#9100), but it too closely copied the height logic. Since the swing-store is not able to export a historical height, it should remove the height flags or error early if the height specified is not the latest height. Currently the export process will start and only error after the length cosmos side of the export completes.

To Reproduce

agd snapsnhots export --height $someHistoricalHeight

Expected behavior

Early error preventing historical exports