Skip to content
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

Open
wants to merge 16 commits into
base: main
Choose a base branch
from

Conversation

DoTheBestToGetTheBest
Copy link
Contributor

currently docs are missing but lmk if changes are needed, if not, i'll add docs @mattsse

crates/eips/src/eip4844/mod.rs Outdated Show resolved Hide resolved
crates/eips/src/eip4844/builder.rs Outdated Show resolved Hide resolved
crates/eips/src/eip4844/mod.rs Outdated Show resolved Hide resolved
crates/eips/src/eip4844/mod.rs Outdated Show resolved Hide resolved
crates/eips/src/eip4844/mod.rs Outdated Show resolved Hide resolved
crates/eips/src/eip4844/mod.rs Outdated Show resolved Hide resolved
@DoTheBestToGetTheBest
Copy link
Contributor Author

Two tests are currently failling

Copy link
Member

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

Copy link
Member

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)]
Copy link
Member

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 {
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants