risechain / reth

Modular, contributor-friendly and blazing-fast implementation of the Ethereum protocol, in Rust
Apache License 2.0
5 stars 4 forks source link

Compile failed when try to make op-reth #3

Open bufrr opened 3 weeks ago

bufrr commented 3 weeks ago

Describe the bug

Compile failed when try to make op-reth

Steps to reproduce

make install-op

Node logs

cargo install --path crates/optimism/bin --bin op-reth --force --locked \
        --features "optimism jemalloc asm-keccak min-debug-logs" \
        --profile "release" \

  Installing op-reth v1.0.8 (/Users/bufrr/github/reth/crates/optimism/bin)
    Updating crates.io index
warning: package `futures-util v0.3.30` in Cargo.lock is yanked in registry `crates-io`, consider running without --locked
   Compiling reth-payload-primitives v1.0.8 (/Users/bufrr/github/reth/crates/payload/primitives)
   Compiling reth-rpc-eth-types v1.0.8 (/Users/bufrr/github/reth/crates/rpc/rpc-eth-types)
   Compiling reth-network v1.0.8 (/Users/bufrr/github/reth/crates/net/network)
   Compiling reth-optimism-evm v1.0.8 (/Users/bufrr/github/reth/crates/optimism/evm)
error[E0276]: impl has stricter requirements than trait
  --> crates/optimism/evm/src/execute.rs:73:23
   |
73 |     type Executor<DB: Database<Error: Into<ProviderError> + Display>> =
   |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl has extra requirement `DB: revm::Database`

error[E0276]: impl has stricter requirements than trait
  --> crates/optimism/evm/src/execute.rs:76:28
   |
76 |     type BatchExecutor<DB: Database<Error: Into<ProviderError> + Display>> =
   |                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl has extra requirement `DB: revm::Database`

error[E0276]: impl has stricter requirements than trait
  --> crates/optimism/evm/src/execute.rs:80:13
   |
80 |         DB: Database<Error: Into<ProviderError> + Display>,
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl has extra requirement `DB: revm::Database`

error[E0276]: impl has stricter requirements than trait
  --> crates/optimism/evm/src/execute.rs:87:13
   |
87 |         DB: Database<Error: Into<ProviderError> + Display>,
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl has extra requirement `DB: revm::Database`

error[E0277]: the trait bound `DB: DatabaseRef` is not satisfied
   --> crates/optimism/evm/src/execute.rs:78:39
    |
78  |     fn executor<DB>(&self, db: DB) -> Self::Executor<DB>
    |                                       ^^^^^^^^^^^^^^^^^^ the trait `DatabaseRef` is not implemented for `DB`
    |
note: required by a bound in `reth_evm::execute::BlockExecutorProvider::Executor`
   --> /Users/bufrr/github/reth/crates/evm/src/execute.rs:121:23
    |
121 | ...e Executor<DB: DatabaseRef<Error: Into<ProviderError> + Display> + Send + Sync>: for<...
    |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `BlockExecutorProvider::Executor`
help: consider further restricting this bound
    |
80  |         DB: Database<Error: Into<ProviderError> + Display> + revm::DatabaseRef,
    |                                                            +++++++++++++++++++

error[E0277]: `DB` cannot be sent between threads safely
   --> crates/optimism/evm/src/execute.rs:78:39
    |
78  |     fn executor<DB>(&self, db: DB) -> Self::Executor<DB>
    |                                       ^^^^^^^^^^^^^^^^^^ `DB` cannot be sent between threads safely
    |
note: required by a bound in `reth_evm::execute::BlockExecutorProvider::Executor`
   --> /Users/bufrr/github/reth/crates/evm/src/execute.rs:121:75
    |
121 | ...isplay> + Send + Sync>: for<'a> Executor<
    |              ^^^^ required by this bound in `BlockExecutorProvider::Executor`
help: consider further restricting this bound
    |
80  |         DB: Database<Error: Into<ProviderError> + Display> + std::marker::Send,
    |                                                            +++++++++++++++++++

error[E0277]: `DB` cannot be shared between threads safely
   --> crates/optimism/evm/src/execute.rs:78:39
    |
78  |     fn executor<DB>(&self, db: DB) -> Self::Executor<DB>
    |                                       ^^^^^^^^^^^^^^^^^^ `DB` cannot be shared between threads safely
    |
note: required by a bound in `reth_evm::execute::BlockExecutorProvider::Executor`
   --> /Users/bufrr/github/reth/crates/evm/src/execute.rs:121:82
    |
121 | ... + Send + Sync>: for<'a> Executor<
    |              ^^^^ required by this bound in `BlockExecutorProvider::Executor`
help: consider further restricting this bound
    |
80  |         DB: Database<Error: Into<ProviderError> + Display> + std::marker::Sync,
    |                                                            +++++++++++++++++++

error[E0277]: the trait bound `DB: DatabaseRef` is not satisfied
   --> crates/optimism/evm/src/execute.rs:85:45
    |
85  |     fn batch_executor<DB>(&self, db: DB) -> Self::BatchExecutor<DB>
    |                                             ^^^^^^^^^^^^^^^^^^^^^^^ the trait `DatabaseRef` is not implemented for `DB`
    |
note: required by a bound in `reth_evm::execute::BlockExecutorProvider::BatchExecutor`
   --> /Users/bufrr/github/reth/crates/evm/src/execute.rs:129:28
    |
129 | ...chExecutor<DB: DatabaseRef<Error: Into<ProviderError> + Display> + Send + Sync>: for<...
    |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `BlockExecutorProvider::BatchExecutor`
help: consider further restricting this bound
    |
87  |         DB: Database<Error: Into<ProviderError> + Display> + revm::DatabaseRef,
    |                                                            +++++++++++++++++++

error[E0277]: `DB` cannot be sent between threads safely
   --> crates/optimism/evm/src/execute.rs:85:45
    |
85  |     fn batch_executor<DB>(&self, db: DB) -> Self::BatchExecutor<DB>
    |                                             ^^^^^^^^^^^^^^^^^^^^^^^ `DB` cannot be sent between threads safely
    |
note: required by a bound in `reth_evm::execute::BlockExecutorProvider::BatchExecutor`
   --> /Users/bufrr/github/reth/crates/evm/src/execute.rs:129:80
    |
129 | ...play> + Send + Sync>: for<'a> BatchExecutor<
    |            ^^^^ required by this bound in `BlockExecutorProvider::BatchExecutor`
help: consider further restricting this bound
    |
87  |         DB: Database<Error: Into<ProviderError> + Display> + std::marker::Send,
    |                                                            +++++++++++++++++++

error[E0277]: `DB` cannot be shared between threads safely
   --> crates/optimism/evm/src/execute.rs:85:45
    |
85  |     fn batch_executor<DB>(&self, db: DB) -> Self::BatchExecutor<DB>
    |                                             ^^^^^^^^^^^^^^^^^^^^^^^ `DB` cannot be shared between threads safely
    |
note: required by a bound in `reth_evm::execute::BlockExecutorProvider::BatchExecutor`
   --> /Users/bufrr/github/reth/crates/evm/src/execute.rs:129:87
    |
129 | ... Send + Sync>: for<'a> BatchExecutor<
    |            ^^^^ required by this bound in `BlockExecutorProvider::BatchExecutor`
help: consider further restricting this bound
    |
87  |         DB: Database<Error: Into<ProviderError> + Display> + std::marker::Sync,
    |                                                            +++++++++++++++++++

error[E0277]: the trait bound `DB: DatabaseRef` is not satisfied
   --> crates/optimism/evm/src/execute.rs:117:18
    |
117 |         mut evm: Evm<'_, Ext, &mut State<DB>>,
    |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `DatabaseRef` is not implemented for `DB`, which is required by `&mut revm::State<DB>: revm::Database`
    |
    = note: required for `revm::State<DB>` to implement `revm::Database`
    = note: 1 redundant requirement hidden
    = note: required for `&mut revm::State<DB>` to implement `revm::Database`
note: required by a bound in `Evm`
   --> /Users/bufrr/.cargo/git/checkouts/revm-0fddc07de3cd88ca/cf599db/crates/revm/src/evm.rs:22:29
    |
22  | pub struct Evm<'a, EXT, DB: Database> {
    |                             ^^^^^^^^ required by this bound in `Evm`
help: consider further restricting this bound
    |
120 |         DB: Database<Error: Into<ProviderError> + Display> + revm::DatabaseRef,
    |                                                            +++++++++++++++++++

   Compiling reth-engine-primitives v1.0.8 (/Users/bufrr/github/reth/crates/engine/primitives)
error[E0277]: the trait bound `DB: DatabaseRef` is not satisfied
  --> crates/optimism/evm/src/execute.rs:64:44
   |
64 | ...uilder().with_database(db).with_bundle_update().without_state_clear().build(),
   |             ------------- ^^ the trait `DatabaseRef` is not implemented for `DB`
   |             |
   |             required by a bound introduced by this call
   |
note: required by a bound in `StateBuilder::<DB>::with_database`
  --> /Users/bufrr/.cargo/git/checkouts/revm-0fddc07de3cd88ca/cf599db/crates/revm/src/db/states/state_builder.rs:62:31
   |
62 |     pub fn with_database<ODB: DatabaseRef>(self, database: ODB) -> StateBuilder<ODB> {
   |                               ^^^^^^^^^^^ required by this bound in `StateBuilder::<DB>::with_database`
help: consider further restricting this bound
   |
59 |         DB: Database<Error: Into<ProviderError> + Display> + revm::DatabaseRef,
   |                                                            +++++++++++++++++++

error[E0599]: the method `with_bundle_update` exists for struct `StateBuilder<DB>`, but its trait bounds were not satisfied
  --> crates/optimism/evm/src/execute.rs:64:48
   |
64 | ...).with_database(db).with_bundle_update().without_state_clear().build(),
   |                        ^^^^^^^^^^^^^^^^^^ private field, not a method
   |
   = note: the following trait bounds were not satisfied:
           `DB: DatabaseRef`

error[E0277]: the trait bound `DB: DatabaseRef` is not satisfied
   --> crates/optimism/evm/src/execute.rs:81:5
    |
81  | /     {
82  | |         self.op_executor(db)
83  | |     }
    | |_____^ the trait `DatabaseRef` is not implemented for `DB`
    |
note: required by a bound in `reth_evm::execute::BlockExecutorProvider::Executor`
   --> /Users/bufrr/github/reth/crates/evm/src/execute.rs:121:23
    |
121 | ...e Executor<DB: DatabaseRef<Error: Into<ProviderError> + Display> + Send + Sync>: for<...
    |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `BlockExecutorProvider::Executor`
help: consider further restricting this bound
    |
80  |         DB: Database<Error: Into<ProviderError> + Display> + revm::DatabaseRef,
    |                                                            +++++++++++++++++++

error[E0277]: `DB` cannot be sent between threads safely
   --> crates/optimism/evm/src/execute.rs:81:5
    |
81  | /     {
82  | |         self.op_executor(db)
83  | |     }
    | |_____^ `DB` cannot be sent between threads safely
    |
note: required by a bound in `reth_evm::execute::BlockExecutorProvider::Executor`
   --> /Users/bufrr/github/reth/crates/evm/src/execute.rs:121:75
    |
121 | ...isplay> + Send + Sync>: for<'a> Executor<
    |              ^^^^ required by this bound in `BlockExecutorProvider::Executor`
help: consider further restricting this bound
    |
80  |         DB: Database<Error: Into<ProviderError> + Display> + std::marker::Send,
    |                                                            +++++++++++++++++++

error[E0277]: `DB` cannot be shared between threads safely
   --> crates/optimism/evm/src/execute.rs:81:5
    |
81  | /     {
82  | |         self.op_executor(db)
83  | |     }
    | |_____^ `DB` cannot be shared between threads safely
    |
note: required by a bound in `reth_evm::execute::BlockExecutorProvider::Executor`
   --> /Users/bufrr/github/reth/crates/evm/src/execute.rs:121:82
    |
121 | ... + Send + Sync>: for<'a> Executor<
    |              ^^^^ required by this bound in `BlockExecutorProvider::Executor`
help: consider further restricting this bound
    |
80  |         DB: Database<Error: Into<ProviderError> + Display> + std::marker::Sync,
    |                                                            +++++++++++++++++++

error[E0277]: the trait bound `DB: DatabaseRef` is not satisfied
   --> crates/optimism/evm/src/execute.rs:88:5
    |
88  | /     {
89  | |         let executor = self.op_executor(db);
90  | |         OpBatchExecutor { executor, batch_record: BlockBatchRecord::default() }
91  | |     }
    | |_____^ the trait `DatabaseRef` is not implemented for `DB`
    |
note: required by a bound in `reth_evm::execute::BlockExecutorProvider::BatchExecutor`
   --> /Users/bufrr/github/reth/crates/evm/src/execute.rs:129:28
    |
129 | ...chExecutor<DB: DatabaseRef<Error: Into<ProviderError> + Display> + Send + Sync>: for<...
    |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `BlockExecutorProvider::BatchExecutor`
help: consider further restricting this bound
    |
87  |         DB: Database<Error: Into<ProviderError> + Display> + revm::DatabaseRef,
    |                                                            +++++++++++++++++++

error[E0277]: `DB` cannot be sent between threads safely
   --> crates/optimism/evm/src/execute.rs:88:5
    |
88  | /     {
89  | |         let executor = self.op_executor(db);
90  | |         OpBatchExecutor { executor, batch_record: BlockBatchRecord::default() }
91  | |     }
    | |_____^ `DB` cannot be sent between threads safely
    |
note: required by a bound in `reth_evm::execute::BlockExecutorProvider::BatchExecutor`
   --> /Users/bufrr/github/reth/crates/evm/src/execute.rs:129:80
    |
129 | ...play> + Send + Sync>: for<'a> BatchExecutor<
    |            ^^^^ required by this bound in `BlockExecutorProvider::BatchExecutor`
help: consider further restricting this bound
    |
87  |         DB: Database<Error: Into<ProviderError> + Display> + std::marker::Send,
    |                                                            +++++++++++++++++++

error[E0277]: `DB` cannot be shared between threads safely
   --> crates/optimism/evm/src/execute.rs:88:5
    |
88  | /     {
89  | |         let executor = self.op_executor(db);
90  | |         OpBatchExecutor { executor, batch_record: BlockBatchRecord::default() }
91  | |     }
    | |_____^ `DB` cannot be shared between threads safely
    |
note: required by a bound in `reth_evm::execute::BlockExecutorProvider::BatchExecutor`
   --> /Users/bufrr/github/reth/crates/evm/src/execute.rs:129:87
    |
129 | ... Send + Sync>: for<'a> BatchExecutor<
    |            ^^^^ required by this bound in `BlockExecutorProvider::BatchExecutor`
help: consider further restricting this bound
    |
87  |         DB: Database<Error: Into<ProviderError> + Display> + std::marker::Sync,
    |                                                            +++++++++++++++++++

error[E0277]: the trait bound `DB: DatabaseRef` is not satisfied
   --> crates/optimism/evm/src/execute.rs:125:23
    |
125 |         system_caller.apply_beacon_root_contract_call(
    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `DatabaseRef` is not implemented for `DB`, which is required by `revm::State<DB>: revm::Database`
    |
    = note: required for `revm::State<DB>` to implement `revm::Database`
help: consider further restricting this bound
    |
120 |         DB: Database<Error: Into<ProviderError> + Display> + revm::DatabaseRef,
    |                                                            +++++++++++++++++++

error[E0599]: the method `db_mut` exists for struct `Evm<'_, Ext, &mut State<DB>>`, but its trait bounds were not satisfied
   --> crates/optimism/evm/src/execute.rs:140:79
    |
140 |         ensure_create2_deployer(self.chain_spec.clone(), block.timestamp, evm.db_mut())
    |                                                                               ^^^^^^ method cannot be called on `Evm<'_, Ext, &mut State<DB>>` due to unsatisfied trait bounds
    |
    = note: the following trait bounds were not satisfied:
            `DB: DatabaseRef`
            which is required by `&mut revm::State<DB>: revm::Database`

error[E0599]: the method `db_mut` exists for struct `Evm<'_, Ext, &mut State<DB>>`, but its trait bounds were not satisfied
   --> crates/optimism/evm/src/execute.rs:171:25
    |
171 |                     evm.db_mut()
    |                         ^^^^^^ method cannot be called on `Evm<'_, Ext, &mut State<DB>>` due to unsatisfied trait bounds
    |
    = note: the following trait bounds were not satisfied:
            `DB: DatabaseRef`
            which is required by `&mut revm::State<DB>: revm::Database`

error[E0599]: the method `tx_mut` exists for struct `Evm<'_, Ext, &mut State<DB>>`, but its trait bounds were not satisfied
   --> crates/optimism/evm/src/execute.rs:178:45
    |
178 |             self.evm_config.fill_tx_env(evm.tx_mut(), transaction, *sender);
    |                                             ^^^^^^
    |
    = note: the following trait bounds were not satisfied:
            `DB: DatabaseRef`
            which is required by `&mut revm::State<DB>: revm::Database`

error[E0599]: the method `transact` exists for struct `Evm<'_, Ext, &mut State<DB>>`, but its trait bounds were not satisfied
   --> crates/optimism/evm/src/execute.rs:181:56
    |
181 |             let ResultAndState { result, state } = evm.transact().map_err(move |err| {
    |                                                        ^^^^^^^^ method cannot be called on `Evm<'_, Ext, &mut State<DB>>` due to unsatisfied trait bounds
    |
    = note: the following trait bounds were not satisfied:
            `DB: DatabaseRef`

error[E0599]: the method `db_mut` exists for struct `Evm<'_, Ext, &mut State<DB>>`, but its trait bounds were not satisfied
   --> crates/optimism/evm/src/execute.rs:196:17
    |
196 |             evm.db_mut().commit(state);
    |                 ^^^^^^ method cannot be called on `Evm<'_, Ext, &mut State<DB>>` due to unsatisfied trait bounds
    |
    = note: the following trait bounds were not satisfied:
            `DB: DatabaseRef`
            which is required by `&mut revm::State<DB>: revm::Database`

error[E0277]: the trait bound `DB: DatabaseRef` is not satisfied
   --> crates/optimism/evm/src/execute.rs:219:9
    |
219 |         drop(evm);
    |         ^^^^ the trait `DatabaseRef` is not implemented for `DB`, which is required by `&mut revm::State<DB>: revm::Database`
    |
    = note: required for `revm::State<DB>` to implement `revm::Database`
    = note: 1 redundant requirement hidden
    = note: required for `&mut revm::State<DB>` to implement `revm::Database`
note: required by a bound in `Evm`
   --> /Users/bufrr/.cargo/git/checkouts/revm-0fddc07de3cd88ca/cf599db/crates/revm/src/evm.rs:22:29
    |
22  | pub struct Evm<'a, EXT, DB: Database> {
    |                             ^^^^^^^^ required by this bound in `Evm`
help: consider further restricting this bound
    |
120 |         DB: Database<Error: Into<ProviderError> + Display> + revm::DatabaseRef,
    |                                                            +++++++++++++++++++

error[E0277]: the trait bound `DB: DatabaseRef` is not satisfied
   --> crates/optimism/evm/src/execute.rs:298:66
    |
298 |             let evm = self.executor.evm_config.evm_with_env(&mut self.state, env);
    |                                                ------------      ^^^^^^^^^^ the trait `DatabaseRef` is not implemented for `DB`, which is required by `&mut revm::State<DB>: revm::Database`
    |                                                |
    |                                                required by a bound introduced by this call
    |
    = note: required for `revm::State<DB>` to implement `revm::Database`
    = note: 1 redundant requirement hidden
    = note: required for `&mut revm::State<DB>` to implement `revm::Database`
note: required by a bound in `reth_evm::ConfigureEvm::evm_with_env`
   --> /Users/bufrr/github/reth/crates/evm/src/lib.rs:55:25
    |
55  |     fn evm_with_env<DB: Database>(
    |                         ^^^^^^^^ required by this bound in `ConfigureEvm::evm_with_env`
help: consider further restricting this bound
    |
263 |     DB: Database<Error: Into<ProviderError> + Display> + revm::DatabaseRef,
    |                                                        +++++++++++++++++++

error[E0277]: the trait bound `DB: DatabaseRef` is not satisfied
   --> crates/optimism/evm/src/execute.rs:299:27
    |
299 |             self.executor.execute_pre_and_transactions(block, evm)
    |                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `DatabaseRef` is not implemented for `DB`, which is required by `&mut revm::State<_>: revm::Database`
    |
    = note: required for `revm::State<DB>` to implement `revm::Database`
    = note: 1 redundant requirement hidden
    = note: required for `&mut revm::State<DB>` to implement `revm::Database`
note: required by a bound in `Evm`
   --> /Users/bufrr/.cargo/git/checkouts/revm-0fddc07de3cd88ca/cf599db/crates/revm/src/evm.rs:22:29
    |
22  | pub struct Evm<'a, EXT, DB: Database> {
    |                             ^^^^^^^^ required by this bound in `Evm`
help: consider further restricting this bound
    |
263 |     DB: Database<Error: Into<ProviderError> + Display> + revm::DatabaseRef,
    |                                                        +++++++++++++++++++

error[E0599]: the method `set_state_clear_flag` exists for struct `State<DB>`, but its trait bounds were not satisfied
   --> crates/optimism/evm/src/execute.rs:312:20
    |
312 |         self.state.set_state_clear_flag(state_clear_flag);
    |                    ^^^^^^^^^^^^^^^^^^^^ method cannot be called on `State<DB>` due to unsatisfied trait bounds
    |
    = note: the following trait bounds were not satisfied:
            `DB: DatabaseRef`

error[E0599]: the method `increment_balances` exists for struct `State<DB>`, but its trait bounds were not satisfied
   --> crates/optimism/evm/src/execute.rs:326:14
    |
325 | /         self.state
326 | |             .increment_balances(balance_increments)
    | |             -^^^^^^^^^^^^^^^^^^ method cannot be called on `State<DB>` due to unsatisfied trait bounds
    | |_____________|
    |
    |
    = note: the following trait bounds were not satisfied:
            `DB: DatabaseRef`

error[E0599]: the method `merge_transitions` exists for struct `State<DB>`, but its trait bounds were not satisfied
   --> crates/optimism/evm/src/execute.rs:354:20
    |
354 |         self.state.merge_transitions(BundleRetention::Reverts);
    |                    ^^^^^^^^^^^^^^^^^ method cannot be called on `State<DB>` due to unsatisfied trait bounds
    |
    = note: the following trait bounds were not satisfied:
            `DB: DatabaseRef`

error[E0599]: the method `take_bundle` exists for struct `State<DB>`, but its trait bounds were not satisfied
   --> crates/optimism/evm/src/execute.rs:357:31
    |
357 |             state: self.state.take_bundle(),
    |                               ^^^^^^^^^^^ method cannot be called on `State<DB>` due to unsatisfied trait bounds
    |
    = note: the following trait bounds were not satisfied:
            `DB: DatabaseRef`

   Compiling reth-node-types v1.0.8 (/Users/bufrr/github/reth/crates/node/types)
   Compiling reth-ethereum-engine-primitives v1.0.8 (/Users/bufrr/github/reth/crates/ethereum/engine-primitives)
error[E0599]: the method `merge_transitions` exists for struct `State<DB>`, but its trait bounds were not satisfied
   --> crates/optimism/evm/src/execute.rs:376:20
    |
376 |         self.state.merge_transitions(BundleRetention::Reverts);
    |                    ^^^^^^^^^^^^^^^^^ method cannot be called on `State<DB>` due to unsatisfied trait bounds
    |
    = note: the following trait bounds were not satisfied:
            `DB: DatabaseRef`

error[E0599]: the method `take_bundle` exists for struct `State<DB>`, but its trait bounds were not satisfied
   --> crates/optimism/evm/src/execute.rs:380:31
    |
380 |             state: self.state.take_bundle(),
    |                               ^^^^^^^^^^^ method cannot be called on `State<DB>` due to unsatisfied trait bounds
    |
    = note: the following trait bounds were not satisfied:
            `DB: DatabaseRef`

error[E0599]: the method `merge_transitions` exists for struct `State<DB>`, but its trait bounds were not satisfied
   --> crates/optimism/evm/src/execute.rs:434:29
    |
434 |         self.executor.state.merge_transitions(retention);
    |                             ^^^^^^^^^^^^^^^^^ method cannot be called on `State<DB>` due to unsatisfied trait bounds
    |
    = note: the following trait bounds were not satisfied:
            `DB: DatabaseRef`

error[E0599]: the method `take_bundle` exists for struct `State<DB>`, but its trait bounds were not satisfied
   --> crates/optimism/evm/src/execute.rs:444:33
    |
444 |             self.executor.state.take_bundle(),
    |                                 ^^^^^^^^^^^ method cannot be called on `State<DB>` due to unsatisfied trait bounds
    |
    = note: the following trait bounds were not satisfied:
            `DB: DatabaseRef`

error[E0599]: the method `load_cache_account` exists for mutable reference `&mut State<DB>`, but its trait bounds were not satisfied
   --> crates/optimism/evm/src/l1.rs:281:22
    |
281 |         let acc = db.load_cache_account(CREATE_2_DEPLOYER_ADDR)?;
    |                      ^^^^^^^^^^^^^^^^^^ method cannot be called on `&mut State<DB>` due to unsatisfied trait bounds
    |
    = note: the following trait bounds were not satisfied:
            `DB: DatabaseRef`
help: consider restricting the type parameter to satisfy the trait bound
    |
269 |     DB: revm::Database, DB: DatabaseRef
    |                       ~~~~~~~~~~~~~~~~~

error[E0599]: the method `commit` exists for mutable reference `&mut State<DB>`, but its trait bounds were not satisfied
   --> crates/optimism/evm/src/l1.rs:293:12
    |
293 |         db.commit(HashMap::from_iter([(CREATE_2_DEPLOYER_ADDR, revm_acc)]));
    |            ^^^^^^ method cannot be called on `&mut State<DB>` due to unsatisfied trait bounds
    |
   ::: /Users/bufrr/.cargo/git/checkouts/revm-0fddc07de3cd88ca/cf599db/crates/revm/src/db/states/state.rs:45:1
    |
45  | pub struct State<DB> {
    | -------------------- doesn't satisfy `revm::State<DB>: DatabaseCommit`
    |
    = note: the following trait bounds were not satisfied:
            `DB: DatabaseRef`
            which is required by `revm::State<DB>: DatabaseCommit`
            `revm::State<DB>: DatabaseCommit`
            which is required by `&mut revm::State<DB>: DatabaseCommit`
help: consider restricting the type parameter to satisfy the trait bound
    |
269 |     DB: revm::Database, DB: DatabaseRef
    |                       ~~~~~~~~~~~~~~~~~

warning: unused import: `DatabaseCommit`
  --> crates/optimism/evm/src/execute.rs:26:20
   |
26 |     db::{Database, DatabaseCommit},
   |                    ^^^^^^^^^^^^^^
   |
   = note: `#[warn(unused_imports)]` on by default

warning: unused import: `DatabaseCommit`
  --> crates/optimism/evm/src/l1.rs:12:5
   |
12 |     DatabaseCommit, L1BlockInfo,
   |     ^^^^^^^^^^^^^^

Some errors have detailed explanations: E0276, E0277, E0599.
For more information about an error, try `rustc --explain E0276`.
warning: `reth-optimism-evm` (lib) generated 2 warnings
error: could not compile `reth-optimism-evm` (lib) due to 38 previous errors; 2 warnings emitted
warning: build failed, waiting for other jobs to finish...

Platform(s)

Linux (x86), Mac (Apple Silicon)

What version/commit are you on?

v1.0.7

What database version are you on?

no database

Which chain / network are you on?

optimism

What type of node are you running?

Archive (default)

What prune config do you use, if any?

No response

If you've built Reth from source, provide the full command you used

No response

Code of Conduct

hai-rise commented 3 weeks ago

@bufrr Ah, we currently maintain OP compatibility in a private repository. For historical sync, the change is pretty straightforward, mostly changing DB: Database to DB: DatabaseRef + Send + Sync like for Ethereum here: https://github.com/risechain/reth/commit/63af3be58dd28f9c4ea581b9992012b616e11596#diff-7fbb0c1e65c92e8879aa308fee2538af673a2cd6d70f9b5b1103cf4d6554604d

I'll push it here soon, but also note that OP Mainnet blocks are very small so parallel execution isn't much faster. For practical use, it still needs to wait for #2.

bufrr commented 3 weeks ago

@bufrr Ah, we currently maintain OP compatibility in a private repository. For historical sync, the change is pretty straightforward, mostly changing DB: Database to DB: DatabaseRef + Send + Sync like for Ethereum here: 63af3be#diff-7fbb0c1e65c92e8879aa308fee2538af673a2cd6d70f9b5b1103cf4d6554604d

I'll push it here soon, but also note that OP Mainnet blocks are very small so parallel execution isn't much faster. For practical use, it still needs to wait for #2.

Got it! Ty

hai-rise commented 3 weeks ago

Ah, let's keep the issue open to make us accountable. Let's only close it once it compiles!

github-actions[bot] commented 17 hours ago

This issue is stale because it has been open for 21 days with no activity.