Skip to content

Conversation

gabrocheleau
Copy link
Contributor

@gabrocheleau gabrocheleau commented Oct 3, 2025

This PR implements EIP-7918

Copy link

codecov bot commented Oct 3, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.29%. Comparing base (89bc05b) to head (3b7bfd7).

Additional details and impacted files

Impacted file tree graph

Flag Coverage Δ
block 84.42% <100.00%> (+0.09%) ⬆️
blockchain 89.32% <ø> (ø)
common 97.53% <100.00%> (+<0.01%) ⬆️
evm 72.79% <ø> (ø)
mpt 89.74% <ø> (+0.35%) ⬆️
statemanager 69.06% <ø> (ø)
static 99.77% <ø> (ø)
tx 90.04% <ø> (ø)
util 88.75% <100.00%> (+0.01%) ⬆️
vm 55.31% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@gabrocheleau gabrocheleau mentioned this pull request Oct 3, 2025
13 tasks
@gabrocheleau gabrocheleau marked this pull request as ready for review October 3, 2025 12:54
@holgerd77
Copy link
Member

Short nit: please label PRs, still important for me

Copy link
Member

@holgerd77 holgerd77 left a comment

Choose a reason for hiding this comment

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

Few nits to address, looks good otherwise! 👍

// The validation of the fields and 4844 activation is already taken care in BlockHeader constructor
const targetGasConsumed = (this.excessBlobGas ?? BIGINT_0) + (this.blobGasUsed ?? BIGINT_0)
const targetBlobGasPerBlock = childCommon.param('targetBlobGasPerBlock')
const excessBlobGas = this.excessBlobGas ?? 0n
Copy link
Member

Choose a reason for hiding this comment

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

Please do not use the n notation for BigInts (compatibility reasons) + we have these predefined constants (like BIGINT_1) for various commonly used BigInt values, which gives a performance benefit and which you can use on various occasions in this PR.

if (!this.cache.hash) {
this.cache.hash = this.keccakFunction(RLP.encode(this.raw())) as Uint8Array
}
this.cache.hash ??= this.keccakFunction(RLP.encode(this.raw())) as Uint8Array
Copy link
Member

Choose a reason for hiding this comment

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

Did you also had this strange random (?) linter stuff !?

blobGasPriceUpdateFraction: 3338477, // The denominator used in the exponential when calculating a blob gas price
// gasPrices
minBlobGas: 1, // The minimum fee per blob gas
blobBaseCost: 8192, // EIP-7918: Blob base fee bounded by execution cost (2^13)
Copy link
Member

Choose a reason for hiding this comment

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

This can be removed (I guess?).

'should use original EIP-4844 logic when EIP-7918 is not activated',
)
})
})
Copy link
Member

Choose a reason for hiding this comment

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

Just for informational purposes: is this AI or partly or not?

Copy link
Member

Choose a reason for hiding this comment

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

Not matter who to praise for: these are really nicely readable tests! 😄 😂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants