Skip to content

Conversation

@LevinMK23
Copy link

Description

Fixes #9548

This PR fixes the auto-renewal behavior in the broker pallet to match the documented behavior.

Problem: When auto-renewal fails due to insufficient funds or other errors, the system disables the auto-renewal setting entirely, requiring manual re-enablement.

Solution: The auto-renewal setting now persists across multiple periods even when renewal attempts fail, as stated in the documentation: "Even if an auto-renewal attempt fails, the auto-renewal setting remains active for subsequent sales."

Integration

For downstream projects using pallet-broker:

  • No breaking changes
  • Auto-renewal will now retry automatically after failures
  • Existing code continues to work without modifications

Review Notes

Changes made:

  1. Modified renew_cores() in tick_impls.rs to return Some(AutoRenewalRecord) instead of None on failures
  2. Updated next_renewal to sale.region_end for retry in the next period
  3. Updated existing test auto_renewal_works to expect new behavior
  4. Added new test auto_renewal_persists_after_failure to verify the fix

Before:

  • Failed renewal → auto-renewal setting deleted

After:

  • Failed renewal → auto-renewal setting preserved for next attempt

Checklist

  • My PR includes a detailed description as outlined above
  • My PR follows the labeling requirements (T14-system_parachains)
  • I have added tests that prove my fix is effective
  • PRDoc file included

mi.levin added 2 commits October 31, 2025 12:17
   Fixes paritytech#9548

   Auto-renewal setting now persists across multiple periods even when
   renewal attempts fail due to insufficient funds or other errors.
   This matches the documented behavior.
@LevinMK23 LevinMK23 requested a review from a team as a code owner October 31, 2025 09:35
@cla-bot-2021
Copy link

cla-bot-2021 bot commented Oct 31, 2025

User @LevinMK23, please sign the CLA here.

@github-actions
Copy link
Contributor

Command "prdoc --audience runtime_dev --bump patch
/cmd label T14-system_parachains I2-bug" has failed ❌! See logs here

@LevinMK23
Copy link
Author

/cmd label T14-system_parachains I2-bug C1-mentor

@github-actions
Copy link
Contributor

Command "label T14-system_parachains I2-bug C1-mentor" has failed ❌! See logs here

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.

Auto-renewal gets disabled after failed payment attempts

1 participant