Skip to content

fix: harden supervisor recovery and stuck scan#207

Open
liobrasil wants to merge 3 commits intoholyfuchs/supervisor-fixfrom
lionel/fix-supervisor-scan-recovery
Open

fix: harden supervisor recovery and stuck scan#207
liobrasil wants to merge 3 commits intoholyfuchs/supervisor-fixfrom
lionel/fix-supervisor-scan-recovery

Conversation

@liobrasil
Copy link
Contributor

Summary

  • add the final supervisor regression coverage for duplicate recoveries and mixed recurring/non-recurring scan sets
  • fix duplicate recovery churn by treating in-flight executed recurring transactions as active until rebalance state advances
  • restrict stuck-scan ordering to recurring participants and lazily prune stale non-recurring entries during candidate walks
  • align scheduler docs/comments with the recurring-only scan behavior

Verification

  • flow test cadence/tests/scheduler_mixed_population_regression_test.cdc
  • flow test cadence/tests/scheduled_supervisor_test.cdc

return true
}

if status == FlowTransactionScheduler.Status.Executed
Copy link
Member

Choose a reason for hiding this comment

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

This is the same issue we faced in onflow/FlowYieldVaultsEVM#70
The problem with the fix is that if the transaction panics, lastRebalanceTimestamp is not updated. This makes the rebalancer permanantely stuck because it's Executed and the lastRebalanceTimestamp was never updated.
You might want to consider a grace period based fix.

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