Skip to content

routing.rs reports synced: false for every non-wallet-scoped read, so an absence can never be warranted #290

Description

@MichaelTaylor3d

Task

routing.rs returns synced: false for every non-wallet-scoped read. So coin_record can never warrant an absence, and a consumer that correctly refuses to treat an unwarranted absence as fact is stuck reporting unknown forever.

Why this surfaced

dig-app just fixed the opposite defect (#2919): it was treating "the chain source returned nothing" as "it does not exist", which made a surface assert a falsehood about the chain — a user told their DID does not exist when the truth was the node could not see it.

The fix introduced AbsenceWarrant { Warranted, Withheld }, so an absence is only believed when the source can vouch for it. Correct, and it now runs into this.

The consequence today: a genuinely-failed mint reports as unknown rather than rejected. That is the safe direction and the fix is not wrong — but it means the honest answer is unreachable, not merely rare. A user whose mint really did fail is told the node cannot see, forever.

Scope

Disclose a real sync state on non-wallet-scoped reads so a warranted absence becomes possible.

The design question to settle first: what does "synced" mean for a read that is not wallet-scoped? A wallet-scoped read has a clear notion of caught-up; a general coin read may need a different, honestly-narrower claim — for example "this source is at height H and H is within N of the peak it corroborates". Answer that before wiring a boolean, because a synced: true that overstates is worse than the current false: it converts a conservative unknown into a confident falsehood.

Fail toward false. If the node cannot establish that it is caught up, it must keep saying so — the current behaviour is over-conservative, not unsafe, and that ordering must survive the fix.

Related

  • dig-app chain/source.rsAbsenceWarrant / AbsenceWitness, the consumer side.
  • dig-app account/chain_mint.rs — the gated conclusion.
  • The corroboration work in chia-query 0.12.0 is adjacent: it grades a positive answer across peers. This is the absence half at the node boundary.

Evidence

A test that fails without the fix: a node that is genuinely caught up warrants an absence for a coin that does not exist, and a node that is not caught up still withholds it.

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

    kind:maintenancereal work that changes nothing a user can perceive

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions