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: refactor to use create command #487

Merged
merged 2 commits into from
May 5, 2022
Merged

Conversation

dB2510
Copy link
Contributor

@dB2510 dB2510 commented May 5, 2022

Refactor genp2pkey and create-cluster commands to create enr and create cluster commands, i.e, subcommands of create command.

category: refactor
ticket: #442
feature_set: stable

@dB2510 dB2510 linked an issue May 5, 2022 that may be closed by this pull request
@codecov
Copy link

codecov bot commented May 5, 2022

Codecov Report

Merging #487 (40935a0) into main (7feacba) will increase coverage by 0.10%.
The diff coverage is 44.44%.

@@            Coverage Diff             @@
##             main     #487      +/-   ##
==========================================
+ Coverage   55.85%   55.95%   +0.10%     
==========================================
  Files          84       84              
  Lines        7504     7502       -2     
==========================================
+ Hits         4191     4198       +7     
+ Misses       2737     2726      -11     
- Partials      576      578       +2     
Impacted Files Coverage Δ
cmd/bootnode.go 42.15% <0.00%> (ø)
cmd/cmd.go 75.64% <0.00%> (ø)
cmd/createcluster.go 54.08% <0.00%> (ø)
cmd/createdkg.go 0.00% <0.00%> (ø)
cmd/dkg.go 0.00% <0.00%> (ø)
cmd/enr.go 0.00% <0.00%> (ø)
cmd/create.go 100.00% <100.00%> (+100.00%) ⬆️
cmd/createenr.go 81.25% <100.00%> (ø)
cmd/run.go 100.00% <100.00%> (ø)
app/log/config.go 53.54% <0.00%> (-3.83%) ⬇️
... and 3 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7feacba...40935a0. Read the comment docs.

@@ -43,13 +43,13 @@ func New() *cobra.Command {
return newRootCmd(
newVersionCmd(runVersionCmd),
newEnrCmd(runNewENR),
newGenP2PKeyCmd(runGenP2PKey),
Copy link
Contributor

@corverroos corverroos May 5, 2022

Choose a reason for hiding this comment

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

rather retain the old ones, until we have fixed charon-docker-compose and the docs to use the new ones.

Copy link
Contributor

@corverroos corverroos left a comment

Choose a reason for hiding this comment

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

LGTM

@OisinKyne
Copy link
Contributor

OisinKyne commented May 5, 2022

Hey @dB2510, I'm making suggestions on text not just in this PR, but you might still fix them for me if you wouldn't mind 👼

I've marked with ** and ~~ for add and strike the changes I want to make.

./charon help
Charon enables the operation of Ethereum validators in a fault tolerant manner by splitting the validating keys across a group of trusted parties using threshold cryptography.

Usage:
  charon [command]

Available Commands:
  bootnode    **Start a discv5 bootnode server**
  completion  Generate the autocompletion script for the specified shell
  create      Create **artifacts for a distributed validator cluster**
  dkg         **Participate in a Distributed Key Generation ceremony**
  enr         **Print this client's Ethereum Node Record**
  help        Help about any command
  run         Run the **c**haron middleware **client**
  version     Print version and exit

Flags:
  -h, --help   Help for charon

Use "charon [command] --help" for more information about a command.

And on the create command:

./charon create
Create **artifacts for a distributed validator cluster. These commands can be used to facilitate the creation of a distributed validator cluster between a group of operators by performing a distributed key generation ceremony, or they can be used to create a local cluster for single operator use cases.**

Usage:
  charon create [command]

Available Commands:
  cluster    **Create private keys and configuration files needed to run a distributed validator cluster locally**
  dkg         **Create the configuration for a new Distributed Key Generation ceremony using `charon dkg`**
  enr         **Create an Ethereum Node Record (ENR) private key to identify this charon client**
Flags:
  -h, --help   Help for create

Use "charon create [command] --help" for more information about a command.

@xenowits xenowits added the merge when ready Indicates bulldozer bot may merge when all checks pass label May 5, 2022
@obol-bulldozer obol-bulldozer bot merged commit 38b92d1 into main May 5, 2022
@obol-bulldozer obol-bulldozer bot deleted the dhruv/refactorcmds branch May 5, 2022 17:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge when ready Indicates bulldozer bot may merge when all checks pass
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Refactor to use a create command with subcommands
4 participants