Skip to content

[DashVM 5.0-dev] Implement time-only live-paid schedules and removal settlement #4688

Open

Description

@QuantumExplorer

Implement time-only live-paid schedules and removal settlement

Parent: #4626 · Complete tracking register

Proposed target: 5.0-dev. This is a workstream tracking issue, not a claim that the release branch exists or the implementation is done. Owner: QuantumExplorer. Dates and effort remain unset.

Scope

Integrate ordered time-only jobs, latest routing, Drop/Skip/Retry, first-payment-failure removal, existing prefund purpose isolation, cancellation/refunds and real scheduled-host-fault recovery rehearsals.

Specification

DVM-08 · DVM-06 · DVM-07

The current parent acceptance and module/capability appendices remain authoritative; these DIP drafts add proposed engineering detail without silently approving open allocations.

Completion criteria

Complete every listed task acceptance item, its applicable capability matrix, and the linked specification vectors. Record actual PR/test evidence; drafting is not production completion.

Task acceptance

R06-09

  • Build the scheduling integration needed for contract calls with bounded processing, correct fee-pool accounting and a prepaid drop cost; specify live payment/payer rules instead of requiring full future execution prepayment.

Q28 (confirmed): Every scheduled job declares an authorized contract balance bucket as execution/storage payer. The submitting signer pays registration; check live payer authority and funds before each run. Additional payers require explicit authorization. Q29 (confirmed direction): The routine declares Drop, Retry or Skip after deterministic execution failure. Specify bounded retry counts/intervals and exhaustion behavior. Each real attempt pays once; internal speculation is not an attempt. Preserve first-inability-to-pay removal using the prepaid drop reserve. Q31 (confirmed): Each scheduled job declares its cancellation authority and reserves removal costs. Charge removal and return unused reserves to their recorded owner, or the current processing pool if that owner is a wiped contract. Preserve funded removal across fee upgrades or settle affected old jobs first.

Prerequisites: R06-01.

Dependents: R06-04, R10-05.

Modules: JOBS, JOBS_STORE, FEES. Original task context.

R06-10

  • Test scheduling conservation, blocks with only scheduled work, bounded backlog processing, first-payment-failure removal, prepaid removal cost and fee-table changes using the selected live-payment model.

Q29 (confirmed direction): The routine declares Drop, Retry or Skip after deterministic execution failure. Specify bounded retry counts/intervals and exhaustion behavior. Each real attempt pays once; internal speculation is not an attempt. Preserve first-inability-to-pay removal using the prepaid drop reserve. Q31 (confirmed): Each scheduled job declares its cancellation authority and reserves removal costs. Charge removal and return unused reserves to their recorded owner, or the current processing pool if that owner is a wiped contract. Preserve funded removal across fee upgrades or settle affected old jobs first.

Prerequisites: None recorded.

Dependents: None recorded.

Modules: JOBS, INTEGRATION, ASSETS. Original task context.

R10-05

  • Implement authorized live-paid scheduling, declared Drop/Retry/Skip, bounded retries, first-payment-failure removal, frozen-execution pause and explicit cancellation settlement.

Q28 (confirmed): Every scheduled job declares an authorized contract balance bucket as execution/storage payer. The submitting signer pays registration; check live payer authority and funds before each run. Additional payers require explicit authorization. Q29 (confirmed direction): The routine declares Drop, Retry or Skip after deterministic execution failure. Specify bounded retry counts/intervals and exhaustion behavior. Each real attempt pays once; internal speculation is not an attempt. Preserve first-inability-to-pay removal using the prepaid drop reserve. Q30 (confirmed direction): Pause execution of jobs whose contract is frozen. Frozen identities/contracts may receive native funds without running frozen guest code; existing asset-specific and receiving permissions still apply. Proposed queue policy resumes future runs without a catch-up burst and cancels permanently missing methods. Q31 (confirmed): Each scheduled job declares its cancellation authority and reserves removal costs. Charge removal and return unused reserves to their recorded owner, or the current processing pool if that owner is a wiped contract. Preserve funded removal across fee upgrades or settle affected old jobs first. Scheduled-job clock: Use only the jobs_due_time queue, with agreed consensus-time deadlines and deterministic tie-breaking. Recurrence and retry delays are time-based. Update job records and the time index atomically on registration, retry, cancellation and removal; reject unsupported scheduling modes before storing a job. Local wall clocks cannot decide consensus execution. Prefunded reuse: Fund scheduled-job removal through the existing 40/128 prefunded ledger. Reuse native add/deduct/fetch/empty/proof operations with purpose-aware validation. Atomically link each reserved amount to its job, recorded payer/refund owner and fee context; remove/refund it once with job and due-time-index settlement. No dedicated DashVM monetary subtree and no future-execution prepayment.

Prerequisites: R10-04, R06-09, R09-03.

Dependents: R10-06, R10-08, R11-12.

Modules: JOBS, JOBS_STORE, FEES. Original task context. Refinements (not extra dependency edges): FIX-03.

R10-08

  • Run mixed direct/nested/recurring-call strategy and upgrade tests across both proposal paths and architectures; cover execution, first-payment-failure removal, cancellation and frozen/unsupported behavior once specified. Native auction/allowance/prepaid-subscription fixtures are not required scope.

Q29 (confirmed direction): The routine declares Drop, Retry or Skip after deterministic execution failure. Specify bounded retry counts/intervals and exhaustion behavior. Each real attempt pays once; internal speculation is not an attempt. Preserve first-inability-to-pay removal using the prepaid drop reserve. Q30 (confirmed direction): Pause execution of jobs whose contract is frozen. Frozen identities/contracts may receive native funds without running frozen guest code; existing asset-specific and receiving permissions still apply. Proposed queue policy resumes future runs without a catch-up burst and cancels permanently missing methods. Scheduled-job clock: Verify time-based due ordering, recurrence, retries, cancellation, frozen-job handling and first-payment-failure removal across both proposal paths. Verify unsupported height/epoch scheduling requests fail without creating jobs or queues; node-local clock differences do not change due jobs.

Prerequisites: R10-05, R10-07, R10-06.

Dependents: R04-07.

Modules: INTEGRATION, JOBS. Original task context.

R11-12

  • Test scheduled execution under traps, exhaustion, freeze, unsupported versions, fee changes and payment failure, using live payment and prepaid drop cost. Verify deterministic queue effects, conservation and existing host-fault handling.

Q28 (confirmed): Every scheduled job declares an authorized contract balance bucket as execution/storage payer. The submitting signer pays registration; check live payer authority and funds before each run. Additional payers require explicit authorization. Q29 (confirmed direction): The routine declares Drop, Retry or Skip after deterministic execution failure. Specify bounded retry counts/intervals and exhaustion behavior. Each real attempt pays once; internal speculation is not an attempt. Preserve first-inability-to-pay removal using the prepaid drop reserve. Q30 (confirmed direction): Pause execution of jobs whose contract is frozen. Frozen identities/contracts may receive native funds without running frozen guest code; existing asset-specific and receiving permissions still apply. Proposed queue policy resumes future runs without a catch-up burst and cancels permanently missing methods. Q34 (confirmed): One contract-owned receipt per outer invocation, with bounded nested outcomes. The invocation payer pays; refunds follow the recorded owner. Each scheduled attempt is an invocation. Failed-call receipts are written outside rolled-back guest effects.

Prerequisites: R10-05.

Dependents: None recorded.

Modules: JOBS, INTEGRATION, FEES. Original task context. Refinements (not extra dependency edges): FIX-07.

FIX-03

  • Rehearse scheduled host-fault recovery under the existing policy

Separate paid guest failures, local unready nodes and reproducible host faults. Reproduce a fault before ordinary transactions and identify the existing recovery path; report the halt limitation if no progressing normal upgrade applies.

Prerequisites: None recorded.

Dependents: FIX-04.

Modules: JOBS, ABCI, INTEGRATION. Original task context.

Coordination and dependencies

Task-level prerequisites above govern order. Workstreams contain multiple stages, so a cross-link is not a claim that the entire other issue must close first. These are Markdown relationships, not native GitHub blocked-by edges. The parent dependency register preserves all 234 links, reasons and explicit/inferred labels.

  • R06-01 → R06-09 (inferred): Rebased source dependency; confirm the implementation ordering. Implementation prerequisite inferred from the described interfaces.
  • R06-09 → R06-04 (inferred): Rebased source dependency; confirm the implementation ordering. Implementation prerequisite inferred from the described interfaces.
  • R10-04 → R10-05 (inferred): Rebased source dependency; confirm the implementation ordering. Scheduled calls use the scheduling infrastructure, bounded host reads and the selected existing atomic-effect integration.
  • R09-03 → R10-05 (inferred): Rebased source dependency; confirm the implementation ordering. Scheduled calls use the scheduling infrastructure, bounded host reads and the selected existing atomic-effect integration.
  • R10-05 → R10-06 (inferred): Rebased source dependency; confirm the implementation ordering. Implementation prerequisite inferred from the described interfaces.
  • R10-07 → R10-08 (inferred): Rebased source dependency; confirm the implementation ordering. Implementation prerequisite inferred from the described interfaces.
  • R10-06 → R10-08 (inferred): Rebased source dependency; confirm the implementation ordering. Implementation prerequisite inferred from the described interfaces.
  • R10-08 → R04-07 (inferred): Rebased source dependency; confirm the implementation ordering. Implementation prerequisite inferred from the described interfaces.
  • FIX-03 → FIX-04 (inferred): Upgrade rehearsal includes a scheduled-event fault and the existing recovery limit.

PR and evidence tracking

Create focused PRs against the chosen development branch. Link this issue with Refs #<issue-number> for partial work. Do not use Fixes for the whole workstream until every listed full task and acceptance criterion is complete.

For a PR that completes an entire task, add a standalone line in its actual PR body: Dash-Tasks: <completed task IDs>. Replace the placeholder with only fully completed IDs. Preparation PRs use ordinary references and omit the completion marker for their broader parent tasks. The site reads this marker on PRs in dashpay/platform and dashpay/grovedb: draft = red, ready for review = yellow, merged with no linked open PR = green. Closed-unmerged is not completion. This does not automatically close issue checkboxes and does not prove acceptance tests passed; reviewers must record the evidence.

Evidence Link / result
Implementation PRs Pending
Canonical vectors and targeted tests Pending
Upgrade/replay/conservation evidence, where applicable Pending
Remaining full-task acceptance All unchecked above

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions