fix(sdk): eagerly bootstrap protocol version before first proof parse#3493
fix(sdk): eagerly bootstrap protocol version before first proof parse#3493QuantumExplorer wants to merge 3 commits intov3.1-devfrom
Conversation
The auto-detect protocol version feature introduced in #3483 updated the cached version only *after* a proof-backed response was successfully parsed. On a fresh auto-detect SDK the first parse therefore used PlatformVersion::latest() as a fallback, so on an older network whose proof interpretation differs from latest() the very first request could fail before the SDK ever got a chance to learn the correct version. Close that bootstrap hole by running a one-shot unproved RPC (CurrentQuorumsInfo) the first time parse_proof_with_metadata_and_proof is invoked, reading metadata.protocol_version from the response, and updating the SDK's cached version before the proof parse runs. A tokio::sync::OnceCell guarantees the bootstrap RPC runs at most once per SDK (and its clones) even under concurrent first calls. Skipped for pinned SDKs (with_version), mock SDKs, and any SDK that has already seen a response. If the bootstrap RPC itself fails the SDK logs a warning and falls back to the previous latest() behaviour so partially-reachable networks still function. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
📝 WalkthroughWalkthroughUpdated Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant SDK
participant OnceCell as OnceCell<br/>(Bootstrap)
participant DAPI
participant MetadataCache
Client->>SDK: parse_proof_with_metadata_and_proof()
SDK->>OnceCell: Check if bootstrap completed
alt First call (OnceCell empty)
OnceCell->>SDK: Bootstrap needed
SDK->>SDK: Check if auto-detect enabled<br/>& cached version == 0
alt Conditions met
SDK->>DAPI: fetch_unproved<br/>CurrentQuorumsInfo
DAPI-->>SDK: metadata with protocol_version
SDK->>MetadataCache: Update cached<br/>protocol_version
SDK->>OnceCell: Mark bootstrap complete
else Conditions not met
SDK->>OnceCell: Mark bootstrap complete<br/>(no-op)
end
else Already bootstrapped
OnceCell-->>SDK: Bootstrap skipped<br/>(cached result)
end
SDK->>Client: Resume proof parsing
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related issues
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
✅ Review complete (commit 923c4af) |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@packages/rs-sdk/src/sdk.rs`:
- Around line 357-360: The bootstrap RPC call uses RequestSettings::default()
which ignores the SDK-wide settings and caller overrides; replace that hardcoded
default with the SDK instance's configured RequestSettings (the field on the
client, e.g., self.request_settings or self.settings) and pass that into
CurrentQuorumsInfo::fetch_unproved_with_settings so the call honors
SdkBuilder::with_settings() and the SDK's retry/timeout policy.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: c7a31a89-fb63-46a6-af36-cebcad6b41dd
📒 Files selected for processing (2)
.gitignorepackages/rs-sdk/src/sdk.rs
| match CurrentQuorumsInfo::fetch_unproved_with_settings( | ||
| self, | ||
| NoParamQuery {}, | ||
| RequestSettings::default(), |
There was a problem hiding this comment.
Use the SDK’s configured request settings for the bootstrap RPC.
Line 360 hardcodes RequestSettings::default(), so this new pre-parse RPC ignores both the SDK default retry policy and any caller overrides from SdkBuilder::with_settings(). That makes the first proof-backed request run under a different timeout/retry policy than every other SDK call.
Suggested fix
match CurrentQuorumsInfo::fetch_unproved_with_settings(
self,
NoParamQuery {},
- RequestSettings::default(),
+ self.dapi_client_settings,
)📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| match CurrentQuorumsInfo::fetch_unproved_with_settings( | |
| self, | |
| NoParamQuery {}, | |
| RequestSettings::default(), | |
| match CurrentQuorumsInfo::fetch_unproved_with_settings( | |
| self, | |
| NoParamQuery {}, | |
| self.dapi_client_settings, |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@packages/rs-sdk/src/sdk.rs` around lines 357 - 360, The bootstrap RPC call
uses RequestSettings::default() which ignores the SDK-wide settings and caller
overrides; replace that hardcoded default with the SDK instance's configured
RequestSettings (the field on the client, e.g., self.request_settings or
self.settings) and pass that into
CurrentQuorumsInfo::fetch_unproved_with_settings so the call honors
SdkBuilder::with_settings() and the SDK's retry/timeout policy.
|
✅ DashSDKFFI.xcframework built for this PR.
SwiftPM (host the zip at a stable URL, then use): .binaryTarget(
name: "DashSDKFFI",
url: "https://your.cdn.example/DashSDKFFI.xcframework.zip",
checksum: "c4e7ddc282704f0a475ba2a8f9f187d52feede046a90605ef3479195aac1590b"
)Xcode manual integration:
|
| { | ||
| // Learn the network protocol version before the first proof parse. | ||
| // No-op after the first successful call (and for pinned / mock SDKs). | ||
| self.ensure_protocol_version_bootstrapped().await; |
There was a problem hiding this comment.
I think calling this function in SdkBuilder::build() will be simpler and (marginally) cheaper.
thepastaclaw
left a comment
There was a problem hiding this comment.
Code Review
The detached HEAD commit fd1e4a2329f95ba2fa24d9ae0bccce9f3939618f is a small repo-hygiene change that deletes .claude/scheduled_tasks.lock and broadens .gitignore from .claude/worktrees/ to .claude/. That change is otherwise safe, but the broader ignore rule now covers an already tracked subtree under .claude/, which will hide future additions there from git status unless contributors force-add them.
Reviewed commit: fd1e4a2
🟡 1 suggestion(s)
1 additional finding
🟡 suggestion: Blanket `.claude/` ignore masks new files in an already tracked subtree
.gitignore (line 93)
This repository already tracks .claude/skills/pr-description/SKILL.md, so changing the ignore rule from .claude/worktrees/ to .claude/ makes future files under intentionally versioned .claude/* paths invisible to normal Git workflows. Existing tracked files remain visible, but any new skill metadata or other committed assets under .claude/ will be skipped by git status and require git add -f, which is easy to miss and creates avoidable maintenance risk. Keep the ignore scoped to local Claude state or add negations for the tracked subtree.
💡 Suggested change
__pycache__/
.claude/*
!.claude/skills/
!.claude/skills/**
🤖 Prompt for all review comments with AI agents
These findings are from an automated code review. Verify each finding against the current code and only fix it if needed.
In `.gitignore`:
- [SUGGESTION] line 93: Blanket `.claude/` ignore masks new files in an already tracked subtree
This repository already tracks `.claude/skills/pr-description/SKILL.md`, so changing the ignore rule from `.claude/worktrees/` to `.claude/` makes future files under intentionally versioned `.claude/*` paths invisible to normal Git workflows. Existing tracked files remain visible, but any new skill metadata or other committed assets under `.claude/` will be skipped by `git status` and require `git add -f`, which is easy to miss and creates avoidable maintenance risk. Keep the ignore scoped to local Claude state or add negations for the tracked subtree.
thepastaclaw
left a comment
There was a problem hiding this comment.
Code Review
The eager-bootstrap fix closes the first-proof-on-older-network gap, but the OnceCell latch treats failure and zero-version responses as permanent success, so a single transient RPC failure can leave the SDK in the exact latest()-fallback state the PR was meant to prevent. Additional issues: bootstrap uses unproved metadata that a single DAPI node can use to pin the cached version (monotonic fetch_max prevents correction), the bootstrap RPC ignores user-configured dapi_client_settings, and the whole bootstrap path has zero test coverage. Minor doc and Arc::clone nits.
Reviewed commit: 923c4af
🔴 1 blocking | 🟡 3 suggestion(s) | 💬 2 nitpick(s)
🤖 Prompt for all review comments with AI agents
These findings are from an automated code review. Verify each finding against the current code and only fix it if needed.
In `packages/rs-sdk/src/sdk.rs`:
- [BLOCKING] lines 351-379: Failed bootstrap (and zero-version responses) permanently disable future protocol-version detection
`ensure_protocol_version_bootstrapped()` uses `OnceCell::get_or_init` with a closure that always returns `()`, even in the `Err` arm and even when `maybe_update_protocol_version` short-circuits on `received_version == 0`. After one transient failure (or a response whose metadata protocol_version is 0 — possible for older nodes or protobuf defaults), `protocol_version_bootstrapped` is permanently initialized while `self.protocol_version` stays at 0. Every subsequent call to `parse_proof_with_metadata_and_proof` then skips bootstrap and falls back to `PlatformVersion::latest()` for the rest of the SDK's lifetime — the exact broken state this PR is meant to fix. Store `Result<(), Error>` in the OnceCell (or use a more granular latch) so that only a *successful* version discovery marks bootstrap as complete, and transient failures get retried.
- [SUGGESTION] lines 337-380: Unproved bootstrap metadata can pin the SDK's protocol_version
The bootstrap value comes from `ResponseMetadata.protocol_version` of an *unproved* `CurrentQuorumsInfo` response. Because `maybe_update_protocol_version` uses `fetch_max` and only accepts monotonically increasing known versions, a single DAPI node that wins the bootstrap RPC can return the highest-known version and pin the cached version there; any later honest proof-backed metadata carrying the real lower network version is silently discarded. This widens the SDK's attack surface compared to the previous `latest()` fallback — an attacker can cause proof-parse failures (DoS) against a client whose network is on a lower version. Consider cross-checking the bootstrap metadata against multiple peers, or only treating the bootstrap version as a hint that is confirmed by the first proof-backed response.
- [SUGGESTION] lines 357-362: Bootstrap RPC ignores the user-configured dapi_client_settings
`CurrentQuorumsInfo::fetch_unproved_with_settings(self, NoParamQuery {}, RequestSettings::default())` discards `self.dapi_client_settings`, so timeouts, retries, and ban policy set on the `SdkBuilder` are silently ignored for the bootstrap call. This runs on the critical path of the very first proof-backed request, so a user who configured longer timeouts for a slow network (or stricter retry/ban policy) will instead get library defaults here. Pass `self.dapi_client_settings` (or an explicit, documented bootstrap-specific RequestSettings) instead.
- [SUGGESTION] lines 337-380: No tests exercise the bootstrap RPC path itself
The diff adds no new tests. The existing tests target `verify_response_metadata` / `maybe_update_protocol_version` via mock SDKs, but `ensure_protocol_version_bootstrapped` early-returns for mocks, so the bootstrap logic — which is the entire point of this PR — has no automated coverage. Important untested behaviours include: idempotence of the OnceCell under concurrent first parses, correct skip for pinned and mock SDKs, correct behaviour when the bootstrap RPC fails, and that the cached version is actually updated before the first proof parse.
| let bootstrapped = Arc::clone(&self.protocol_version_bootstrapped); | ||
| bootstrapped | ||
| .get_or_init(|| async { | ||
| use crate::platform::FetchUnproved; | ||
| use drive_proof_verifier::types::{CurrentQuorumsInfo, NoParamQuery}; | ||
|
|
||
| match CurrentQuorumsInfo::fetch_unproved_with_settings( | ||
| self, | ||
| NoParamQuery {}, | ||
| RequestSettings::default(), | ||
| ) | ||
| .await | ||
| { | ||
| Ok((_, metadata)) => { | ||
| self.maybe_update_protocol_version(metadata.protocol_version); | ||
| tracing::debug!( | ||
| version = metadata.protocol_version, | ||
| "SDK auto-detect bootstrap succeeded" | ||
| ); | ||
| } | ||
| Err(err) => { | ||
| tracing::warn!( | ||
| %err, | ||
| "SDK auto-detect bootstrap RPC failed; falling back to PlatformVersion::latest() for the first request" | ||
| ); | ||
| } | ||
| } | ||
| }) | ||
| .await; |
There was a problem hiding this comment.
🔴 Blocking: Failed bootstrap (and zero-version responses) permanently disable future protocol-version detection
ensure_protocol_version_bootstrapped() uses OnceCell::get_or_init with a closure that always returns (), even in the Err arm and even when maybe_update_protocol_version short-circuits on received_version == 0. After one transient failure (or a response whose metadata protocol_version is 0 — possible for older nodes or protobuf defaults), protocol_version_bootstrapped is permanently initialized while self.protocol_version stays at 0. Every subsequent call to parse_proof_with_metadata_and_proof then skips bootstrap and falls back to PlatformVersion::latest() for the rest of the SDK's lifetime — the exact broken state this PR is meant to fix. Store Result<(), Error> in the OnceCell (or use a more granular latch) so that only a successful version discovery marks bootstrap as complete, and transient failures get retried.
source: ['claude-general', 'codex-general', 'claude-security-auditor', 'codex-security-auditor', 'claude-rust-quality', 'codex-rust-quality']
🤖 Fix this with AI agents
These findings are from an automated code review. Verify each finding against the current code and only fix it if needed.
In `packages/rs-sdk/src/sdk.rs`:
- [BLOCKING] lines 351-379: Failed bootstrap (and zero-version responses) permanently disable future protocol-version detection
`ensure_protocol_version_bootstrapped()` uses `OnceCell::get_or_init` with a closure that always returns `()`, even in the `Err` arm and even when `maybe_update_protocol_version` short-circuits on `received_version == 0`. After one transient failure (or a response whose metadata protocol_version is 0 — possible for older nodes or protobuf defaults), `protocol_version_bootstrapped` is permanently initialized while `self.protocol_version` stays at 0. Every subsequent call to `parse_proof_with_metadata_and_proof` then skips bootstrap and falls back to `PlatformVersion::latest()` for the rest of the SDK's lifetime — the exact broken state this PR is meant to fix. Store `Result<(), Error>` in the OnceCell (or use a more granular latch) so that only a *successful* version discovery marks bootstrap as complete, and transient failures get retried.
| async fn ensure_protocol_version_bootstrapped(&self) { | ||
| if !self.auto_detect_protocol_version { | ||
| return; | ||
| } | ||
| // If we've already seen a response (protocol_version != 0), the | ||
| // version is already cached — skip the bootstrap entirely. | ||
| if self.protocol_version.load(Ordering::Relaxed) != 0 { | ||
| return; | ||
| } | ||
| // Mock SDKs have no real network to bootstrap against. | ||
| if !matches!(self.inner, SdkInstance::Dapi { .. }) { | ||
| return; | ||
| } | ||
|
|
||
| let bootstrapped = Arc::clone(&self.protocol_version_bootstrapped); | ||
| bootstrapped | ||
| .get_or_init(|| async { | ||
| use crate::platform::FetchUnproved; | ||
| use drive_proof_verifier::types::{CurrentQuorumsInfo, NoParamQuery}; | ||
|
|
||
| match CurrentQuorumsInfo::fetch_unproved_with_settings( | ||
| self, | ||
| NoParamQuery {}, | ||
| RequestSettings::default(), | ||
| ) | ||
| .await | ||
| { | ||
| Ok((_, metadata)) => { | ||
| self.maybe_update_protocol_version(metadata.protocol_version); | ||
| tracing::debug!( | ||
| version = metadata.protocol_version, | ||
| "SDK auto-detect bootstrap succeeded" | ||
| ); | ||
| } | ||
| Err(err) => { | ||
| tracing::warn!( | ||
| %err, | ||
| "SDK auto-detect bootstrap RPC failed; falling back to PlatformVersion::latest() for the first request" | ||
| ); | ||
| } | ||
| } | ||
| }) | ||
| .await; | ||
| } |
There was a problem hiding this comment.
🟡 Suggestion: Unproved bootstrap metadata can pin the SDK's protocol_version
The bootstrap value comes from ResponseMetadata.protocol_version of an unproved CurrentQuorumsInfo response. Because maybe_update_protocol_version uses fetch_max and only accepts monotonically increasing known versions, a single DAPI node that wins the bootstrap RPC can return the highest-known version and pin the cached version there; any later honest proof-backed metadata carrying the real lower network version is silently discarded. This widens the SDK's attack surface compared to the previous latest() fallback — an attacker can cause proof-parse failures (DoS) against a client whose network is on a lower version. Consider cross-checking the bootstrap metadata against multiple peers, or only treating the bootstrap version as a hint that is confirmed by the first proof-backed response.
source: ['claude-general', 'claude-security-auditor', 'codex-security-auditor', 'codex-rust-quality']
🤖 Fix this with AI agents
These findings are from an automated code review. Verify each finding against the current code and only fix it if needed.
In `packages/rs-sdk/src/sdk.rs`:
- [SUGGESTION] lines 337-380: Unproved bootstrap metadata can pin the SDK's protocol_version
The bootstrap value comes from `ResponseMetadata.protocol_version` of an *unproved* `CurrentQuorumsInfo` response. Because `maybe_update_protocol_version` uses `fetch_max` and only accepts monotonically increasing known versions, a single DAPI node that wins the bootstrap RPC can return the highest-known version and pin the cached version there; any later honest proof-backed metadata carrying the real lower network version is silently discarded. This widens the SDK's attack surface compared to the previous `latest()` fallback — an attacker can cause proof-parse failures (DoS) against a client whose network is on a lower version. Consider cross-checking the bootstrap metadata against multiple peers, or only treating the bootstrap version as a hint that is confirmed by the first proof-backed response.
| match CurrentQuorumsInfo::fetch_unproved_with_settings( | ||
| self, | ||
| NoParamQuery {}, | ||
| RequestSettings::default(), | ||
| ) | ||
| .await |
There was a problem hiding this comment.
🟡 Suggestion: Bootstrap RPC ignores the user-configured dapi_client_settings
CurrentQuorumsInfo::fetch_unproved_with_settings(self, NoParamQuery {}, RequestSettings::default()) discards self.dapi_client_settings, so timeouts, retries, and ban policy set on the SdkBuilder are silently ignored for the bootstrap call. This runs on the critical path of the very first proof-backed request, so a user who configured longer timeouts for a slow network (or stricter retry/ban policy) will instead get library defaults here. Pass self.dapi_client_settings (or an explicit, documented bootstrap-specific RequestSettings) instead.
source: ['claude-rust-quality']
🤖 Fix this with AI agents
These findings are from an automated code review. Verify each finding against the current code and only fix it if needed.
In `packages/rs-sdk/src/sdk.rs`:
- [SUGGESTION] lines 357-362: Bootstrap RPC ignores the user-configured dapi_client_settings
`CurrentQuorumsInfo::fetch_unproved_with_settings(self, NoParamQuery {}, RequestSettings::default())` discards `self.dapi_client_settings`, so timeouts, retries, and ban policy set on the `SdkBuilder` are silently ignored for the bootstrap call. This runs on the critical path of the very first proof-backed request, so a user who configured longer timeouts for a slow network (or stricter retry/ban policy) will instead get library defaults here. Pass `self.dapi_client_settings` (or an explicit, documented bootstrap-specific RequestSettings) instead.
| async fn ensure_protocol_version_bootstrapped(&self) { | ||
| if !self.auto_detect_protocol_version { | ||
| return; | ||
| } | ||
| // If we've already seen a response (protocol_version != 0), the | ||
| // version is already cached — skip the bootstrap entirely. | ||
| if self.protocol_version.load(Ordering::Relaxed) != 0 { | ||
| return; | ||
| } | ||
| // Mock SDKs have no real network to bootstrap against. | ||
| if !matches!(self.inner, SdkInstance::Dapi { .. }) { | ||
| return; | ||
| } | ||
|
|
||
| let bootstrapped = Arc::clone(&self.protocol_version_bootstrapped); | ||
| bootstrapped | ||
| .get_or_init(|| async { | ||
| use crate::platform::FetchUnproved; | ||
| use drive_proof_verifier::types::{CurrentQuorumsInfo, NoParamQuery}; | ||
|
|
||
| match CurrentQuorumsInfo::fetch_unproved_with_settings( | ||
| self, | ||
| NoParamQuery {}, | ||
| RequestSettings::default(), | ||
| ) | ||
| .await | ||
| { | ||
| Ok((_, metadata)) => { | ||
| self.maybe_update_protocol_version(metadata.protocol_version); | ||
| tracing::debug!( | ||
| version = metadata.protocol_version, | ||
| "SDK auto-detect bootstrap succeeded" | ||
| ); | ||
| } | ||
| Err(err) => { | ||
| tracing::warn!( | ||
| %err, | ||
| "SDK auto-detect bootstrap RPC failed; falling back to PlatformVersion::latest() for the first request" | ||
| ); | ||
| } | ||
| } | ||
| }) | ||
| .await; | ||
| } |
There was a problem hiding this comment.
🟡 Suggestion: No tests exercise the bootstrap RPC path itself
The diff adds no new tests. The existing tests target verify_response_metadata / maybe_update_protocol_version via mock SDKs, but ensure_protocol_version_bootstrapped early-returns for mocks, so the bootstrap logic — which is the entire point of this PR — has no automated coverage. Important untested behaviours include: idempotence of the OnceCell under concurrent first parses, correct skip for pinned and mock SDKs, correct behaviour when the bootstrap RPC fails, and that the cached version is actually updated before the first proof parse.
source: ['claude-general', 'claude-rust-quality']
🤖 Fix this with AI agents
These findings are from an automated code review. Verify each finding against the current code and only fix it if needed.
In `packages/rs-sdk/src/sdk.rs`:
- [SUGGESTION] lines 337-380: No tests exercise the bootstrap RPC path itself
The diff adds no new tests. The existing tests target `verify_response_metadata` / `maybe_update_protocol_version` via mock SDKs, but `ensure_protocol_version_bootstrapped` early-returns for mocks, so the bootstrap logic — which is the entire point of this PR — has no automated coverage. Important untested behaviours include: idempotence of the OnceCell under concurrent first parses, correct skip for pinned and mock SDKs, correct behaviour when the bootstrap RPC fails, and that the cached version is actually updated before the first proof parse.
| /// Skipped entirely for SDKs built with an explicit version | ||
| /// ([`SdkBuilder::with_version()`]), for mock SDKs, and any time this | ||
| /// helper is entered from within the unproved request path itself | ||
| /// (to avoid re-entry). |
There was a problem hiding this comment.
💬 Nitpick: Doc comment claims a re-entry guard that doesn't exist
The doc says the helper is Skipped entirely ... any time this helper is entered from within the unproved request path itself (to avoid re-entry). There is no such guard in the implementation — re-entry is prevented only by the structural fact that FetchUnproved::fetch_unproved_with_settings does not call parse_proof_with_metadata_and_proof. Either add an explicit guard or fix the doc to describe the actual invariant (so a future refactor doesn't silently introduce a deadlock on the OnceCell).
source: ['claude-general', 'claude-security-auditor', 'claude-rust-quality']
| let bootstrapped = Arc::clone(&self.protocol_version_bootstrapped); | ||
| bootstrapped |
There was a problem hiding this comment.
💬 Nitpick: Redundant Arc::clone before get_or_init
let bootstrapped = Arc::clone(&self.protocol_version_bootstrapped); bootstrapped.get_or_init(...) bumps the Arc count only to call a method that takes &self. self.protocol_version_bootstrapped.get_or_init(...).await works just as well.
source: ['claude-rust-quality']
Summary
Close the bootstrap hole in the auto-detect protocol version feature from #3483.
Before: On a fresh auto-detect SDK the first `parse_proof_with_metadata_and_proof` call uses `PlatformVersion::latest()` as a fallback because no response metadata has been seen yet. On an older network whose proof interpretation differs from `latest()`, the very first proof-backed request fails before the SDK ever learns the correct version. The old doc comment on `parse_proof_with_metadata_and_proof` called this out as a known limitation and told users to pin the version explicitly via `SdkBuilder::with_version()` if they cared.
After: The first time `parse_proof_with_metadata_and_proof` runs on an auto-detect SDK, it transparently kicks off a one-shot `CurrentQuorumsInfo` unproved RPC, reads `metadata.protocol_version` from the response, and updates the SDK's cached version before the proof parse executes. A `tokio::sync::OnceCell` guarantees the bootstrap RPC runs at most once per SDK (and its clones) even under concurrent first calls — subsequent callers wait for the in-flight bootstrap to finish.
Design notes
Test plan
🤖 Generated with Claude Code
Summary by CodeRabbit
Release Notes
New Features
Chores
.gitignoreconfiguration.