Skip to content

Commit

Permalink
improved sidecars logging (berachain#126)
Browse files Browse the repository at this point in the history
  • Loading branch information
abi87 authored Jan 14, 2025
1 parent 002a1ff commit ff4f077
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions beacon/blockchain/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,7 @@ var (
// ErrDataNotAvailable indicates that the required data is not available.
ErrDataNotAvailable = errors.New("data not available")

ErrSidecarCommittmentMismatch = errors.New("sidecars commitments mismatch")

ErrSidecarSignatureMismatch = errors.New("sidecar signature mismatch")
)
4 changes: 3 additions & 1 deletion beacon/blockchain/process_proposal.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,11 @@ func (s *Service) ProcessProposal(
// Make sure we have the right number of BlobSidecars
numCommitments := len(blk.GetBody().GetBlobKzgCommitments())
if numCommitments != len(sidecars) {
err = fmt.Errorf("expected %d sidecars, got %d",
err = fmt.Errorf("expected %d sidecars, got %d: %w",
numCommitments, len(sidecars),
ErrSidecarCommittmentMismatch,
)
s.logger.Warn(err.Error())
return err
}

Expand Down

0 comments on commit ff4f077

Please sign in to comment.