Skip to content

feat: add EIP4844 transactions#140

Merged
fmoletta merged 12 commits into
mainfrom
eip4844-tx
Jul 12, 2024
Merged

feat: add EIP4844 transactions#140
fmoletta merged 12 commits into
mainfrom
eip4844-tx

Conversation

@fmoletta

@fmoletta fmoletta commented Jul 10, 2024

Copy link
Copy Markdown
Contributor

This PR is based on #138 (as they modify the same code), please merge it first

Motivation

Add support for EIP4844 transactions

Description

Add EIP4844 transactions + needed trait and methods and integrate it into existing transaction-related code

Closes #26 (evm already performs validations before executing so adding the transaction itself will sufice)

@fmoletta fmoletta changed the base branch from main to eip2930-tx July 10, 2024 21:28
@fmoletta fmoletta changed the title [WIP] feat: add eip4844 tx feat: add eip4844 tx Jul 10, 2024
@fmoletta fmoletta changed the title feat: add eip4844 tx feat: add EIP4844 transactions Jul 11, 2024
@fmoletta fmoletta marked this pull request as ready for review July 11, 2024 13:27
@fmoletta fmoletta requested a review from a team as a code owner July 11, 2024 13:27
Base automatically changed from eip2930-tx to main July 11, 2024 14:09

@MegaRedHand MegaRedHand left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

Comment thread crates/core/src/rlp/error.rs Outdated
#[error("UnexpectedString")]
UnexpectedString,
#[error("Invalid transaction type")]
InvalidTransactionType,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This doesn't belong here.

Comment thread crates/core/src/types/engine/payload.rs Outdated
0x3 => {
EIP4844Transaction::decode(tx_bytes).map(Transaction::EIP4844Transaction)
}
_ => Err(RLPDecodeError::InvalidTransactionType),

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Can we change the return type, or return MalformedData instead?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Could we use the custom variant? It is a shame to lose key information useful for debugging

@MegaRedHand MegaRedHand Jul 11, 2024

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Sure! I think we might want to have some "stacktrace" in the future for cases like this

@fmoletta fmoletta merged commit fe1aeed into main Jul 12, 2024
@fmoletta fmoletta deleted the eip4844-tx branch July 12, 2024 13:48
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.

Add support for validating EIP-4844 transactions

2 participants