Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CLI support for initializing application stores from an existing snapshot #2824

Closed
4 tasks done
cmwaters opened this issue Nov 8, 2023 · 1 comment · Fixed by #2825
Closed
4 tasks done

Add CLI support for initializing application stores from an existing snapshot #2824

cmwaters opened this issue Nov 8, 2023 · 1 comment · Fixed by #2825
Assignees
Labels
enhancement New feature or request

Comments

@cmwaters
Copy link
Contributor

cmwaters commented Nov 8, 2023

Summary

In SDK v0.47, a cli feature was introduced that allowed for node operators to initialise their application.db based off a trusted snapshot. This provides an alternative way (other than statesync) to bootstrap a node to a certain height. This can be super useful for starting up one node from another trusted node and is important in the case of wanting to debug the state transitions that happen at a certain height

Proposal

Port over the features https://github.com/cosmos/cosmos-sdk/blob/release/v0.47.x/client/snapshot/cmd.go

For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
@cmwaters cmwaters added the enhancement New feature or request label Nov 8, 2023
@rootulp rootulp self-assigned this Nov 8, 2023
@rootulp
Copy link
Collaborator

rootulp commented Nov 8, 2023

It looks like the snapshots command was originally introduced in cosmos/cosmos-sdk#16067. Our fork already includes https://github.com/celestiaorg/cosmos-sdk/tree/release/v0.46.x-celestia/client/snapshot so I think we just need to add the command to the root celestia-app command.

rootulp added a commit that referenced this issue Nov 8, 2023
Closes #2824

## Testing

I verified the snapshots command was added

```shell
$ ./build/celestia-appd snapshots
Manage local snapshots

Usage:
  celestia-appd snapshots [command]

Available Commands:
  delete      Delete a local snapshot
  dump        Dump the snapshot as portable archive format
  export      Export app state to snapshot store
  list        List local snapshots
  load        Load a snapshot archive file (.tar.gz) into snapshot store
  restore     Restore app state from local snapshot

Flags:
  -h, --help   help for snapshots

```
mergify bot pushed a commit that referenced this issue Nov 8, 2023
Closes #2824

## Testing

I verified the snapshots command was added

```shell
$ ./build/celestia-appd snapshots
Manage local snapshots

Usage:
  celestia-appd snapshots [command]

Available Commands:
  delete      Delete a local snapshot
  dump        Dump the snapshot as portable archive format
  export      Export app state to snapshot store
  list        List local snapshots
  load        Load a snapshot archive file (.tar.gz) into snapshot store
  restore     Restore app state from local snapshot

Flags:
  -h, --help   help for snapshots

```

(cherry picked from commit 7d28fc0)
cmwaters pushed a commit that referenced this issue Nov 9, 2023
Closes #2824

## Testing

I verified the snapshots command was added

```shell
$ ./build/celestia-appd snapshots
Manage local snapshots

Usage:
  celestia-appd snapshots [command]

Available Commands:
  delete      Delete a local snapshot
  dump        Dump the snapshot as portable archive format
  export      Export app state to snapshot store
  list        List local snapshots
  load        Load a snapshot archive file (.tar.gz) into snapshot store
  restore     Restore app state from local snapshot

Flags:
  -h, --help   help for snapshots

```
0xchainlover pushed a commit to celestia-org/celestia-app that referenced this issue Aug 1, 2024
Closes celestiaorg/celestia-app#2824

## Testing

I verified the snapshots command was added

```shell
$ ./build/celestia-appd snapshots
Manage local snapshots

Usage:
  celestia-appd snapshots [command]

Available Commands:
  delete      Delete a local snapshot
  dump        Dump the snapshot as portable archive format
  export      Export app state to snapshot store
  list        List local snapshots
  load        Load a snapshot archive file (.tar.gz) into snapshot store
  restore     Restore app state from local snapshot

Flags:
  -h, --help   help for snapshots

```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants