Skip to content

Commit

Permalink
fix(config): Fix object store (#2183)
Browse files Browse the repository at this point in the history
## What ❔

<!-- What are the changes this PR brings about? -->
<!-- Example: This PR adds a PR template to the repo. -->
<!-- (For bigger PRs adding more context is appreciated) -->

## Why ❔

<!-- Why are these changes done? What goal do they contribute to? What
are the principles behind them? -->
<!-- Example: PR templates ensure PR reviewers, observers, and future
iterators are in context about the evolution of repos. -->

## Checklist

<!-- Check your PR fulfills the following items. -->
<!-- For draft PRs check the boxes as you complete them. -->

- [ ] PR title corresponds to the body of PR (we generate changelog
entries from PRs).
- [ ] Tests for the changes have been added / updated.
- [ ] Documentation comments have been added / updated.
- [ ] Code has been formatted via `zk fmt` and `zk lint`.
- [ ] Spellcheck has been run via `zk spellcheck`.

---------

Signed-off-by: Danil <deniallugo@gmail.com>
  • Loading branch information
Deniallugo committed Jun 7, 2024
1 parent 8468716 commit 551cdc2
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions core/lib/env_config/src/fri_prover.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
use zksync_config::{configs::FriProverConfig, ObjectStoreConfig};
use zksync_config::configs::FriProverConfig;

use crate::{envy_load, FromEnv};
use crate::{envy_load, object_store::ProverObjectStoreConfig, FromEnv};

impl FromEnv for FriProverConfig {
fn from_env() -> anyhow::Result<Self> {
let mut prover: FriProverConfig = envy_load("fri_prover", "FRI_PROVER_")?;
prover.object_store = ObjectStoreConfig::from_env().ok();
prover.object_store = ProverObjectStoreConfig::from_env().map(|a| a.0).ok();
Ok(prover)
}
}
Expand Down Expand Up @@ -62,10 +62,10 @@ mod tests {
FRI_PROVER_ZONE_READ_URL="http://metadata.google.internal/computeMetadata/v1/instance/zone"
FRI_PROVER_SHALL_SAVE_TO_PUBLIC_BUCKET=true
FRI_PROVER_AVAILABILITY_CHECK_INTERVAL_IN_SECS="1800"
OBJECT_STORE_BUCKET_BASE_URL="/base/url"
OBJECT_STORE_MODE="GCSWithCredentialFile"
OBJECT_STORE_GCS_CREDENTIAL_FILE_PATH="/path/to/credentials.json"
OBJECT_STORE_MAX_RETRIES="5"
PROVER_OBJECT_STORE_BUCKET_BASE_URL="/base/url"
PROVER_OBJECT_STORE_MODE="GCSWithCredentialFile"
PROVER_OBJECT_STORE_GCS_CREDENTIAL_FILE_PATH="/path/to/credentials.json"
PROVER_OBJECT_STORE_MAX_RETRIES="5"
"#;
lock.set_env(config);

Expand Down

0 comments on commit 551cdc2

Please sign in to comment.