-
Notifications
You must be signed in to change notification settings - Fork 21.6k
all: EIP-4844 integration #27511
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
all: EIP-4844 integration #27511
Conversation
e31b0e0 to
a94251c
Compare
9581095 to
baa5c0a
Compare
ff1b9fd to
ea9cf1b
Compare
| blobBalanceCheck.Mul(blobBalanceCheck, st.msg.BlobGasFeeCap) | ||
| balanceCheck.Add(balanceCheck, blobBalanceCheck) | ||
| // Pay for dataGasUsed * actual blob fee | ||
| blobFee := new(big.Int).SetUint64(dataGas) | ||
| blobFee.Mul(blobFee, eip4844.CalcBlobFee(*st.evm.Context.ExcessDataGas)) | ||
| mgval.Add(mgval, blobFee) |
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.
this seems dangerous. See up above?
balanceCheck := mgval
So at this point, the one might alias the other. So IMO let's change that into balanceCheck := new(big.Int).Set(mgval) before this clause, so we don't change one when we want to change the other. Sneaky bugs
| if chain.Config().IsCancun(header.Number, header.Time) { | ||
| var blobs int | ||
| for _, tx := range txs { | ||
| blobs += len(tx.BlobHashes()) | ||
| } | ||
| dataGasUsed := uint64(blobs * params.BlobTxDataGasPerBlob) | ||
| header.DataGasUsed = &dataGasUsed | ||
| } |
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.
Is this really the best place to update the header? It kind of seems like this belongs into the state transition, where we usually track the block gas?
miner/payload_building.go
Outdated
| // enough to run. The empty payload can at least make sure there is something | ||
| // to deliver for not missing slot. | ||
| empty, _, err := w.getSealingBlock(args.Parent, args.Timestamp, args.FeeRecipient, args.Random, args.Withdrawals, true) | ||
| empty, _, _, _, _, err := w.getSealingBlock(args.Parent, args.Timestamp, args.FeeRecipient, args.Random, args.Withdrawals, true) |
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.
Dog sled situation here.
e03b5ad to
d949917
Compare
37c89d9 to
8c9da8e
Compare
5273993 to
4a84e82
Compare
6861f29 to
1b5cf90
Compare
c81ab7b to
0e54abd
Compare
0e54abd to
eafa695
Compare
eafa695 to
7dba16c
Compare
|
We have this in now, and all fixes for Cancun should go to master branch. |
4844 integration PR