@@ -28,8 +28,6 @@ const (
2828 FlagRootDir = "home"
2929 // FlagDBPath is a flag for specifying the database path
3030 FlagDBPath = FlagPrefixEvnode + "db_path"
31- // FlagClearCache is a flag for clearing the cache
32- FlagClearCache = FlagPrefixEvnode + "clear_cache"
3331
3432 // Node configuration flags
3533
@@ -49,11 +47,8 @@ const (
4947 FlagLazyBlockTime = FlagPrefixEvnode + "node.lazy_block_interval"
5048 // FlagReadinessMaxBlocksBehind configures how many blocks behind best-known head is still considered ready
5149 FlagReadinessMaxBlocksBehind = FlagPrefixEvnode + "node.readiness_max_blocks_behind"
52-
53- // Sync configuration flags
54-
55- // FlagSyncP2PPrefer is a flag to prioritize p2p over da fetching
56- FlagSyncP2PPrefer = FlagPrefixEvnode + "sync.prefer_p2p"
50+ // FlagClearCache is a flag for clearing the cache
51+ FlagClearCache = FlagPrefixEvnode + "clear_cache"
5752
5853 // Data Availability configuration flags
5954
@@ -135,14 +130,10 @@ const (
135130// Config stores Rollkit configuration.
136131type Config struct {
137132 RootDir string `mapstructure:"-" yaml:"-" comment:"Root directory where rollkit files are located"`
138- ClearCache bool `mapstructure:"clear_cache " yaml:"-" comment:"Clear the cache"`
133+ ClearCache bool `mapstructure:"- " yaml:"-" comment:"Clear the cache"`
139134
140135 // Base configuration
141136 DBPath string `mapstructure:"db_path" yaml:"db_path" comment:"Path inside the root directory where the database is located"`
142-
143- // Sync configuration (not in yaml)
144- Sync SyncConfig `mapstructure:"sync" yaml:"-"`
145-
146137 // P2P configuration
147138 P2P P2PConfig `mapstructure:"p2p" yaml:"p2p"`
148139
@@ -165,12 +156,6 @@ type Config struct {
165156 Signer SignerConfig `mapstructure:"signer" yaml:"signer"`
166157}
167158
168- // SyncConfig contains synchronization configuration parameters
169- // Those are used in flags are not set in the ev-node config.
170- type SyncConfig struct {
171- PreferP2P bool `mapstructure:"prefer_p2p" yaml:"-" comment:"Prefer P2P over DA fetching"`
172- }
173-
174159// DAConfig contains all Data Availability configuration parameters
175160type DAConfig struct {
176161 Address string `mapstructure:"address" yaml:"address" comment:"Address of the data availability layer service (host:port). This is the endpoint where Rollkit will connect to submit and retrieve data."`
@@ -324,9 +309,6 @@ func AddFlags(cmd *cobra.Command) {
324309 cmd .Flags ().String (FlagDBPath , def .DBPath , "path for the node database" )
325310 cmd .Flags ().Bool (FlagClearCache , def .ClearCache , "clear the cache" )
326311
327- // Sync configuration flags
328- cmd .Flags ().Bool (FlagSyncP2PPrefer , def .Sync .PreferP2P , "prefer P2P over DA fetching" )
329-
330312 // Node configuration flags
331313 cmd .Flags ().Bool (FlagAggregator , def .Node .Aggregator , "run node in aggregator mode" )
332314 cmd .Flags ().Bool (FlagLight , def .Node .Light , "run light client" )
@@ -372,9 +354,6 @@ func AddFlags(cmd *cobra.Command) {
372354 cmd .Flags ().String (FlagSignerType , def .Signer .SignerType , "type of signer to use (file, grpc)" )
373355 cmd .Flags ().String (FlagSignerPath , def .Signer .SignerPath , "path to the signer file or address" )
374356 cmd .Flags ().String (FlagSignerPassphrase , "" , "passphrase for the signer (required for file signer and if aggregator is enabled)" )
375-
376- // FlagSyncP2PPrefer is only relevant for sync nodes.
377- cmd .MarkFlagsMutuallyExclusive (FlagSyncP2PPrefer , FlagAggregator )
378357}
379358
380359// Load loads the node configuration in the following order of precedence:
0 commit comments