Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Native Asset indexing and endpoint response has issues that need correcting. #1121

Open
2 tasks done
stevenj opened this issue Nov 5, 2024 · 0 comments · May be fixed by #1150
Open
2 tasks done

[Bug]: Native Asset indexing and endpoint response has issues that need correcting. #1121

stevenj opened this issue Nov 5, 2024 · 0 comments · May be fixed by #1150
Assignees
Labels
bug Something isn't working

Comments

@stevenj
Copy link
Collaborator

stevenj commented Nov 5, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

Native Assets names are 32 byte maximum binary fields.
The index stores them as strings, not strings.
The endpoint response also does not consider that each asset hash (id) can have multiple asset names associated with it.
Currently it is only handling one asset name per asset hash.
The Value of the asset is also restricted to u64, but it can be in the range:
minInt64 = -9223372036854775808
maxInt64 = 9223372036854775807

Expected Behavior

To fix:

  1. The Asset name needs to be stored in the index as binary bytes.
  2. Multiple asset names per asset id need to be properly reported.
  3. The asset name in the response needs to be converted to a string using the AssetName types From<Vec<u8>> implementation.
  4. Change the value for Native assets to be i128, to handle the extended range they support.

Project

Backend

What operating system are you seeing the problem on?

macOS, Linux, Windows

What browsers are you seeing the problem on?

Not Applicable

Relevant log output

No response

Anything else?

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@stevenj stevenj added the bug Something isn't working label Nov 5, 2024
@stevenj stevenj added this to the M4: Voting & Delegation milestone Nov 5, 2024
@apskhem apskhem self-assigned this Nov 5, 2024
@apskhem apskhem moved this from New to 🏗 In progress in Catalyst Nov 5, 2024
@apskhem apskhem linked a pull request Nov 6, 2024 that will close this issue
8 tasks
@apskhem apskhem linked a pull request Nov 6, 2024 that will close this issue
8 tasks
@apskhem apskhem moved this from 🏗 In progress to 👀 In review in Catalyst Nov 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: 👀 In review
Development

Successfully merging a pull request may close this issue.

2 participants