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: remove deprecated commands #551

Merged
merged 1 commit into from
May 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions cmd/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,13 @@ func New() *cobra.Command {
return newRootCmd(
newVersionCmd(runVersionCmd),
newEnrCmd(runNewENR),
// TODO(dhruv): remove genp2pkey command once charon-docker-compose and docs are updated
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 docs updated?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

newGenP2PKeyCmd(runGenP2PKey),
newRunCmd(app.Run),
newBootnodeCmd(RunBootnode),
// TODO(dhruv): replace newCreateClusterCmdNew with newCreateClusterCmd once charon-docker-compose and docs are updated
newCreateClusterCmd(runCreateCluster),
newDKGCmd(dkg.Run),
newCreateCmd(
newCreateDKGCmd(runCreateDKG),
newCreateEnrCmd(runCreateEnrCmd),
newCreateClusterCmdNew(runCreateCluster),
newCreateClusterCmd(runCreateCluster),
),
)
}
Expand Down
21 changes: 1 addition & 20 deletions cmd/createcluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,25 +98,6 @@ type clusterConfig struct {
func newCreateClusterCmd(runFunc func(io.Writer, clusterConfig) error) *cobra.Command {
var conf clusterConfig

cmd := &cobra.Command{
Use: "create-cluster",
Short: "Create a local charon cluster [DEPRECATED]",
Long: "Create a local charon cluster including validator keys, charon p2p keys, and a cluster manifest. [DEPRECATED]" +
"See flags for supported features.",
RunE: func(cmd *cobra.Command, args []string) error {
return runFunc(cmd.OutOrStdout(), conf)
},
}

bindClusterFlags(cmd.Flags(), &conf)

return cmd
}

// TODO(dhruv): replace newCreateClusterCmd with newCreateClusterCmdNew once charon-docker-compose are updated.
func newCreateClusterCmdNew(runFunc func(io.Writer, clusterConfig) error) *cobra.Command {
var conf clusterConfig

cmd := &cobra.Command{
Use: "cluster",
Short: "Create private keys and configuration files needed to run a distributed validator cluster locally",
Expand Down Expand Up @@ -372,7 +353,7 @@ func writeOutput(out io.Writer, conf clusterConfig) {
_, _ = sb.WriteString("├─ run_cluster.sh\tConvenience script to run all nodes\n")
_, _ = sb.WriteString("├─ teamocil.yml\t\tTeamocil config for splitting logs in tmux panes\n")
}
_, _ = sb.WriteString("├─ node[0-3]/\t\tDirectory for each node\n")
_, _ = sb.WriteString(fmt.Sprintf("├─ node[0-%d]/\t\tDirectory for each node\n", conf.NumNodes-1))
_, _ = sb.WriteString("│ ├─ p2pkey\t\tP2P networking private key for node authentication\n")
_, _ = sb.WriteString("│ ├─ keystore-*.json\tValidator private share key for duty signing\n")
_, _ = sb.WriteString("│ ├─ keystore-*.txt\tKeystore password files for keystore-*.json\n")
Expand Down
2 changes: 1 addition & 1 deletion cmd/createenr_internal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
"github.com/obolnetwork/charon/p2p"
)

func TestRunGenP2P(t *testing.T) {
func TestRunCreateEnr(t *testing.T) {
temp, err := os.MkdirTemp("", "")
require.NoError(t, err)

Expand Down
67 changes: 0 additions & 67 deletions cmd/genp2pkey.go

This file was deleted.