Skip to content

feat: normalize gRPC backfill#1201

Merged
thlorenz merged 6 commits into
masterfrom
thlorenz/normalize-grpc
May 19, 2026
Merged

feat: normalize gRPC backfill#1201
thlorenz merged 6 commits into
masterfrom
thlorenz/normalize-grpc

Conversation

@thlorenz
Copy link
Copy Markdown
Collaborator

@thlorenz thlorenz commented May 15, 2026

Summary

Normalize gRPC backfill handling so every gRPC endpoint is treated as backfill-capable, and all subscription paths consistently derive from_slot from the shared chain slot.

Details

magicblock-chainlink

  • Removed provider-specific gRPC endpoint gating and backfill capability detection. Generic gRPC endpoints with an API key are now accepted instead of only Helius/Triton-shaped URLs.
  • Made ChainSlot::compute_from_slot() return a concrete slot value, saturating to 0 during bootstrap or low-slot cases.
  • Updated account, optimization, and program subscription flows so gRPC requests always set from_slot using the chain-slot-derived value.
  • Simplified gRPC client behavior now that all gRPC providers are considered backfill-capable from the caller’s perspective.
  • Cleaned up stale provider-specific wording and regression tests around optional/missing from_slot behavior.

Summary by CodeRabbit

  • Breaking Changes

    • gRPC endpoints now require explicit API key validation instead of relying on endpoint allowlists.
  • Refactor

    • Simplified chain slot and backfill initialization by removing optional configurations. Chain slot tracking is now always required, and backfill support is now unconditionally enabled across all provider implementations.

Review Change Stack

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 15, 2026

Manual Deploy Available

You can trigger a manual deploy of this PR branch to testnet:

Deploy to Testnet 🚀

Alternative: Comment /deploy on this PR to trigger deployment directly.

⚠️ Note: Manual deploy requires authorization. Only authorized users can trigger deployments.

Comment updated automatically when the PR is synchronized.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 15, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: db9af0d5-7475-42c5-8d15-bc2fc128e1e4

📥 Commits

Reviewing files that changed from the base of the PR and between 5c82aa5 and eec4133.

📒 Files selected for processing (7)
  • magicblock-chainlink/src/remote_account_provider/chain_laser_actor/actor.rs
  • magicblock-chainlink/src/remote_account_provider/chain_laser_actor/stream_manager.rs
  • magicblock-chainlink/src/remote_account_provider/chain_laser_client.rs
  • magicblock-chainlink/src/remote_account_provider/chain_slot.rs
  • magicblock-chainlink/src/remote_account_provider/chain_updates_client.rs
  • magicblock-chainlink/src/remote_account_provider/endpoint.rs
  • magicblock-chainlink/src/remote_account_provider/errors.rs
💤 Files with no reviewable changes (1)
  • magicblock-chainlink/src/remote_account_provider/errors.rs

📝 Walkthrough

Walkthrough

This PR refactors the remote account provider to eliminate optional backfill capability tracking. Endpoint::Grpc now requires an api_key field instead of storing supports_backfill, and endpoint validation requires the API key to be present. ChainSlot::compute_from_slot returns a mandatory u64 instead of Option<u64>. StreamManager now requires a non-optional ChainSlot and all from_slot parameters are mandatory u64 values. All gRPC subscription requests now unconditionally set from_slot to a concrete value. Error handling updates the enum to replace UnsupportedGrpcEndpoint with InvalidPubsubEndpoint.

Suggested reviewers

  • snawaz
  • GabrielePicco
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch thlorenz/normalize-grpc

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@thlorenz thlorenz marked this pull request as draft May 15, 2026 06:41
@thlorenz thlorenz requested a review from GabrielePicco May 15, 2026 06:41
* master:
  fix: unique txs for callbacks with same data and within same blockchash (#1196)
@thlorenz thlorenz marked this pull request as ready for review May 15, 2026 07:02
Copy link
Copy Markdown
Collaborator

@GabrielePicco GabrielePicco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@thlorenz thlorenz merged commit f162228 into master May 19, 2026
33 checks passed
@thlorenz thlorenz deleted the thlorenz/normalize-grpc branch May 19, 2026 08:34
thlorenz added a commit that referenced this pull request May 19, 2026
* master:
  feat: normalize gRPC backfill (#1201)
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.

2 participants