You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When first implementing the p2p primitive, I decided to use Protobuf and represent PublicKey/Signature with Bytes (which prost could automatically use). However, the migration to Array (#447) makes Protobuf a lot less enjoyable to use (it was already less performant but is also even more so now).
We now need to parse fields from proto and keep them around with the proto object:
This change may pair very well with #434 (we could parse messages + verify signatures concurrently and then pass the formatted messages to the application).
May make sense to add a Version/Flag type that has 4 bits dedicated to version and 4 bits dedicated to flags (for including/not including different object components).
I'm not sure if there is any analysis on "worst case" parsing of adversarial Protobuf payloads of different sizes but that would be very interesting to dig into 👀
When first implementing the
p2p
primitive, I decided to useProtobuf
and represent PublicKey/Signature withBytes
(whichprost
could automatically use). However, the migration toArray
(#447) makesProtobuf
a lot less enjoyable to use (it was already less performant but is also even more so now).We now need to parse fields from proto and keep them around with the proto object:
monorepo/consensus/src/lib.rs
Lines 30 to 38 in ccf2f88
We should consider dropping protobuf altogether in primitives for manually packed byte payloads (which can parse generic types directly).
Related: #454
The text was updated successfully, but these errors were encountered: