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

Check for Duplicate Stamp Hash #83

Open
reinamora137 opened this issue Dec 5, 2023 · 1 comment
Open

Check for Duplicate Stamp Hash #83

reinamora137 opened this issue Dec 5, 2023 · 1 comment
Labels
indexer Indexer related issues

Comments

@reinamora137
Copy link
Collaborator

It's possible to get a duplicate stamp hash since we are truncating it... Need to check on the db if there is a collision and regenerate if needed.

@Chriton Chriton added the indexer Indexer related issues label Dec 20, 2023
@reinamora137
Copy link
Collaborator Author

This was a test script to check the probability of collision based upon the # of allowed chars(needs to be double checked)

import math

n = 52500  # Number of expected unique items
m = 62**8  # Number of possible unique combinations for 8-character Base62

probability = 1 - math.exp(-(n**2) / (2 * m))
print(probability)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
indexer Indexer related issues
Projects
None yet
Development

No branches or pull requests

2 participants