Skip to content

Commit ddb47e4

Browse files
committed
Fix Jame's comment.
1 parent 1d8fb51 commit ddb47e4

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

beacon-chain/core/peerdas/das_core.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,8 @@ func ComputeColumnsForCustodyGroup(custodyGroup uint64) ([]uint64, error) {
123123
}
124124

125125
// DataColumnSidecars computes the data column sidecars from the signed block, cells and cell proofs.
126+
// The returned value contains pointers to `cellsAndProofs`.
127+
// (If the called modifies `cellsAndProofs` afterwards, the returned value will be modified as well.)
126128
// https://github.com/ethereum/consensus-specs/blob/v1.5.0-beta.3/specs/fulu/das-core.md#get_data_column_sidecars
127129
func DataColumnSidecars(signedBlock interfaces.ReadOnlySignedBeaconBlock, cellsAndProofs []kzg.CellsAndProofs) ([]*ethpb.DataColumnSidecar, error) {
128130
start := time.Now()
@@ -177,8 +179,7 @@ func DataColumnSidecars(signedBlock interfaces.ReadOnlySignedBeaconBlock, cellsA
177179

178180
kzgProofOfColumnBytes := make([][]byte, 0, blobsCount)
179181
for _, kzgProof := range kzgProofOfColumn {
180-
copiedProof := kzgProof
181-
kzgProofOfColumnBytes = append(kzgProofOfColumnBytes, copiedProof[:])
182+
kzgProofOfColumnBytes = append(kzgProofOfColumnBytes, kzgProof[:])
182183
}
183184

184185
sidecar := &ethpb.DataColumnSidecar{

beacon-chain/core/peerdas/reconstruction.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,8 @@ func RecoverCellsAndProofs(
8181

8282
// DataColumnSidecarsForReconstruct is a TEMPORARY function until there is an official specification for it.
8383
// It is scheduled for deletion.
84+
// The returned value contains pointers to `cellsAndProofs`.
85+
// (If the called modifies `cellsAndProofs` afterwards, the returned value will be modified as well.)
8486
func DataColumnSidecarsForReconstruct(
8587
blobKzgCommitments [][]byte,
8688
signedBlockHeader *ethpb.SignedBeaconBlockHeader,
@@ -128,8 +130,7 @@ func DataColumnSidecarsForReconstruct(
128130

129131
kzgProofOfColumnBytes := make([][]byte, 0, blobsCount)
130132
for _, kzgProof := range kzgProofOfColumn {
131-
copiedProof := kzgProof
132-
kzgProofOfColumnBytes = append(kzgProofOfColumnBytes, copiedProof[:])
133+
kzgProofOfColumnBytes = append(kzgProofOfColumnBytes, kzgProof[:])
133134
}
134135

135136
sidecar := &ethpb.DataColumnSidecar{

0 commit comments

Comments
 (0)