diff --git a/pkg/cannon/deriver/beacon/eth/v1/beacon_blob.go b/pkg/cannon/deriver/beacon/eth/v1/beacon_blob.go index 41459674..1eccd435 100644 --- a/pkg/cannon/deriver/beacon/eth/v1/beacon_blob.go +++ b/pkg/cannon/deriver/beacon/eth/v1/beacon_blob.go @@ -2,6 +2,7 @@ package v1 import ( "context" + "encoding/hex" "fmt" "time" @@ -232,7 +233,7 @@ func (b *BeaconBlobDeriver) createEventFromBlob(ctx context.Context, blob *deneb Data: &xatu.DecoratedEvent_EthV1BeaconBlockBlobSidecar{ EthV1BeaconBlockBlobSidecar: &xatuethv1.BlobSidecar{ Slot: &wrapperspb.UInt64Value{Value: uint64(blob.Slot)}, - Blob: blob.Blob[:], + Blob: fmt.Sprintf("0x%s", hex.EncodeToString(blob.Blob[:])), Index: &wrapperspb.UInt64Value{Value: uint64(blob.Index)}, BlockRoot: blob.BlockRoot.String(), BlockParentRoot: blob.BlockParentRoot.String(), diff --git a/pkg/proto/eth/v1/blob.pb.go b/pkg/proto/eth/v1/blob.pb.go index 246c5b87..4eacdc89 100644 --- a/pkg/proto/eth/v1/blob.pb.go +++ b/pkg/proto/eth/v1/blob.pb.go @@ -26,7 +26,7 @@ type BlobSidecar struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Blob []byte `protobuf:"bytes,1,opt,name=blob,proto3" json:"blob,omitempty"` + Blob string `protobuf:"bytes,1,opt,name=blob,proto3" json:"blob,omitempty"` KzgCommitment string `protobuf:"bytes,2,opt,name=kzg_commitment,proto3" json:"kzg_commitment,omitempty"` KzgProof string `protobuf:"bytes,3,opt,name=kzg_proof,proto3" json:"kzg_proof,omitempty"` Slot *wrapperspb.UInt64Value `protobuf:"bytes,4,opt,name=slot,proto3" json:"slot,omitempty"` @@ -68,11 +68,11 @@ func (*BlobSidecar) Descriptor() ([]byte, []int) { return file_pkg_proto_eth_v1_blob_proto_rawDescGZIP(), []int{0} } -func (x *BlobSidecar) GetBlob() []byte { +func (x *BlobSidecar) GetBlob() string { if x != nil { return x.Blob } - return nil + return "" } func (x *BlobSidecar) GetKzgCommitment() string { @@ -133,7 +133,7 @@ var file_pkg_proto_eth_v1_blob_proto_rawDesc = []byte{ 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xe1, 0x02, 0x0a, 0x0b, 0x42, 0x6c, 0x6f, 0x62, 0x53, 0x69, 0x64, 0x65, 0x63, 0x61, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x62, 0x6c, - 0x6f, 0x62, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x62, 0x6c, 0x6f, 0x62, 0x12, 0x26, + 0x6f, 0x62, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x62, 0x6c, 0x6f, 0x62, 0x12, 0x26, 0x0a, 0x0e, 0x6b, 0x7a, 0x67, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6b, 0x7a, 0x67, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6b, 0x7a, 0x67, 0x5f, 0x70, 0x72, diff --git a/pkg/proto/eth/v1/blob.proto b/pkg/proto/eth/v1/blob.proto index 8031a9f5..b1f22002 100644 --- a/pkg/proto/eth/v1/blob.proto +++ b/pkg/proto/eth/v1/blob.proto @@ -7,7 +7,7 @@ import "google/protobuf/wrappers.proto"; option go_package = "github.com/ethpandaops/xatu/pkg/proto/eth/v1"; message BlobSidecar { - bytes blob = 1; + string blob = 1; string kzg_commitment = 2 [ json_name = "kzg_commitment" ]; string kzg_proof = 3 [ json_name = "kzg_proof" ]; google.protobuf.UInt64Value slot = 4;