Skip to content

Dep: update revm to 20 #94

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

Merged
merged 16 commits into from
Mar 27, 2025
Merged

Dep: update revm to 20 #94

merged 16 commits into from
Mar 27, 2025

Conversation

prestwich
Copy link
Member

😮‍💨

Copy link
Member

@Evalir Evalir left a comment

Choose a reason for hiding this comment

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

first pass done, will do a second pass later

@@ -18,18 +18,18 @@ use std::format;
/// connector. E.g. the connector may contain some `Db` and the resulting Db may
/// contain `&Db`. This allows for (e.g.) shared caches between DBs on multiple
/// threads.
pub trait DbConnect<'a>: Sync {
pub trait DbConnect: Sync {
Copy link
Member

Choose a reason for hiding this comment

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

i don't exactly remember why we couldn't elide this lifetime before—what was the reason?

Copy link
Member Author

Choose a reason for hiding this comment

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

so that it could appear in the return types of the functions without being a generic lifetime on the function


/// The result of driving a bundle to completion.
pub type DriveBundleResult<'a, Ext, Db, T> =
Result<EvmNeedsTx<'a, Ext, Db>, EvmBundleDriverErrored<'a, Ext, Db, T>>;
pub type DriveBundleResult<Db, Insp, T> =
Copy link
Member

Choose a reason for hiding this comment

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

nvm i now remember why we have it. But does this change usage in any significant way?

Copy link
Member Author

Choose a reason for hiding this comment

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

losing the lifetime is good overall, but order of generics is flipped 😮‍💨

gas_priority_fee.take();
blob_hashes.clear();
max_fee_per_blob_gas.take();
authorization_list.take();
*max_fee_per_blob_gas = 0;
Copy link
Member

Choose a reason for hiding this comment

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

should this be 0?

Copy link
Member Author

Choose a reason for hiding this comment

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

so it now must be populated (no longer an option type), but is ignored during tx validation for non-4844 tx types

https://github.com/bluealloy/revm/blob/6f383227cad2c0eb4949533a2e27de015ca6bdb9/crates/handler/src/validation.rs#L102

Copy link
Member Author

Choose a reason for hiding this comment

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

so i think any value is permissible

*value = self.value.unwrap_or_default();
*data = self.input.input().cloned().unwrap_or_default();
*nonce = self.nonce;
*nonce = self.nonce.unwrap_or_default(); // TODO: IS THIS CORRECT?
Copy link
Member

Choose a reason for hiding this comment

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

hmm i'm not exactly sure this is correct, i need to check

Copy link
Member Author

Choose a reason for hiding this comment

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

soooo it's not the same behavior as it used to be, unfortunately. Because nonce-check-disabling is now in cfg rather than tx. but there's nothing else we can do here -_-

Copy link
Member Author

Choose a reason for hiding this comment

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

the rpc server already disables nonce checks on call so this should be fine

@prestwich prestwich mentioned this pull request Mar 26, 2025
@prestwich prestwich marked this pull request as ready for review March 26, 2025 12:41
Copy link
Member

@Evalir Evalir left a comment

Choose a reason for hiding this comment

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

aight, this is looking good to me so far

@prestwich prestwich enabled auto-merge (squash) March 27, 2025 11:06
@prestwich prestwich merged commit 11f6ab9 into main Mar 27, 2025
5 checks passed
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.

2 participants