Skip to content

usage-meter: link usage records to attestation ids across contracts #70

Closed

Description

@joelpeace48-cell

Problem

Metering and attestation are separate contracts with no link between them.
Usage can be recorded with no corresponding attestation, and an attestation can
exist with no usage — so an invoice cannot be traced back to the evidence that
justifies it. That traceability is the entire pitch.

What to do

  • Extend the usage record with an attestation_id.
  • Cross-contract call into audit-registry to verify the attestation exists,
    is not superseded, and belongs to the claimed payer.
  • Reject double-metering the same attestation id.
  • Decide the policy for usage with no attestation: reject, or record as
    unattested and price differently. Make it configurable per payer, and default
    to the stricter option.
  • Measure the cost of the cross-contract call — if it is prohibitive, consider
    verifying a batch root instead.

Acceptance criteria

  • Usage records carry a verified attestation reference
  • Double-metering the same attestation rejected
  • Unattested-usage policy configurable, defaulting to strict
  • Cross-contract call cost measured and documented

Notes

Depends on the cross-contract authorization pattern issue — get that right
before wiring contracts together, or the call becomes a privilege-escalation
path.

Activity

  1. Alheriii commented on Aug 24, 2026

    @Alheriii
    Contributor

    Hi there 👋

    I’d love to pick this one up.

    For context: 200+ contributions shipped across the ecosystem, clean reviews, and I contributed to this project last wave with no dropped PRs or delays.

    I’ll add comprehensive tests for DatasetRegistry, LicenseRouter, and RoyaltySplitter — covering happy paths, authorization, edge cases, expiry, revocation, and failures.
    Aiming for >85% coverage and cargo test --all green before PR.

    Can I be assigned? Thanks!

  2. joelpeace48-cell commented on Aug 24, 2026

    @joelpeace48-cell
    ContributorAuthor

    @Alheriii you are assigned, ensure all ci pipeline are green

  3. grantfox-oss commented on Aug 24, 2026

    @grantfox-oss

    🦊 GrantFox — @Alheriii has been assigned to this issue as part of the Third Campaign campaign!

    Next steps:

    1. Open a Pull Request referencing this issue (e.g., Closes #70)
    2. Your PR will be reviewed by the FinesseStudioLab maintainers

    Good luck! Track your progress on GrantFox.

  4. grantfox-oss commented on Aug 24, 2026

    @grantfox-oss

    🎉 This issue has been marked as completed on GrantFox as part of the Third Campaign campaign!

    @Alheriii's PR #84 was approved and merged by @joelpeace48-cell.

    🏆 @Alheriii: You earned 35 FoxPoints for this contribution! Your current tier: Explorer (153 total points). Track your full progress on GrantFox.

    👏 Great work, @Alheriii! Keep contributing to FinesseStudioLab.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardThird CampaignCampaign: Third Campaignarea:usage-meterMetering contractdifficulty:expertFunds, auth, or consensus-critical; needs reviewpriority:highNeeded for the next milestonetype:featNew capability

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions