Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/node: configuration changes for genesis id #3505

Closed
dshulyak opened this issue Aug 27, 2022 · 0 comments
Closed

cmd/node: configuration changes for genesis id #3505

dshulyak opened this issue Aug 27, 2022 · 0 comments
Assignees

Comments

@dshulyak
Copy link
Contributor

dshulyak commented Aug 27, 2022

part of: spacemeshos/pm#135
depends on: #3505

  • add a genesis section into config
  • for this issue genesis section needs to include: genesis time and genesis extra data (other fields can be moved into this config later)
    • genesis time is a string with time encoded according to RFC3339
    • genesis extra data is a string with a max size of 255 chars. defaults to mainnet
  • when node is started check if genesis section is already stored in the data directory (example: /data/genesis.conf)
    • if it is not stored, encode genesis section with json and persist it on disk
    • if stored - decode object with json into another instance of genesis config, compute diff using https://github.com/google/go-cmp/ and print fatal error to the operator with a diff and a path to persisted genesis conf
  • compute genesis id as a hash from genesis time and genesis extra data
  • golden atx should be set to genesis id
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
3 participants