Skip to content

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

feat(eips): EIP-7594 sidecar #2273

wants to merge 1 commit into from

Conversation

rkrasiuk
Copy link
Member

@rkrasiuk rkrasiuk commented Apr 2, 2025

Motivation

Solution

PR Checklist

  • Added Tests
  • Added Documentation
  • Breaking changes

Copy link
Member

@mattsse mattsse left a 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

@github-project-automation github-project-automation bot moved this to In Progress in Alloy Apr 2, 2025
@@ -70,7 +70,7 @@ serde_json.workspace = true
rand.workspace = true

[features]
default = ["std", "kzg-sidecar"]
default = ["std", "kzg-sidecar", "kzg"]
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

temp

@rkrasiuk rkrasiuk force-pushed the rkrasiuk/eip7594 branch 8 times, most recently from 3797c90 to b93c92d Compare April 4, 2025 14:15
@jenpaff jenpaff added this to the v1.0 milestone Apr 7, 2025
Copy link
Member

@mattsse mattsse left a 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 {
Copy link
Member

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

Comment on lines 546 to 554
pub fn validate_blob(
&self,
sidecar: &BlobTransactionSidecar,
sidecar: &BlobTransactionSidecarVariant,
proof_settings: &c_kzg::KzgSettings,
) -> Result<(), BlobTransactionValidationError> {
Copy link
Member

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

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

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

Successfully merging this pull request may close these issues.

4 participants