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

New Genesis Template cli command #612

Merged
merged 5 commits into from
Aug 14, 2020

Conversation

snaumov
Copy link
Contributor

@snaumov snaumov commented Aug 9, 2020

Summary of changes
Changes introduced in this pull request:

Added new CLI command to create Genesis template.

Lotus-seed output for reference:

{
  "Accounts": [],
  "Miners": [],
  "NetworkName": "localnet-a793c73a-4db3-4755-910e-7466bce48023"
}

Forest's output:

{
  "Accounts": [],
  "Miners": [],
  "NetworkName": "localnet-a793c73a-4db3-4755-910e-7466bce4blah"
}

How to test

build and run

forest genesis new-template

Provide network name and output path optionally:

forest genesis new-template -n "my-network" -f "./genesis_out.json"

Reference issue to close (if applicable)

Closes #580 #579

Other information and links

@austinabell austinabell marked this pull request as draft August 9, 2020 16:22
@snaumov snaumov changed the title [WIP]: New Genesis Template cli command New Genesis Template cli command Aug 9, 2020
@snaumov snaumov marked this pull request as ready for review August 9, 2020 17:52
@ec2
Copy link
Member

ec2 commented Aug 10, 2020

One general note so far, is i'd add this attribute to the serde-able structs to get pascal casing so we can match Lotus #[serde(rename_all = "PascalCase")]. Also thanks so much for the contribution!!! It's always so exciting getting external contributors

@snaumov
Copy link
Contributor Author

snaumov commented Aug 11, 2020

One general note so far, is i'd add this attribute to the serde-able structs to get pascal casing so we can match Lotus #[serde(rename_all = "PascalCase")]. Also thanks so much for the contribution!!! It's always so exciting getting external contributors

Added PascalCase.

Ya, absolutely, the pleasure is all mine 👍

types/src/genesis/mod.rs Show resolved Hide resolved
types/src/genesis/mod.rs Outdated Show resolved Hide resolved
types/src/genesis/mod.rs Outdated Show resolved Hide resolved
Copy link
Member

@ec2 ec2 left a comment

Choose a reason for hiding this comment

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

LGTM aside from @austinabell 's suggestions

@snaumov
Copy link
Contributor Author

snaumov commented Aug 14, 2020

@austinabell @ec2 please merge when you have a chance. Thanks :D

@austinabell austinabell merged commit bbbb9e2 into ChainSafe:main Aug 14, 2020
@austinabell
Copy link
Contributor

@snaumov thank you !

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

Successfully merging this pull request may close these issues.

Add CLI Command to Generate New GenesisTemplate
3 participants