You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
returnfmt.Errorf("wrong format for Cloud KMS key: %s", key)
159
-
}
160
-
cfg.COACloudKMSKeys[i] = flowGoKMS.Key{
161
-
ProjectID: cloudKMSProjectID,
162
-
LocationID: cloudKMSLocationID,
163
-
KeyRingID: cloudKMSKeyRingID,
164
-
KeyID: keyParts[0],
165
-
KeyVersion: keyParts[1],
166
-
}
129
+
// key has the form "{keyID}@{keyVersion}"
130
+
keyParts:=strings.Split(cloudKMSKey, "@")
131
+
iflen(keyParts) !=2 {
132
+
returnfmt.Errorf("wrong format for Cloud KMS key: %s", key)
133
+
}
134
+
cfg.COACloudKMSKey=&flowGoKMS.Key{
135
+
ProjectID: cloudKMSProjectID,
136
+
LocationID: cloudKMSLocationID,
137
+
KeyRingID: cloudKMSKeyRingID,
138
+
KeyID: keyParts[0],
139
+
KeyVersion: keyParts[1],
167
140
}
168
141
} else {
169
142
returnfmt.Errorf(
@@ -259,13 +232,12 @@ var (
259
232
coa,
260
233
key,
261
234
keyAlg,
262
-
keysPath,
263
235
flowNetwork,
264
236
logLevel,
265
237
logWriter,
266
238
filterExpiry,
267
239
accessSporkHosts,
268
-
cloudKMSKeys,
240
+
cloudKMSKey,
269
241
cloudKMSProjectID,
270
242
cloudKMSLocationID,
271
243
cloudKMSKeyRingID,
@@ -293,7 +265,6 @@ func init() {
293
265
Cmd.Flags().StringVar(&coa, "coa-address", "", "Flow address that holds COA account used for submitting transactions")
294
266
Cmd.Flags().StringVar(&key, "coa-key", "", "Private key value for the COA address used for submitting transactions")
295
267
Cmd.Flags().StringVar(&keyAlg, "coa-key-alg", "ECDSA_P256", "Private key algorithm for the COA private key, only effective if coa-key/coa-key-file is present. Available values (ECDSA_P256 / ECDSA_secp256k1 / BLS_BLS12_381), defaults to ECDSA_P256.")
296
-
Cmd.Flags().StringVar(&keysPath, "coa-key-file", "", "File path that contains JSON array of COA keys used in key-rotation mechanism, this is exclusive with coa-key flag.")
297
268
Cmd.Flags().StringVar(&logLevel, "log-level", "debug", "Define verbosity of the log output ('debug', 'info', 'warn', 'error', 'fatal', 'panic')")
298
269
Cmd.Flags().StringVar(&logWriter, "log-writer", "stderr", "Log writer used for output ('stderr', 'console')")
299
270
Cmd.Flags().Float64Var(&cfg.StreamLimit, "stream-limit", 10, "Rate-limits the events sent to the client within one second")
@@ -305,7 +276,7 @@ func init() {
305
276
Cmd.Flags().StringVar(&cloudKMSProjectID, "coa-cloud-kms-project-id", "", "The project ID containing the KMS keys, e.g. 'flow-evm-gateway'")
306
277
Cmd.Flags().StringVar(&cloudKMSLocationID, "coa-cloud-kms-location-id", "", "The location ID where the key ring is grouped into, e.g. 'global'")
307
278
Cmd.Flags().StringVar(&cloudKMSKeyRingID, "coa-cloud-kms-key-ring-id", "", "The key ring ID where the KMS keys exist, e.g. 'tx-signing'")
308
-
Cmd.Flags().StringVar(&cloudKMSKeys, "coa-cloud-kms-keys", "", `Names of the KMS keys and their versions as a comma separated list, e.g. "gw-key-6@1,gw-key-7@1,gw-key-8@1"`)
279
+
Cmd.Flags().StringVar(&cloudKMSKey, "coa-cloud-kms-key", "", `Name of the KMS key and its version, e.g. "gw-key-6@1"`)
309
280
Cmd.Flags().StringVar(&walletKey, "wallet-api-key", "", "ECDSA private key used for wallet APIs. WARNING: This should only be used locally or for testing, never in production.")
310
281
Cmd.Flags().IntVar(&cfg.MetricsPort, "metrics-port", 9091, "Port for the metrics server")
311
282
Cmd.Flags().BoolVar(&cfg.IndexOnly, "index-only", false, "Run the gateway in index-only mode which only allows querying the state and indexing, but disallows sending transactions.")
0 commit comments