mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-25 22:26:42 +00:00
miner: compute cell proofs on demand
This commit is contained in:
parent
284b63d7a1
commit
0a6e0a1cb3
1 changed files with 12 additions and 4 deletions
|
|
@ -394,10 +394,18 @@ func (miner *Miner) commitTransactions(env *environment, plainTxs, blobTxs *tran
|
|||
// Make sure all transactions after osaka have cell proofs
|
||||
if miner.chainConfig.IsOsaka(env.header.Number, env.header.Time) {
|
||||
if sidecar := tx.BlobTxSidecar(); sidecar != nil {
|
||||
if len(sidecar.Blobs) != len(sidecar.Proofs)*kzg4844.CellProofsPerBlob {
|
||||
log.Warn("Ignoring V1 blob transaction post-Osaka", "hash", ltx.Hash)
|
||||
txs.Pop()
|
||||
continue
|
||||
if sidecar.Version == 0 {
|
||||
log.Warn("Encountered Version 0 transaction post-Osaka, recompute proofs", "hash", ltx.Hash)
|
||||
sidecar.Proofs = make([]kzg4844.Proof, 0)
|
||||
for _, blob := range sidecar.Blobs {
|
||||
cellProofs, err := kzg4844.ComputeCells(&blob)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
sidecar.Proofs = append(sidecar.Proofs, cellProofs...)
|
||||
}
|
||||
//txs.Pop()
|
||||
//continue
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue