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

Expose more types from CMT #3875

Merged
merged 2 commits into from
Dec 6, 2022
Merged

Expose more types from CMT #3875

merged 2 commits into from
Dec 6, 2022

Conversation

austbot
Copy link
Contributor

@austbot austbot commented Dec 6, 2022

Indexing CMT is made difficult without additional types.
Consider when needing to ensure we have not missed a tree while indexing. We will need an account data source.

  • Geyser
  • RPC Via GPA

If we get the raw account data and deserialize it into a ConcurrentMerkleTreeHeader we will not be able to introspect the data version or event the account type.

This pr exposes new types and bumps the version. Please consider this contribution as it could be a blocker to the additional layer of merkle tree backfilling needed for Metaplex Read API.

I also add a get_creation_slot on the Main header struct as a convenience feature as I'm relatively sure that information will be present in all data versions.

@austbot austbot marked this pull request as ready for review December 6, 2022 05:07
@mergify mergify bot added the community Community contribution label Dec 6, 2022
@ngundotra
Copy link
Contributor

Looks great. Thanks Austin!

@ngundotra ngundotra merged commit ed8522b into solana-labs:master Dec 6, 2022
HaoranYi pushed a commit to HaoranYi/solana-program-library that referenced this pull request Jul 19, 2023
* Expose other types from CMT to allow usage on the client side while deserializing accounts.

* adds a convenient creation slot getter
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community Community contribution
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants