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: integrate revm + impl address recovery #73

Merged
merged 49 commits into from
Jul 2, 2024
Merged

feat: integrate revm + impl address recovery #73

merged 49 commits into from
Jul 2, 2024

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

crates/core/Cargo.toml Outdated Show resolved Hide resolved
@@ -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.

crates/evm/src/lib.rs Outdated Show resolved Hide resolved
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 😅

ef_tests/src/types.rs Outdated Show resolved Hide resolved
@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! 🙌

@juanbono juanbono merged commit ad45537 into main Jul 2, 2024
3 checks passed
@juanbono juanbono deleted the add-revm branch July 2, 2024 17:03
mpaulucci pushed a commit to mpaulucci/lambda_ethereum_rust that referenced this pull request Oct 16, 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
<!-- Link to issues: Resolves lambdaclass#111, Resolves lambdaclass#222 -->

Closes lambdaclass#21
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