a16z / helios

A fast, secure, and portable light client for Ethereum
MIT License
1.76k stars 269 forks source link

Can't build execution v0.5.1 in Rust project #303

Closed micheleterziani closed 7 months ago

micheleterziani commented 7 months ago

Hello everyone, I'm trying to use Helios on my Rust project, I added the dependency in the .toml file from the github repo (version 0.5.1) but when i try to compile it gives me a series of errors, the first one appears to be an unresolved import of revm::primitives. This is the error:

error[E0432]: unresolved import `revm::primitives::B160`
  --> /Users/.cargo/git/checkouts/helios-b3bc464b79507b80/92fcdf0/execution/src/evm.rs:10:82
   |
10 |         AccountInfo, Bytecode, Env, ExecutionResult, ResultAndState, TransactTo, B160, B256, U256,
   |                                                                                  ^^^^ no `B160` in the root

Does anyone know what to do? I'm using VS Code and the build stops when trying to compile at execution/src/evm.rs:10:82

ncitron commented 7 months ago

Yeah this seems to be because revm, one of our dependencies, has introduced a breaking change without properly bumping their semver to denote that they have made such a change. For a quick fix you can try changing the revm version in your lock file to one that is lower (probably reducing the patch number of it). I'll try to see if there is a way for me to lock to a working version of revm in our main cargo.toml so that this happens automatically, but if that doesn't work we may have to just update our revm version and fix all of the changes.