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

noid generation is kinda dumb #17

Open
squidgetx opened this issue Jul 24, 2023 · 0 comments
Open

noid generation is kinda dumb #17

squidgetx opened this issue Jul 24, 2023 · 0 comments
Labels
wontfix This will not be worked on

Comments

@squidgetx
Copy link
Owner

squidgetx commented Jul 24, 2023

Current implementation is basically this:

BETANUMERIC = "0123456789bcdfghjkmnpqrstvwxz"
def generate_noid(length: int) -> str:
    return "".join(secrets.choice(BETANUMERIC) for _ in range(length))

and when an ARK is minted we call generate_noid(8) and then just try again if there is a collision

There's no way this is actually good lol, i mean it's not actually the worst but performance would definitely be better if we used numbers or uuids.

https://metacpan.org/dist/Noid/view/noid

37B combinations

@squidgetx squidgetx added wishlist wontfix This will not be worked on and removed wishlist labels Jul 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

1 participant