Skip to content

Conversation

pdobacz
Copy link
Member

@pdobacz pdobacz commented Oct 2, 2025

https://eips.ethereum.org/EIPS/eip-7892

Closes #1325 and follows the proposal there.

Blob parameter only forks. This ended up a considerable revamp, as we've moved on from hardcoded blob schedules to ones coming from JSON config (post Osaka). Because of this, a bunch of internal APIs needed to be shuffled, I hope this all still makes sense.

To ease review, the "main" commit follows the old naming convention, which seems to have bin a misnomer - it took a single entry of a blob schedule for the blob schedule. The two follow-up commits, to be squashed away before merging, clean this up.

But, this PR should also be reviewable as a whole, just need to follow the new naming.

Filling with evmone-t8n requires an update to EEST: ethereum/execution-spec-tests#2264


namespace evmone::state
{
BlobParams get_blob_params(evmc_revision rev)
Copy link
Member Author

Choose a reason for hiding this comment

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

NOTE: this used to be constexpr but it cannot be anymore, since I've decided to overload get_blob_params. I don't think the constexprness has been leveraged anywhere, and now it also throws so probably doesn't even make sense to be constexpr.. But yea, lmk if this a problem

@pdobacz pdobacz force-pushed the eip7892-bpo branch 3 times, most recently from b57b3f9 to 9cb611b Compare October 3, 2025 07:20
Copy link

codecov bot commented Oct 3, 2025

Codecov Report

❌ Patch coverage is 81.60920% with 32 lines in your changes missing coverage. Please review.
✅ Project coverage is 87.24%. Comparing base (008669c) to head (918b013).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
test/unittests/state_block_test.cpp 16.66% 0 Missing and 15 partials ⚠️
test/utils/utils.cpp 0.00% 4 Missing and 4 partials ⚠️
test/statetest/statetest_loader.cpp 89.74% 2 Missing and 2 partials ⚠️
test/state/blob_schedule.cpp 90.32% 2 Missing and 1 partial ⚠️
test/blockchaintest/blockchaintest_runner.cpp 90.00% 0 Missing and 1 partial ⚠️
test/t8n/t8n.cpp 94.11% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1330      +/-   ##
==========================================
- Coverage   87.25%   87.24%   -0.01%     
==========================================
  Files         169      169              
  Lines       24864    24970     +106     
  Branches     4081     4106      +25     
==========================================
+ Hits        21695    21786      +91     
- Misses        521      529       +8     
- Partials     2648     2655       +7     
Flag Coverage Δ
eest-develop 79.87% <87.12%> (+0.05%) ⬆️
eest-develop-gmp 15.97% <33.12%> (+0.13%) ⬆️
eest-legacy 11.22% <36.20%> (+0.11%) ⬆️
eest-legacy-silkpre 17.63% <28.02%> (+0.07%) ⬆️
evmone-unittests 83.81% <64.94%> (-0.08%) ⬇️

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

Components Coverage Δ
core 93.58% <91.42%> (-0.02%) ⬇️
tooling 88.08% <84.61%> (-0.22%) ⬇️
tests 84.14% <68.75%> (+0.01%) ⬆️
Files with missing lines Coverage Δ
test/blockchaintest/blockchaintest_loader.cpp 95.83% <100.00%> (+0.21%) ⬆️
test/state/block.cpp 100.00% <100.00%> (ø)
test/state/block.hpp 100.00% <ø> (ø)
test/statetest/statetest.hpp 85.71% <ø> (ø)
test/statetest/statetest_runner.cpp 80.43% <100.00%> (+0.43%) ⬆️
test/unittests/state_transition.cpp 81.30% <100.00%> (ø)
test/unittests/state_transition_block_test.cpp 100.00% <100.00%> (ø)
test/unittests/state_transition_call_test.cpp 100.00% <100.00%> (ø)
test/unittests/state_tx_test.cpp 83.76% <100.00%> (+0.17%) ⬆️
...est/unittests/statetest_loader_block_info_test.cpp 72.88% <100.00%> (+1.09%) ⬆️
... and 6 more
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@pdobacz
Copy link
Member Author

pdobacz commented Oct 4, 2025

I'm puzzled by why do things like unittests or t8n still come up on the coverage report, I left them on the ignore list.

This is the last thing to tackle here I guess, but otherwise ready for review

EDIT: of course, the ignore is for the EEST job only, that's why t8n comes up. I also filled some coverage gaps. I think the report is fine, there are some immaterial or irrelevant lines missed, some of which we will work on filling later.

Copy link
Member

@chfast chfast left a comment

Choose a reason for hiding this comment

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

I think the general direction is good: don't hardcode the blob schedule in EVM.

return {6, 9, 5007716};
return {3, 6, 3338477};
}
using BlobSchedule = std::unordered_map<std::string, state::BlobParams>;
Copy link
Member

Choose a reason for hiding this comment

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

Focusing on the interface for EVM here, I think the mapping should be rather timestamp => BlobParams so this is independent of the revision and the network name.

So we should use something like flat_map to represent BlobSchedule.

Getting the BlobSchedule by name or from JSON should be the job for the EVM user. I imagine this will be hardcoded for Mainnet and constructed from JSON for tests.

I'm not sure how much refactoring this is, so we can leave it for some other task. Maybe when we will be putting better boundary between test and consensus code.

Copy link
Member

Choose a reason for hiding this comment

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

Now I realized that passing BlobParams instead of BlobSchedule is more in-line with passing revision.

Copy link
Member Author

Choose a reason for hiding this comment

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

Focusing on the interface for EVM here, I think the mapping should be rather timestamp => BlobParams so this is independent of the revision and the network name.

So I thought about this today. What troubles me, is whether or not we'd still want to fetch BlobParams by fork explicitly, bypassing timestamp. More generally, I'm not 100% sure about the boundary between EEST and evmone here - in the contexts of state/blockchaintests, t8n, and potentially the future Engine API test consumption.

I think it's ok to merge as is to tick off coverage work, but I can try the refactor afterwards and we can decide the API considerations with the testing team.

Now I realized that passing BlobParams instead of BlobSchedule is more in-line with passing revision.

Not sure what do you mean? passing where?

Copy link
Member

Choose a reason for hiding this comment

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

I meant the same as your concern.

@pdobacz pdobacz force-pushed the eip7892-bpo branch 2 times, most recently from 805042d to a5bb986 Compare October 6, 2025 12:41
Copy link
Member

@chfast chfast left a comment

Choose a reason for hiding this comment

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

You can rework commits and we can merge this.

@pdobacz pdobacz force-pushed the eip7892-bpo branch 2 times, most recently from e2e6150 to f88e644 Compare October 9, 2025 21:28
@pdobacz
Copy link
Member Author

pdobacz commented Oct 10, 2025

@chfast I've tacked on a commit implementing the change we've discussed (using resolved blobParams), PTAL, and if it's OK I'll squash again and we'll be ready to merge.

Copy link
Member

@chfast chfast left a comment

Choose a reason for hiding this comment

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

Make sure the final commit message will be up to date.

@pdobacz pdobacz merged commit 92e8882 into master Oct 10, 2025
21 of 23 checks passed
@pdobacz pdobacz deleted the eip7892-bpo branch October 10, 2025 15:24
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.

Add support for EIP-7892 BPO forks

2 participants