diff --git a/core/types/block_export.go b/core/types/block_export.go index 0c4db7520..105bbc242 100644 --- a/core/types/block_export.go +++ b/core/types/block_export.go @@ -4,6 +4,7 @@ import ( "math/big" "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/crypto/kzg4844" "github.com/ethereum/go-ethereum/params" ) @@ -77,6 +78,14 @@ type TransactionExportRLP struct { BlobTxSidecar *BlobTxSidecar `json:"blobTxSidecar" rlp:"optional"` } +type BlobsSidecarForExport BlobTxSidecar + +type BlobTxSidecarExportRLP struct { + Blobs []kzg4844.Blob + Commitments []kzg4844.Commitment + Proofs []kzg4844.Proof +} + func (r *ReceiptForExport) ExportReceipt() *ReceiptExportRLP { enc := &ReceiptExportRLP{ PostStateOrStatus: (*Receipt)(r).statusEncoding(), @@ -101,6 +110,14 @@ func (r *WithdrawalForExport) ExportWithdrawal() *WithdrawalExportRLP { } } +func (blob *BlobsSidecarForExport) ExportBlob(blobTxSidecar *BlobTxSidecar) *BlobTxSidecarExportRLP { + return &BlobTxSidecarExportRLP{ + Blobs: blobTxSidecar.Blobs, + Commitments: blobTxSidecar.Commitments, + Proofs: blobTxSidecar.Proofs, + } +} + func (tx *TransactionForExport) ExportTx(chainConfig *params.ChainConfig, blockNumber *big.Int, baseFee *big.Int, blockTime uint64) *TransactionExportRLP { var inner_tx *Transaction = (*Transaction)(tx) v, r, s := tx.inner.rawSignatureValues() diff --git a/miner/worker.go b/miner/worker.go index 9a3610623..1ca1ce0d2 100644 --- a/miner/worker.go +++ b/miner/worker.go @@ -116,6 +116,9 @@ func (env *environment) copy() *environment { cpy.sidecars = make([]*types.BlobTxSidecar, len(env.sidecars)) copy(cpy.sidecars, env.sidecars) + fmt.Println(cpy.header.ParentBeaconRoot, "Parent Beacon Root found") + fmt.Println(cpy.sidecars, "Sidecars also found") + return cpy }