MCPcopy Create free account
hub / github.com/ethstorage/es-node / kZGToVersionedHash

Function kZGToVersionedHash

cmd/es-utils/utils/utils.go:253–258  ·  view source on GitHub ↗

kZGToVersionedHash implements kzg_to_versioned_hash from EIP-4844

(kzg kzg4844.Commitment)

Source from the content-addressed store, hash-verified

251
252// kZGToVersionedHash implements kzg_to_versioned_hash from EIP-4844
253func kZGToVersionedHash(kzg kzg4844.Commitment) common.Hash {
254 h := sha256.Sum256(kzg[:])
255 h[0] = blobCommitmentVersionKZG
256
257 return h
258}
259
260func EncodeBlobs(data []byte) []kzg4844.Blob {
261 blobs := []kzg4844.Blob{{}}

Callers 1

ComputeBlobsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected