-
Notifications
You must be signed in to change notification settings - Fork 421
feat(eips): EIP-7594 sidecar #2273
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
base: main
Are you sure you want to change the base?
Conversation
ad05e66
to
bf1e853
Compare
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.
can we undo the rename here, this just introduces friction and we can avoid this because this sidecar will still remain the main user facing type
bf1e853
to
53b9bef
Compare
crates/eips/Cargo.toml
Outdated
@@ -70,7 +70,7 @@ serde_json.workspace = true | |||
rand.workspace = true | |||
|
|||
[features] | |||
default = ["std", "kzg-sidecar"] | |||
default = ["std", "kzg-sidecar", "kzg"] |
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.
temp
3797c90
to
b93c92d
Compare
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.
we can likely make all of this work without introducing breaking changes (at least twice, introducing the variant format, transitioning to 7594 format)
@@ -88,8 +92,8 @@ impl From<TxEip4844> for TxEip4844Variant { | |||
} | |||
} | |||
|
|||
impl From<(TxEip4844, BlobTransactionSidecar)> for TxEip4844Variant { | |||
fn from((tx, sidecar): (TxEip4844, BlobTransactionSidecar)) -> Self { | |||
impl From<(TxEip4844, BlobTransactionSidecarVariant)> for TxEip4844Variant { |
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.
this removes an impl, we should avoid this
pub fn validate_blob( | ||
&self, | ||
sidecar: &BlobTransactionSidecar, | ||
sidecar: &BlobTransactionSidecarVariant, | ||
proof_settings: &c_kzg::KzgSettings, | ||
) -> Result<(), BlobTransactionValidationError> { |
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.
this would be breaking
@@ -776,13 +779,17 @@ pub struct TxEip4844WithSidecar { | |||
pub tx: TxEip4844, | |||
/// The sidecar. | |||
#[cfg_attr(feature = "serde", serde(flatten))] | |||
pub sidecar: BlobTransactionSidecar, | |||
pub sidecar: BlobTransactionSidecarVariant, |
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.
with this approach we will always need runtime checks for the format, this would also be a significant breaking change that could trigger more breaking changes if the eip changes.
I'd prefer if we can make this a generic value instead then we can easily switch between
BlobTransactionSideCar, Variant, 7594 format
it' likely that we need a helper trait for validation then but this should be fine because we know all the variants
cd15ad4
to
f95441f
Compare
f95441f
to
9715113
Compare
9715113
to
d766aed
Compare
Motivation
Solution
PR Checklist