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

Incorporate Collections into Name module. #2018

Open
4 tasks
Taztingo opened this issue May 30, 2024 · 0 comments
Open
4 tasks

Incorporate Collections into Name module. #2018

Taztingo opened this issue May 30, 2024 · 0 comments
Labels
name Name Module nice-to-have Features not required in upcoming milestone
Milestone

Comments

@Taztingo
Copy link
Contributor

Summary

The collections package has been added to cosmos sdk v0.50, and we should see if we can leverage this. This package will help improve clarity and may improve performance of our storage usage. A simple module that we can easily integrate this into and use for gathering metrics is the name module.

Problem Definition

The current way that we use state is quite cumbersome and it may not be optimal.

Proposal

The following steps are one of many ways to implement this and can be followed loosely to incorporate this into the name module:

  • Create a codec for Record message
  • Update the prefixes to use collections.Prefix.
  • Store the params as an Item
  • Store the name as a Map<String, Record>
  • Store the addresses with as a Map<Pair<Addr, String>, Record>
  • Update pagination queries to use collections.Paginate

Some useful metrics to gather, compare, and discuss are:

  • Gas usage when adding, removing, and editing entries
  • Runtime performance under different loads

For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
@Taztingo Taztingo added nice-to-have Features not required in upcoming milestone name Name Module labels May 30, 2024
@SpicyLemon SpicyLemon added this to the backlog milestone Aug 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
name Name Module nice-to-have Features not required in upcoming milestone
Projects
Development

No branches or pull requests

2 participants