Skip to content

Commit 75a88de

Browse files
authored
Config verifier mina (#2184)
1 parent 2aa541a commit 75a88de

File tree

3 files changed

+15
-0
lines changed

3 files changed

+15
-0
lines changed

config-files/config-operator-docker.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ operator:
3333
max_batch_size: 268435456 # 256 MiB
3434
last_processed_batch_filepath: config-files/operator.last_processed_batch.json
3535
poll_latest_batch_interval: 20s # Optional: The interval to poll for latest batches. Default: 20s if not specified
36+
mina_verifier_enabled: true # Enable Mina verifiers for CI testing
3637
# Operators variables needed for register it in EigenLayer
3738
el_delegation_manager_address: "0xCf7Ed3AccA5a467e9e704C703E8D87F634fB0Fc9"
3839
private_key_store_path: config-files/anvil.ecdsa.key.json

core/config/operator.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ type OperatorConfig struct {
2929
MaxBatchSize int64
3030
LastProcessedBatchFilePath string
3131
PollLatestBatchInterval time.Duration
32+
MinaVerifierEnabled bool
3233
}
3334
}
3435

@@ -47,6 +48,7 @@ type OperatorConfigFromYaml struct {
4748
MaxBatchSize int64 `yaml:"max_batch_size"`
4849
LastProcessedBatchFilePath string `yaml:"last_processed_batch_filepath"`
4950
PollLatestBatchInterval string `yaml:"poll_latest_batch_interval"`
51+
MinaVerifierEnabled bool `yaml:"mina_verifier_enabled"`
5052
} `yaml:"operator"`
5153
BlsConfigFromYaml BlsConfigFromYaml `yaml:"bls"`
5254
}
@@ -98,6 +100,7 @@ func NewOperatorConfig(configFilePath string) *OperatorConfig {
98100
MaxBatchSize int64
99101
LastProcessedBatchFilePath string
100102
PollLatestBatchInterval time.Duration
103+
MinaVerifierEnabled bool
101104
}{
102105
AggregatorServerIpPortAddress: operatorConfigFromYaml.Operator.AggregatorServerIpPortAddress,
103106
OperatorTrackerIpPortAddress: operatorConfigFromYaml.Operator.OperatorTrackerIpPortAddress,
@@ -112,6 +115,7 @@ func NewOperatorConfig(configFilePath string) *OperatorConfig {
112115
MaxBatchSize: operatorConfigFromYaml.Operator.MaxBatchSize,
113116
LastProcessedBatchFilePath: operatorConfigFromYaml.Operator.LastProcessedBatchFilePath,
114117
PollLatestBatchInterval: pollInterval,
118+
MinaVerifierEnabled: operatorConfigFromYaml.Operator.MinaVerifierEnabled,
115119
},
116120
}
117121
}

operator/pkg/operator.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -427,11 +427,21 @@ func (o *Operator) verify(verificationData VerificationData, disabledVerifiersBi
427427
o.handleVerificationResult(results, verificationResult, nil, "Circom Groth16 BN256 proof verification")
428428

429429
case common.Mina:
430+
if !o.Config.Operator.MinaVerifierEnabled {
431+
o.Logger.Infof("Mina verifier is disabled. Set mina_verifier_enabled: true in config to enable")
432+
results <- false
433+
return
434+
}
430435
verificationResult, err := mina.VerifyMinaState(verificationData.Proof, verificationData.PubInput)
431436
o.Logger.Infof("Mina state proof verification result: %t", verificationResult)
432437
o.handleVerificationResult(results, verificationResult, err, "Mina state proof verification")
433438

434439
case common.MinaAccount:
440+
if !o.Config.Operator.MinaVerifierEnabled {
441+
o.Logger.Infof("Mina account verifier is disabled. Set mina_verifier_enabled: true in config to enable")
442+
results <- false
443+
return
444+
}
435445
verificationResult, err := mina_account.VerifyAccountInclusion(verificationData.Proof, verificationData.PubInput)
436446
o.Logger.Infof("Mina account inclusion proof verification result: %t", verificationResult)
437447
o.handleVerificationResult(results, verificationResult, err, "Mina account state proof verification")

0 commit comments

Comments
 (0)