@@ -61,6 +61,12 @@ const (
6161 p2pPeersF = "p2p-peers"
6262 p2pFeederNodeF = "p2p-feeder-node"
6363 p2pPrivateKey = "p2p-private-key"
64+ consensusF = "consensus"
65+ consensusAddrF = "consensus-addr"
66+ consensusPeersF = "consensus-peers"
67+ consensusDBPathF = "consensus-db-path"
68+ consensusMockIndexF = "consensus-mock-index" // TODO: remove this
69+ consensusMockCountF = "consensus-mock-count" // TODO: remove this
6470 metricsF = "metrics"
6571 metricsHostF = "metrics-host"
6672 metricsPortF = "metrics-port"
@@ -115,6 +121,12 @@ const (
115121 defaultP2pPeers = ""
116122 defaultP2pFeederNode = false
117123 defaultP2pPrivateKey = ""
124+ defaultConsensus = false
125+ defaultConsensusAddr = ""
126+ defaultConsensusPeers = ""
127+ defaultConsensusDBPath = ""
128+ defaultConsensusMockIndex = 0 // TODO: remove this
129+ defaultConsensusMockCount = 0 // TODO: remove this
118130 defaultMetrics = false
119131 defaultMetricsPort = 9090
120132 defaultGRPC = false
@@ -178,21 +190,27 @@ const (
178190 "These peers can be either Feeder or regular nodes."
179191 p2pFeederNodeUsage = "EXPERIMENTAL: Run juno as a feeder node which will only sync from feeder gateway and gossip the new" +
180192 " blocks to the network."
181- p2pPrivateKeyUsage = "EXPERIMENTAL: Hexadecimal representation of a private key on the Ed25519 elliptic curve."
182- metricsUsage = "Enables the Prometheus metrics endpoint on the default port."
183- metricsHostUsage = "The interface on which the Prometheus endpoint will listen for requests."
184- metricsPortUsage = "The port on which the Prometheus endpoint will listen for requests."
185- grpcUsage = "Enable the HTTP gRPC server on the default port."
186- grpcHostUsage = "The interface on which the gRPC server will listen for requests."
187- grpcPortUsage = "The port on which the gRPC server will listen for requests."
188- maxVMsUsage = "Maximum number for VM instances to be used for RPC calls concurrently"
189- maxVMQueueUsage = "Maximum number for requests to queue after reaching max-vms before starting to reject incoming requests"
190- remoteDBUsage = "gRPC URL of a remote Juno node"
191- rpcMaxBlockScanUsage = "Maximum number of blocks scanned in single starknet_getEvents call"
192- dbCacheSizeUsage = "Determines the amount of memory (in megabytes) allocated for caching data in the database."
193- dbMaxHandlesUsage = "A soft limit on the number of open files that can be used by the DB"
194- gwAPIKeyUsage = "API key for gateway endpoints to avoid throttling" //nolint: gosec
195- gwTimeoutsUsage = "Timeouts for requests made to the gateway. Can be specified in three ways:\n " +
193+ p2pPrivateKeyUsage = "EXPERIMENTAL: Hexadecimal representation of a private key on the Ed25519 elliptic curve."
194+ consensusUsage = "EXPERIMENTAL: Enables the consensus server."
195+ consensusAddrUsage = "EXPERIMENTAL: Specify the address of the consensus server."
196+ consensusPeersUsage = "EXPERIMENTAL: Specify list of consensus peers split by a comma."
197+ consensusDBPathUsage = "EXPERIMENTAL: Specify the path to the consensus database."
198+ consensusMockIndexUsage = "EXPERIMENTAL: Specify the index of the mock consensus server to use." // TODO: remove this
199+ consensusMockCountUsage = "EXPERIMENTAL: Specify the number of mock consensus servers to use." // TODO: remove this
200+ metricsUsage = "Enables the Prometheus metrics endpoint on the default port."
201+ metricsHostUsage = "The interface on which the Prometheus endpoint will listen for requests."
202+ metricsPortUsage = "The port on which the Prometheus endpoint will listen for requests."
203+ grpcUsage = "Enable the HTTP gRPC server on the default port."
204+ grpcHostUsage = "The interface on which the gRPC server will listen for requests."
205+ grpcPortUsage = "The port on which the gRPC server will listen for requests."
206+ maxVMsUsage = "Maximum number for VM instances to be used for RPC calls concurrently"
207+ maxVMQueueUsage = "Maximum number for requests to queue after reaching max-vms before starting to reject incoming requests"
208+ remoteDBUsage = "gRPC URL of a remote Juno node"
209+ rpcMaxBlockScanUsage = "Maximum number of blocks scanned in single starknet_getEvents call"
210+ dbCacheSizeUsage = "Determines the amount of memory (in megabytes) allocated for caching data in the database."
211+ dbMaxHandlesUsage = "A soft limit on the number of open files that can be used by the DB"
212+ gwAPIKeyUsage = "API key for gateway endpoints to avoid throttling" //nolint: gosec
213+ gwTimeoutsUsage = "Timeouts for requests made to the gateway. Can be specified in three ways:\n " +
196214 "- Single value (e.g. '5s'): After each failure, the timeout will increase dynamically.\n " +
197215 "- Comma-separated list (e.g. '5s,10s,20s'): Each value will be used in sequence after failures.\n " +
198216 "- Single value with trailing comma (e.g. '5s,'): Uses a fixed timeout without dynamic adjustment."
@@ -382,6 +400,12 @@ func NewCmd(config *node.Config, run func(*cobra.Command, []string) error) *cobr
382400 junoCmd .Flags ().String (p2pPeersF , defaultP2pPeers , p2pPeersUsage )
383401 junoCmd .Flags ().Bool (p2pFeederNodeF , defaultP2pFeederNode , p2pFeederNodeUsage )
384402 junoCmd .Flags ().String (p2pPrivateKey , defaultP2pPrivateKey , p2pPrivateKeyUsage )
403+ junoCmd .Flags ().Bool (consensusF , defaultConsensus , consensusUsage )
404+ junoCmd .Flags ().String (consensusAddrF , defaultConsensusAddr , consensusAddrUsage )
405+ junoCmd .Flags ().String (consensusPeersF , defaultConsensusPeers , consensusPeersUsage )
406+ junoCmd .Flags ().String (consensusDBPathF , defaultConsensusDBPath , consensusDBPathUsage )
407+ junoCmd .Flags ().Int (consensusMockIndexF , defaultConsensusMockIndex , consensusMockIndexUsage ) // TODO: remove this
408+ junoCmd .Flags ().Int (consensusMockCountF , defaultConsensusMockCount , consensusMockCountUsage ) // TODO: remove this
385409 junoCmd .Flags ().Bool (metricsF , defaultMetrics , metricsUsage )
386410 junoCmd .Flags ().String (metricsHostF , defaultHost , metricsHostUsage )
387411 junoCmd .Flags ().Uint16 (metricsPortF , defaultMetricsPort , metricsPortUsage )
0 commit comments