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

[Configuration changes] Drop nitro p2p config options #2462

Merged
merged 4 commits into from
Jul 10, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
3 changes: 0 additions & 3 deletions cmd/nitro-val/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ type ValidationNodeConfig struct {
HTTP genericconf.HTTPConfig `koanf:"http"`
WS genericconf.WSConfig `koanf:"ws"`
IPC genericconf.IPCConfig `koanf:"ipc"`
P2P genericconf.P2PConfig `koanf:"p2p"`
Auth genericconf.AuthRPCConfig `koanf:"auth"`
Metrics bool `koanf:"metrics"`
MetricsServer genericconf.MetricsServerConfig `koanf:"metrics-server"`
Expand Down Expand Up @@ -67,7 +66,6 @@ var ValidationNodeConfigDefault = ValidationNodeConfig{
HTTP: HTTPConfigDefault,
WS: WSConfigDefault,
IPC: IPCConfigDefault,
P2P: genericconf.P2PConfigDefault,
Auth: genericconf.AuthRPCConfigDefault,
Metrics: false,
MetricsServer: genericconf.MetricsServerConfigDefault,
Expand All @@ -87,7 +85,6 @@ func ValidationNodeConfigAddOptions(f *flag.FlagSet) {
genericconf.WSConfigAddOptions("ws", f)
genericconf.IPCConfigAddOptions("ipc", f)
genericconf.AuthRPCConfigAddOptions("auth", f)
genericconf.P2PConfigAddOptions("p2p", f)
f.Bool("metrics", ValidationNodeConfigDefault.Metrics, "enable metrics")
genericconf.MetricsServerAddOptions("metrics-server", f)
f.Bool("pprof", ValidationNodeConfigDefault.PProf, "enable pprof")
Expand Down
1 change: 0 additions & 1 deletion cmd/nitro-val/nitro_val.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ func mainImpl() int {
nodeConfig.WS.Apply(&stackConf)
nodeConfig.Auth.Apply(&stackConf)
nodeConfig.IPC.Apply(&stackConf)
nodeConfig.P2P.Apply(&stackConf)
Copy link
Contributor

Choose a reason for hiding this comment

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

let's remove this function as well?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Removed along with the whole P2PConfig struct. We can revert this PR when we're ready to reintroduce P2P.

vcsRevision, strippedRevision, vcsTime := confighelpers.GetVersion()
stackConf.Version = strippedRevision

Expand Down
4 changes: 0 additions & 4 deletions cmd/nitro/nitro.go
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,6 @@ func mainImpl() int {
if nodeConfig.WS.ExposeAll {
stackConf.WSModules = append(stackConf.WSModules, "personal")
}
nodeConfig.P2P.Apply(&stackConf)
vcsRevision, strippedRevision, vcsTime := confighelpers.GetVersion()
stackConf.Version = strippedRevision

Expand Down Expand Up @@ -717,7 +716,6 @@ type NodeConfig struct {
IPC genericconf.IPCConfig `koanf:"ipc"`
Auth genericconf.AuthRPCConfig `koanf:"auth"`
GraphQL genericconf.GraphQLConfig `koanf:"graphql"`
P2P genericconf.P2PConfig `koanf:"p2p"`
Metrics bool `koanf:"metrics"`
MetricsServer genericconf.MetricsServerConfig `koanf:"metrics-server"`
PProf bool `koanf:"pprof"`
Expand All @@ -743,7 +741,6 @@ var NodeConfigDefault = NodeConfig{
IPC: genericconf.IPCConfigDefault,
Auth: genericconf.AuthRPCConfigDefault,
GraphQL: genericconf.GraphQLConfigDefault,
P2P: genericconf.P2PConfigDefault,
Metrics: false,
MetricsServer: genericconf.MetricsServerConfigDefault,
Init: conf.InitConfigDefault,
Expand All @@ -768,7 +765,6 @@ func NodeConfigAddOptions(f *flag.FlagSet) {
genericconf.WSConfigAddOptions("ws", f)
genericconf.IPCConfigAddOptions("ipc", f)
genericconf.AuthRPCConfigAddOptions("auth", f)
genericconf.P2PConfigAddOptions("p2p", f)
genericconf.GraphQLConfigAddOptions("graphql", f)
f.Bool("metrics", NodeConfigDefault.Metrics, "enable metrics")
genericconf.MetricsServerAddOptions("metrics-server", f)
Expand Down
Loading