Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(proof-data-handler): add tee_proof_generation_timeout_in_secs param #3128

Merged
merged 4 commits into from
Oct 25, 2024

Conversation

pbeza
Copy link
Collaborator

@pbeza pbeza commented Oct 18, 2024

What ❔

Add tee_proof_generation_timeout_in_secs parameter to the proof-data-handler configuration to avoid sharing the same proof_generation_timeout_in_secs timeout with the ZK prover.

This timeout is for retrying TEE proof generation if it fails. Retries continue indefinitely until successful.

Why ❔

The TEE prover is much faster than the ZK prover, so some of the ZK timeouts are too long to be shared with the TEE-specific code.

Checklist

  • 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 zkstack dev fmt and zkstack dev lint.

@pbeza pbeza requested review from haraldh and slowli October 18, 2024 14:51
@pbeza pbeza force-pushed the tee/pab/feat-tee-specific-proof-data-handler-timeout branch from 41d0c85 to 88edd26 Compare October 18, 2024 14:54
@pbeza pbeza marked this pull request as ready for review October 18, 2024 14:55
@pbeza
Copy link
Collaborator Author

pbeza commented Oct 18, 2024

Perhaps I should extract the TEE-specific options, like I did in #3112 (which hasn't been merged yet):

#[derive(Debug, Deserialize, Clone, PartialEq)]
pub struct TeeConfig {
/// If true, the TEE support is enabled.
#[serde(deserialize_with = "deserialize_stringified_any")]
pub tee_support: bool,
/// All batches before this one are considered to be processed.
#[serde(deserialize_with = "deserialize_stringified_any", default)]
pub first_tee_processed_batch: L1BatchNumber,
}
#[derive(Debug, Deserialize, Clone, PartialEq)]
pub struct ProofDataHandlerConfig {
pub http_port: u16,
pub proof_generation_timeout_in_secs: u16,
#[serde(flatten)]
pub tee_config: TeeConfig,
}

Lemme know what's your preference, @haraldh @slowli.

In case you wondered what is deserialize_stringified_any about:

// Boilerplate to workaround https://github.com/softprops/envy/issues/26

Edit

Updated. ✅

@pbeza pbeza force-pushed the tee/pab/feat-tee-specific-proof-data-handler-timeout branch 5 times, most recently from 6fbc503 to 0a495d4 Compare October 24, 2024 15:38
Add `tee_proof_generation_timeout_in_secs` parameter to the
`proof-data-handler` configuration to avoid sharing the same
`proof_generation_timeout_in_secs` timeout with the prover.

This timeout is for retrying TEE proof generation if it fails. Retries
continue indefinitely until successful.
@pbeza pbeza force-pushed the tee/pab/feat-tee-specific-proof-data-handler-timeout branch from 0a495d4 to 952b50d Compare October 25, 2024 08:31
haraldh
haraldh previously approved these changes Oct 25, 2024
@haraldh haraldh added this pull request to the merge queue Oct 25, 2024
@haraldh haraldh removed this pull request from the merge queue due to a manual request Oct 25, 2024
slowli
slowli previously approved these changes Oct 25, 2024
core/lib/config/src/configs/proof_data_handler.rs Outdated Show resolved Hide resolved
@pbeza pbeza dismissed stale reviews from slowli and haraldh via db8ac3a October 25, 2024 11:22
@haraldh haraldh added this pull request to the merge queue Oct 25, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 25, 2024
@haraldh haraldh added this pull request to the merge queue Oct 25, 2024
Merged via the queue into main with commit f3724a7 Oct 25, 2024
43 checks passed
@haraldh haraldh deleted the tee/pab/feat-tee-specific-proof-data-handler-timeout branch October 25, 2024 14:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants