Commit 8f294062 authored by Diederik Loerakker's avatar Diederik Loerakker Committed by GitHub

bedrock: op node testnet fixes (#2587)

* fix(op-node/flags): fix p2p advertise udp flag

* fix(op-node/rollup): fix config validation
Co-authored-by: default avatarmergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
parent 6b7ff0bf
...@@ -83,7 +83,7 @@ var ( ...@@ -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.", 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, Required: false,
Value: 0, Value: 0,
EnvVar: p2pEnv("ADVERTISE_TCP"), EnvVar: p2pEnv("ADVERTISE_UDP"),
} }
Bootnodes = cli.StringFlag{ Bootnodes = cli.StringFlag{
Name: "p2p.bootnodes", Name: "p2p.bootnodes",
......
...@@ -70,8 +70,32 @@ func (cfg *Config) Check() error { ...@@ -70,8 +70,32 @@ func (cfg *Config) Check() error {
if cfg.Genesis.L2.Hash == cfg.Genesis.L1.Hash { if cfg.Genesis.L2.Hash == cfg.Genesis.L1.Hash {
return errors.New("achievement get! rollup inception: L1 and L2 genesis cannot be the same") 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{}) { 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 return nil
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment