-
Notifications
You must be signed in to change notification settings - Fork 8
fix: gas estimation for simple transfers #78
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
Conversation
e2b43bf
to
5932673
Compare
@@ -41,3 +42,37 @@ impl<Ext, Db: DatabaseRef + Sync> EvmNeedsBlock<'_, Ext, ConcurrentState<Db>> { | |||
bundle | |||
} | |||
} | |||
|
|||
impl<Ext, Db: DatabaseRef + Sync> EvmNeedsTx<'_, Ext, ConcurrentState<Db>> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
drive-by to add feature parity with State
/// them should be done with caution, as it may lead to logic bugs. | ||
/// | ||
/// [`CfgEnv`]: revm::primitives::CfgEnv | ||
pub fn env_unchecked(&self) -> &Env { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
drive-by util functions
@@ -1176,7 +1200,7 @@ impl<'a, Ext, Db: Database + DatabaseCommit, TrevmState: HasTx> Trevm<'a, Ext, D | |||
} | |||
} | |||
|
|||
// -- HAS TX with State<Db> | |||
// -- NEEDS TX with State<Db> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fix doc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
couple of nits, all good otherwise
@@ -1,6 +1,6 @@ | |||
[package] | |||
name = "trevm" | |||
version = "0.19.3" | |||
version = "0.19.5" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why are we skipping a version?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to match revm
Co-authored-by: evalir <[email protected]>
Co-authored-by: evalir <[email protected]>
the basic transfer estimation failed when eip2930 or eip7702 attributes were present, by underestimating the gas required.
This is an edge case, as users don't generally attach spurious info that costs money, but regularly encountered during testing things like
eth_estimateGas