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

Updates the hash to be 10 characters #353

Merged
merged 2 commits into from
Aug 12, 2019
Merged

Updates the hash to be 10 characters #353

merged 2 commits into from
Aug 12, 2019

Conversation

arcanis
Copy link
Member

@arcanis arcanis commented Aug 12, 2019

Per the following probability table, 10 hexadecimal characters give us a probability of 10−9 to have an hash collision for 47 elements.

Given that the hashes are prefixed with the package names and the protocol used, it would require to have a lot of instances of a single package to risk finding a collision, so 10 characters should be fairly safe.

cc @Vlasenko

@larixer
Copy link
Member

larixer commented Aug 12, 2019

@arcanis Provided we won't have too many virtuals for the same package with the same version the math looks good to me, e.g. not much more then 47 virtuals per a package

@arcanis
Copy link
Member Author

arcanis commented Aug 12, 2019

Awesome, thanks for confirming 👍

@arcanis arcanis merged commit 8294bbf into master Aug 12, 2019
@arcanis arcanis deleted the mael/smaller-hashes branch August 26, 2019 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants