Skip to content

Commit

Permalink
chore!: update celestia-app to v1.0.0-rc12 (celestiaorg#2581)
Browse files Browse the repository at this point in the history
## Overview

bumps app to v1.0.0-rc12

## Checklist

- [x] New and updated code has appropriate documentation
- [x] New and updated code has new and/or updated testing
- [x] Required CI checks are passing
- [x] Visual proof for any user facing features like CLI or
documentation updates
- [ ] Linked issues closed with keywords
  • Loading branch information
evan-forbes authored and renaynay committed Aug 23, 2023
1 parent a88d941 commit 9656e62
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 27 deletions.
9 changes: 5 additions & 4 deletions blob/service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import (
"github.com/stretchr/testify/require"
tmrand "github.com/tendermint/tendermint/libs/rand"

"github.com/celestiaorg/celestia-app/pkg/appconsts"
"github.com/celestiaorg/celestia-app/pkg/shares"
"github.com/celestiaorg/go-header/store"

Expand Down Expand Up @@ -309,9 +310,9 @@ func TestService_GetSingleBlobWithoutPadding(t *testing.T) {

ns1, ns2 := blobs[0].Namespace().ToAppNamespace(), blobs[1].Namespace().ToAppNamespace()

padding0, err := shares.NamespacePaddingShare(ns1)
padding0, err := shares.NamespacePaddingShare(ns1, appconsts.ShareVersionZero)
require.NoError(t, err)
padding1, err := shares.NamespacePaddingShare(ns2)
padding1, err := shares.NamespacePaddingShare(ns2, appconsts.ShareVersionZero)
require.NoError(t, err)
rawShares0, err := BlobsToShares(blobs[0])
require.NoError(t, err)
Expand Down Expand Up @@ -354,9 +355,9 @@ func TestService_GetAllWithoutPadding(t *testing.T) {

ns1, ns2 := blobs[0].Namespace().ToAppNamespace(), blobs[1].Namespace().ToAppNamespace()

padding0, err := shares.NamespacePaddingShare(ns1)
padding0, err := shares.NamespacePaddingShare(ns1, appconsts.ShareVersionZero)
require.NoError(t, err)
padding1, err := shares.NamespacePaddingShare(ns2)
padding1, err := shares.NamespacePaddingShare(ns2, appconsts.ShareVersionZero)
require.NoError(t, err)
rawShares0, err := BlobsToShares(blobs[0])
require.NoError(t, err)
Expand Down
10 changes: 5 additions & 5 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ require (
github.com/BurntSushi/toml v1.3.2
github.com/alecthomas/jsonschema v0.0.0-20200530073317-71f438968921
github.com/benbjohnson/clock v1.3.5
github.com/celestiaorg/celestia-app v1.0.0-rc11
github.com/celestiaorg/celestia-app v1.0.0-rc12
github.com/celestiaorg/go-ds-badger4 v0.0.0-20230712104058-7ede1c814ac5
github.com/celestiaorg/go-fraud v0.1.2
github.com/celestiaorg/go-header v0.2.12
github.com/celestiaorg/go-libp2p-messenger v0.2.0
github.com/celestiaorg/nmt v0.18.1
github.com/celestiaorg/rsmt2d v0.11.0
github.com/cosmos/cosmos-sdk v0.46.13
github.com/cosmos/cosmos-sdk v0.46.14
github.com/cosmos/cosmos-sdk/api v0.1.0
github.com/cristalhq/jwt v1.2.0
github.com/etclabscore/go-openrpc-reflect v0.0.37
Expand Down Expand Up @@ -55,7 +55,7 @@ require (
github.com/multiformats/go-multihash v0.2.3
github.com/open-rpc/meta-schema v0.0.0-20201029221707-1b72ef2ea333
github.com/prometheus/client_golang v1.14.0
github.com/pyroscope-io/client v0.7.1
github.com/pyroscope-io/client v0.7.2
github.com/pyroscope-io/otel-profiling-go v0.4.0
github.com/spf13/cobra v1.7.0
github.com/spf13/pflag v1.0.5
Expand Down Expand Up @@ -270,7 +270,7 @@ require (
github.com/prometheus/client_model v0.4.0 // indirect
github.com/prometheus/common v0.42.0 // indirect
github.com/prometheus/procfs v0.9.0 // indirect
github.com/pyroscope-io/godeltaprof v0.1.0 // indirect
github.com/pyroscope-io/godeltaprof v0.1.2 // indirect
github.com/quic-go/qpack v0.4.0 // indirect
github.com/quic-go/qtls-go1-19 v0.3.2 // indirect
github.com/quic-go/qtls-go1-20 v0.2.2 // indirect
Expand Down Expand Up @@ -334,7 +334,7 @@ require (
)

replace (
github.com/cosmos/cosmos-sdk => github.com/celestiaorg/cosmos-sdk v1.16.1-sdk-v0.46.13
github.com/cosmos/cosmos-sdk => github.com/celestiaorg/cosmos-sdk v1.17.0-sdk-v0.46.14
github.com/filecoin-project/dagstore => github.com/celestiaorg/dagstore v0.0.0-20230413141458-735ab09a15d6
github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1
// broken goleveldb needs to be replaced for the cosmos-sdk and celestia-app
Expand Down
16 changes: 8 additions & 8 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -343,12 +343,12 @@ 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 v1.0.0-rc11 h1:u94drhPdvgwNvx0F2xGib+fyOyP+fIvp3aL6Avd/HT0=
github.com/celestiaorg/celestia-app v1.0.0-rc11/go.mod h1:A17xfzurB2RHpplh6+nGMeC9hCquu0aMYnanOeifDO0=
github.com/celestiaorg/celestia-app v1.0.0-rc12 h1:ko9hPD4oz1UTS4ZqzikGVQ0wXi5+4kEhDb7decx5Ehs=
github.com/celestiaorg/celestia-app v1.0.0-rc12/go.mod h1:vXvKEudUpdJCvUr79qVKKJ0Xo7ofsuU80+Hs9aKGjvU=
github.com/celestiaorg/celestia-core v1.24.0-tm-v0.34.28 h1:eXS3v26nob8Xs2+flKHVxcTzhzQW44KgTcooR3OxnK4=
github.com/celestiaorg/celestia-core v1.24.0-tm-v0.34.28/go.mod h1:J/GsBjoTZaFz71VeyrLZbG8rV+Rzi6oFEUZUipQ97hQ=
github.com/celestiaorg/cosmos-sdk v1.16.1-sdk-v0.46.13 h1:CxEQDQEQR1ypB+VUmCISIqFVmHfb+mx8x+zh7rHbyU8=
github.com/celestiaorg/cosmos-sdk v1.16.1-sdk-v0.46.13/go.mod h1:xpBZc/OYZ736hp0IZlBGNUhEgCD9C+bKs8yNLZibyv0=
github.com/celestiaorg/cosmos-sdk v1.17.0-sdk-v0.46.14 h1:PckXGxLJjXv97VO3xS8NPHN5oO83X5nvJLbc/4s8jUM=
github.com/celestiaorg/cosmos-sdk v1.17.0-sdk-v0.46.14/go.mod h1:70Go8qNy7YAb1PUcHCChRHNX2ke7c9jgUIEklUX+Mac=
github.com/celestiaorg/dagstore v0.0.0-20230413141458-735ab09a15d6 h1:/yCwMCoOPcYCiG18u8/1pv5eXF04xczoQO3sR0bKsgM=
github.com/celestiaorg/dagstore v0.0.0-20230413141458-735ab09a15d6/go.mod h1:ta/DlqIH10bvhwqJIw51Nq3QU4XVMp6pz3f0Deve9fM=
github.com/celestiaorg/go-ds-badger4 v0.0.0-20230712104058-7ede1c814ac5 h1:MJgXvhJP1Au8rXTvMMlBXodu9jplEK1DxiLtMnEphOs=
Expand Down Expand Up @@ -1781,10 +1781,10 @@ github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1
github.com/prometheus/procfs v0.9.0 h1:wzCHvIvM5SxWqYvwgVL7yJY8Lz3PKn49KQtpgMYJfhI=
github.com/prometheus/procfs v0.9.0/go.mod h1:+pB4zwohETzFnmlpe6yd2lSc+0/46IYZRB/chUwxUZY=
github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU=
github.com/pyroscope-io/client v0.7.1 h1:yFRhj3vbgjBxehvxQmedmUWJQ4CAfCHhn+itPsuWsHw=
github.com/pyroscope-io/client v0.7.1/go.mod h1:4h21iOU4pUOq0prKyDlvYRL+SCKsBc5wKiEtV+rJGqU=
github.com/pyroscope-io/godeltaprof v0.1.0 h1:UBqtjt0yZi4jTxqZmLAs34XG6ycS3vUTlhEUSq4NHLE=
github.com/pyroscope-io/godeltaprof v0.1.0/go.mod h1:psMITXp90+8pFenXkKIpNhrfmI9saQnPbba27VIaiQE=
github.com/pyroscope-io/client v0.7.2 h1:OX2qdUQsS8RSkn/3C8isD7f/P0YiZQlRbAlecAaj/R8=
github.com/pyroscope-io/client v0.7.2/go.mod h1:FEocnjn+Ngzxy6EtU9ZxXWRvQ0+pffkrBxHLnPpxwi8=
github.com/pyroscope-io/godeltaprof v0.1.2 h1:MdlEmYELd5w+lvIzmZvXGNMVzW2Qc9jDMuJaPOR75g4=
github.com/pyroscope-io/godeltaprof v0.1.2/go.mod h1:psMITXp90+8pFenXkKIpNhrfmI9saQnPbba27VIaiQE=
github.com/pyroscope-io/otel-profiling-go v0.4.0 h1:Hk/rbUqOWoByoWy1tt4r5BX5xoKAvs5drr0511Ki8ic=
github.com/pyroscope-io/otel-profiling-go v0.4.0/go.mod h1:MXaofiWU7PgLP7eISUZJYVO4Z8WYMqpkYgeP4XrPLyg=
github.com/quic-go/qpack v0.4.0 h1:Cr9BXA1sQS2SmDUWjSofMPNKmvF6IiIfDRmgU0w1ZCo=
Expand Down
8 changes: 6 additions & 2 deletions nodebuilder/tests/nd_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,12 @@ func TestShrexNDFromLights(t *testing.T) {
// wait for chain to be filled
require.NoError(t, <-fillDn)

// first 2 blocks are not filled with data
for i := 3; i < blocks; i++ {
// first 15 blocks are not filled with data
//
// TODO: we need to stop guessing
// the block that actually has transactions. We can get this data from the
// response returned by FillBlock.
for i := 16; i < blocks; i++ {
h, err := bridge.HeaderServ.GetByHeight(ctx, uint64(i))
require.NoError(t, err)

Expand Down
25 changes: 17 additions & 8 deletions share/namespace.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,19 @@ const NamespaceSize = appns.NamespaceSize

// Various reserved namespaces.
var (
MaxReservedNamespace = Namespace(appns.MaxReservedNamespace.Bytes())
ParitySharesNamespace = Namespace(appns.ParitySharesNamespace.Bytes())
TailPaddingNamespace = Namespace(appns.TailPaddingNamespace.Bytes())
ReservedPaddingNamespace = Namespace(appns.ReservedPaddingNamespace.Bytes())
TxNamespace = Namespace(appns.TxNamespace.Bytes())
PayForBlobNamespace = Namespace(appns.PayForBlobNamespace.Bytes())
ISRNamespace = Namespace(appns.IntermediateStateRootsNamespace.Bytes())
// MaxPrimaryReservedNamespace is the highest primary reserved namespace.
// Namespaces lower than this are reserved for protocol use.
MaxPrimaryReservedNamespace = Namespace(appns.MaxPrimaryReservedNamespace.Bytes())
// MinSecondaryReservedNamespace is the lowest secondary reserved namespace
// reserved for protocol use. Namespaces higher than this are reserved for
// protocol use.
MinSecondaryReservedNamespace = Namespace(appns.MinSecondaryReservedNamespace.Bytes())
ParitySharesNamespace = Namespace(appns.ParitySharesNamespace.Bytes())
TailPaddingNamespace = Namespace(appns.TailPaddingNamespace.Bytes())
ReservedPaddingNamespace = Namespace(appns.PrimaryReservedPaddingNamespace.Bytes())
TxNamespace = Namespace(appns.TxNamespace.Bytes())
PayForBlobNamespace = Namespace(appns.PayForBlobNamespace.Bytes())
ISRNamespace = Namespace(appns.IntermediateStateRootsNamespace.Bytes())
)

// Namespace represents namespace of a Share.
Expand Down Expand Up @@ -124,7 +130,10 @@ func (n Namespace) ValidateForBlob() error {
if err := n.ValidateForData(); err != nil {
return err
}
if bytes.Compare(n, MaxReservedNamespace) < 1 {
if bytes.Compare(n, MaxPrimaryReservedNamespace) < 1 {
return fmt.Errorf("invalid blob namespace(%s): reserved namespaces are forbidden", n)
}
if bytes.Compare(n, MinSecondaryReservedNamespace) > -1 {
return fmt.Errorf("invalid blob namespace(%s): reserved namespaces are forbidden", n)
}
return nil
Expand Down
1 change: 1 addition & 0 deletions state/core_access.go
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ func (ca *CoreAccessor) SubmitPayForBlob(
ctx,
ca.signer,
ca.coreConn,
sdktx.BroadcastMode_BROADCAST_MODE_BLOCK,
appblobs,
apptypes.SetGasLimit(gasLim),
withFee(fee),
Expand Down

0 comments on commit 9656e62

Please sign in to comment.