diff --git a/op-node/flags/p2p_flags.go b/op-node/flags/p2p_flags.go index d38abf11480da..da2b26203a685 100644 --- a/op-node/flags/p2p_flags.go +++ b/op-node/flags/p2p_flags.go @@ -83,7 +83,7 @@ var ( Usage: "The UDP port to advertise in Discv5 as fallback if not determined by Discv5, put into the ENR of the node. Set to p2p.listen.udp value if 0.", Required: false, Value: 0, - EnvVar: p2pEnv("ADVERTISE_TCP"), + EnvVar: p2pEnv("ADVERTISE_UDP"), } Bootnodes = cli.StringFlag{ Name: "p2p.bootnodes", diff --git a/op-node/rollup/types.go b/op-node/rollup/types.go index 20fa741de80e1..fb84a0ae3ea17 100644 --- a/op-node/rollup/types.go +++ b/op-node/rollup/types.go @@ -70,8 +70,32 @@ func (cfg *Config) Check() error { if cfg.Genesis.L2.Hash == cfg.Genesis.L1.Hash { return errors.New("achievement get! rollup inception: L1 and L2 genesis cannot be the same") } + if cfg.Genesis.L2Time == 0 { + return errors.New("missing L2 genesis time") + } + if cfg.P2PSequencerAddress == (common.Address{}) { + return errors.New("missing p2p sequencer address") + } + if cfg.FeeRecipientAddress == (common.Address{}) { + return errors.New("missing fee recipient address") + } + if cfg.BatchInboxAddress == (common.Address{}) { + return errors.New("missing batch inbox address") + } + if cfg.BatchSenderAddress == (common.Address{}) { + return errors.New("missing batch sender address") + } if cfg.DepositContractAddress == (common.Address{}) { - return errors.New("did not provide deposit contract address ") + return errors.New("missing deposit contract address") + } + if cfg.L1ChainID == nil { + return errors.New("l1 chain ID must not be nil") + } + if cfg.L2ChainID == nil { + return errors.New("l2 chain ID must not be nil") + } + if cfg.L1ChainID.Cmp(cfg.L2ChainID) == 0 { + return errors.New("l1 and l2 chain IDs must be different") } return nil }