Skip to content

Discriminator for BaseAssetV1 Changed After Anchor Upgrade #248

@ljiatu

Description

@ljiatu

Hi all! I'm updating the Anchor version in my repo to 0.31.1, which requires mpl-core version of 0.11.1-beta.2, and noticed that the discriminator of BaseAssetV1 has been changed from [0; 8] to [1] by this PR: #245. Two questions:

  1. Would it be problematic to update programs that are currently running on older versions of Anchor and mpl-core?

  2. The release note for Anchor 0.31.0 states the following:

Additionally, the IDL generation step also checks whether you have ambigious discriminators i.e. discriminators that can be used for multiple types. However, you should still consider future possibilities, especially when working with 1-byte discriminators. For example, having an account with discriminator [1] means you can't have any other discriminators that start with 1, e.g. [1, 2, 3, 4], as it would not be unique.

Now that the discriminator for BaseAssetV1 is [1], wouldn't this cause conflict if another account we define also starts with 1?

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions