Skip to content

Commit 31025ed

Browse files
authored
Merge of #2005
2 parents 16d7577 + 9797b44 commit 31025ed

File tree

5 files changed

+16
-1
lines changed

5 files changed

+16
-1
lines changed

charts/coprocessor/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: coprocessor
22
description: A helm chart to distribute and deploy Zama fhevm Co-Processor services
3-
version: 0.8.1
3+
version: 0.8.2
44
apiVersion: v2
55
keywords:
66
- fhevm

charts/coprocessor/values.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -447,6 +447,7 @@ gwListener:
447447
# --replay-from-block BLOCK_NUMBER
448448
# To go back in time from latest block
449449
# --replay-from-block -NB_BLOCK
450+
# --replay-skip-verify-proof # Skip VerifyProofRequest events during replay
450451

451452
# Service ports configuration
452453
ports:

coprocessor/fhevm-engine/gw-listener/src/bin/gw_listener.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,13 @@ struct Conf {
8282

8383
#[arg(long, default_value = None, help = "Can be negative from last processed block", allow_hyphen_values = true, alias = "catchup-kms-generation-from-block")]
8484
pub replay_from_block: Option<i64>,
85+
86+
#[arg(
87+
long,
88+
default_value_t = false,
89+
help = "Skip VerifyProofRequest events during replay"
90+
)]
91+
pub replay_skip_verify_proof: bool,
8592
}
8693

8794
fn install_signal_handlers(cancel_token: CancellationToken) -> anyhow::Result<()> {
@@ -170,6 +177,7 @@ async fn main() -> anyhow::Result<()> {
170177
get_logs_poll_interval: conf.get_logs_poll_interval,
171178
get_logs_block_batch_size: conf.get_logs_block_batch_size,
172179
replay_from_block: conf.replay_from_block,
180+
replay_skip_verify_proof: conf.replay_skip_verify_proof,
173181
log_last_processed_every_number_of_updates: conf.log_last_processed_every_number_of_updates,
174182
};
175183

coprocessor/fhevm-engine/gw-listener/src/gw_listener.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,10 @@ impl<P: Provider<Ethereum> + Clone + 'static, A: AwsS3Interface + Clone + 'stati
196196
}
197197
for log in logs {
198198
if log.address() == self.input_verification_address {
199+
if replay_from_block.is_some() && self.conf.replay_skip_verify_proof {
200+
debug!(log = ?log, "Skipping VerifyProofRequest during replay");
201+
continue;
202+
}
199203
if let Ok(event) = InputVerification::InputVerificationEvents::decode_log(&log.inner) {
200204
match event.data {
201205
InputVerification::InputVerificationEvents::VerifyProofRequest(request) => {

coprocessor/fhevm-engine/gw-listener/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ pub struct ConfigSettings {
5252
pub get_logs_poll_interval: Duration,
5353
pub get_logs_block_batch_size: u64,
5454
pub replay_from_block: Option<i64>,
55+
pub replay_skip_verify_proof: bool,
5556

5657
pub log_last_processed_every_number_of_updates: u64,
5758
}
@@ -86,6 +87,7 @@ impl Default for ConfigSettings {
8687
get_logs_poll_interval: Duration::from_millis(500),
8788
get_logs_block_batch_size: 100,
8889
replay_from_block: None,
90+
replay_skip_verify_proof: false,
8991
log_last_processed_every_number_of_updates: 50,
9092
}
9193
}

0 commit comments

Comments
 (0)