-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Could SSZ be replaced through protocol buffers? #503
Comments
See: #129 TLDR;
|
@paulhauner yeah, I spoke with @prestonvanloon and he mentioned that the fact that they are non-deterministic means they can't be used. I still question if we should discuss reducing the usage of Potentially discussing changing |
See also some brief analysis here: https://github.com/sigp/serialization_sandbox/blob/report/report/serialization_report.md. That is from a spec many moons ago, so it's very outdated! Protobuf is marginally bigger on the wire than SSZ. You'd probably want to do some more analysis before you make a firm judgement on that, though. If we really want to see gains from proto we'd make SSZ an encode-only format. Whilst that's probably cpu-cycles-optimal, I'm not sure it's meeting-project-deadlines-optimal. Personally, I'm fine for either SSZ or protobuf across the wire -- I'm using protos for the node API so it's minimal effort for me to switch between them. |
Another reason for SSZ for consensus is the tree hashing algorithm. We need to be able to cache large portions of the state that do not change at state updates to reduce load of hashing the large state object at each slot/epoch |
I think the answer is pretty clear: "No" :) Closing for now! |
Abstract
The goal of this issue is to start a discussion on whether abandoning
SimpleSeralize
and replacing it withProtocolBuffers
is a possibility, and whether this change should be adopted.Motivation
The reason for proposing this, would be to reduce the amount of new standards created by
eth2.0
and fallback on robust technologies with already various implementations in the languages currently being used to buildeth2.0
clients.Changes
Changes to the specification would include changing all
DataStructures
to Protocol Bufferproto
's, this could also help reduce the requirement of implementation as anyone would be able to generate the data structures for their specific implementation from theseproto
s.The
hash
function could remain as is, but the way it is called could be changed. Changing it to being called with the alreadybyte
encodedproto
.The text was updated successfully, but these errors were encountered: