Skip to content
Open
Show file tree
Hide file tree
Changes from 6 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
2 changes: 2 additions & 0 deletions changelog/bragaigor-nit-4241.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
### Changed
- enable execution only mode
10 changes: 8 additions & 2 deletions cmd/nitro/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,10 @@ func (c *NodeConfig) Validate() error {
if err := c.ParentChain.Validate(); err != nil {
return err
}

if c.Execution.RPCServer.Enable && c.Node.RPCServer.Enable {
return errors.New("when on rpc mode a node can either be consensus or execution, not both")
Comment thread
bragaigor marked this conversation as resolved.
Outdated
}
if err := c.Node.Validate(); err != nil {
return err
}
Expand All @@ -169,8 +173,10 @@ func (c *NodeConfig) Validate() error {
if c.Node.Sequencer || c.Node.BatchPoster.Enable {
return errors.New("sequencing and batch-posting are currently not supported when connecting to an execution client over RPC")
}
} else if c.Execution.ConsensusRPCClient.URL != "" {
return errors.New("consensus is connecting directly to execution but execution is connecting to consensus over an rpc- invalid case")
} else if c.Execution.RPCServer.Enable && c.Execution.ConsensusRPCClient.URL == "" {
return errors.New("communication over rpc is enabled on execution but consensus RPC client is not set")
} else if c.Node.RPCServer.Enable && c.Node.ExecutionRPCClient.URL == "" {
return errors.New("communication over rpc is enabled on consensus but execution RPC client is not set")
}
if err := c.BlocksReExecutor.Validate(); err != nil {
return err
Expand Down
Loading
Loading