Skip to content

Conversation

@fmoletta
Copy link
Contributor

@fmoletta fmoletta commented Jun 27, 2024

Motivation

Replace evm code in eftests with an implementation that uses ethrex types

Description

  • Implement execute_tx using revm
  • Move evm crate into core crate
  • Move Transaction into its own module
  • Implement multiple getters for Transaction fields
  • Implement address recovery from signed transactions
  • Implement conversions between ef tests types and ethrex types
  • Add one more ef test

Closes #21

@@ -1,14 +1,99 @@
pub fn add(left: usize, right: usize) -> usize {
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think we wanted to avoid to many crates so we were adding evm code to core.

let acc_info = RevmAccountInfo {
balance: U256::from_limbs(account.info.balance.0),
code_hash: account.info.code_hash.0.into(),
code: Some(Bytecode::new_raw(account.code.clone().into())),
Copy link
Collaborator

Choose a reason for hiding this comment

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

code it optional right? Depending on if the address is a smart contract or a EOA?

@mpaulucci
Copy link
Collaborator

sorry, didn't realize this was a draft 😅

@fmoletta fmoletta changed the title feat: integrate revm feat: integrate revm + impl address recovery Jul 1, 2024
@fmoletta fmoletta marked this pull request as ready for review July 1, 2024 21:10
@fmoletta fmoletta requested a review from a team as a code owner July 1, 2024 21:10
Copy link
Collaborator

@juanbono juanbono left a comment

Choose a reason for hiding this comment

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

See comments

@fmoletta fmoletta requested a review from juanbono July 2, 2024 13:28
Copy link
Collaborator

@mpaulucci mpaulucci left a comment

Choose a reason for hiding this comment

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

great work! 🙌

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.

Call EVM to execute transactions in a block

5 participants