Skip to content

On rollbacks (lack of idea) #188

@waalge

Description

@waalge

Reading https://cardanosolutions.github.io/kupo/#section/Rollbacks-and-chain-forks/How-can-your-application-deal-with-rollbacks

I cannot extract from the text how I handle a utxo, previously reported, that is not present on chain after a rollback.

Say:

  • I sync (request /matches),
  • Kupo responds with a UTxO.
  • There is a rollback and this response content is now no longer on the chain.
  • I sync again, with ETag and If-None-Match set

The response is not a 304. It has a new Etag and X-Most-Recent-Checkpoint and an empty array of utxos (say).

I cannot see how I can tell that my cached utxo does not exist (without also continuously syncing the checkpoints and running implementing this client side).
I think I want that in such cases kupo to first respond with maybe a 410 Gone perhaps with a body containing some checkpoints most recent to the X-Most-Recent-Checkpoint.

What am I missing?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions