Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions validator/client/propose.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,16 +124,16 @@ func (v *validator) ProposeBlock(ctx context.Context, slot primitives.Slot, pubK
var genericSignedBlock *ethpb.GenericSignedBeaconBlock
if blk.Version() >= version.Deneb && !blk.IsBlinded() {
signedBlobs := make([]*ethpb.SignedBlobSidecar, len(b.GetDeneb().Blobs))
for _, blob := range b.GetDeneb().Blobs {
for i, blob := range b.GetDeneb().Blobs {
blobSig, err := v.signBlob(ctx, blob, pubKey)
if err != nil {
log.WithError(err).Error("Failed to sign blob")
return
}
signedBlobs = append(signedBlobs, &ethpb.SignedBlobSidecar{
signedBlobs[i] = &ethpb.SignedBlobSidecar{
Message: blob,
Signature: blobSig,
})
}
}
denebBlock, err := blk.PbDenebBlock()
if err != nil {
Expand Down
4 changes: 4 additions & 0 deletions validator/client/propose_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -673,13 +673,17 @@ func testProposeBlock(t *testing.T, graffiti []byte) {
).DoAndReturn(func(ctx context.Context, block *ethpb.GenericSignedBeaconBlock) (*ethpb.ProposeResponse, error) {
sentBlock, err = blocktest.NewSignedBeaconBlockFromGeneric(block)
assert.NoError(t, err, "Unexpected error unwrapping block")
if tt.version == version.Deneb {
require.Equal(t, 2, len(block.GetDeneb().Blobs))
}
return &ethpb.ProposeResponse{BlockRoot: make([]byte, 32)}, nil
})

validator.ProposeBlock(context.Background(), 1, pubKey)
g := sentBlock.Block().Body().Graffiti()
assert.Equal(t, string(validator.graffiti), string(g[:]))
require.LogsContain(t, hook, "Submitted new block")

})
}
}
Expand Down