Skip to content

Commit

Permalink
go/oasis-node/cmd/debug: Add the dumpdb command
Browse files Browse the repository at this point in the history
This command will attempt to extract the ABCI state from a combination
of a shutdown node's on-disk database and the genesis document currently
being used by the network, and will write the output as a JSON formatted
genesis document.

Some caveats:

* It is not guaranteed that the dumped output will be usable as an
  actual genesis document without manual intervention.

* Only the state that would be exported via a normal dump from a running
  node will be present in the dump.
  • Loading branch information
Yawning committed May 21, 2020
1 parent bb06f53 commit a550fcc
Show file tree
Hide file tree
Showing 7 changed files with 460 additions and 3 deletions.
14 changes: 14 additions & 0 deletions .changelog/2359.feature.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
go/oasis-node/cmd/debug: Add the `dumpdb` command

This command will attempt to extract the ABCI state from a combination
of a shutdown node's on-disk database and the genesis document currently
being used by the network, and will write the output as a JSON formatted
genesis document.

Some caveats:

- It is not guaranteed that the dumped output will be usable as an
actual genesis document without manual intervention.

- Only the state that would be exported via a normal dump from a running
node will be present in the dump.
2 changes: 2 additions & 0 deletions go/oasis-node/cmd/debug/debug.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"github.com/oasislabs/oasis-core/go/oasis-node/cmd/debug/byzantine"
"github.com/oasislabs/oasis-core/go/oasis-node/cmd/debug/consim"
"github.com/oasislabs/oasis-core/go/oasis-node/cmd/debug/control"
"github.com/oasislabs/oasis-core/go/oasis-node/cmd/debug/dumpdb"
"github.com/oasislabs/oasis-core/go/oasis-node/cmd/debug/fixgenesis"
"github.com/oasislabs/oasis-core/go/oasis-node/cmd/debug/storage"
"github.com/oasislabs/oasis-core/go/oasis-node/cmd/debug/txsource"
Expand All @@ -25,6 +26,7 @@ func Register(parentCmd *cobra.Command) {
fixgenesis.Register(debugCmd)
control.Register(debugCmd)
consim.Register(debugCmd)
dumpdb.Register(debugCmd)

parentCmd.AddCommand(debugCmd)
}
Loading

0 comments on commit a550fcc

Please sign in to comment.