-
Notifications
You must be signed in to change notification settings - Fork 131
EIP-7934 #3376
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?
EIP-7934 #3376
Changes from all commits
a5c5362
08816a3
bdf2591
6c962ce
3794671
55c505f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -160,9 +160,13 @@ proc assembleBlock*( | |
blobsBundle = BlobsBundle( | ||
wrapperVersion: getWrapperVersion(com, blk.header.timestamp) | ||
) | ||
currentRlpSize = rlp.getEncodedLength(blk.header) + rlp.getEncodedLength(blk.withdrawals) | ||
|
||
for item in pst.packedTxs: | ||
let tx = item.pooledTx | ||
if currentRlpSize > MAX_RLP_BLOCK_SIZE - 7: | ||
break | ||
currentRlpSize = currentRlpSize + rlp.getEncodedLength(tx.tx) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Calculating the rlp length like this might works to some extent. But considering how rlp algorithm works, there are and there will be edge cases where this calculation will produce invalid result. To produce a reliable result for all cases, we need a specially crafted And that dangerous limit is And also a break from that loop must be executed before |
||
blk.txs.add tx.tx | ||
if tx.blobsBundle != nil: | ||
doAssert(tx.blobsBundle.wrapperVersion == blobsBundle.wrapperVersion) | ||
|
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.
nimbus-eth1/execution_chain/core/tx_pool.nim
Line 178 in 6ce4568
withdrawals are fork dependant.