Skip to content

Implement receipt value check #95

@aasseman

Description

@aasseman

Problem statement
TAP Agent does not currently check that the receipt values are correct w.r.t the query and Agora model.

Expectation proposal
Computing a query's price w.r.t. an Agora model is fairly easy on principle, as the canonical Agora implementation already is a Rust library: https://github.com/graphprotocol/agora.

However:

  • Indexers can change their Agora models at any time.
  • Gateways poll the indexer's models at a regular interval (~30sec).
  • The indexer is not informed of which model was used for a particular query (would have to guess by testing its most recent model versions).
  • There is no standard currently as to how long a gateway is authorized to use an obsolete model.

Additional context

let required_checks = vec![
ReceiptCheck::CheckUnique,
ReceiptCheck::CheckAllocationId,
ReceiptCheck::CheckTimestamp,
// ReceiptCheck::CheckValue,
ReceiptCheck::CheckSignature,
ReceiptCheck::CheckAndReserveEscrow,
];

Metadata

Metadata

Assignees

Labels

p1High prioritysize:x-largeVery largetype:featureNew or enhanced functionality

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions