diff --git a/driver/chain_syncer/calldata/syncer.go b/driver/chain_syncer/calldata/syncer.go index b5f373721..58434f03e 100644 --- a/driver/chain_syncer/calldata/syncer.go +++ b/driver/chain_syncer/calldata/syncer.go @@ -261,6 +261,7 @@ func (s *Syncer) onBlockProposed( "blockID", event.BlockId, "hint", hint, "invalidTxIndex", invalidTxIndex, + "bytes", len(txListBytes), ) l1Origin := &rawdb.L1Origin{ diff --git a/driver/txlist_fetcher/blob.go b/driver/txlist_fetcher/blob.go index 902e7fe0d..f054e944d 100644 --- a/driver/txlist_fetcher/blob.go +++ b/driver/txlist_fetcher/blob.go @@ -49,7 +49,7 @@ func (d *BlobFetcher) Fetch( "blobHash", common.Bytes2Hex(meta.BlobHash[:]), ) - if kZGToVersionedHash( + if KZGToVersionedHash( kzg4844.Commitment(common.FromHex(sidecar.KzgCommitment)), ) == common.BytesToHash(meta.BlobHash[:]) { return common.Hex2Bytes(sidecar.Blob), nil @@ -59,8 +59,8 @@ func (d *BlobFetcher) Fetch( return nil, errSidecarNotFound } -// kZGToVersionedHash implements kzg_to_versioned_hash from EIP-4844 -func kZGToVersionedHash(kzg kzg4844.Commitment) common.Hash { +// KZGToVersionedHash implements kzg_to_versioned_hash from EIP-4844 +func KZGToVersionedHash(kzg kzg4844.Commitment) common.Hash { h := sha256.Sum256(kzg[:]) h[0] = blobCommitmentVersionKZG