Skip to content

ICRC-1: specify how to opt-out of deduplication #185

Description

@roman-kashitsyn

I noticed that at least one production implementation of ICRC-1 ledger (link) ignores the deduplication part of the spec; it only records the created_at_time field in a block.

We should specify how a ledger opts out of the deduplication mechanism. I see at least three options:

  1. Always return TooOld or CreatedInFuture if the caller specified created_at_time (effectively setting TX_WINDOW and PERMITTED_DRIFT to zero).
  2. Reject the call (e.g., trap) if the caller specified created_at_time.
  3. Introduce our first generic error { error_code = 1; message = "ICRC-1: deduplication not supported"}.

I prefer the last option with the generic error because it’s the most explicit one. On the other hand, the test suite expects the first option:

Err(TransferError::TooOld) => {

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    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