Skip to content

[BUG] [reputation] The issuer-mismatch probe never reaches a verdict for most anchors #1243

Description

@ezedike-evan

What I found

Reading the live probe ledger while wiring up probe-derived health, the issuer-mismatch signal has never produced a verdict for any anchor. Every row is a failure, and every failure is classified unknown — meaning the check errored before it could compare anything, not that an issuer actually mismatched.

Live counts over the current 30-day window:

Anchor issuer rows successes mismatch verdicts last failure type
moneygram 583 0 0 unknown
cowrie 39 0 0 unknown
ngnc 583 0 0 (TOML fails first)

MoneyGram's stellar.toml resolves cleanly on every one of those same ticks — uptime is 583/583 and TOML integrity is 583/583. So the anchor is reachable and its TOML is valid; the issuer comparison itself is what fails.

Why it matters

defaultCheckIssuer in lib/reputation/probe.ts resolves the TOML, then reads the advertised issuer and compares it against SEP-38 /info. An anchor that does not advertise ANCHOR_QUOTE_SERVER has no SEP-38 /info to read, so the comparison can never complete — and today that is nearly the whole fleet. One of the registered anchors advertises a quote server at all, which docs/POSITIONING.md already states.

The result is that one of the four published health signals is structurally dead. It cannot ever say an issuer matches, and it cannot ever say one does not.

What this is not

This is not a mismatch being detected. probeIssuerMismatch deliberately distinguishes a genuine mismatch from a probe that could not complete, and nothing in the ledger is a mismatch. The health scoring added in the probe-derived-health work excludes non-verdict rows for exactly this reason, so nothing currently publishes "0% issuer match" about these anchors. That guard is a floor, not a fix — the signal still yields no information.

Suggested direction

Compare the advertised issuer against the asset on-chain rather than against SEP-38 /info: read [[CURRENCIES]] from the TOML for the asset code and issuer, then confirm that issuer actually issues that asset on Horizon. That path needs nothing from the anchor beyond the TOML it already publishes, so it works for the whole fleet instead of the SEP-38 subset.

Acceptance

  • The issuer signal returns reachable: true for at least one registered anchor whose advertised issuer is correct.
  • A deliberately wrong advertised issuer produces failureType: 'mismatch', not unknown.
  • A test covers both, with the on-chain lookup stubbed.

Found while wiring lib/reputation/health.ts. Related: the failure-classifier fix in the same branch, which stops a TOML parse error being filed as a TLS fault.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething is broken. A user-visible defect or a broken invariant.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions