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

Debugging tool to replace producer keys #7509

Open
arhag opened this issue Jun 18, 2019 · 0 comments
Open

Debugging tool to replace producer keys #7509

arhag opened this issue Jun 18, 2019 · 0 comments
Assignees

Comments

@arhag
Copy link
Contributor

arhag commented Jun 18, 2019

It would be helpful to have a standalone tool that automates the steps described in PR #7413. In fact, with such a tool we would not need to add the --replace-producer-keys CLI option to chain plugin at all.

The tool would take as input:

  • a path to a input portable snapshot;
  • the public key to replace the active block producers' keys with;
  • a flag indicating whether to generate a block with eosio::regproducer actions;
  • and, a path to the directory where the generated portable snapshot should be saved.

It would use the chain lib to create a state database from the provided snapshot, and then modify the state as done in controller::replace_producer_keys in PR #7413. It would then, optionally, produce a block (in a special mode where it forces the onblock transaction to not execute) containing the actions that use eosio::regproducer to replace the registered block producing keys of the active producers. Then, it would ensure that the proposed and pending schedule are still empty (just in case the produced block made changes to it). And finally it would export a snapshot of the new state to the specified output directory.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants