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

Make getTLDs request more lightweight by adding a new parameter called includeNumberOfAliases #827

Open
ipr0310 opened this issue May 29, 2024 · 0 comments
Labels
API Issues related to the Node's API enhancement New feature or request

Comments

@ipr0310
Copy link
Member

ipr0310 commented May 29, 2024

Is your feature request related to a problem? Please describe.

Currently, the getTLDs request shows all available TLDs registered onchain

image

The issue is that that each TLD includes the number of aliases registered with it by default

{
  "tlds": [
    {
      "account": "0",
      "accountRS": "S-2222-2222-2222-22222",
      "aliasName": "signum",
      "timestamp": 0,
      "alias": "0",
      "numberOfAliases": 62004
    },
  /// Remaining TLDs...
  ],
  "requestProcessingTime": 2639
}

This is a pretty heavy operation that should be optimized by optionally showing the numberOfAliases
See that requestProcessingTime shows the queries lasted almost 3 seconds, there has been cases where it lasted up to 5 seconds

Describe the solution you'd like
I think there should be a new parameter for actually not showing the number aliases

Something like this:
image

As an example, if the user set that new parameter to false, number of aliases will not be shown

    {
      "account": "0",
      "accountRS": "S-2222-2222-2222-22222",
      "aliasName": "signum",
      "timestamp": 0,
      "alias": "0"
    }

Additional context
By default this parameter should be true in order to prevent breaking changes on multiple DApps that may use this feature.

Currently i inspected the code on SignumSwap and this is the result:
SignumSwap makes that request, but does not use the numberOfAliases property

Second Additional context
Most wallets may not use that property at all. Example: Signum Mobile Wallet will not use the numberOfAliases property

@ipr0310 ipr0310 added enhancement New feature or request API Issues related to the Node's API labels May 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API Issues related to the Node's API enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant