@@ -60,6 +60,12 @@ const (
6060 p2pPeersF = "p2p-peers"
6161 p2pFeederNodeF = "p2p-feeder-node"
6262 p2pPrivateKey = "p2p-private-key"
63+ consensusF = "consensus"
64+ consensusAddrF = "consensus-addr"
65+ consensusPeersF = "consensus-peers"
66+ consensusDBPathF = "consensus-db-path"
67+ consensusMockIndexF = "consensus-mock-index" // TODO: remove this
68+ consensusMockCountF = "consensus-mock-count" // TODO: remove this
6369 metricsF = "metrics"
6470 metricsHostF = "metrics-host"
6571 metricsPortF = "metrics-port"
@@ -112,6 +118,12 @@ const (
112118 defaultP2pPeers = ""
113119 defaultP2pFeederNode = false
114120 defaultP2pPrivateKey = ""
121+ defaultConsensus = false
122+ defaultConsensusAddr = ""
123+ defaultConsensusPeers = ""
124+ defaultConsensusDBPath = ""
125+ defaultConsensusMockIndex = 0 // TODO: remove this
126+ defaultConsensusMockCount = 1 // TODO: remove this
115127 defaultMetrics = false
116128 defaultMetricsPort = 9090
117129 defaultGRPC = false
@@ -172,21 +184,27 @@ const (
172184 "These peers can be either Feeder or regular nodes."
173185 p2pFeederNodeUsage = "EXPERIMENTAL: Run juno as a feeder node which will only sync from feeder gateway and gossip the new" +
174186 " blocks to the network."
175- p2pPrivateKeyUsage = "EXPERIMENTAL: Hexadecimal representation of a private key on the Ed25519 elliptic curve."
176- metricsUsage = "Enables the Prometheus metrics endpoint on the default port."
177- metricsHostUsage = "The interface on which the Prometheus endpoint will listen for requests."
178- metricsPortUsage = "The port on which the Prometheus endpoint will listen for requests."
179- grpcUsage = "Enable the HTTP gRPC server on the default port."
180- grpcHostUsage = "The interface on which the gRPC server will listen for requests."
181- grpcPortUsage = "The port on which the gRPC server will listen for requests."
182- maxVMsUsage = "Maximum number for VM instances to be used for RPC calls concurrently"
183- maxVMQueueUsage = "Maximum number for requests to queue after reaching max-vms before starting to reject incoming requests"
184- remoteDBUsage = "gRPC URL of a remote Juno node"
185- rpcMaxBlockScanUsage = "Maximum number of blocks scanned in single starknet_getEvents call"
186- dbCacheSizeUsage = "Determines the amount of memory (in megabytes) allocated for caching data in the database."
187- dbMaxHandlesUsage = "A soft limit on the number of open files that can be used by the DB"
188- gwAPIKeyUsage = "API key for gateway endpoints to avoid throttling" //nolint: gosec
189- gwTimeoutsUsage = "Timeouts for requests made to the gateway. Can be specified in three ways:\n " +
187+ p2pPrivateKeyUsage = "EXPERIMENTAL: Hexadecimal representation of a private key on the Ed25519 elliptic curve."
188+ consensusUsage = "EXPERIMENTAL: Enables the consensus server."
189+ consensusAddrUsage = "EXPERIMENTAL: Specify the address of the consensus server."
190+ consensusPeersUsage = "EXPERIMENTAL: Specify list of consensus peers split by a comma."
191+ consensusDBPathUsage = "EXPERIMENTAL: Specify the path to the consensus database."
192+ consensusMockIndexUsage = "EXPERIMENTAL: Specify the index of the mock consensus server to use." // TODO: remove this
193+ consensusMockCountUsage = "EXPERIMENTAL: Specify the number of mock consensus servers to use." // TODO: remove this
194+ metricsUsage = "Enables the Prometheus metrics endpoint on the default port."
195+ metricsHostUsage = "The interface on which the Prometheus endpoint will listen for requests."
196+ metricsPortUsage = "The port on which the Prometheus endpoint will listen for requests."
197+ grpcUsage = "Enable the HTTP gRPC server on the default port."
198+ grpcHostUsage = "The interface on which the gRPC server will listen for requests."
199+ grpcPortUsage = "The port on which the gRPC server will listen for requests."
200+ maxVMsUsage = "Maximum number for VM instances to be used for RPC calls concurrently"
201+ maxVMQueueUsage = "Maximum number for requests to queue after reaching max-vms before starting to reject incoming requests"
202+ remoteDBUsage = "gRPC URL of a remote Juno node"
203+ rpcMaxBlockScanUsage = "Maximum number of blocks scanned in single starknet_getEvents call"
204+ dbCacheSizeUsage = "Determines the amount of memory (in megabytes) allocated for caching data in the database."
205+ dbMaxHandlesUsage = "A soft limit on the number of open files that can be used by the DB"
206+ gwAPIKeyUsage = "API key for gateway endpoints to avoid throttling" //nolint: gosec
207+ gwTimeoutsUsage = "Timeouts for requests made to the gateway. Can be specified in three ways:\n " +
190208 "- Single value (e.g. '5s'): After each failure, the timeout will increase dynamically.\n " +
191209 "- Comma-separated list (e.g. '5s,10s,20s'): Each value will be used in sequence after failures.\n " +
192210 "- Single value with trailing comma (e.g. '5s,'): Uses a fixed timeout without dynamic adjustment."
@@ -374,6 +392,12 @@ func NewCmd(config *node.Config, run func(*cobra.Command, []string) error) *cobr
374392 junoCmd .Flags ().String (p2pPeersF , defaultP2pPeers , p2pPeersUsage )
375393 junoCmd .Flags ().Bool (p2pFeederNodeF , defaultP2pFeederNode , p2pFeederNodeUsage )
376394 junoCmd .Flags ().String (p2pPrivateKey , defaultP2pPrivateKey , p2pPrivateKeyUsage )
395+ junoCmd .Flags ().Bool (consensusF , defaultConsensus , consensusUsage )
396+ junoCmd .Flags ().String (consensusAddrF , defaultConsensusAddr , consensusAddrUsage )
397+ junoCmd .Flags ().String (consensusPeersF , defaultConsensusPeers , consensusPeersUsage )
398+ junoCmd .Flags ().String (consensusDBPathF , defaultConsensusDBPath , consensusDBPathUsage )
399+ junoCmd .Flags ().Int (consensusMockIndexF , defaultConsensusMockIndex , consensusMockIndexUsage ) // TODO: remove this
400+ junoCmd .Flags ().Int (consensusMockCountF , defaultConsensusMockCount , consensusMockCountUsage ) // TODO: remove this
377401 junoCmd .Flags ().Bool (metricsF , defaultMetrics , metricsUsage )
378402 junoCmd .Flags ().String (metricsHostF , defaultHost , metricsHostUsage )
379403 junoCmd .Flags ().Uint16 (metricsPortF , defaultMetricsPort , metricsPortUsage )
0 commit comments