Skip to content

Commit

Permalink
stashing'
Browse files Browse the repository at this point in the history
  • Loading branch information
badgersrus committed Aug 28, 2024
1 parent 2f36005 commit 405b353
Showing 1 changed file with 0 additions and 24 deletions.
24 changes: 0 additions & 24 deletions go/ethadapter/beacon_client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,10 @@ import (
"testing"

"github.com/ethereum/go-ethereum/crypto/kzg4844"
"github.com/ethereum/go-ethereum/params"
"github.com/stretchr/testify/require"
"github.com/ten-protocol/go-ten/go/common"
)

const spareBlobBits = 6 // = math.floor(math.log2(BLS_MODULUS)) % 8

func TestBlobsFromSidecars(t *testing.T) {
indices := []uint64{5, 7, 2}

Expand Down Expand Up @@ -134,27 +131,6 @@ func makeTestBlobSidecar(index uint64) (IndexedBlobHash, *BlobSidecar) {
return idh, &sidecar
}

// Function to encode data into blobs
func encodeBlobs(data []byte) []kzg4844.Blob {
blobs := []kzg4844.Blob{{}}
blobIndex := 0
fieldIndex := -1
for i := 0; i < len(data); i += 31 {
fieldIndex++
if fieldIndex == params.BlobTxFieldElementsPerBlob {
blobs = append(blobs, kzg4844.Blob{})
blobIndex++
fieldIndex = 0
}
max := i + 31
if max > len(data) {
max = len(data)
}
copy(blobs[blobIndex][fieldIndex*32+1:], data[i:max])
}
return blobs
}

func createRollup(lastBatch int64) common.ExtRollup {
header := common.RollupHeader{
LastBatchSeqNo: uint64(lastBatch),
Expand Down

0 comments on commit 405b353

Please sign in to comment.