Skip to content
This repository was archived by the owner on Aug 2, 2022. It is now read-only.

Add snapshot plugin#3587

Closed
elmato wants to merge 4 commits intomasterfrom
snapshot-plugin
Closed

Add snapshot plugin#3587
elmato wants to merge 4 commits intomasterfrom
snapshot-plugin

Conversation

@elmato
Copy link
Contributor

@elmato elmato commented May 30, 2018

This PR adds a new plugin that allows to take a snapshot of the blockchain state at a determined block.
The snapshot is taken after the block is applied and its saved when that block becomes irreversible.

The generated snapshot contains:

  • The chain id
  • The genesis state
  • All accounts (with permissions)
  • All the tables

@bytemaster
Copy link
Contributor

The "state" that is saved is not the state of "irreversibility" but the state of a potentially reversible future block.

This plugin should take the snapshot immediately after the referenced block is applied.

The snapshot should be in binary not json.

It will need to save the block_header_state object as well in order to prevent need to replay.

@abourget
Copy link
Contributor

Just so you know.. I also have a solution to freeze a chain at a given block. It's in eosc.. a sort-of eos swiss-knife.

You can run:

$ eosc bps chain-freeze --help
Freeze the chain by proxying p2p blocks until a block including updateauth actions is passed through, then block/shutdown.

Usage:
  eosc bps chain-freeze [flags]

Flags:
      --listening-address string    return producers info in json (default ":19876")
  -t, --target-p2p-address string   return producers info in json (default "localhost:9876")

It listens and sniffs the p2p protocol, and stops propagation, leaving you with a blockchain frozen at a given state. You can then normally query the contracts and all, without fearing it will continue.

@abourget
Copy link
Contributor

abourget commented May 31, 2018

@elmato elmato force-pushed the snapshot-plugin branch 2 times, most recently from 67cd068 to 19a2650 Compare May 31, 2018 14:26
@arhag arhag added this to the Version 1.2 milestone May 31, 2018
@elmato elmato force-pushed the snapshot-plugin branch 4 times, most recently from 1314e92 to a5b71d3 Compare June 4, 2018 00:18
@elmato elmato force-pushed the snapshot-plugin branch from a5b71d3 to f0f4200 Compare June 8, 2018 20:23
@elmato
Copy link
Contributor Author

elmato commented Jul 24, 2018

Replaced by #4837

@elmato elmato closed this Jul 24, 2018
@kj4ezj kj4ezj deleted the snapshot-plugin branch July 19, 2021 17:44
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants