Skip to content

feat: log signer validation outcomes with payer context#989

Closed
MoonBoi9001 wants to merge 1 commit into
mb9/dips-startup-config-loggingfrom
mb9/dips-signer-validation-logging
Closed

feat: log signer validation outcomes with payer context#989
MoonBoi9001 wants to merge 1 commit into
mb9/dips-startup-config-loggingfrom
mb9/dips-signer-validation-logging

Conversation

@MoonBoi9001
Copy link
Copy Markdown
Member

@MoonBoi9001 MoonBoi9001 commented Mar 26, 2026

TL;DR

When the indexer rejects a paid indexing proposal because the proposer's signing key isn't authorized, the rejection reaches the consumer but the indexer writes nothing to its own logs. This change adds structured logs at warn or debug for each signer-validation outcome. Operators can now tell a transient indexing lag apart from a real authorization mismatch.

Motivation

When a paid indexing proposal arrives, the indexer looks up the proposer's escrow account in a subgraph and checks whether the signing key is on the authorized list for that payer. If either step fails the proposal is rejected, but with no log line and the same generic outcome on the wire. The two failure modes are very different in operational terms: an escrow account that simply hasn't been indexed yet is a transient subgraph lag the operator can wait out, while a signer genuinely missing from the authorized list is a real authorization problem. Operators triaging a wave of rejections cannot tell these apart and waste time chasing the wrong root cause.

Summary

  • Warn-log when no escrow record exists for the payer, noting it may not be indexed yet
  • Warn-log when the signer isn't on the payer's authorized list, with authorized-signer count
  • Debug-log on success
  • Include the payer and signer addresses as structured fields for filtering

@MoonBoi9001 MoonBoi9001 changed the base branch from fix/rca-metadata-version-enum to mb9/dips-startup-config-logging March 26, 2026 23:18
@MoonBoi9001 MoonBoi9001 added the DIPs Decentralized Indexing Payments label Apr 17, 2026
Distinguish between "no escrow accounts found for payer" (likely
subgraph lag) and "signer not in authorized list" (genuine mismatch).
Previously both cases returned the same generic error with no logging.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@MoonBoi9001 MoonBoi9001 force-pushed the mb9/dips-startup-config-logging branch from 1c50cd9 to c14d30d Compare May 7, 2026 05:59
@MoonBoi9001 MoonBoi9001 force-pushed the mb9/dips-signer-validation-logging branch from 9a12fb3 to 46a2659 Compare May 7, 2026 05:59
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 7, 2026

Coverage Report for CI Build 25478616228

Warning

No base build found for commit c14d30d on mb9/dips-startup-config-logging.
Coverage changes can't be calculated without a base build.
If a base build is processing, this comment will update automatically when it completes.

Coverage: 71.35%

Details

  • Patch coverage: 6 uncovered changes across 1 file (4 of 10 lines covered, 40.0%).

Uncovered Changes

File Changed Covered %
crates/dips/src/signers.rs 10 4 40.0%

Coverage Regressions

Requires a base build to compare against. How to fix this →


Coverage Stats

Coverage Status
Relevant Lines: 15152
Covered Lines: 10811
Line Coverage: 71.35%
Coverage Strength: 112.4 hits per line

💛 - Coveralls

@MoonBoi9001 MoonBoi9001 changed the title feat(dips): add structured logging to signer validation feat: log signer validation outcomes with payer context May 7, 2026
@MoonBoi9001
Copy link
Copy Markdown
Member Author

Superseded by #1009 — the signer-validation module this PR adds logging to is removed wholesale in the on-chain offer-based authorization switch, so the logging additions become dead code. Dropping in favour of the architecture change.

@MoonBoi9001 MoonBoi9001 closed this May 7, 2026
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.

1 participant