Skip to content

Conversation

@kjcamann
Copy link
Contributor

There are a few changes here:

  • The ExecuteTransaction and ExecuteSystemTransaction functors are given a State object rather than creating one, so it can be owned by the outer transaction fiber. After the functor is done executing the transaction, this outer fiber gives the State to the recording code

  • class State gains the State::clear method, so that it can be reset when re-execution is needed

  • record_txn_events.cpp gains functions for recording State objects as ACCOUNT_ACCESS_LIST_HEADER, ACCOUNT_ACCESS, and STORAGE_ACCESS events

  • All state-affecting changes to the block that occur before transaction and after the transaction are also recorded

Copilot AI review requested due to automatic review settings October 23, 2025 18:34
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR refactors transaction execution to enable recording of state access events. The key change is moving State object ownership from within transaction execution functors to the outer transaction fiber, allowing state information to be captured after execution completes.

Key changes:

  • ExecuteTransaction and ExecuteSystemTransaction functors now accept a State& parameter in their operator() instead of creating State internally
  • Added State::clear() method to enable state reuse during transaction retries
  • Implemented state access event recording via new ACCOUNT_ACCESS_LIST_HEADER, ACCOUNT_ACCESS, and STORAGE_ACCESS events

Reviewed Changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
execute_system_transaction.hpp/cpp Removed BlockState member; operator() now accepts State& parameter
execute_transaction.hpp/cpp Removed BlockState member; operator() now accepts State& parameter
dispatch_transaction.hpp/cpp Updated signatures to pass State& instead of BlockState&
state.hpp/cpp Added clear() method and get_block_state() accessors
version_stack.hpp Added reset() method to support state clearing
execute_block.cpp Creates State objects before transaction execution; records access events for block prologue/epilogue
record_txn_events.hpp/cpp Added infrastructure to record account and storage access events
execute_transaction_test.cpp Updated tests to create State objects and pass to execution functors

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@kjcamann kjcamann force-pushed the ken/event-ring-v4-execution-state branch from 2f4605d to 8bb9232 Compare October 28, 2025 18:07
There are a few changes here:

- The ExecuteTransaction and ExecuteSystemTransaction functors are
  given a State object rather than creating one, so it can be owned
  by the outer transaction fiber. After the functor is done executing
  the transaction, this outer fiber gives the State to the recording
  code

- `class State` gains the `State::clear` method, so that it can be
  reset when re-execution is needed

- record_txn_events.cpp gains functions for recording State objects
  as `ACCOUNT_ACCESS_LIST_HEADER`, `ACCOUNT_ACCESS`, and
  `STORAGE_ACCESS` events

- All state-affecting changes to the block that occur before
  transaction and after the transaction are also recorded
@kjcamann kjcamann force-pushed the ken/event-ring-v4-execution-state branch from 8bb9232 to 6e09fee Compare October 28, 2025 18:29
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