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

admin: use specified private key with setup init #1058

Merged
merged 2 commits into from
Oct 11, 2024

Conversation

jchappelow
Copy link
Member

@jchappelow jchappelow commented Oct 3, 2024

Requires and based on #1059

Resolves #1057

This change alters how setup init handles the --app.private_key_path flag.
Recently it was modified to ignore the flag entirely, with the apparent intent of ensuring the generated config.toml in the initialized root directory would always be private_key_path = "private_key" with the actual private key always being written into the root directory. This behavior is good, however, when the flag is set it is desirable to import the private key file pointed to by this flag, which is what this change does.

This new behavior streamlines the production deployment guide where the workflow for the genesis validator set involves preparing the private keys so that then can be used in the genesis file created with kwil-admin setup genesis first.

@jchappelow jchappelow force-pushed the setup-init-priv-key branch 2 times, most recently from bbab678 to 6efa77c Compare October 4, 2024 15:47
@jchappelow
Copy link
Member Author

Not urgent @brennanjl, but I wanted to ensure this behavior isn't out of line with your intent for this command, particularly since you recently updated it. I think this is a minor change and should not cause any problems, but it does help some workflows where you want to initialize your node's root directory with an existing private key and existing genesis.json.

@jchappelow jchappelow force-pushed the setup-init-priv-key branch 2 times, most recently from 817f2d9 to 8860116 Compare October 7, 2024 19:24
charithabandi
charithabandi previously approved these changes Oct 9, 2024
Copy link
Contributor

@charithabandi charithabandi left a comment

Choose a reason for hiding this comment

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

LGTM!

@jchappelow
Copy link
Member Author

@charithabandi Would you please re-approve? I added docs and de-duped some other instances of copyfile

@brennanjl brennanjl merged commit e8510e5 into kwilteam:main Oct 11, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

setup init command ignores provided private key
3 participants