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

HIP - 367 : Remove limit on the number of tokens that can be associated to an account #2917

Closed
10 tasks done
anighanta opened this issue Feb 25, 2022 · 0 comments · Fixed by #2934 or #2997
Closed
10 tasks done
Assignees
Milestone

Comments

@anighanta
Copy link
Contributor

anighanta commented Feb 25, 2022

  • Remove the restriction on the number of tokens that can be associated to the account that is dictated by property "tokens.maxPerAccount"
  • Use a map valued linkedList <EntityNumPair, MerkleTokenRelStatus> instead of using CopyOfWriteIds array to track the associated token Ids where MerkleTokenRelStatus serves as a doubly linkedList node.
  • Track the latest association using a EntityNumPair on MerkleAccount using the new TokenAssociaitonMetadata which will encapsulate numAssociations -> current token association count, numZeroBalances -> zero balanced token associations among the current associations and lastAssociation -> EntityNumPair of last token association.
  • MerkleAccount will no longer have 3 children. It will have just 2 from this release on [merkelAccountState and Records]
  • Migration from older version states should work with updating the linked list with the appropriate links and setting the latest association of the MerkleAccount along with numAssociaitons and numZeroBalances.
  • Association and Dissociation logics should manipulate the linkedList and TokenAssociaitonMetadata as expected
  • GetAccountInfo/Balance will have only a limited amount of token association data in them [dictated by "tokens.maxPerAccount"`]
  • CryptoDelete no longer skips validating zero token balances on deleted tokens. All associated token balances must be zero and one would have to dissociate/transfer away any token balances to be eligible for deletion.
  • TokenBurn, TokenMint and TokenWipe operations should update the treasury's/account's numZeroBalances in their TokenAssociaitonMetadata respectively.
  • CryptoTransfer should update the sender's and receiver's numZeroBalances accordingly
@anighanta anighanta self-assigned this Feb 25, 2022
@SimiHunjan SimiHunjan added this to the 0.24.0 milestone Mar 1, 2022
@anighanta anighanta mentioned this issue Mar 1, 2022
2 tasks
@SimiHunjan SimiHunjan modified the milestones: 0.24.0, 0.25.0 Mar 14, 2022
@anighanta anighanta mentioned this issue Mar 16, 2022
2 tasks
@anighanta anighanta changed the title HIP - 1000 : Remove limit on the number of tokens that can be associated to an account HIP - 367 : Remove limit on the number of tokens that can be associated to an account Mar 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants