Skip to content

fix: fund action scenarios through delegated payers - #339

Open
snawaz wants to merge 1 commit into
fix/foreign-settlement-fee-vaultfrom
fix/paid-action-fixtures
Open

snawaz wants to merge 1 commit into
fix/foreign-settlement-fee-vaultfrom
fix/paid-action-fixtures

Conversation

@snawaz

@snawaz snawaz commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

What changed

Use delegated payers and the validator fee vault for mixed-action and standalone-action recovery scenarios, supporting the payment requirement in validator #1924.

Check the sponsored commit allowance before delegating the accounting payer, then run paid actions. Use the existing funder for base-chain redelegation while keeping the owner’s signature.

Stacked on #337. Validator #1924 pins CI to this fix.

The validator's action-payment fix rejects fee-bearing work from
non-delegated payers. Existing mixed-action and standalone recovery cases
used that unpaid path, even though their assertions concern settlement,
accounting, and recovery rather than free execution.

Run sponsored-quota checks before delegating the accounting scenario's
payer, refresh the expected cell state, and then exercise paid action
bundles. Fund subsequent base-chain redelegation from the existing funder
while retaining the cell owner's signature.

Delegate the standalone recovery payer after its base setup, wait for its
ER account, and include the validator fee vault. Keep the original
recovery and exactly-once-effect assertions.

Supports magicblock-labs/magicblock-validator#1913
@coderabbitai

coderabbitai Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The committor scenarios now delegate action payers through the ER and update sponsored-quota checks and redelegation order.

Changes: Action recovery

Layer / File(s) Summary
Delegate payer before action submission
redshift/src/scenarios/committor/commit_recovery.rs
action_blackout delegates the payer to the ER and waits for delegation before submitting the standalone action. The intent bundle uses the ER identity as its validator.

Intent execution and accounting

Layer / File(s) Summary
Update quota state and redelegation order
redshift/src/scenarios/committor/intent_execution_and_accounting.rs
The quota check updates actor 0’s expected cell header after undelegation. Redelegation uses the fixture funder with the payer as a cosigner. The run checks the quota and redelegates actor 0 before the mixed-bundle cases, removing the later duplicate steps.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Possibly related PRs

Suggested reviewers: bmuddha

Merge Risk: Minimal · up to 4a1a7

This change only updates test scenarios for the validator's paid-action requirement. No production behavior changes, and no actionable merge-blocking risk was found.

Pre-merge checks: Passed 5

Check name Status Explanation
Title check Passed The title clearly summarizes the main change: funding action scenarios through delegated payers.
Description check Passed The description directly explains the delegated payer, validator fee vault, quota, and redelegation changes in the changeset.
Docstring Coverage Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
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.
Full details: Docstring Coverage

Explanation

Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 4 functions across 2 files.

Finishing Touches

Generate docstrings

  • Commit to this branch
  • Create a new PR
Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Some tools did not complete. Review the errors below.

Clippy (1.99.1)

Clippy execution failed

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

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 1488223 and 4a1a782.

Files selected for processing: 2

  • redshift/src/scenarios/committor/commit_recovery.rs
  • redshift/src/scenarios/committor/intent_execution_and_accounting.rs

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

@snawaz snawaz added the bug Something isn't working label Nov 10, 2026 — with ChatGPT Codex Connector
@snawaz snawaz self-assigned this Nov 10, 2026
@snawaz
snawaz added this pull request to stack #340 November 10, 2026 16:31
@snawaz
snawaz marked this pull request as ready for review November 11, 2026 13:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant