-
Notifications
You must be signed in to change notification settings - Fork 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
chore: bump revm dec 2024 #246
Conversation
As discussed would like to hold on merging until we've iterated on the revm api a bit as this is used in a bunch of places and want to be thoughtful about breakages |
Doing exactly that, and I have already accounted interfaces and usage patterns when refactoring Revm. Changes that simplify integration even more, are here: bluealloy/revm#1934 Present context allows us a lot simpler usage and it is easier to navigate. Would assume this will not be merged until we have PR in Reth. |
@mattsse this is now integrated. We should wait for Reth integration before merging. |
Co-authored-by: Arsenii Kulikov <[email protected]>
Co-authored-by: Arsenii Kulikov <[email protected]>
to | ||
} else { | ||
// We need to exclude the created address if this is a CREATE frame. | ||
// | ||
// This assumes that caller has already been loaded but nonce was not increased yet. | ||
let nonce = context.journaled_state.account(from).info.nonce; | ||
let nonce = context.journal_ref().evm_state().get(&from).unwrap().info.nonce; |
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.
nit, can we drop the _ref() suffix here? should just be journal and journal_mut
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.
In most cases a mutable journal is needed, there was few cases were ref is needed so this fn was added
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.
I see, then I think it should remain like that for legacy reasons
src/access_list.rs
Outdated
where | ||
DB: Database, | ||
CTX: ContextTrait<Journal: JournalExt>, |
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.
naming a trait Trait always feels a bit weird to me
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.
Will rename all of them to ContextT
.
src/tracing/builder/geth.rs
Outdated
@@ -216,7 +219,7 @@ impl<'a> GethTraceBuilder<'a> { | |||
/// * `db` - The database to fetch state pre-transaction execution. | |||
pub fn geth_prestate_traces<DB: DatabaseRef>( | |||
&self, | |||
ResultAndState { state, .. }: &ResultAndState, | |||
ResultAndState { state, .. }: &ResultAndState<impl HaltReasonTrait>, |
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.
can we make this a named generic, don't like mixing this
src/tracing/builder/parity.rs
Outdated
@@ -170,7 +173,7 @@ impl ParityTraceBuilder { | |||
/// with the [TracingInspector](crate::tracing::TracingInspector). | |||
pub fn into_trace_results_with_state<DB: DatabaseRef>( | |||
self, | |||
res: &ResultAndState, | |||
res: &ResultAndState<impl HaltReasonTrait>, |
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.
same, can we name this just HaltReason or HaltReasonT
pub(crate) struct StringError(pub String); | ||
|
||
impl core::error::Error for StringError {} | ||
impl DBErrorMarker for StringError {} |
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 is this necessary?
#[derive(Clone, Debug)] | ||
pub(crate) struct StringError(pub String); |
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.
needs docs, why this is necessary
#[derive(Clone, Debug)] | ||
pub(crate) struct StringError(pub String); |
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.
can we name this JsDbError
src/tracing/js/mod.rs
Outdated
pub fn result<TX, DB>( | ||
&mut self, | ||
res: ResultAndState, | ||
env: &Env, | ||
res: ResultAndState<impl HaltReasonTrait>, | ||
tx: &TX, | ||
block: &impl Block, |
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.
can we make these consistent across all functions, don't like to mix this
a7ed3df
to
3c6cca4
Compare
Revm Framework integration