-
Notifications
You must be signed in to change notification settings - Fork 898
Implement EIP-7892 BPO hardforks #7521
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
Conversation
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.
LGTM, just minor nits.
I think we should merge this asap for the devnet, given the spec is a bit in flux, I think its okay to merge this with the TODOs and iterate as the spec gets clearer.
consensus/types/src/chain_spec.rs
Outdated
match self.fulu_fork_epoch { | ||
Some(fulu_epoch) if epoch >= fulu_epoch => { | ||
let mut max_blobs_per_block = self.max_blobs_per_block_electra; | ||
let mut blob_schedule = self.blob_schedule.clone(); |
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.
why not sort the chainspec blob_schedule at construction from the config instead of sorting it everytime on function call?
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.
My concern was that the spec was constructed in multiple places and I want to ensure the blob schedule was always sorted. I've done that now by adding a wrapper BlobSchedule
type. Let me know what you think :)
consensus/types/src/chain_spec.rs
Outdated
let mut max_blobs_per_block = self.max_blobs_per_block_electra; | ||
let mut blob_schedule = self.blob_schedule.clone(); | ||
blob_schedule.sort_by_key(|entry| entry.epoch); | ||
for entry in blob_schedule { |
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.
Maybe we can do something like
let index = self.blob_schedule.partition_point(|entry| entry.epoch <= epoch);
if index > 0 {
max_blobs = self.blob_schedule[index - 1].max_blobs_per_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've updated the function to be implemented on the BlobSchedule
. It's simpler now. Let me know what you think :)
Tested this with the interop config in https://notes.ethereum.org/@ethpandaops/fusaka-devnet-0#Kurtosis-Interop-Conifg-Pre-devnet-testing Let it run for 3 epochs which covered an increase and decrease in the blob count and it runs perfectly with the other clients. 🎉 |
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.
LGTM, the CI failures seem to be unrelated to this PR
cc @jimmygchen
Nice one! thanks 🎉 |
This pull request has been removed from the queue for the following reason: The merge conditions cannot be satisfied due to failing checks: You can check the last failing draft PR here: #7531. You may have to fix your CI before adding the pull request to the queue again. |
Indeed, the RPC one has been fixed in #7522. |
@mergify requeue |
✅ The queue state of this pull request has been cleaned. It can be re-embarked automatically |
This pull request has been removed from the queue for the following reason: The merge conditions cannot be satisfied due to failing checks: You can check the last failing draft PR here: #7535. You may have to fix your CI before adding the pull request to the queue again. |
Ah it was actually not that (even though it revealed a real bug that triggers the same failure) - the test is actually failing 100% now in its current state, because the failing test expects a blob, but the random block generator didn't create a block with blobs. |
This comment was marked as duplicate.
This comment was marked as duplicate.
@ethDreamer I've added a setter method to the execution block generator to allow modifying blob generation behaviour on the fly. Basically the test is failing because it expects blobs, but there's no blobs generated for the next block (passing before due to |
This pull request has been removed from the queue for the following reason: The pull request #7521 has been manually updated. If you want to requeue this pull request, you can post a |
@Mergifyio requeue |
☑️ This pull request is already queued |
Issue Addressed
EIP-7892: Blob Parameter Only Hardforks
#7467