Skip to content

fix: delegate with any validator#53

Merged
Dodecahedr0x merged 4 commits into
mainfrom
dode/fix-delegate
Jun 8, 2026
Merged

fix: delegate with any validator#53
Dodecahedr0x merged 4 commits into
mainfrom
dode/fix-delegate

Conversation

@Dodecahedr0x

@Dodecahedr0x Dodecahedr0x commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

Closes #54

Summary by CodeRabbit

  • Chores

    • Updated the SDK dependency to track a specific Git revision instead of stable releases, enabling better development control and flexibility
    • Reformatted dependency configuration declarations to improve consistency and maintainability across the workspace
  • Refactor

    • Updated delegation logic implementation to use an alternative function call approach for improved handling

@coderabbitai

coderabbitai Bot commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@Dodecahedr0x, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 17 minutes and 44 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 074351d8-4bdf-42c0-90a3-a4db5fc58781

📥 Commits

Reviewing files that changed from the base of the PR and between 27ee12c and 3dad4b0.

⛔ Files ignored due to path filters (3)
  • Cargo.lock is excluded by !**/*.lock
  • program/tests/integration/use-randomness/Cargo.lock is excluded by !**/*.lock
  • program/tests/integration/use-randomness/tests/fixtures/dlp.so is excluded by !**/*.so
📒 Files selected for processing (1)
  • Cargo.toml

Walkthrough

The ephemeral-rollups-sdk dependency is updated from crates.io to a specific Git revision. The delegate_oracle_queue module imports and calls the new delegate_account_with_any_validator CPI function instead of delegate_account, using the same parameters. A minor feature formatting change is applied to solana-pubkey-compat.

Changes

Ephemeral Rollups SDK Update and CPI Migration

Layer / File(s) Summary
Dependency updates
Cargo.toml
The ephemeral-rollups-sdk dependency is pinned to a Git revision instead of a crates.io version. solana-pubkey-compat features are reformatted to multiline syntax without functional change.
CPI function migration
program/src/delegate_oracle_queue.rs
The module imports delegate_account_with_any_validator and switches the delegation CPI invocation to use that function instead of delegate_account, passing the same arguments.

🎯 2 (Simple) | ⏱️ ~8 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'fix: delegate with any validator' directly corresponds to the main change: switching the delegation CPI call from delegate_account to delegate_account_with_any_validator in the Oracle queue processing.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch dode/fix-delegate

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@Cargo.toml`:
- Line 32: The dependency entry for ephemeral-rollups-sdk pins a Git commit by
rev (30866291a6bbc6c620941beeabcc8b70fae0ea8e); either change the dependency to
use a release tag (e.g., replace rev = "..." with tag = "vX.Y.Z") if a tag
exists for that commit, or if no tag is available, add a short comment in
Cargo.toml next to ephemeral-rollups-sdk documenting why this exact rev is
pinned and what it corresponds to (branch name refs/heads/dode/rust-confined and
any relevant PR or milestone) so future maintainers understand the pin.
🪄 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: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 2dc532a7-c09e-4f57-8127-70a21e5ba9af

📥 Commits

Reviewing files that changed from the base of the PR and between 76c9137 and 27ee12c.

⛔ Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (2)
  • Cargo.toml
  • program/src/delegate_oracle_queue.rs

Comment thread Cargo.toml Outdated
@Dodecahedr0x Dodecahedr0x self-assigned this Jun 8, 2026

@GabrielePicco GabrielePicco left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM, but let's merge once the SDK is released so that we don't depend on a github version

@Dodecahedr0x Dodecahedr0x merged commit 5de1f39 into main Jun 8, 2026
4 checks passed
@GabrielePicco GabrielePicco deleted the dode/fix-delegate branch June 11, 2026 07:46
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.

fix: update delegate with any validator

2 participants