-
Notifications
You must be signed in to change notification settings - Fork 265
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
feat: Add Blob type that behaves like Bytes #1912
base: main
Are you sure you want to change the base?
feat: Add Blob type that behaves like Bytes #1912
Conversation
Two tests are currently failling |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's undo all of the changes here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same
I want to focus only on the additional type first
@@ -86,9 +91,146 @@ pub const BYTES_PER_COMMITMENT: usize = 48; | |||
|
|||
/// How many bytes are in a proof | |||
pub const BYTES_PER_PROOF: usize = 48; | |||
/// A fixed-size container for binary data, designed to hold exactly 131,072 bytes. | |||
#[derive(Clone, Debug, RlpEncodable, RlpDecodable, Hash, PartialEq, Eq)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
RlpDecodable we can't derive but must impl manually because we also need to enforce length
} | ||
} | ||
#[cfg(feature = "serde")] | ||
impl serde::Serialize for Blob { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
actually this we can derive
currently docs are missing but lmk if changes are needed, if not, i'll add docs @mattsse