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 EIP-7702 - new type transaction #960

Open
wants to merge 8 commits into
base: develop
Choose a base branch
from
Open

Conversation

mrLSD
Copy link
Member

@mrLSD mrLSD commented Sep 26, 2024

Description

➡️ Added EIP-7702 - new type transaction for Prague hard fork
➡️ Changed basic EVM transact functions call

⚠️ Special attention: it brings breaking changes, as a new version of aurora-evm transact functions has breaking changes, wich includes new fields related to EIP-7702.

Gas cost

➡️ Gas costs decreased. In some cases significantly.

@mrLSD mrLSD self-assigned this Sep 26, 2024
@mrLSD mrLSD added C-enhancement Category: New feature or request S-do-not-merge Status: Do not merge A-testing Area: If something has added tests, or changed them. A-evm-compatibility Area: EVM compatibility changes or fixes. A-engine Area: purely engine EVM related labels Sep 26, 2024
@aleksuss
Copy link
Member

aleksuss commented Oct 7, 2024

It would be good to add some integration tests/examples which demonstrate the new functionality.

engine-transactions/src/eip_7702.rs Outdated Show resolved Hide resolved
engine-transactions/src/eip_7702.rs Outdated Show resolved Hide resolved
engine-transactions/src/eip_7702.rs Outdated Show resolved Hide resolved
@mrLSD mrLSD requested a review from birchmd October 8, 2024 11:12
Copy link
Member

@birchmd birchmd left a comment

Choose a reason for hiding this comment

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

The implementation looks good to me now, nice work. I still think it would be nice to have some integration tests for this feature. I think the following tests would be good to have:

  • Happy path: EOA delegates code to a contract and then a transaction to that EOA executes successfully
  • Error path: Delegation fails for incorrect nonce
  • Error path: Delegation fails for incorrect chain id
  • Error path: Delegation fails for invalid signature

if self.transaction.authorization_list.is_empty() {
return Err(Error::EmptyAuthorizationList);
}
let current_tx_chain_id = U256::from(self.transaction.chain_id);
Copy link
Member

Choose a reason for hiding this comment

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

Good idea taking the current chain id from the transaction itself!

@@ -88,7 +88,7 @@ fn repro_5bEgfRQ() {
block_timestamp: 1_651_073_772_931_594_646,
input_path: "src/tests/res/input_5bEgfRQ.hex",
evm_gas_used: 6_414_105,
near_gas_used: 650,
near_gas_used: 508,
Copy link
Member

Choose a reason for hiding this comment

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

It's always nice to see the gas costs go down when we move to a newer version of sputnikVM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-engine Area: purely engine EVM related A-evm-compatibility Area: EVM compatibility changes or fixes. A-testing Area: If something has added tests, or changed them. C-enhancement Category: New feature or request S-do-not-merge Status: Do not merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants