Skip to content

Commit

Permalink
fix(chore): Swap blob to hex (#242)
Browse files Browse the repository at this point in the history
  • Loading branch information
samcm authored Oct 18, 2023
1 parent bfe0bcf commit 8934ee5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
3 changes: 2 additions & 1 deletion pkg/cannon/deriver/beacon/eth/v1/beacon_blob.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package v1

import (
"context"
"encoding/hex"
"fmt"
"time"

Expand Down Expand Up @@ -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(),
Expand Down
8 changes: 4 additions & 4 deletions pkg/proto/eth/v1/blob.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pkg/proto/eth/v1/blob.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 8934ee5

Please sign in to comment.