-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
feat(evm): EIP-7002 withdrawal requests #8212
Changes from all commits
6a0f553
602bd89
8e1c172
a58710c
e546045
d5dc0b1
c876c5b
71c3338
dbfdbc8
45d54ce
d4e48b5
1083d06
0d17302
b5016e0
3b6dc03
daedecb
f50b10c
b08f642
8334ee3
8a223df
49f2c03
8c3e3a1
4d518fd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,10 @@ | ||
//! Traits for execution. | ||
|
||
use alloy_consensus::Request; | ||
use reth_interfaces::{executor::BlockExecutionError, provider::ProviderError}; | ||
use reth_primitives::{BlockNumber, BlockWithSenders, PruneModes, Receipt, Receipts, U256}; | ||
use reth_primitives::{ | ||
BlockNumber, BlockWithSenders, PruneModes, Receipt, Receipts, Requests, U256, | ||
}; | ||
use revm::db::BundleState; | ||
use revm_primitives::db::Database; | ||
|
||
|
@@ -80,6 +83,8 @@ pub struct BlockExecutionOutput<T> { | |
pub state: BundleState, | ||
/// All the receipts of the transactions in the block. | ||
pub receipts: Vec<T>, | ||
/// All the EIP-7685 requests of the transactions in the block. | ||
pub requests: Vec<Request>, | ||
Comment on lines
+86
to
+87
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this is fine for now There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. how would you improve it? |
||
/// The total gas used by the block. | ||
pub gas_used: u64, | ||
} | ||
|
@@ -95,14 +100,26 @@ pub struct BatchBlockExecutionOutput { | |
/// | ||
/// If receipt is None it means it is pruned. | ||
pub receipts: Receipts, | ||
/// The collection of EIP-7685 requests. | ||
/// Outer vector stores requests for each block sequentially. | ||
/// The inner vector stores requests ordered by transaction number. | ||
/// | ||
/// A transaction may have zero or more requests, so the length of the inner vector is not | ||
/// guaranteed to be the same as the number of transactions. | ||
pub requests: Requests, | ||
/// First block of bundle state. | ||
pub first_block: BlockNumber, | ||
} | ||
|
||
impl BatchBlockExecutionOutput { | ||
/// Create Bundle State. | ||
pub fn new(bundle: BundleState, receipts: Receipts, first_block: BlockNumber) -> Self { | ||
Self { bundle, receipts, first_block } | ||
pub fn new( | ||
bundle: BundleState, | ||
receipts: Receipts, | ||
requests: Requests, | ||
first_block: BlockNumber, | ||
) -> Self { | ||
Self { bundle, receipts, requests, first_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.
I will combine this with the other output types separately