Remove Asset Code Types 4 and 12

Open
#296 2 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale

Research direction

Review the existing asset code type definitions and the XDR compatibility implications described in the issue. Determine whether both tags can accept up to 12 bytes without violating compatibility expectations, and confirm that the protocol semantics and migration decision are agreed before implementation.

Written by the indexing model from the issue text.

Description

CAP enhancement needs draft

The two existing current non-native Asset Code types are currently guaranteed to be non-overlapping without the enum tag by length.

Given that there are no functional differences between asset code types, I propose deprecating the distinction between the types by allowing either tag to refer to up to 12 bytes of asset code.

This should simplify the handling of this both internally (and help ensure that treatment of asset types is uniform) and externally for consumers of the API.

This should be forwards compatible as old clients should produce XDR which is binary compatible with the new semantics, but may break backwards compatibility as new clients may produce XDR which is incompatible with old clients parsings. While breaking backwards compatibility is not great, it may be a worthwhile cleanup to remove this distinction.

The motivation for such a change is that stellar core's rules should not be enforcing UX-layer invariants.

Dominant language
RPC
Stars
632
Forks
399
Avg merge
1d 23h
Merged PRs (30d)
6

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from stellar/stellar-protocol

All issues in stellar/stellar-protocol

Similar issues

More Backend & API Design issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.