Skip to content

fix: store agreement proposals without the signer signature - #1061

Closed
MoonBoi9001 wants to merge 3 commits into
main-dips-rebasedfrom
mb9/store-agreement-proposals-without-signature
Closed

fix: store agreement proposals without the signer signature#1061
MoonBoi9001 wants to merge 3 commits into
main-dips-rebasedfrom
mb9/store-agreement-proposals-without-signature

Conversation

@MoonBoi9001

@MoonBoi9001 MoonBoi9001 commented Jun 19, 2026

Copy link
Copy Markdown
Member

TL;DR

This makes the indexer service remove the signature before saving an indexing proposal.

Motivation

When the service receives an indexing-agreement proposal it first verifies the sender's signature, then saves the proposal for the agent to act on. The agent no longer uses that signature to accept on-chain — it accepts against the payer's posted on-chain offer — so it now treats any saved proposal that still carries a signature as a mistake and refuses it. The result is that every proposal the service saves is discarded by the agent and no agreement can be accepted. Clearing the signature before saving, while still verifying it first, lets the two services line up again.

Summary

  • Keeps verifying the sender's signature on every incoming proposal, unchanged.
  • Saves the proposal with the signature cleared, which is the form the agent expects.
  • Compares a re-sent proposal against that same cleared form so genuine retries still match.
  • Updates the affected tests to seed and check the stored form.

Generated with Claude Code
https://claude.ai/code/session_01USBDULGGvrHzVTKWgxfYz4

@graphprotocol graphprotocol deleted a comment from github-actions Bot Jun 19, 2026
@MoonBoi9001
MoonBoi9001 marked this pull request as ready for review June 22, 2026 05:16
@MoonBoi9001 MoonBoi9001 added the DIPs Decentralized Indexing Payments label Jun 22, 2026
@tmigone

tmigone commented Jun 23, 2026

Copy link
Copy Markdown
Member

what about doing the opposite? i.e, having the service store the signature but the agent to ignore it. Is there any downside to that? There isn't an immediate use for the signature, but it is proof that can be potentially valuable.

Base automatically changed from mb9/reject-replayed-dips-proposals to main-dips-rebased June 23, 2026 21:39
@MoonBoi9001

Copy link
Copy Markdown
Member Author

Makes sense, will look into it

MoonBoi9001 and others added 3 commits June 26, 2026 22:15
The indexer-agent reads proposals indexer-rs writes to the shared table and
rejects any whose stored signature is non-empty, since on-chain acceptance is
offer-based; strip the signature before storing while still authenticating it.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01USBDULGGvrHzVTKWgxfYz4
The header said signature and signer-authorization checks are not performed here, but the
proposal path now recovers the EIP-712 signer and requires the agreement-manager role
before storing; the signature is stripped only once that check passes.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01USBDULGGvrHzVTKWgxfYz4
A proposal re-sent with a different signature over identical terms must replay as
idempotent rather than a conflict, since the stored form drops the signature. Add a
two-signer test that proves this, plus a shared context builder it needs.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01USBDULGGvrHzVTKWgxfYz4
@MoonBoi9001
MoonBoi9001 force-pushed the mb9/store-agreement-proposals-without-signature branch from 7b11731 to 64a20c6 Compare June 26, 2026 10:21
@MoonBoi9001

Copy link
Copy Markdown
Member Author

Closing as superseded. Store-with-signature — the suggestion in review here — already shipped on main-dips-rebased via the #1042#1052 series (#1045 verifies the signature, and the service stores the raw signed bytes). This PR's only remaining unique change was stripping the signature before storage, i.e. the opposite, so there's nothing left to land.

The other half — having the indexer-agent ignore the stored signature instead of rejecting it as a non_empty_signature regression — will land separately in graphprotocol/indexer, stacked on graphprotocol/indexer#1240.

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

Labels

DIPs Decentralized Indexing Payments

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants