Skip to content

Conversation

@jwasinger
Copy link
Contributor

Add two new tracing hooks which are called:

  • immediately before the first transaction in a block would be executed (even if the block is empty).
  • after applying block rewards as the final step in block execution.

These are required for BALs:

  1. if the block is empty, there is no way to differentiate between the execution of pre/post transaction block state changes. In the access list, these are distinct.
  2. Even though 1 only necessitates the addition of a single hook which is called immediately before execution of the first transaction in the block, having a dedicated hook which is called post-block-reward-application makes the implementation of the access list cleaner.

@jwasinger jwasinger changed the title Pretx postfinalize hooks core: introduce new tracing hooks prior to transaction execution and after block reward application Oct 21, 2025
@s1na
Copy link
Contributor

s1na commented Oct 23, 2025

if the block is empty, there is no way to differentiate between the execution of pre/post transaction block state changes. In the access list, these are distinct.

Which state changes are those?

@jwasinger
Copy link
Contributor Author

jwasinger commented Oct 27, 2025

The beacon root and parent root accumulator contracts mutate their storage. Post-block, contract-based withdrawals and EIP-4895 withdrawals can mutate account balances.

@s1na
Copy link
Contributor

s1na commented Oct 27, 2025

It should be possible to use the OnSystemCallStart, OnSystemCallEnd to detect changes that happen during any of that.

@jwasinger
Copy link
Contributor Author

It should be possible to use the OnSystemCallStart, OnSystemCallEnd to detect changes that happen during any of that.

There's no way to determine when the system calls are pre/post-transactions if the block does not contain any transactions.

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