Skip to content

Distribute hold-tier execution rewards from the incentives pool#10

Open
moshemalawach wants to merge 1 commit into
mainfrom
feat/hold-execution-rewards
Open

Distribute hold-tier execution rewards from the incentives pool#10
moshemalawach wants to merge 1 commit into
mainfrom
feat/hold-execution-rewards

Conversation

@moshemalawach
Copy link
Copy Markdown
Member

Summary

Upstream aleph-api-credit PR #5 (feat/hold-execution-rewards) adds an optional rewards array to aleph_credit_expense execution messages for holder-tier instances — the user paid by holding ALEPH, not by burning credits. Node operators should still be paid for running these workloads, but from the incentives pool rather than from user revenue.

  • Parse the new rewards entries alongside existing credits in aleph_credit_expense execution messages.
  • Route them through the same 60/15/20/5 split (CRN / CCN / stakers / dev fund).
  • Surface the new total separately as hold_rewards_total_aleph in the published credit-rewards-distribution post so accounting can distinguish user-paid from incentives-pool-paid payouts.
  • Gated by credit_hold_rewards_enabled (default true), mirroring the upstream @temporary JOB_EXPENSE_HOLD_ENABLED flag.
  • Rename the inner accumulator from rewards to payouts to free the name for the new message field.

Test plan

  • Dry-run nodestatus-distribute on testnet against messages that contain rewards and verify the summary shows the split correctly.
  • Confirm pre-PR-5 messages (no rewards field) produce identical numbers to the previous behavior.
  • Toggle credit_hold_rewards_enabled=false and verify hold_rewards_total_aleph is 0 and the field is still present in the post.
  • Run the existing test suite (pytest).

Upstream aleph-api-credit PR #5 adds an optional `rewards` array to
`aleph_credit_expense` execution messages for holder-tier instances —
the user paid by holding ALEPH, not by burning credits, so node
operators are paid from the incentives pool instead of user revenue.

Route `rewards` entries through the same 60/15/20/5 split as `credits`
(CRN / CCN / stakers / dev fund), tracked separately as
`hold_rewards_total_aleph` in the published distribution post for
auditing. Gated by `credit_hold_rewards_enabled` (default true)
mirroring the upstream `@temporary` flag.

Rename the inner accumulator from `rewards` to `payouts` to free the
name for the new message field.
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.

1 participant