Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feat.Req] Implement receipt value check #95

Open
aasseman opened this issue Nov 14, 2023 · 0 comments · May be fixed by #153
Open

[Feat.Req] Implement receipt value check #95

aasseman opened this issue Nov 14, 2023 · 0 comments · May be fixed by #153
Assignees
Labels
p1 High priority size:x-large Very large type:feature New or enhanced functionality

Comments

@aasseman
Copy link
Collaborator

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,
];

@aasseman aasseman added size:x-large Very large p1 High priority type:feature New or enhanced functionality labels Nov 14, 2023
@aasseman aasseman added this to the TAP Agent ready for prod milestone Nov 14, 2023
@aasseman aasseman linked a pull request Apr 29, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p1 High priority size:x-large Very large type:feature New or enhanced functionality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants