Skip to content

Commit

Permalink
fix: bump to celestia-app v0.13.3
Browse files Browse the repository at this point in the history
  • Loading branch information
rootulp committed May 25, 2023
1 parent cd8d0b9 commit 26c01b4
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 3 deletions.
36 changes: 36 additions & 0 deletions api/gateway/share_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package gateway

import (
"bytes"
"encoding/base64"
"testing"

"github.com/stretchr/testify/assert"
Expand Down Expand Up @@ -63,6 +64,12 @@ func Test_dataFromShares(t *testing.T) {
largePfbTxData := []byte{128, 4}
largePfbTxData = append(largePfbTxData, bytes.Repeat([]byte{0xc}, 512)...)

rawDataWithMultipleSequences := [][]uint8{
{0x0, 0x48, 0x75, 0x90, 0x2d, 0xb, 0x5a, 0xc7, 0xfa, 0x11, 0x6b, 0x67, 0xb1, 0x7a, 0x6b, 0x30, 0x81, 0x0, 0x0, 0x0, 0x0, 0x4, 0x2b, 0x78, 0xda, 0x8c, 0xd3, 0x6b, 0x37, 0xdb, 0x77, 0x0, 0x0, 0x60, 0x55, 0x44, 0x51, 0x23, 0xcb, 0xd1, 0xd, 0x71, 0x5b, 0xa2, 0x6d, 0x6a, 0x9b, 0xb5, 0x2a, 0x71, 0x19, 0x65, 0x95, 0xb8, 0x44, 0x8d, 0x92, 0x10, 0xd9, 0x11, 0x8c, 0x65, 0x55, 0x97, 0x6a, 0x59, 0xdd, 0x9b, 0x2e, 0x15, 0x35, 0x1a, 0x41, 0x47, 0xc7, 0x34, 0x11, 0x97, 0xa4, 0xd5, 0x4e, 0x95, 0xb8, 0xc5, 0xe, 0x45, 0x5d, 0xd2, 0x6a, 0xc9, 0x39, 0xe9, 0xd4, 0xa5, 0xee, 0x4a, 0x7a, 0x5a, 0xb, 0x41, 0x89, 0x6c, 0xa7, 0x67, 0xff, 0xbd, 0xff, 0x7d, 0x81, 0xe7, 0xdd, 0xd3, 0x46, 0xd4, 0xd8, 0xf6, 0xe1, 0xd6, 0xed,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 0x86, 0x65, 0xcb, 0xbf, 0x6e, 0x67, 0xc9, 0xb6, 0x37, 0x38, 0x6b, 0x31, 0xff, 0x61, 0x2f, 0xb1, 0xe6, 0x79, 0x40, 0xcd, 0x63, 0xbb, 0xfe, 0x8f, 0xcb, 0xc4, 0xf7, 0x3e, 0x5f, 0x50, 0xd4, 0x13, 0xcd, 0xbd, 0xf6, 0x15, 0x13, 0xe5, 0xb6, 0x17, 0x5a, 0xce, 0x9c, 0xf8, 0x50, 0x61, 0x5a, 0xe3, 0xc2, 0xe9, 0x3e, 0x6c, 0x3c, 0xcb, 0x88, 0x35, 0xcf, 0xeb, 0x0, 0x20, 0x0, 0x0, 0xff, 0xff, 0x37, 0xcf, 0x6e, 0x78, 0x1},
}

testCases := []testCase{
{
name: "empty",
Expand Down Expand Up @@ -97,6 +104,12 @@ func Test_dataFromShares(t *testing.T) {
want: [][]byte{largePfbTxData},
wantErr: false,
},
{
name: "returns raw data for multiple sequences",
input: sharesWithMultipleSequences(t),
want: rawDataWithMultipleSequences,
wantErr: false,
},
}

for _, tc := range testCases {
Expand All @@ -106,6 +119,7 @@ func Test_dataFromShares(t *testing.T) {
assert.Error(t, err)
return
}
assert.NoError(t, err)
assert.Equal(t, tc.want, got)
})
}
Expand All @@ -121,3 +135,25 @@ func padShare(share []byte) (paddedShare []byte) {
func fillShare(share []byte, filler byte) (paddedShare []byte) {
return append(share, bytes.Repeat([]byte{filler}, appconsts.ShareSize-len(share))...)
}

// sharesWithMultipleSequences is the raw share data from Blockspace Race block
// height 559108 namespace e8e5f679bf7116cb.
// https://github.com/celestiaorg/celestia-app/issues/1816
func sharesWithMultipleSequences(t *testing.T) [][]byte {
sharesBase64 := []string{
"6OX2eb9xFssBAAAEQwBIdZAtC1rH+hFrZ7F6azCBAAAAAAQreNqM02s323cAAGBVRFEjy9ENcVuibWqbtSpxGWWVuESNkhDZEYxlVZdqWd2bLhU1GkFHxzQRl6TVTpW4xQ5FXdJqyTnp1KXuSnpa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TZQ88S+W96xfj1F2f2eUU/y16CrHcfnvf3qdOtlkHXH86+pK5ybVAwW/Dr1pGCZzK5QtStHtb6sVFuQsig4ftZq1a46qUdT7m3hTwc=",
"6OX2eb9xFssAmWcHNW+S6eFdYXNeXPrbcmVS4Jo9zG/2vrsme05s1tMfW6ILLH3mEmueA9S8tka+O/zFxSXz6hqnZpm2qt393sGal79490QTjXrxzf8/EmueE9S8yDZJq+P6fi+8XnRW7n/yzPKX4gfLkLrsmOPuDYuKWus1iTXPBWrem89/37l9ejxT/s0cZYe5K+IN6h6qzF377/rp9dnvVBrmXSLWPDeoeclv12ZbWd3OC3QV35SZeZija9qGZcu/bmfJtjc4azH/YS+x5nlAzWO7/o/LxPc+X1DUE8299hUT5bYXWs6c+FBhWuPC6T5sPMuINc/rACAAAP//N89ueAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=",
}

rawShares := [][]byte{}
for _, share := range sharesBase64 {
rawShare, err := base64.StdEncoding.DecodeString(share)
assert.NoError(t, err)
rawShares = append(rawShares, rawShare)
}
return rawShares
}
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ require (
github.com/BurntSushi/toml v1.2.1
github.com/alecthomas/jsonschema v0.0.0-20200530073317-71f438968921
github.com/benbjohnson/clock v1.3.0
github.com/celestiaorg/celestia-app v0.13.0
github.com/celestiaorg/celestia-app v0.13.3
github.com/celestiaorg/go-fraud v0.1.0
github.com/celestiaorg/go-header v0.2.7
github.com/celestiaorg/go-libp2p-messenger v0.2.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -340,8 +340,8 @@ github.com/buger/jsonparser v0.0.0-20181115193947-bf1c66bbce23/go.mod h1:bbYlZJ7
github.com/bwesterb/go-ristretto v1.2.0/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0=
github.com/c-bata/go-prompt v0.2.2/go.mod h1:VzqtzE2ksDBcdln8G7mk2RX9QyGjH+OVqOCSiVIqS34=
github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ=
github.com/celestiaorg/celestia-app v0.13.0 h1:NPOR1P98YCCv+E2I9TdqsO1/UnGyzTHW5CBhctWHaOY=
github.com/celestiaorg/celestia-app v0.13.0/go.mod h1:OcPBfWDyowJgoEQ89NB2LgLOm9LSwloCgCzdZKjmi78=
github.com/celestiaorg/celestia-app v0.13.3 h1:lJQLBzKALrKe0lLe3Gf8Si7+CF0eqRuNhjIjj7pM2fk=
github.com/celestiaorg/celestia-app v0.13.3/go.mod h1:OcPBfWDyowJgoEQ89NB2LgLOm9LSwloCgCzdZKjmi78=
github.com/celestiaorg/celestia-core v1.15.0-tm-v0.34.23 h1:BHvn41IHOtvHeX1VZqO/xBFIHj93llcw9ZQfNxyVRlI=
github.com/celestiaorg/celestia-core v1.15.0-tm-v0.34.23/go.mod h1:nL+vkAMKy/A8wWemWqMwBy4pOGWYYbboAVTEe3N5gIU=
github.com/celestiaorg/cosmos-sdk v1.8.0-sdk-v0.46.7 h1:EADZy33ufskVIy6Rj6jbi3SOVCeYYo26zUi7iYx+QR0=
Expand Down

0 comments on commit 26c01b4

Please sign in to comment.