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

refactor: remove old token metadata processor #1747

Merged
merged 10 commits into from
Nov 9, 2023

Conversation

rafaelcr
Copy link
Collaborator

@rafaelcr rafaelcr commented Nov 8, 2023

Removes the old FT/NFT token metadata processor. We already have the Token Metadata API live and all current traffic is being redirected there.

This change will optimize block ingestion times because the API will no longer need to analyze the ABI of all deployed contracts to determine if they deploy FTs or NFTs. Also, it will no longer need to maintain token queues and notify listeners when the queues are updated.


Rosetta

This change impacts Rosetta, because FT operations still need to be displayed in blocks and transactions with the proper symbol and decimals. To solve this, a FT metadata retrieval class is added that just queries the relevant contracts for this info before operations are displayed, keeping it in an in-memory LRU cache for quicker access in the future.

Copy link

codecov bot commented Nov 8, 2023

Codecov Report

❗ No coverage uploaded for pull request base (nakamoto@872bcbd). Click here to learn what that means.
The diff coverage is n/a.

@@             Coverage Diff             @@
##             nakamoto    #1747   +/-   ##
===========================================
  Coverage            ?   71.28%           
===========================================
  Files               ?       86           
  Lines               ?    11453           
  Branches            ?     2470           
===========================================
  Hits                ?     8164           
  Misses              ?     3139           
  Partials            ?      150           

Copy link

github-actions bot commented Nov 8, 2023

Vercel deployment URL: https://stacks-blockchain-7h5xjkqyt-blockstack.vercel.app 🚀

@rafaelcr rafaelcr changed the title refactor: remove old token metadata processor [draft] refactor: remove old token metadata processor Nov 9, 2023
@rafaelcr rafaelcr linked an issue Nov 9, 2023 that may be closed by this pull request
@rafaelcr rafaelcr marked this pull request as ready for review November 9, 2023 04:24
Copy link
Member

@zone117x zone117x left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@rafaelcr rafaelcr merged commit a490d67 into nakamoto Nov 9, 2023
30 checks passed
@rafaelcr rafaelcr deleted the chore/nakamoto/remove-metadata branch November 9, 2023 16:11
rafaelcr added a commit that referenced this pull request Nov 13, 2023
* refactor: remove old processor, start fetching data from contract

* refactor: remove old tests

* fix: tests and lint

* fix: use lru cache

* chore: delete old tables

* chore: fix comments [skip ci]

* fix: env comment block [skip ci]

* chore: avoid duplicate RPC lookups

* fix: make an incremental migration to drop tables

* fix: re-add metadata processing ENV flag

---------

Co-authored-by: Matthew Little <[email protected]>
@blockstack-devops
Copy link

🎉 This PR is included in version 7.4.0-nakamoto.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@blockstack-devops
Copy link

🎉 This PR is included in version 7.6.0-nakamoto.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@blockstack-devops
Copy link

🎉 This PR is included in version 7.6.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

remove the old token metadata processor
3 participants