Skip to content

Commit

Permalink
Fix reconstruct blob sidecars to account hasIndex updates
Browse files Browse the repository at this point in the history
  • Loading branch information
terencechain committed Feb 11, 2025
1 parent 26d3547 commit 70789ce
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 3 additions & 1 deletion beacon-chain/execution/engine_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -543,9 +543,11 @@ func (s *Service) ReconstructBlobSidecars(ctx context.Context, block interfaces.

// Collect KZG hashes for non-existing blobs
var kzgHashes []common.Hash
var kzgIndexes map[int]bool
for i, commitment := range kzgCommitments {
if !hasIndex(uint64(i)) {
kzgHashes = append(kzgHashes, primitives.ConvertKzgCommitmentToVersionedHash(commitment))
kzgIndexes[i] = true
}
}
if len(kzgHashes) == 0 {
Expand All @@ -569,7 +571,7 @@ func (s *Service) ReconstructBlobSidecars(ctx context.Context, block interfaces.
// Reconstruct verified blob sidecars
var verifiedBlobs []blocks.VerifiedROBlob
for i, blobIndex := 0, 0; i < len(kzgCommitments); i++ {
if hasIndex(uint64(i)) {
if !kzgIndexes[i] {
continue
}

Expand Down
3 changes: 3 additions & 0 deletions changelog/tt_fix_reconstruct_blob_sidecars.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
### Fixed

- Fix reconstruct blob sidecars for reference bug.

0 comments on commit 70789ce

Please sign in to comment.