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

Upgrade revm in Optimism execution #76

Merged
merged 8 commits into from
Jan 22, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions lib/src/builder/execute/optimism.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ use anyhow::{anyhow, bail, Context, Result};
use log::debug;
use revm::{
interpreter::Host,
optimism,
primitives::{Address, ResultAndState, SpecId, TransactTo, TxEnv},
Database, DatabaseCommit, Evm,
};
Expand Down Expand Up @@ -101,6 +102,7 @@ impl TxExecStrategy<OptimismTxEssence> for OpTxExecStrategy {
blk_env.gas_limit = block_builder.input.gas_limit;
})
.with_db(block_builder.db.take().unwrap())
.append_handler_register(optimism::optimism_handle_register)
Copy link
Contributor

Choose a reason for hiding this comment

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

So, in the newest revm, we must register handler ourself?

Copy link
Contributor

Choose a reason for hiding this comment

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

It's a new for other chains too.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So, in the newest revm, we must register handler ourself?

I have no idea, and have asked the revm developers the same question. My current guess is that (at least for OP) this should happen automatically when the feature is enabled.
However, if support for other chains is developed outside the revm repo, this is the new way to register them.

.build();

// bloom filter over all transaction logs
Expand Down
Loading