vault: poll for DKG result in NewReportingPlugin (~12s startup speedup)#21710
Merged
prashantkumar1982 merged 1 commit intodevelopfrom Mar 26, 2026
Merged
vault: poll for DKG result in NewReportingPlugin (~12s startup speedup)#21710prashantkumar1982 merged 1 commit intodevelopfrom
prashantkumar1982 merged 1 commit intodevelopfrom
Conversation
…mmediately When the vault OCR3.1 oracle starts before DKG completes, NewReportingPlugin fails because the DKG result package is not yet in the database. This triggers libocr exponential backoff (1s, 2s, 4s, 8s... up to 2min), wasting ~12s even after the DKG result becomes available. Add pollForKeyMaterial() that polls the DB every 2s within the MaxDurationInitialization context window (10s). The vault oracle now starts within seconds of DKG completion instead of waiting for the next retry cycle. Made-with: Cursor
Contributor
|
👋 prashantkumar1982, thanks for creating this pull request! To help reviewers, please consider creating future PRs as drafts first. This allows you to self-review and make any final changes before notifying the team. Once you're ready, you can mark it as "Ready for review" to request feedback. Thanks! |
Contributor
|
I see you updated files related to
|
Contributor
|
✅ No conflicts with other open PRs targeting |
|
jmank88
approved these changes
Mar 25, 2026
vreff
approved these changes
Mar 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.





Summary
Performance improvement: saves ~12 seconds from vault oracle startup.
When the vault OCR3.1 oracle starts before DKG completes,
NewReportingPluginfails immediately because the DKG result isn't in the DB yet. This triggers libocr's exponential backoff (1s, 2s, 4s, 8s, 13s…), wasting ~12s even after DKG finishes.Change
Add
pollForKeyMaterial()that polls the DB every 2s within libocr'sMaxDurationInitializationwindow (10s), instead of failing immediately. The vault oracle now starts within ~2s of DKG completion rather than waiting for the next backoff cycle.Impact
From local CRE log analysis:
Eliminates the occasional first-request timeout in vault E2E tests.