Skip to content

Include project reference id for convenient lookups #1066

Closed
@ryanchristo

Description

Summary

We are removing support for custom project ids in #1046 to prevent issues with batch denom format and name squatting. In place of custom project ids, we are introducing a new arbitrary reference id without unique constraints that can be used for convenient lookups (or to group projects together prior to adding support for multiple credit classes per project).

Adding a reference id was originally proposed in #1032:

@clevinson:

Add an optional field to project_id called origin_id (similar to origin_tx in MintBatchCredits), which does not have enforced uniqueness (to prevent name squatting), but is used in an ORM secondary index.

Issuers of bridged credits could then create a project with origin_id = "V-35", and later that issuer/bridge operator could query for existing projects with origin_id == "V-35" if they want to issue more bridged credits to the same project.

@ryanchristo:

Adding a field such as a reference_id without unique constraints is worth considering and it might serve two purposes, (1) link on-chain projects that are the same on-the-ground project prior to support for multiple classes, and (2) convenient lookup.

Problem Definition

A project might have their own identification number that they use to reference their project and we should provide a convenient way for projects to be queried by this reference id.

Proposal

  • Add reference_id to MsgCreateProject
  • Add --reference-id flag to create-project command
  • Add QueryProjectByReferenceId with pagination
  • Add query projects-by-reference-id command

The reference id can be any arbitrary string with no unique constraints and a limit of 32 characters.


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned

Metadata

Assignees

Labels

Scope: x/ecocreditIssues that update the x/ecocredit moduleType: FeatureNew feature or request

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions