-
Notifications
You must be signed in to change notification settings - Fork 20.9k
core,miner,params: implement EIP-7934 - RLP Execution Block Size Limit #31990
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
base: master
Are you sure you want to change the base?
Conversation
miner/worker.go
Outdated
@@ -391,6 +394,10 @@ func (miner *Miner) commitTransactions(env *environment, plainTxs, blobTxs *tran | |||
continue | |||
} | |||
|
|||
if miner.chainConfig.IsOsaka(env.header.Number, env.header.Time) && env.size+tx.Size() > params.BlockRLPSizeCap { |
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.
Please add a comment.
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.
Also, the block body size is also influenced by other things, such as withdrawals. So we need to add a bit of buffer into the size limit here. For the withdrawals, we may be able to add their true size into env.size
before adding transactions.
…if we would hit the size cap when filling it with txs
@@ -273,6 +305,7 @@ func (miner *Miner) commitTransaction(env *environment, tx *types.Transaction) e | |||
} | |||
env.txs = append(env.txs, tx) | |||
env.receipts = append(env.receipts, receipt) | |||
env.size += tx.Size() |
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.
It only applies the non-blob-tx, but for the blob-tx, the tx withouth sidecar should also be considered for the inclusion size.
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 think blobs don't need to be included here, since they do not become a part of the 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.
Gary's point was that his path wasn't called for blob transactions. We need to factor the blob transaction without the sidecar into the size calc.
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 since updated this pr.
…ribute to the RLP-encoded block
…t to add when creating a block
|
||
for _, withdrawal := range genParam.withdrawals { | ||
if int(work.size)+params.WithdrawalSize > maxBlockSize { | ||
break |
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.
From the CL team:
potuz — 2025/6/10 21:11
This makes the payload invalid
Technically it will make the consensus block that contains that payload invalid.
Probably we need to put a note here, at least adding a warning log that a part of withdrawals specified by the CL are discarded due to the size restriction. In practice, it's impossible to occur.
No description provided.