-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
refactor(rpc): unify system caller invocations #12360
Conversation
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.
lgtm
/// Applies chain-specific state transitions required before executing a block. | ||
/// | ||
/// Note: This should only be called when tracing an entire block vs individual transactions. | ||
/// When tracing transaction on top of an already committed block state, those transitions are | ||
/// already applied. | ||
fn apply_pre_execution_changes<DB: Send + Database<Error: Display> + DatabaseCommit>( |
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.
this makes sense, although this only works as long as the the system calls are the same for eth and op.
but this is a good step
@@ -93,54 +92,30 @@ where | |||
/// Trace the entire block asynchronously | |||
async fn trace_block( | |||
&self, | |||
at: BlockId, | |||
transactions: Vec<TransactionSignedEcRecovered>, | |||
block: Arc<SealedBlockWithSenders>, |
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.
these changes are so that we don't need the parent_beacon_block_root argument?
transactions, | ||
Arc::new(block.with_senders_unchecked(senders).seal_slow()), |
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 we need to seal here because we decoded the block from rlp
ref #12023
Extracts all system caller into a separate method on
Trace
trait. Those are now same for OP and eth but eventually we can customize OP behavior by just overriding this method in OP trait impl.