Skip to content
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

Fix block validation order for EIP4844 #2946

Merged
merged 2 commits into from
Aug 8, 2023
Merged

Fix block validation order for EIP4844 #2946

merged 2 commits into from
Aug 8, 2023

Conversation

jochem-brouwer
Copy link
Member

@jochem-brouwer jochem-brouwer commented Aug 8, 2023

The problem this fixes is that we first validate the blob transactions (this calls into fake_exponential) and then validate the excess blob gas. This is problematic, because if the excess blob gas check is incorrect it calls with very large numbers into fake_exponential, essentially an infinite loop.

This also optimizes the blob gas price calculation: this is constant, but we calculated it for each blob tx before.

@jochem-brouwer jochem-brouwer changed the title Fix Cancun pyspec tests on hive Fix block validation order for EIP4844 Aug 8, 2023
@jochem-brouwer jochem-brouwer marked this pull request as ready for review August 8, 2023 13:38
@codecov
Copy link

codecov bot commented Aug 8, 2023

Codecov Report

Merging #2946 (950cae6) into master (0a612d0) will increase coverage by 3.93%.
The diff coverage is 100.00%.

Additional details and impacted files

Impacted file tree graph

Flag Coverage Δ
block 88.66% <100.00%> (+0.01%) ⬆️
blockchain 92.58% <ø> (ø)
client 87.44% <ø> (?)
common 98.64% <ø> (ø)
ethash ∅ <ø> (∅)
evm ?
rlp ∅ <ø> (∅)
statemanager 85.16% <ø> (ø)
trie 89.70% <ø> (-0.29%) ⬇️
tx 95.96% <ø> (ø)
util 86.77% <ø> (ø)
vm 79.20% <ø> (ø)

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

acolytec3
acolytec3 previously approved these changes Aug 8, 2023
Copy link
Contributor

@acolytec3 acolytec3 left a comment

Choose a reason for hiding this comment

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

Nice fixes (especially the blobGasPrice one).

Copy link
Contributor

@g11tech g11tech left a comment

Choose a reason for hiding this comment

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

lgtm

@g11tech g11tech merged commit f8605a0 into master Aug 8, 2023
41 checks passed
@holgerd77 holgerd77 deleted the fix-pyspec-client branch August 8, 2023 20:13
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.

3 participants