Skip to content

Commit

Permalink
fix(tee-prover): fix deserialization of duration in envy config
Browse files Browse the repository at this point in the history
Relevant logs from the `stage` environment showcasing the issue:
https://grafana.matterlabs.dev/goto/IC-9k4eIR?orgId=1

Error message from the above logs:
```
Error: missing value for field initial_retry_backoff
```
  • Loading branch information
pbeza committed Sep 6, 2024
1 parent 64f9551 commit fd71886
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions core/bin/zksync_tee_prover/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ envy.workspace = true
reqwest.workspace = true
secp256k1 = { workspace = true, features = ["serde"] }
serde = { workspace = true, features = ["derive"] }
serde_with.workspace = true
thiserror.workspace = true
tokio = { workspace = true, features = ["full"] }
tracing.workspace = true
Expand Down
3 changes: 3 additions & 0 deletions core/bin/zksync_tee_prover/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ use std::{path::PathBuf, time::Duration};

use secp256k1::SecretKey;
use serde::Deserialize;
use serde_with::{serde_as, DurationSecondsWithFrac};
use url::Url;
use zksync_env_config::FromEnv;
use zksync_types::tee_types::TeeType;
Expand All @@ -22,10 +23,12 @@ pub(crate) struct TeeProverConfig {
pub max_retries: usize,
/// Initial back-off interval when retrying recovery on a retriable error. Each subsequent retry interval
/// will be multiplied by [`Self.retry_backoff_multiplier`].
#[serde_as(as = "DurationSecondsWithFrac")]
pub initial_retry_backoff: Duration,
/// Multiplier for the back-off interval when retrying recovery on a retriable error.
pub retry_backoff_multiplier: f32,
/// Maximum back-off interval when retrying recovery on a retriable error.
#[serde_as(as = "DurationSecondsWithFrac")]
pub max_backoff: Duration,
}

Expand Down

0 comments on commit fd71886

Please sign in to comment.