Skip to content

feat: integrate revm + impl address recovery#73

Merged
juanbono merged 49 commits into
mainfrom
add-revm
Jul 2, 2024
Merged

feat: integrate revm + impl address recovery#73
juanbono merged 49 commits into
mainfrom
add-revm

Conversation

@fmoletta

@fmoletta fmoletta commented Jun 27, 2024

Copy link
Copy Markdown
Contributor

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

Comment thread crates/core/Cargo.toml Outdated
Comment thread crates/evm/src/lib.rs
@@ -1,14 +1,99 @@
pub fn add(left: usize, right: usize) -> usize {

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.

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

Comment thread crates/evm/src/lib.rs Outdated
Comment thread crates/evm/src/lib.rs
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
Copy Markdown
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
Copy Markdown
Collaborator

sorry, didn't realize this was a draft 😅

Comment thread ef_tests/src/types.rs Outdated
@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
Comment thread crates/core/src/types/transaction.rs
Comment thread crates/core/src/types/transaction.rs

@juanbono juanbono 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.

See comments

Comment thread crates/core/src/rlp/encode.rs
Comment thread ef_tests/Cargo.toml
Comment thread crates/core/src/evm/mod.rs Outdated
@fmoletta fmoletta requested a review from juanbono July 2, 2024 13:28

@mpaulucci mpaulucci 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.

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

4 participants