-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
bincode is not optimal #26406
Comments
The major hangup I've encountered hacking at this quickly is deriving traits for the GenericArray struct (part of Signature struct) |
Quick comparison of SerDes methods running Bincode (Default)
Borsh
speedy
postcard
Code can be found on this branch. Note the SerDes library must be selected via feature ( |
Given how sensitive our system is to shred volume, I'm wondering if something like postcard is the best option |
Some more challenges uncovered looking into converting Shreds to use a different SerDes library:
I believe these things can be worked around, but it is messy. 1 in particular makes me concerned regarding latency of extracting fields such as index, slot, version with dynamic sizing (we would have to perform a full deserialization). However, the dynamic sizing is what allows for tighter packing and reduced number of shreds. |
Problem
For serialize/deserialize the validator uses bincode in many cases but bincode is known to not be optimal.
Proposed Solution
Convert bincode use-cases to other faster serialization libraries like speedy/borsh/capnproto. A more universal format would be nicer for interconnection with other languages and environments as well.
The text was updated successfully, but these errors were encountered: