-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Replace SHA-512 hashing function with the ~10 times faster BLAKE3. #2530
base: py3
Are you sure you want to change the base?
Conversation
Performance is a problem for ZeroNet given that it's written in Python. Hashes are checked really often (see a recent "Eternal Word" issue), so making them faster is important. BLAKE3 looks like a good alternative, but changing the hash function without backward compatibility is wrong. We could add both |
@imachug I'm not in favor of backward compatibility, at least not creating or signing sites with sha512. Downloading the content which hashed by sha512 is enough.
until now this ☝️ was in ContentManager.py and turned out that is useless, so I removed. Adding back sha512 instead of sha1 will still fail. There was no backward compatibility at all using this code. At this point I see that this is going to be the fastest fork of ZeroNet. The @HelloZeroNet repository comes not even close to the speed of this fork with blake3. |
No need for "- ZeroNet_" in title
…patch-1 Update ContentManager.py
Everyone should resign they sites, no need for backward compatibility. 🙄
BLAKE3 is a cryptographic hash function that is:
unlike SHA-2.
because it's a Merkle tree on the inside.
because it's a Merkle tree.
on smaller architectures.
The chart below shows BLAKE3's performance on modern server hardware, an Intel Cascade
Lake-SP 8275CL processor:
BLAKE3 paper: https://github.com/BLAKE3-team/BLAKE3-specs/blob/master/blake3.pdf
This is my last attempt to contribute to this repository and the third time I changed the requirements.txt to include only gevent>=1.4.0! If this pull request is not going to be merged than this is going to be fastest fork of "ZeroNet". For that matter I going to rename it and will be not called "ZeroNet" anymore!
I would like to give a huge thanks to @imachug and @filips123 for they great and hard work on this software, keep up the good work guys! 🤗
I wish that not @HelloZeroNet (@shortcutme) owns this repository. 😢 It would be in better hands with @imachug for example. @imachug is way more respectful and active than the current "owner" 😡.