@@ -51,6 +51,15 @@ type Config struct {
5151 MaxChunkSize int64 `json:"max_chunk_size"`
5252 // MaxSubmissionTime is the maximum time to submit a batch.
5353 MaxSubmissionTime int64 `json:"max_submission_time"` // seconds
54+
55+ // L2StartHeight is the height to start the l2 node. If it is 0, it will start from the latest height.
56+ // If the latest height stored in the db is not 0, this config is ignored.
57+ // L2 starts from the last submitted output l2 block number + 1 before L2StartHeight.
58+ // L1 starts from the block number of the output tx + 1
59+ L2StartHeight int64 `json:"l2_start_height"`
60+ // StartBatchHeight is the height to start the batch. If it is 0, it will start from the latest height.
61+ // If the latest height stored in the db is not 0, this config is ignored.
62+ BatchStartHeight int64 `json:"batch_start_height"`
5463}
5564
5665type HostConfig struct {
@@ -73,7 +82,7 @@ func DefaultConfig() *Config {
7382
7483 L1ChainID : "testnet-l1-1" ,
7584 L2ChainID : "testnet-l2-1" ,
76- DAChainID : "testnet-l3 -1" ,
85+ DAChainID : "testnet-da -1" ,
7786
7887 L1Bech32Prefix : "init" ,
7988 L2Bech32Prefix : "init" ,
@@ -87,6 +96,9 @@ func DefaultConfig() *Config {
8796 MaxChunks : 5000 ,
8897 MaxChunkSize : 300000 , // 300KB
8998 MaxSubmissionTime : 60 * 60 , // 1 hour
99+
100+ L2StartHeight : 0 ,
101+ BatchStartHeight : 0 ,
90102 }
91103}
92104
@@ -112,8 +124,9 @@ func (cfg Config) Validate() error {
112124 return errors .New ("L2 chain ID is required" )
113125 }
114126 if cfg .DAChainID == "" {
115- return errors .New ("L2 RPC URL is required" )
127+ return errors .New ("DA chain ID is required" )
116128 }
129+
117130 if cfg .ListenAddress == "" {
118131 return errors .New ("listen address is required" )
119132 }
0 commit comments