Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Indexing metadata section in Forc manifest #21
Indexing metadata section in Forc manifest #21
Changes from 2 commits
22bf393
ff409fa
7c4c676
f674ee5
02cf096
af43a52
6ca0529
efce84d
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How will we ensure that namespace is unique across projects?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought about this for awhile and I'm still not sure how to address this in the indexing metadata section.
For context, the namespace functionality was actually used as a way to separate indexers that may have the same name. Due to the original indexer's ability to be self-hosted, it was unlikely that namespaces would be collide since teams were generally expected to run their own indexer service deployment. Additionally, the original indexer also contained functionality to use
forc wallet
to place indexer uploading/stopping/removal behind authenticated routes.The next iteration of the indexer is intended to be a sort of hosted "public good" service. Thus, the indexer team expects users to deploy their indexers to the service, and in order to ensure that database tables are distinct from one another (as they've generally been named after their GraphQL or Sway types), we need to determine a unique prefix for tables associated with the same contract. The prefix should be user-chosen as the developer experience with using a user-generated identifier is likely to be better than something generated that has no meaning to them. I did think about using a contract ID, but that will change if the content of the contract changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe the indexer website should provide the user with a unique key, which can be used as a prefix?
Are users paying for the indexing service? If so, it should be easy to have a key (or even user-chosen unique namespace) linked to their billing account.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's probably a good idea; users could request one using
forc wallet
and the service could handle generating a unique key in an idempotent manner.