mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
feat: add prague check in ExecutionPayloadValidator (#10033)
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
This commit is contained in:
@ -47,7 +47,7 @@ impl ExecutionPayloadValidator {
|
||||
|
||||
/// Returns true if the Prague harkdfork is active at the given timestamp.
|
||||
#[inline]
|
||||
fn _is_prague_active_at_timestamp(&self, timestamp: u64) -> bool {
|
||||
fn is_prague_active_at_timestamp(&self, timestamp: u64) -> bool {
|
||||
self.chain_spec().is_prague_active_at_timestamp(timestamp)
|
||||
}
|
||||
|
||||
@ -165,6 +165,12 @@ impl ExecutionPayloadValidator {
|
||||
return Err(PayloadError::PreShanghaiBlockWithWitdrawals)
|
||||
}
|
||||
|
||||
if self.is_prague_active_at_timestamp(sealed_block.timestamp) &&
|
||||
sealed_block.has_eip7702_transactions()
|
||||
{
|
||||
return Err(PayloadError::PrePragueBlockWithEip7702Transactions)
|
||||
}
|
||||
|
||||
// EIP-4844 checks
|
||||
self.ensure_matching_blob_versioned_hashes(&sealed_block, &cancun_fields)?;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user