Skip to content
This repository has been archived by the owner on Jun 12, 2023. It is now read-only.

add genesis recreate cli #1465

Conversation

andymck
Copy link
Contributor

@andymck andymck commented Mar 3, 2022

Tested by:

  • export current snapshot from test-val1
  • load current snapshot onto locally running testnet staked validator
  • run recreate CLI command and export new genesis block
  • stop local testnet validator and wipe the data directory
  • start local testnet validator and load the previously exported gen block
  • manually compare datasets against a test validator ( test-val1 )

@andymck andymck force-pushed the andymck/testnet-poc-grpc-plus-genesis-export branch from 51f29fd to 6bcc84f Compare March 3, 2022 16:48
["genesis recreate <pubkey> <privkey>\n\n",
" recreate a genesis block from the existing ledger data\n"
" includingtxns for all chainvars, gateways, accounts and validators.\n"
" pub and priv key should be base64url encoded binary terms.\n"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are the keys the 'master key' for the chain?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would suggest supplying an output directory or file here, vs putting it in whatever the VM's working directory is.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah keys here are the master keys for the chain. pubkey is then set as 'master_key' in the var txn and the priv key used to create the proof

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NOTE: i simplified the key handling...requirement now is to supply the master key itself as a base58 encoded string rather than its pub and priv components

@andymck andymck force-pushed the andymck/testnet-poc-grpc-plus-genesis-export branch 2 times, most recently from 5d4ff32 to e3e1693 Compare March 4, 2022 11:11
@andymck andymck changed the base branch from andymck/testnet-poc-grpc to andymck/poc-grpc March 4, 2022 11:13
@andymck andymck changed the base branch from andymck/poc-grpc to andymck/testnet-poc-grpc March 4, 2022 11:13
@andymck andymck force-pushed the andymck/testnet-poc-grpc-plus-genesis-export branch from e3e1693 to be6eb80 Compare March 4, 2022 12:07
@andymck
Copy link
Contributor Author

andymck commented Mar 4, 2022

replaced by #1467

@andymck andymck closed this Mar 4, 2022
@andymck andymck deleted the andymck/testnet-poc-grpc-plus-genesis-export branch March 4, 2022 12:15
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.

2 participants