Skip to content

design: funding model for attestation storage #3972

Description

@pbeza

Background

submit_participant_info takes no deposit and the contract funds attestation storage from its own balance — true of every deployed version, not just since #3940. Any account can create unlimited entries at roughly 1/7th of what each costs the contract, and once the balance no longer covers the contract's own storage it cannot write state at all, which halts signing. Measurements are in the drain analysis below.

This issue covers agreeing the funding model. Implementation is tracked separately in #4015.

The design has to work around two protocol constraints: a function-call access key cannot attach a deposit (not even inside a meta-transaction), and report_data binds the quote to env::signer_account_pk(), so an operator cannot submit on a node's behalf. Payment and submission therefore have to be separate transactions.

Acceptance Criteria

  • A funding model is agreed that keeps the node self-submitting with its function-call key and moves the storage cost to whoever onboards it.
  • The decision record names what was chosen, what was rejected, and why — including the alternatives that cannot work (full-access node keys, meta-transactions, operator-submits-on-behalf) and those that were judged not worth it (per-account entry caps, refundable bonds, an owner-callable release method, gating Attestation::Mock).
  • The bound is stated: what the contract can still be made to fund, and what is accepted as residual.
  • The operator-facing impact is described, including how many steps change.
  • Design doc merged under docs/design/, reviewed by the team.

Outcome

Settled on a grant counter: one prepayment buys one grant, a grant permits one stored attestation entry, and a grant returns when its entry is reclaimed. The contract stores counts rather than amounts, nothing is refunded, and multi-node or migrating operators simply prepay again — so there is no cap constant, no participant-status check, and no assumption about how many nodes share an account.

Doc: docs/design/operator-prepaid-attestation-storage.md (#4011).

Resources & Additional Notes

Metadata

Metadata

Assignees

Labels

designThe primary purpose of this issue is to design something new rather than implementing it.enhancementNew feature or requestsecurity

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions