Skip to content

Commit

Permalink
fix: bump to celestia-app v0.13.3 (#2257)
Browse files Browse the repository at this point in the history
Closes celestiaorg/celestia-app#1816 which was originally reported by @jcstein.

## Testing

Before (with celestia-node v0.10.0)

```
$ curl -X GET http://0.0.0.0:26659/namespaced_data/e8e5f679bf7116cb/height/559108
"share sequence has 1 shares but needed 0 shares"%
```

After

```
$ curl -X GET http://0.0.0.0:26659/namespaced_data/e8e5f679bf7116cb/height/559108
{"data":["AEh1kC0LWsf6EWtnsXprMIEAAAAABCt42ozTazfbdwAAYFVEUSPL0Q1xW6Jtapu1KnEZZZW4RI2SENkRjGVVl2pZ3ZsuFTUaQUfHNBGXpNVOlbjFDkVd0mrJOenUpe5KeloLQYlsp2f/vf99gefd00bU2Pbh1u2UHCXmBRfh/AXXGYmDZfblBNTVrcCk+fBQJpKMPHCFO4hJwd1jSKkobUPkk6LrrFa1sNyC2KdfU9M7Vida1GR+H4+36v5PC+SuuV0zV98MOuuDexFGGw0UKP3wRhcK4x65qnO2DNLBNBtIo8qWcrc7fIOPI+7IOg3HsXmTHqMtzXxRlk+kF2MlUwtMQ0GatgXlZ46OCZ6e0jWkE7kgu524ULFzQ8EiivPFmq87hWCaLaS5aUtlznB71EXO57dci615Lm0HyJONyefjeFNfEzQmosG0I5AWc3khxjoSPdij4YnHY7l0hNIkzy/r9TFXV+ZQMfXZOpiGgTRStgbtECKZ5DFR8tPBAEsDtvwv+6b+CBf5Yv9mWGqEHEyzgzTdnlKEIntmt1794plkL+YIv4jxlfssTCuoijwzwMzZAdO+gDRkh9dK28uGu0jzTOVhfe9LIVrnLNif0KUbkWqfzvSJ7H1ce/jYqDTxLvmBPK3IQ1JVkVdOH9mHpIaIc9KxdntCpw+aPaTZOKqsMU4B9RW3h6j0LsFLyUlNu39W9k+dfRy9w2fZUsC045D2xu3H9+x1Vb2l2KndJTF4OVT0m+9AnTC0Nbx1ebpbLw1Mc4A0vFdylops7FB4uSxwY8HhmwIlxXbYVJdaXkrK0jObDwLTHC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YbaRWPMsoOb97zWQ//Dv6f24+x/ZIo7ft/fUbHvZKhMVobN0cXnkqy+LiTXPCmqeBXenbfjjIy9WP9N4LeUycemtJ1PVgl8YePLP4uudnqrcSqx5NlDzxL5b3rF+PUXZ/Z5RT/LXoKsdx+e9/ep062WQdcfzr6krnJtUDBb8OvWkYJnMrlC1K0e1vqxUW5CyKDh+1mrVrjqpR1PubeFPB5lnBzVvkunhXWFzXlz623JlUuCaPcxv9r67JntObNbTH1uiCyx95hJrngPUvLZGvjv8xcUl8+oap2aZtqrd/d7Bmpe/ePdEE4168c3/PxJrnhPUvMg2Savj+n4vvF50Vu5/8szyl+IHy5C67Jjj7g2LilrrNYk1zwVq3pvPf9+5fXo8U/7NHGWHuSviDeoeqsxd++/66fXZ71Qa5l0i1jw3qHnJb9dmW1ndzgt0Fd+UmXmYo2vahmXLv25nybY3OGsx/2EvseZ5QM1ju/6Py8T3Pl9Q1BPNvfYVE+W2F1rOnPhQYVrjwuk+bDzLiDXP6wAgAAD//zfPbngB"],"height":559108}%
```
  • Loading branch information
rootulp authored May 26, 2023
1 parent 7efdbbe commit e5efcb0
Show file tree
Hide file tree
Showing 4 changed files with 47 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,9 @@ package gateway

import (
"bytes"
_ "embed"
"encoding/base64"
"encoding/json"
"testing"

"github.com/stretchr/testify/assert"
Expand Down Expand Up @@ -106,6 +109,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 +125,35 @@ 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))...)
}

// sharesBase64JSON is the base64 encoded share data from Blockspace Race
// block height 559108 and namespace e8e5f679bf7116cb.
//
//go:embed "testdata/sharesBase64.json"
var sharesBase64JSON string

// Test_dataFromSharesBSR reproduces an error that occurred when parsing shares
// on Blockspace Race block height 559108 namespace e8e5f679bf7116cb.
//
// https://github.com/celestiaorg/celestia-app/issues/1816
func Test_dataFromSharesBSR(t *testing.T) {
var sharesBase64 []string
err := json.Unmarshal([]byte(sharesBase64JSON), &sharesBase64)
assert.NoError(t, err)
input := decode(sharesBase64)

_, err = dataFromShares(input)
assert.NoError(t, err)
}

// decode returns the raw shares from base64Encoded.
func decode(base64Encoded []string) (rawShares [][]byte) {
for _, share := range base64Encoded {
rawShare, err := base64.StdEncoding.DecodeString(share)
if err != nil {
panic(err)
}
rawShares = append(rawShares, rawShare)
}
return rawShares
}
8 changes: 8 additions & 0 deletions api/gateway/testdata/sharesBase64.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[
"6OX2eb9xFssBAAAEQwBIdZAtC1rH+hFrZ7F6azCBAAAAAAQreNqM02s323cAAGBVRFEjy9ENcVuibWqbtSpxGWWVuESNkhDZEYxlVZdqWd2bLhU1GkFHxzQRl6TVTpW4xQ5FXdJqyTnp1KXuSnpaC0GJbKdn/73/fYHn3dNG1Nj24dbtlBwl5gUX4fwF1xmJg2X25QTU1a3ApPnwUCaSjDxwhTuIScHdY0ipKG1D5JOi66xWtbDcgtinX1PTO1YnWtRkfh+Pt+r+TwvkrrldM1ffDDrrg3sRRhsNFCj98EYXCuMeuapztgzSwTQbSKPKlnK3O3yDjyPuyDoNx7F5kx6jLc18UZZPpBdjJVMLTENBmrYF5WeOjgmentI1pBO5ILuduFCxc0PBIorzxZqvO4Vgmi2kuWlLZc5we9RFzue3XIuteS5tB8iTjcnn43hTXxM0JqLBtCOQFnN5IcY6Ej3Yo+GJx2O5dITSJM8v6/UxV1fmUDH12TqYhoE0UrYG7RAimeQxUfLTwQBLA7b8L/um/ggX+WL/ZlhqhBxMs4M03Z5ShCJ7Zrde/eKZZC/mCL+I8ZX7LEwrqIo8M8DM2QHTvoA0ZIfXStvLhrtI80zlYX3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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="
]
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 e5efcb0

Please sign in to comment.