Skip to content

indexer,api,web: index validator-client reward claim state #790

Description

@bgm-malbeclabs

Summary

The Edge Rewards client-team view shows each team's all-time reward share but no claimable figure, because lake has no way to know whether a client team has claimed.

dim_dz_shred_validator_leaf_distribution_status carries is_claimable at the (subscription_epoch, node_id, client_id) grain, but that flag is the validator's claim on its own leaf. Nothing records the client team's side. Putting that flag on a client-team row would assert something we have not observed.

What is needed

Index whatever onchain state records a validator-client rewards claim, then add a claimable column to GET /api/dz/shreds/rewards?group=client and the client table on /dz/shreds/rewards.

Starting points:

  • ValidatorClientRewards (shreds program) is registration only — client_id, manager_key, short_description, a storage gap. No amounts, no claim flag, so the claim state lives elsewhere.
  • try_validator_share_pre_burn in programs/shred-subscription/src/processor/common.rs shows distribute has two branches over one journal pair, weighting a leaf by leader_slots * (MAX - client_proportion) for the publisher and leader_slots * client_proportion for the client. Whatever the client branch writes on distribute is what needs indexing.

Context

Raised in review on #787. The all-time figure is already correct — see that PR for the derivation — so this is additive rather than a fix.

Metadata

Metadata

Assignees

No one assigned

    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