Skip to content

Commit d64d717

Browse files
committed
update bootstrapping commandline flags
1 parent 475a472 commit d64d717

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

cmd/bootstrap/cmd/clustering.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ func addClusterAssignmentCmdFlags() {
5151
cmd.MarkFlagRequired(clusterAssignmentCmd, "partner-dir")
5252
cmd.MarkFlagRequired(clusterAssignmentCmd, "partner-weights")
5353

54+
// optional parameters for cluster assignment
55+
clusterAssignmentCmd.Flags().UintVar(&flagCollectionClusters, "collection-clusters", 2, "number of collection clusters")
56+
5457
// required parameters for generation of cluster root blocks
5558
clusterAssignmentCmd.Flags().Uint64Var(&flagEpochCounter, "epoch-counter", 0, "epoch counter for the epoch beginning with the root block")
5659
cmd.MarkFlagRequired(clusterAssignmentCmd, "epoch-counter")

cmd/bootstrap/cmd/rootblock.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,13 +115,15 @@ func addRootBlockCmdFlags() {
115115
"protocol state KVStore version to initialize ('default' or an integer equal to a supported protocol version: '0', '1', '2', ...)")
116116
rootBlockCmd.Flags().BytesHexVar(&flagEpochRandomSeed, "random-seed", nil, "random seed")
117117
rootBlockCmd.Flags().StringVar(&flagIntermediaryClusteringDataPath, "intermediary-clustering-data", "", "path to a JSON file containing intermediary clustering data generated by the clustering command")
118+
rootBlockCmd.Flags().StringVar(&flagRootClusterBlockVotesDir, "cluster-votes-dir", "", "directory containing votes for root cluster blocks")
118119

119120
cmd.MarkFlagRequired(rootBlockCmd, "root-chain")
120121
cmd.MarkFlagRequired(rootBlockCmd, "root-parent")
121122
cmd.MarkFlagRequired(rootBlockCmd, "root-height")
122123
cmd.MarkFlagRequired(rootBlockCmd, "root-view")
123124
cmd.MarkFlagRequired(rootBlockCmd, "random-seed")
124125
cmd.MarkFlagRequired(rootBlockCmd, "intermediary-clustering-data")
126+
cmd.MarkFlagRequired(rootBlockCmd, "cluster-votes-dir")
125127

126128
// Epoch timing config - these values must be set identically to `EpochTimingConfig` in the FlowEpoch smart contract.
127129
// See https://github.com/onflow/flow-core-contracts/blob/240579784e9bb8d97d91d0e3213614e25562c078/contracts/epochs/FlowEpoch.cdc#L259-L266
@@ -454,7 +456,7 @@ func generateExecutionStateEpochConfig(
454456
NumViewsInEpoch: cadence.UInt64(flagNumViewsInEpoch),
455457
NumViewsInStakingAuction: cadence.UInt64(flagNumViewsInStakingAuction),
456458
NumViewsInDKGPhase: cadence.UInt64(flagNumViewsInDKGPhase),
457-
NumCollectorClusters: cadence.UInt16(flagCollectionClusters),
459+
NumCollectorClusters: cadence.UInt16(len(clusterQCs)),
458460
RandomSource: cdcRandomSource,
459461
CollectorClusters: epochSetup.Assignments,
460462
ClusterQCs: clusterQCs,

0 commit comments

Comments
 (0)