diff --git a/.github/workflows/interchaintest.yml b/.github/workflows/interchaintest.yml index 10848df..4529d0f 100644 --- a/.github/workflows/interchaintest.yml +++ b/.github/workflows/interchaintest.yml @@ -33,7 +33,7 @@ jobs: push: true platforms: linux/amd64 tags: | - ghcr.io/notional-labs/layer-ictest:latest + ghcr.io/notional-labs/centauri-ictest:latest test-start-cosmos-chain: runs-on: ubuntu-latest needs: build-and-push-image diff --git a/.github/workflows/push_docker_images.yml b/.github/workflows/push_docker_images.yml index 16415e9..562ed87 100644 --- a/.github/workflows/push_docker_images.yml +++ b/.github/workflows/push_docker_images.yml @@ -1,11 +1,11 @@ -# This workflow pushes new layer docker images on every new tag. +# This workflow pushes new centauri docker images on every new tag. # # On every new `vX.Y.Z` tag the following images are pushed: # -# notional-labs/layer:X.Y.Z # is pushed -# notional-labs/layer:X.Y # is updated to X.Y.Z -# notional-labs/layer:X # is updated to X.Y.Z -# notional-labs/layer:latest # is updated to X.Y.Z +# notional-labs/centauri:X.Y.Z # is pushed +# notional-labs/centauri:X.Y # is updated to X.Y.Z +# notional-labs/centauri:X # is updated to X.Y.Z +# notional-labs/centauri:latest # is updated to X.Y.Z # # All the images above have support for linux/amd64 and linux/arm64. # @@ -66,6 +66,6 @@ jobs: push: true platforms: linux/amd64,linux/arm64 tags: | - ghcr.io/notional-labs/layer:${{ env.MAJOR_VERSION }} - ghcr.io/notional-labs/layer:${{ env.MAJOR_VERSION }}.${{ env.MINOR_VERSION }} - ghcr.io/notional-labs/layer:${{ env.MAJOR_VERSION }}.${{ env.MINOR_VERSION }}.${{ env.PATCH_VERSION }} + ghcr.io/notional-labs/centauri:${{ env.MAJOR_VERSION }} + ghcr.io/notional-labs/centauri:${{ env.MAJOR_VERSION }}.${{ env.MINOR_VERSION }} + ghcr.io/notional-labs/centauri:${{ env.MAJOR_VERSION }}.${{ env.MINOR_VERSION }}.${{ env.PATCH_VERSION }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0bff7a4..fe3f3c5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -27,18 +27,18 @@ run: docker-compose up -d - name: Copy binary - run: docker cp composable-centauri_node_1:/bin/layerd ./layerd + run: docker cp composable-centauri_node_1:/bin/centaurid ./centaurid - name: Save sha256 sum - run: sha256sum ./layerd > ./layerd_sha256.txt + run: sha256sum ./centaurid > ./centaurid_sha256.txt - name: Release uses: softprops/action-gh-release@v1 with: token: ${{ github.token }} files: | - layerd - layerd_sha256.txt + centaurid + centaurid_sha256.txt - name: Dump docker logs on failure if: failure() diff --git a/Dockerfile b/Dockerfile index 1beabfd..a569340 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,7 +18,7 @@ RUN apk add --no-cache \ linux-headers # Download go dependencies -WORKDIR /layer +WORKDIR /centauri COPY go.mod go.sum ./ RUN --mount=type=cache,target=/root/.cache/go-build \ --mount=type=cache,target=/root/go/pkg/mod \ @@ -43,15 +43,15 @@ RUN --mount=type=cache,target=/root/.cache/go-build \ -mod=readonly \ -tags "netgo,ledger,muslc" \ -ldflags \ - "-X github.com/cosmos/cosmos-sdk/version.Name="layer" \ - -X github.com/cosmos/cosmos-sdk/version.AppName="layerd" \ + "-X github.com/cosmos/cosmos-sdk/version.Name="centauri" \ + -X github.com/cosmos/cosmos-sdk/version.AppName="centaurid" \ -X github.com/cosmos/cosmos-sdk/version.Version=${GIT_VERSION} \ -X github.com/cosmos/cosmos-sdk/version.Commit=${GIT_COMMIT} \ -X github.com/cosmos/cosmos-sdk/version.BuildTags=netgo,ledger,muslc \ -w -s -linkmode=external -extldflags '-Wl,-z,muldefs -static'" \ -trimpath \ - -o /layer/build/layerd \ - /layer/cmd/layerd + -o /centauri/build/centaurid \ + /centauri/cmd/centaurid # -------------------------------------------------------- # Runner @@ -59,9 +59,9 @@ RUN --mount=type=cache,target=/root/.cache/go-build \ FROM ${RUNNER_IMAGE} -COPY --from=builder /layer/build/layerd /bin/layerd +COPY --from=builder /centauri/build/centaurid /bin/centaurid -ENV HOME /layer +ENV HOME /centauri WORKDIR $HOME # rest server @@ -72,4 +72,4 @@ EXPOSE 26656 EXPOSE 26657 # grpc EXPOSE 9090 -ENTRYPOINT ["layerd"] \ No newline at end of file +ENTRYPOINT ["centaurid"] \ No newline at end of file diff --git a/Dockerfile.dev b/Dockerfile.dev index 72d935b..48d8bdf 100644 --- a/Dockerfile.dev +++ b/Dockerfile.dev @@ -18,7 +18,7 @@ RUN apk add --no-cache \ linux-headers # Download go dependencies -WORKDIR /layer +WORKDIR /centauri COPY go.mod go.sum ./ # Cosmwasm - Download correct libwasmvm version @@ -38,15 +38,15 @@ RUN GOWORK=off go build \ -mod=readonly \ -tags "netgo,ledger,muslc" \ -ldflags \ - "-X github.com/cosmos/cosmos-sdk/version.Name="layer" \ - -X github.com/cosmos/cosmos-sdk/version.AppName="layerd" \ + "-X github.com/cosmos/cosmos-sdk/version.Name="centauri" \ + -X github.com/cosmos/cosmos-sdk/version.AppName="centaurid" \ -X github.com/cosmos/cosmos-sdk/version.Version=${GIT_VERSION} \ -X github.com/cosmos/cosmos-sdk/version.Commit=${GIT_COMMIT} \ -X github.com/cosmos/cosmos-sdk/version.BuildTags=netgo,ledger,muslc \ -w -s -linkmode=external -extldflags '-Wl,-z,muldefs -static'" \ -trimpath \ - -o /layer/build/layerd \ - /layer/cmd/layerd + -o /centauri/build/centaurid \ + /centauri/cmd/centaurid # -------------------------------------------------------- # Runner @@ -54,13 +54,13 @@ RUN GOWORK=off go build \ FROM ${RUNNER_IMAGE} -COPY --from=builder /layer/build/layerd /bin/layerd +COPY --from=builder /centauri/build/centaurid /bin/centaurid -ENV HOME /layer +ENV HOME /centauri WORKDIR $HOME -COPY scripts/* /layer/ +COPY scripts/* /centauri/ # rest server EXPOSE 1317 # tendermint p2p diff --git a/Makefile b/Makefile index 5037a31..7c57535 100644 --- a/Makefile +++ b/Makefile @@ -58,8 +58,8 @@ comma := , build_tags_comma_sep := $(subst $(whitespace),$(comma),$(build_tags)) # process linker flags -ldflags = -X github.com/cosmos/cosmos-sdk/version.Name=layer \ - -X github.com/cosmos/cosmos-sdk/version.AppName=layerd \ +ldflags = -X github.com/cosmos/cosmos-sdk/version.Name=centauri \ + -X github.com/cosmos/cosmos-sdk/version.AppName=centaurid \ -X github.com/cosmos/cosmos-sdk/version.Version=$(VERSION) \ -X github.com/cosmos/cosmos-sdk/version.Commit=$(COMMIT) \ -X "github.com/cosmos/cosmos-sdk/version.BuildTags=$(build_tags_comma_sep)" @@ -86,13 +86,13 @@ endif all: install install: go.sum - go install -mod=readonly $(BUILD_FLAGS) ./cmd/layerd + go install -mod=readonly $(BUILD_FLAGS) ./cmd/centaurid build: - go build $(BUILD_FLAGS) -o bin/layerd ./cmd/layerd + go build $(BUILD_FLAGS) -o bin/centaurid ./cmd/centaurid docker-build-debug: - @DOCKER_BUILDKIT=1 docker build -t layer:debug -f Dockerfile . + @DOCKER_BUILDKIT=1 docker build -t centauri:debug -f Dockerfile . lint: @find . -name '*.go' -type f -not -path "./vendor*" -not -path "*.git*" -not -name '*.pb.go' -not -name '*.gw.go' | xargs go run mvdan.cc/gofumpt -w . @@ -133,22 +133,22 @@ proto-check-breaking: # Executes start chain tests via interchaintest ictest-start-cosmos: - cd tests/interchaintest && go test -race -v -run TestStartLayer . + cd tests/interchaintest && go test -race -v -run TestStartCentauri . ictest-validator: cd tests/interchaintest && go test -race -v -run TestValidator . # Executes start chain tests via interchaintest ictest-start-polkadot: - cd tests/interchaintest && go test -timeout=25m -race -v -run TestPolkadotLayerChainStart . + cd tests/interchaintest && go test -timeout=25m -race -v -run TestPolkadotcentauriChainStart . # Executes IBC tests via interchaintest ictest-ibc: - cd tests/interchaintest && go test -timeout=25m -race -v -run TestLayerPicassoIBCTransfer . + cd tests/interchaintest && go test -timeout=25m -race -v -run TestCentauriPicassoIBCTransfer . # Executes Basic Upgrade Chain tests via interchaintest ictest-upgrade: - cd tests/interchaintest && go test -timeout=25m -race -v -run TestLayerUpgrade . + cd tests/interchaintest && go test -timeout=25m -race -v -run TestCentauriUpgrade . # Executes all tests via interchaintest after compling a local image as juno:local ictest-all: ictest-start-cosmos ictest-start-polkadot ictest-ibc diff --git a/app/app.go b/app/app.go index 793403a..d555fde 100644 --- a/app/app.go +++ b/app/app.go @@ -128,7 +128,7 @@ import ( ) const ( - Name = "layer" + Name = "centauri" dirName = "banksy" ForkHeight = 244008 ) diff --git a/app/keepers/keepers.go b/app/keepers/keepers.go index 1693860..94138a9 100644 --- a/app/keepers/keepers.go +++ b/app/keepers/keepers.go @@ -107,7 +107,7 @@ import ( const ( AccountAddressPrefix = "composable" - authorityAddress = "layer10556m38z4x6pqalr9rl5ytf3cff8q46nz002d6" // convert from: centauri10556m38z4x6pqalr9rl5ytf3cff8q46nk85k9m + authorityAddress = "centauri10556m38z4x6pqalr9rl5ytf3cff8q46nk85k9m" // convert from: centauri10556m38z4x6pqalr9rl5ytf3cff8q46nk85k9m ) type AppKeepers struct { diff --git a/app/upgrades/v6/upgrade.go b/app/upgrades/v6/upgrade.go index 9dff54a..a614235 100644 --- a/app/upgrades/v6/upgrade.go +++ b/app/upgrades/v6/upgrade.go @@ -9,18 +9,6 @@ import ( "github.com/notional-labs/composable/v6/app/keepers" "github.com/notional-labs/composable/v6/app/upgrades" - - bech32authmigration "github.com/notional-labs/composable/v6/bech32-migration/auth" - bech32govmigration "github.com/notional-labs/composable/v6/bech32-migration/gov" - bech32slashingmigration "github.com/notional-labs/composable/v6/bech32-migration/slashing" - bech32stakingmigration "github.com/notional-labs/composable/v6/bech32-migration/staking" - - authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" - slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types" - stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - - "github.com/notional-labs/composable/v6/bech32-migration/utils" ) func CreateUpgradeHandler( @@ -31,26 +19,6 @@ func CreateUpgradeHandler( keepers *keepers.AppKeepers, ) upgradetypes.UpgradeHandler { return func(ctx sdk.Context, plan upgradetypes.Plan, vm module.VersionMap) (module.VersionMap, error) { - // Migration prefix - ctx.Logger().Info("First step: Migrate addresses stored in bech32 form to use new prefix") - keys := keepers.GetKVStoreKey() - bech32stakingmigration.MigrateAddressBech32(ctx, keys[stakingtypes.StoreKey], cdc) - bech32slashingmigration.MigrateAddressBech32(ctx, keys[slashingtypes.StoreKey], cdc) - bech32govmigration.MigrateAddressBech32(ctx, keys[govtypes.StoreKey], cdc) - bech32authmigration.MigrateAddressBech32(ctx, keys[authtypes.StoreKey], cdc) - - // allowed relayer address - tfmdk := keepers.TransferMiddlewareKeeper - tfmdk.IterateAllowRlyAddress(ctx, func(rlyAddress string) bool { - // Delete old address - tfmdk.DeleteAllowRlyAddress(ctx, rlyAddress) - - // add new address - newRlyAddress := utils.ConvertAccAddr(rlyAddress) - tfmdk.SetAllowRlyAddress(ctx, newRlyAddress) - return false - }) - return mm.RunMigrations(ctx, configurator, vm) } } diff --git a/cmd/layerd/cmd/bech32_convert.go b/cmd/centaurid/cmd/bech32_convert.go similarity index 78% rename from cmd/layerd/cmd/bech32_convert.go rename to cmd/centaurid/cmd/bech32_convert.go index 7666090..336f70f 100644 --- a/cmd/layerd/cmd/bech32_convert.go +++ b/cmd/centaurid/cmd/bech32_convert.go @@ -12,13 +12,13 @@ var flagBech32Prefix = "prefix" func AddBech32ConvertCommand() *cobra.Command { cmd := &cobra.Command{ Use: "bech32-convert [address]", - Short: "Convert any bech32 string to the composable prefix", - Long: `Convert any bech32 string to the composable prefix + Short: "Convert any bech32 string to the centauri prefix", + Long: `Convert any bech32 string to the centauri prefix Example: - layerd debug bech32-convert akash1a6zlyvpnksx8wr6wz8wemur2xe8zyh0ytz6d88 + centaurid debug bech32-convert akash1a6zlyvpnksx8wr6wz8wemur2xe8zyh0ytz6d88 - layerd debug bech32-convert stride1673f0t8p893rqyqe420mgwwz92ac4qv6synvx2 --prefix osmo + centaurid debug bech32-convert stride1673f0t8p893rqyqe420mgwwz92ac4qv6synvx2 --prefix osmo `, Args: cobra.ExactArgs(1), RunE: func(cmd *cobra.Command, args []string) error { diff --git a/cmd/layerd/cmd/genaccounts.go b/cmd/centaurid/cmd/genaccounts.go similarity index 99% rename from cmd/layerd/cmd/genaccounts.go rename to cmd/centaurid/cmd/genaccounts.go index ca5a8a0..df42303 100644 --- a/cmd/layerd/cmd/genaccounts.go +++ b/cmd/centaurid/cmd/genaccounts.go @@ -201,7 +201,7 @@ contain valid denominations. Accounts may optionally be supplied with vesting pa func CovertPrefixAddr() *cobra.Command { cmd := &cobra.Command{ Use: "convert [address]", - Short: "Convert prefix from centauri to layer", + Short: "Convert prefix from layer to centauri", Args: cobra.ExactArgs(1), RunE: func(cmd *cobra.Command, args []string) error { newAddr := utils.ConvertAccAddr(args[0]) diff --git a/cmd/layerd/cmd/root.go b/cmd/centaurid/cmd/root.go similarity index 100% rename from cmd/layerd/cmd/root.go rename to cmd/centaurid/cmd/root.go diff --git a/cmd/layerd/config/config.go b/cmd/centaurid/config/config.go similarity index 97% rename from cmd/layerd/config/config.go rename to cmd/centaurid/config/config.go index d32dc05..38aaf57 100644 --- a/cmd/layerd/config/config.go +++ b/cmd/centaurid/config/config.go @@ -11,7 +11,7 @@ import ( const ( // Bech32Prefix defines the Bech32 prefix used for EthAccounts - Bech32Prefix = "layer" + Bech32Prefix = "centauri" // Bech32PrefixAccAddr defines the Bech32 prefix of an account's address Bech32PrefixAccAddr = Bech32Prefix @@ -40,8 +40,8 @@ func SetupConfig() { SetAddressPrefixes(config) config.Seal() - version.AppName = "layer" - version.Name = "layerd" + version.AppName = "centauri" + version.Name = "centaurid" } // SetBech32Prefixes sets the global prefixes to be used when serializing addresses and public keys to Bech32 strings. diff --git a/cmd/layerd/main.go b/cmd/centaurid/main.go similarity index 70% rename from cmd/layerd/main.go rename to cmd/centaurid/main.go index 814033c..bad5e27 100644 --- a/cmd/layerd/main.go +++ b/cmd/centaurid/main.go @@ -6,8 +6,8 @@ import ( svrcmd "github.com/cosmos/cosmos-sdk/server/cmd" "github.com/notional-labs/composable/v6/app" - cmd "github.com/notional-labs/composable/v6/cmd/layerd/cmd" - cmdcfg "github.com/notional-labs/composable/v6/cmd/layerd/config" + cmd "github.com/notional-labs/composable/v6/cmd/centaurid/cmd" + cmdcfg "github.com/notional-labs/composable/v6/cmd/centaurid/config" ) func main() { diff --git a/tests/interchaintest/basic_cosmos_test.go b/tests/interchaintest/basic_cosmos_test.go index 33ee8ae..155391a 100644 --- a/tests/interchaintest/basic_cosmos_test.go +++ b/tests/interchaintest/basic_cosmos_test.go @@ -11,8 +11,8 @@ import ( "go.uber.org/zap/zaptest" ) -// TestStartCentauri is a basic test to assert that spinning up a Layer network with 1 validator works properly. -func TestBasicLayer(t *testing.T) { +// TestStartCentauri is a basic test to assert that spinning up a Centauri network with 1 validator works properly. +func TestBasicCentauri(t *testing.T) { if testing.Short() { t.Skip() } @@ -21,14 +21,14 @@ func TestBasicLayer(t *testing.T) { ctx := context.Background() - // Create chain factory with Layer + // Create chain factory with centauri numVals := 3 numFullNodes := 3 cf := interchaintest.NewBuiltinChainFactory(zaptest.NewLogger(t), []*interchaintest.ChainSpec{ { - Name: "layer", - ChainConfig: layerConfig, + Name: "centauri", + ChainConfig: centauriConfig, NumValidators: &numVals, NumFullNodes: &numFullNodes, }, @@ -38,13 +38,13 @@ func TestBasicLayer(t *testing.T) { chains, err := cf.Chains(t.Name()) require.NoError(t, err) - layer := chains[0].(*cosmos.CosmosChain) + centauri := chains[0].(*cosmos.CosmosChain) // Relayer Factory client, network := interchaintest.DockerSetup(t) // Create a new Interchain object which describes the chains, relayers, and IBC connections we want to use - ic := interchaintest.NewInterchain().AddChain(layer) + ic := interchaintest.NewInterchain().AddChain(centauri) rep := testreporter.NewNopReporter() eRep := rep.RelayerExecReporter(t) diff --git a/tests/interchaintest/chain_start_test.go b/tests/interchaintest/chain_start_test.go index a5dbabe..c74b170 100644 --- a/tests/interchaintest/chain_start_test.go +++ b/tests/interchaintest/chain_start_test.go @@ -11,8 +11,8 @@ import ( "go.uber.org/zap/zaptest" ) -// TestStartcentauri is a basic test to assert that spinning up a layer network with 1 validator works properly. -func TestStartLayer(t *testing.T) { +// TestStartcentauri is a basic test to assert that spinning up a centauri network with 1 validator works properly. +func TestStartCentauri(t *testing.T) { if testing.Short() { t.Skip() } @@ -27,8 +27,8 @@ func TestStartLayer(t *testing.T) { cf := interchaintest.NewBuiltinChainFactory(zaptest.NewLogger(t), []*interchaintest.ChainSpec{ { - Name: "layer", - ChainConfig: layerConfig, + Name: "centauri", + ChainConfig: centauriConfig, NumValidators: &numVals, NumFullNodes: &numFullNodes, }, @@ -38,13 +38,13 @@ func TestStartLayer(t *testing.T) { chains, err := cf.Chains(t.Name()) require.NoError(t, err) - layer := chains[0].(*cosmos.CosmosChain) + centauri := chains[0].(*cosmos.CosmosChain) // Relayer Factory client, network := interchaintest.DockerSetup(t) // Create a new Interchain object which describes the chains, relayers, and IBC connections we want to use - ic := interchaintest.NewInterchain().AddChain(layer) + ic := interchaintest.NewInterchain().AddChain(centauri) rep := testreporter.NewNopReporter() eRep := rep.RelayerExecReporter(t) diff --git a/tests/interchaintest/ibc_transfer_test.go b/tests/interchaintest/ibc_transfer_test.go index e66ede4..8e56f2f 100644 --- a/tests/interchaintest/ibc_transfer_test.go +++ b/tests/interchaintest/ibc_transfer_test.go @@ -29,7 +29,7 @@ import ( // * create client, connection, and channel in relayer // * start relayer // * send transfer over ibc -func TestLayerPicassoIBCTransfer(t *testing.T) { +func TestCentauriPicassoIBCTransfer(t *testing.T) { if testing.Short() { t.Skip() } @@ -97,8 +97,8 @@ func TestLayerPicassoIBCTransfer(t *testing.T) { Name: "centauri", ChainID: "centaurid", Images: []ibc.DockerImage{CentauriImage}, - Bin: "layerd", - Bech32Prefix: "layer", + Bin: "centaurid", + Bech32Prefix: "centauri", Denom: "stake", GasPrices: "0.00stake", GasAdjustment: 1.3, diff --git a/tests/interchaintest/polkadot_chain_test.go b/tests/interchaintest/polkadot_chain_test.go index e9d82f6..7dd0188 100644 --- a/tests/interchaintest/polkadot_chain_test.go +++ b/tests/interchaintest/polkadot_chain_test.go @@ -14,7 +14,7 @@ import ( "go.uber.org/zap/zaptest" ) -func TestPolkadotLayerChainStart(t *testing.T) { +func TestPolkadotCentauriChainStart(t *testing.T) { if testing.Short() { t.Skip("skipping in short mode") } diff --git a/tests/interchaintest/push_wasm_client_code_test.go b/tests/interchaintest/push_wasm_client_code_test.go index 305c814..4a23cf7 100644 --- a/tests/interchaintest/push_wasm_client_code_test.go +++ b/tests/interchaintest/push_wasm_client_code_test.go @@ -66,11 +66,11 @@ func TestPushWasmClientCode(t *testing.T) { { ChainConfig: ibc.ChainConfig{ Type: "cosmos", - Name: "layer", - ChainID: "layerd", + Name: "centauri", + ChainID: "centaurid", Images: []ibc.DockerImage{CentauriImage}, - Bin: "layerd", - Bech32Prefix: "layer", + Bin: "centaurid", + Bech32Prefix: "centauri", Denom: "stake", GasPrices: "0.00stake", GasAdjustment: 1.3, @@ -87,11 +87,11 @@ func TestPushWasmClientCode(t *testing.T) { chains, err := cf.Chains(t.Name()) require.NoError(t, err) - layerd := chains[0] + centaurid := chains[0] t.Logf("NewInterchain") ic := interchaintest.NewInterchain(). - AddChain(layerd) + AddChain(centaurid) t.Logf("Interchain build options") require.NoError(t, ic.Build(ctx, eRep, interchaintest.InterchainBuildOptions{ @@ -108,46 +108,46 @@ func TestPushWasmClientCode(t *testing.T) { // Create and Fund User Wallets fundAmount := int64(10_000_000_000) - users := interchaintest.GetAndFundTestUsers(t, ctx, "default", int64(fundAmount), layerd) + users := interchaintest.GetAndFundTestUsers(t, ctx, "default", int64(fundAmount), centaurid) centaurid1User := users[0] - err = testutil.WaitForBlocks(ctx, 10, layerd) + err = testutil.WaitForBlocks(ctx, 10, centaurid) require.NoError(t, err) - centaurid1UserBalInitial, err := layerd.GetBalance(ctx, centaurid1User.FormattedAddress(), layerd.Config().Denom) + centaurid1UserBalInitial, err := centaurid.GetBalance(ctx, centaurid1User.FormattedAddress(), centaurid.Config().Denom) require.NoError(t, err) require.Equal(t, fundAmount, centaurid1UserBalInitial) - layerdChain := layerd.(*cosmos.CosmosChain) + centauridChain := centaurid.(*cosmos.CosmosChain) // Verify a normal user cannot push a wasm light client contract - _, err = layerdChain.StoreClientContract(ctx, centaurid1User.KeyName(), "ics10_grandpa_cw.wasm") + _, err = centauridChain.StoreClientContract(ctx, centaurid1User.KeyName(), "ics10_grandpa_cw.wasm") require.ErrorContains(t, err, "invalid authority") proposal := cosmos.TxProposalv1{ Metadata: "none", - Deposit: "500000000" + layerdChain.Config().Denom, // greater than min deposit + Deposit: "500000000" + centauridChain.Config().Denom, // greater than min deposit Title: "Grandpa Contract", Summary: "new grandpa contract", } - proposalTx, codeHash, err := layerdChain.PushNewWasmClientProposal(ctx, centaurid1User.KeyName(), "ics10_grandpa_cw.wasm", proposal) + proposalTx, codeHash, err := centauridChain.PushNewWasmClientProposal(ctx, centaurid1User.KeyName(), "ics10_grandpa_cw.wasm", proposal) require.NoError(t, err, "error submitting new wasm contract proposal tx") - height, err := layerdChain.Height(ctx) + height, err := centauridChain.Height(ctx) require.NoError(t, err, "error fetching height before submit upgrade proposal") - err = layerdChain.VoteOnProposalAllValidators(ctx, proposalTx.ProposalID, cosmos.ProposalVoteYes) + err = centauridChain.VoteOnProposalAllValidators(ctx, proposalTx.ProposalID, cosmos.ProposalVoteYes) require.NoError(t, err, "failed to submit votes") - _, err = cosmos.PollForProposalStatus(ctx, layerdChain, height, height+heightDelta, proposalTx.ProposalID, cosmos.ProposalStatusPassed) + _, err = cosmos.PollForProposalStatus(ctx, centauridChain, height, height+heightDelta, proposalTx.ProposalID, cosmos.ProposalStatusPassed) require.NoError(t, err, "proposal status did not change to passed in expected number of blocks") - err = testutil.WaitForBlocks(ctx, 2, layerdChain) + err = testutil.WaitForBlocks(ctx, 2, centauridChain) require.NoError(t, err) var getCodeQueryMsgRsp GetCodeQueryMsgResponse - err = layerdChain.QueryClientContractCode(ctx, codeHash, &getCodeQueryMsgRsp) + err = centauridChain.QueryClientContractCode(ctx, codeHash, &getCodeQueryMsgRsp) codeHashByte32 := sha256.Sum256(getCodeQueryMsgRsp.Code) codeHash2 := hex.EncodeToString(codeHashByte32[:]) t.Logf("Contract codeHash from code: %s", codeHash2) diff --git a/tests/interchaintest/setup.go b/tests/interchaintest/setup.go index 9e0b858..74e6b33 100644 --- a/tests/interchaintest/setup.go +++ b/tests/interchaintest/setup.go @@ -8,8 +8,8 @@ import ( ) var ( - CentauriMainRepo = "ghcr.io/notional-labs/layer" - CentauriICTestRepo = "ghcr.io/notional-labs/layer-ictest" + CentauriMainRepo = "ghcr.io/notional-labs/centauri" + CentauriICTestRepo = "ghcr.io/notional-labs/centauri-ictest" repo, version = GetDockerImageInfo() @@ -19,13 +19,13 @@ var ( UidGid: "1025:1025", } - layerConfig = ibc.ChainConfig{ + centauriConfig = ibc.ChainConfig{ Type: "cosmos", - Name: "layer", - ChainID: "layer-2", + Name: "centauri", + ChainID: "centauri-2", Images: []ibc.DockerImage{CentauriImage}, - Bin: "layerd", - Bech32Prefix: "layer", + Bin: "centaurid", + Bech32Prefix: "centauri", Denom: "stake", CoinType: "118", GasPrices: "0.0stake", @@ -45,7 +45,7 @@ func GetDockerImageInfo() (repo, version string) { repo = CentauriICTestRepo if !found { // make local-image - repo = "layer" + repo = "centauri" branchVersion = "debug" } diff --git a/tests/interchaintest/upgrade_chain_test.go b/tests/interchaintest/upgrade_chain_test.go index 3e2d1fb..acd90d1 100644 --- a/tests/interchaintest/upgrade_chain_test.go +++ b/tests/interchaintest/upgrade_chain_test.go @@ -18,7 +18,7 @@ const ( blocksAfterUpgrade = uint64(10) ) -func TestLayerUpgrade(t *testing.T) { +func TestCentauriUpgrade(t *testing.T) { repo, version := GetDockerImageInfo() CosmosChainUpgradeTest(t, repo, version, "v6") } @@ -43,8 +43,8 @@ func CosmosChainUpgradeTest(t *testing.T, upgradeContainerRepo, upgradeVersion, UidGid: "1025:1025", }, }, - Bin: "layerd", - Bech32Prefix: "layer", + Bin: "centaurid", + Bech32Prefix: "centauri", Denom: "ppica", GasPrices: "0.00ppica", GasAdjustment: 1.3, diff --git a/tests/interchaintest/validator_test.go b/tests/interchaintest/validator_test.go index 7dffb54..149a94b 100644 --- a/tests/interchaintest/validator_test.go +++ b/tests/interchaintest/validator_test.go @@ -30,8 +30,8 @@ func TestValidator(t *testing.T) { cf := interchaintest.NewBuiltinChainFactory(zaptest.NewLogger(t), []*interchaintest.ChainSpec{ { - Name: "layer", - ChainConfig: layerConfig, + Name: "centauri", + ChainConfig: centauriConfig, NumValidators: &numVals, NumFullNodes: &numFullNodes, }, diff --git a/x/transfermiddleware/ibc_ante_test.go b/x/transfermiddleware/ibc_ante_test.go index 85b6447..0ba0b9c 100644 --- a/x/transfermiddleware/ibc_ante_test.go +++ b/x/transfermiddleware/ibc_ante_test.go @@ -15,7 +15,7 @@ import ( customibctesting "github.com/notional-labs/composable/v6/app/ibctesting" ) -var govAuthorityAddress = "layer10556m38z4x6pqalr9rl5ytf3cff8q46nz002d6" // convert from: centauri10556m38z4x6pqalr9rl5ytf3cff8q46nk85k9m +var govAuthorityAddress = "centauri10556m38z4x6pqalr9rl5ytf3cff8q46nk85k9m" // convert from: centauri10556m38z4x6pqalr9rl5ytf3cff8q46nk85k9m type TransferTestSuite struct { suite.Suite