Skip to content

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

Closed

Conversation

MariusVanDerWijden
Copy link
Member

@MariusVanDerWijden MariusVanDerWijden commented Jun 19, 2023

4844 integration PR

@MariusVanDerWijden MariusVanDerWijden force-pushed the 4844-devnet-6 branch 2 times, most recently from e31b0e0 to a94251c Compare June 19, 2023 08:08
@MariusVanDerWijden MariusVanDerWijden force-pushed the 4844-devnet-6 branch 2 times, most recently from 9581095 to baa5c0a Compare June 21, 2023 08:28
@MariusVanDerWijden MariusVanDerWijden force-pushed the 4844-devnet-6 branch 3 times, most recently from ff1b9fd to ea9cf1b Compare July 6, 2023 08:06
Comment on lines 251 to 252
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)
Copy link
Contributor

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

Comment on lines 376 to 389
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
}
Copy link
Contributor

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?

}

// buildPayload builds the payload according to the provided parameters.
func (w *worker) buildPayload(args *BuildPayloadArgs) (*Payload, error) {
// Build the initial version with no transaction included. It should be fast
// 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)
Copy link
Contributor

Choose a reason for hiding this comment

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

Dog sled situation here.

@MariusVanDerWijden MariusVanDerWijden force-pushed the 4844-devnet-6 branch 2 times, most recently from 37c89d9 to 8c9da8e Compare July 27, 2023 14:34
@MariusVanDerWijden MariusVanDerWijden changed the title WIP: 4844 devnet 6 all: EIP-4844 integration Jul 27, 2023
@lightclient lightclient force-pushed the 4844-devnet-6 branch 3 times, most recently from 5273993 to 4a84e82 Compare August 2, 2023 17:25
@lightclient lightclient force-pushed the 4844-devnet-6 branch 4 times, most recently from c81ab7b to 0e54abd Compare August 22, 2023 21:42
@fjl
Copy link
Contributor

fjl commented Sep 20, 2023

We have this in now, and all fixes for Cancun should go to master branch.

@fjl fjl closed this Sep 20, 2023
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.

5 participants