Skip to content

[Tooling][Savepoints/Rollbacks] Implement CLI commands for Snapshots/Rollbacks #566

@deblasis

Description

@deblasis

Objective

Implement the commands that will target the RPC endpoints defined in #565

Origin Document

#493 and #562

Goals

Listing Available Savepoints

p1 persistence savepoints list

It would return a list of available savepoints along with some metadata including but not limited to:

  • Block number
  • Timestamp of snapshot creation
  • Snapshot size (human-readable)
  • Snapshot hash
  • [Optional] Signer & signature of the snapshot

Creatin New Savepoints

p1 persistence savepoints create

It would trigger the creation of a savepoint and return the identifier/full_path & metadata for easy download

p1 persistence savepoint rollback [snapshot hash]

Querying Savepoint Status

  • Query/poll for status of an operation
    This is something that the CLI should be capable of doing as part of the Rollback command. Example:
    1. Start rollback
    2. Poll status until OK or KO
    3. Return to prompt

Deliverable

  • A PR with implementation tending to the goals above
  • Documentation showing an e2e flow that creates, applies and benchmarks savepoints

Non-goals / Non-deliverables

  • Changes in the persistence module

General issue deliverables

  • Update the appropriate CHANGELOG(s)
  • Update any relevant local/global README(s)
  • Update relevant source code tree explanations
  • Add or update any relevant or supporting mermaid diagrams

Testing Methodology

  • All tests: make test_all
  • LocalNet: verify a LocalNet is still functioning correctly by following the instructions at docs/development/README.md

Creator: @deblasis
Co-Owners: @Olshansk

Metadata

Metadata

Assignees

Labels

clientwork needed to interface with the node (rpc, cli, etc..)persistencePersistence specific changestoolingtooling to support development, testing et al

Type

No type

Projects

Status

Backlog

Relationships

None yet

Development

No branches or pull requests

Issue actions