Skip to content

feat: Planck profile#437

Draft
czareko wants to merge 14 commits intomainfrom
feat/planck_profile
Draft

feat: Planck profile#437
czareko wants to merge 14 commits intomainfrom
feat/planck_profile

Conversation

@czareko
Copy link
Copy Markdown
Collaborator

@czareko czareko commented Mar 16, 2026

Need to evaluate if this is worth doing...

Scheduler: fix Lookup/Agenda consistency for deferred named tasks

When service_task cannot execute a named task (preimage unavailable or temporarily overweight), the task returns to the Agenda for future resolution. Previously the Lookup entry was removed eagerly before the outcome was known, leaving the task unreachable by name -- cancel_named and reschedule_named would both fail with NotFound.

This is a concrete problem for reversible-transfers: if a transfer finalization task is deferred due to block weight pressure, cancel_transfer calls cancel_named which fails, and the transfer executes unhindered despite the user's cancellation attempt.

Changes:

  • service_task: Lookup is now only removed on terminal outcomes (successful dispatch, permanently overweight). Tasks that return to the Agenda keep their Lookup and preimage reference intact.
  • do_cancel_named: Returns NotFound when the Lookup points to an empty or out-of-range Agenda slot, instead of silently succeeding and emitting a false Canceled event.
  • Docs: Added known-limitation section for stranded tasks when preimage is unavailable.

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