Skip to content

feat: process withdrawals + fix block decoding in ef tests#213

Merged
fmoletta merged 17 commits into
mainfrom
process-withdrawals
Aug 1, 2024
Merged

feat: process withdrawals + fix block decoding in ef tests#213
fmoletta merged 17 commits into
mainfrom
process-withdrawals

Conversation

@fmoletta

@fmoletta fmoletta commented Jul 31, 2024

Copy link
Copy Markdown
Contributor

Motivation

Adding the ability to process withdrawals after performing sate transitions

Description

  • Adds function process_withdrawals
  • Fixes parsing of blocks in eftests (This allows us to validate and execute blocks that expect exceptions)
  • Fixes execution result checks for transactions that expect exceptions
  • Adds eip4895_withdrawals tests to the ef tests shangai test harness

Closes #22

@fmoletta fmoletta changed the title feat: process withdrawals feat: process withdrawals + fix block decoding in ef tests Jul 31, 2024
@fmoletta fmoletta marked this pull request as ready for review July 31, 2024 21:59
@fmoletta fmoletta requested a review from a team as a code owner July 31, 2024 21:59
@fmoletta fmoletta force-pushed the process-withdrawals branch from e2e2b16 to 646b3c7 Compare July 31, 2024 22:21
Comment thread cmd/ef_tests/types.rs
pub withdrawals: Option<Vec<Withdrawal>>,
}

impl BlockWithRLP {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

nice!

Comment thread crates/storage/storage.rs Outdated
}

/// Increments the balance of an account by a given ammount (if it exists)
fn increment_balance(&mut self, address: Address, amount: U256) -> Result<(), StoreError> {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I worry a bit that this is a separate step from the other updates to accounts. I think eventually we will want to have some kind of "changeset" tables so that we can go back in case of a chain reorg, and that will be more challenging the less "atomic" the changes are. But I think we're fine though, I don't have a concrete suggestion

@fmoletta fmoletta added this pull request to the merge queue Aug 1, 2024
Merged via the queue into main with commit b464e7f Aug 1, 2024
@fmoletta fmoletta deleted the process-withdrawals branch August 1, 2024 18:08
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.

[EIP-4895] Process withdrawals after executing state transition

2 participants