Skip to content

Commit

Permalink
refactor: merge from develop and add test script (#502)
Browse files Browse the repository at this point in the history
* remove the upgrade handler code that tried remove proposal..

* bump ibc-go

* SetTransferKeeper for PFM to replace original ibc transfer to wrapper

* added UpgradeName = "v6_5_1"

* implement custom transfer method for keeper.

* merge from develop2

* refactor pfm

* bump: update cosmos-sdk and cometbft dependency

* bump: update pfm

* bump: update pfm

* add param to new keeper call.

* call the default keeper Transfer instead of recursion.

* fix lint

* introduced v6_5_2 upgrade channel

* update testnet code

* update datatype for min cosmos fee in tx to sdk.Coin

* introduce v6_5_3

* add InitializePinnedCodes

* updating ibc-go

* fixes

* rename uprgade

* revert

* Change prefix to pica (#447)

* delete proposal #6

* use develop branch for ci

* use another image

* test

* removing more broken proposals

* introduce goreleaser

* remove separate gha for building docker images

* rename registry owner

* clean comments

* use version with v

* add additional tags

* fix org

* update docker image

* added jq

* introduce ibc transfer custom module

* custom ibc transfer module ready to replace for testing.

* activate custom ibc module for cosmos chain. chain works.

* added ibc transfer module that is going to store all params for eth fees

* resolve conflict with a same name for MsgUpdateEpochParams from staking.

* add dependency to transfer keeper from ibc transfer middleware/params

* added repeated FeeItem into Params + MVP logic in transfer msg server

* finalized the Transfer method. send fee to fee. build. chain works.

* only useful params in genesis for ibc transfer module. Works

* golangci-lint run

* slashing fixes

* remove unused types in proto

* add docs and fix all requested changes by reviewers

* review fixes

* fix tests

* local setup

* allow devnet with custom key gov

* relay from master

* porting fix from v7

* refactoring.

* add runtime upgrade handler. for ibc fee feature.

* upgrade merged. BankKeeper + GovKeeper + IbcTransferMiddlewareKeeper

* Revert "Merge pull request #451 from ComposableFi/slashing_fix"

This reverts commit 1ad4293, reversing
changes made to 85e2bf9.

* revert banksy changes to resolve halted chain.

* Revert "allow devnet with custom key gov"

This reverts commit 2457d87.

* create a new chain upgrade handler for chain upgrade.

* chore: change centaurid -> picad and prefix name to pica

* chore: update name prefix

* refactor: remove old upgrade

* refactor: update prefix

* refactor: update prefix

* test: change govAuthorityAddress

* ci: rollback

* wip

* feat: add script upgrade_test

* chore: update script

* wip

* refactor: remove set prefix

* refactor: update test

* chore: rollback

* chore: ignore build folder

* perf: make blocktime run faster

* fix: use key with balances

* chore: ignore screen log

* refactor: using default flag for test

* test: increment and assert counter value to be equal 1

* chore: rollback

* chore: rollback script

* test: add script upgrade

* fix: correct upgrade height

* feat: add post scripts

* test: assertion for post scripts

* chore: stream unnecessary output to null

* feat: add test for the new address

* wip

* chore: log for test upgrade

* test: completed ibc transfer

* verify affection of alliance module

* test/ica_migration

* add migration test for mint, ratelimit, ibc-hooks, transfermiddleware module

* finalize script upgrade test

* pick denom for testing as stake

* remove unused fnc

* modify testup

* fix unused fnc

* merge variable

* chore: remove release.yml

* refactor: change v6.4.6 -> v6.4.7

* feaT: migrate contract info

* test: assert contract info && code info

* fix: change repo secret name

* refactor: change v6.4.7 -> v6.4.8

* revert change version

* rebase and change conflict version

* merge from develop2

* feat: add v6_6_0 handler

* remove old upgrade

* fix lint

* fix lint

* fix test

* update script

* update address and ibc-go

* fix lint

* fix lint

---------

Co-authored-by: kkast <[email protected]>
Co-authored-by: Kanstantsin Kastsevich <[email protected]>
Co-authored-by: rjonczy <[email protected]>
Co-authored-by: rustdev <[email protected]>
Co-authored-by: rust.dev <[email protected]>
Co-authored-by: dzmitry-lahoda <[email protected]>
Co-authored-by: tungle <[email protected]>
Co-authored-by: kienn6034 <[email protected]>

* add scripts (#492)

* delete proposal #6

* use develop branch for ci

* use another image

* test

* removing more broken proposals

* introduce goreleaser

* remove separate gha for building docker images

* rename registry owner

* clean comments

* use version with v

* add additional tags

* fix org

* update docker image

* added jq

* introduce ibc transfer custom module

* custom ibc transfer module ready to replace for testing.

* activate custom ibc module for cosmos chain. chain works.

* added ibc transfer module that is going to store all params for eth fees

* resolve conflict with a same name for MsgUpdateEpochParams from staking.

* add dependency to transfer keeper from ibc transfer middleware/params

* added repeated FeeItem into Params + MVP logic in transfer msg server

* finalized the Transfer method. send fee to fee. build. chain works.

* only useful params in genesis for ibc transfer module. Works

* golangci-lint run

* slashing fixes

* remove unused types in proto

* add docs and fix all requested changes by reviewers

* review fixes

* fix tests

* local setup

* allow devnet with custom key gov

* relay from master

* porting fix from v7

* refactoring.

* add runtime upgrade handler. for ibc fee feature.

* upgrade merged. BankKeeper + GovKeeper + IbcTransferMiddlewareKeeper

* Revert "Merge pull request #451 from ComposableFi/slashing_fix"

This reverts commit 1ad4293, reversing
changes made to 85e2bf9.

* revert banksy changes to resolve halted chain.

* Revert "allow devnet with custom key gov"

This reverts commit 2457d87.

* create a new chain upgrade handler for chain upgrade.

* chore: change centaurid -> picad and prefix name to pica

* chore: update name prefix

* refactor: remove old upgrade

* refactor: update prefix

* refactor: update prefix

* test: change govAuthorityAddress

* ci: rollback

* wip

* feat: add script upgrade_test

* chore: update script

* wip

* refactor: remove set prefix

* refactor: update test

* chore: rollback

* chore: ignore build folder

* perf: make blocktime run faster

* fix: use key with balances

* chore: ignore screen log

* refactor: using default flag for test

* test: increment and assert counter value to be equal 1

* chore: rollback

* chore: rollback script

* test: add script upgrade

* fix: correct upgrade height

* feat: add post scripts

* test: assertion for post scripts

* chore: stream unnecessary output to null

* feat: add test for the new address

* wip

* chore: log for test upgrade

* test: completed ibc transfer

* verify affection of alliance module

* test/ica_migration

* add migration test for mint, ratelimit, ibc-hooks, transfermiddleware module

* finalize script upgrade test

* pick denom for testing as stake

* remove unused fnc

* modify testup

* fix unused fnc

* merge variable

* chore: remove release.yml

* refactor: change v6.4.6 -> v6.4.7

* feaT: migrate contract info

* test: assert contract info && code info

* fix: change repo secret name

* refactor: change v6.4.7 -> v6.4.8

* revert change version

* rebase and change conflict version

* merge from develop2

* feat: add v6_6_0 handler

* remove old upgrade

* fix lint

* fix lint

* fix test

* update script

* update address and ibc-go

* fix lint

* fix lint

* feat: init deps

* Kien/e2e test migrate (#23)

* feat: run locanode and push wasm code

* feat: setup relayer

* feat: using ngit for repo with nix

* chore: update notes install deps

* feat: script to upgrade

* fix: upgrade scripts

* fix: init deps script

* fix/migration: wrong prefix relay addresS

* fix: migration transfermiddleware

* allow pica12smx2wdlyttvyzvzg54y2vnqwq2qjate0ww798 in local

* fix lint

---------

Co-authored-by: kkast <[email protected]>
Co-authored-by: Kanstantsin Kastsevich <[email protected]>
Co-authored-by: rjonczy <[email protected]>
Co-authored-by: rustdev <[email protected]>
Co-authored-by: rust.dev <[email protected]>
Co-authored-by: dzmitry-lahoda <[email protected]>
Co-authored-by: tungle <[email protected]>
Co-authored-by: kienn6034 <[email protected]>

* update gitignore

* update gitignore (#493)

* refactor: remove before release testnet

* refactor: update denom

* refactor: hardcode checksum

* refactor: change name convention

* update ibc-go version update ibc-go version

* fix releaser

* introduce refund logic for ibc transfer if tx failed by timeout.

* add migration pfm (#499)

* add migration pfm

* refactor

* refactor

* fix lint

* disallow to device by zero in ibc tx flow

* Kien/merge picad to sdk 50 (#25)

* implement custom transfer method for keeper.

* add param to new keeper call.

* call the default keeper Transfer instead of recursion.

* fix lint

* introduced v6_5_2 upgrade channel

* update datatype for min cosmos fee in tx to sdk.Coin

* introduce v6_5_3

* updating ibc-go

* fixes

* rename uprgade

* revert

* Change prefix to pica (#447)

* delete proposal #6

* use develop branch for ci

* use another image

* test

* removing more broken proposals

* introduce goreleaser

* remove separate gha for building docker images

* rename registry owner

* clean comments

* use version with v

* add additional tags

* fix org

* update docker image

* added jq

* introduce ibc transfer custom module

* custom ibc transfer module ready to replace for testing.

* activate custom ibc module for cosmos chain. chain works.

* added ibc transfer module that is going to store all params for eth fees

* resolve conflict with a same name for MsgUpdateEpochParams from staking.

* add dependency to transfer keeper from ibc transfer middleware/params

* added repeated FeeItem into Params + MVP logic in transfer msg server

* finalized the Transfer method. send fee to fee. build. chain works.

* only useful params in genesis for ibc transfer module. Works

* golangci-lint run

* slashing fixes

* remove unused types in proto

* add docs and fix all requested changes by reviewers

* review fixes

* fix tests

* local setup

* allow devnet with custom key gov

* relay from master

* porting fix from v7

* refactoring.

* add runtime upgrade handler. for ibc fee feature.

* upgrade merged. BankKeeper + GovKeeper + IbcTransferMiddlewareKeeper

* Revert "Merge pull request #451 from ComposableFi/slashing_fix"

This reverts commit 1ad4293, reversing
changes made to 85e2bf9.

* revert banksy changes to resolve halted chain.

* Revert "allow devnet with custom key gov"

This reverts commit 2457d87.

* create a new chain upgrade handler for chain upgrade.

* chore: change centaurid -> picad and prefix name to pica

* chore: update name prefix

* refactor: remove old upgrade

* refactor: update prefix

* refactor: update prefix

* test: change govAuthorityAddress

* ci: rollback

* wip

* feat: add script upgrade_test

* chore: update script

* wip

* refactor: remove set prefix

* refactor: update test

* chore: rollback

* chore: ignore build folder

* perf: make blocktime run faster

* fix: use key with balances

* chore: ignore screen log

* refactor: using default flag for test

* test: increment and assert counter value to be equal 1

* chore: rollback

* chore: rollback script

* test: add script upgrade

* fix: correct upgrade height

* feat: add post scripts

* test: assertion for post scripts

* chore: stream unnecessary output to null

* feat: add test for the new address

* wip

* chore: log for test upgrade

* test: completed ibc transfer

* verify affection of alliance module

* test/ica_migration

* add migration test for mint, ratelimit, ibc-hooks, transfermiddleware module

* finalize script upgrade test

* pick denom for testing as stake

* remove unused fnc

* modify testup

* fix unused fnc

* merge variable

* chore: remove release.yml

* refactor: change v6.4.6 -> v6.4.7

* feaT: migrate contract info

* test: assert contract info && code info

* fix: change repo secret name

* refactor: change v6.4.7 -> v6.4.8

* revert change version

* rebase and change conflict version

* merge from develop2

* feat: add v6_6_0 handler

* remove old upgrade

* fix lint

* fix lint

* fix test

* update script

* update address and ibc-go

* fix lint

* fix lint

---------

Co-authored-by: kkast <[email protected]>
Co-authored-by: Kanstantsin Kastsevich <[email protected]>
Co-authored-by: rjonczy <[email protected]>
Co-authored-by: rustdev <[email protected]>
Co-authored-by: rust.dev <[email protected]>
Co-authored-by: dzmitry-lahoda <[email protected]>
Co-authored-by: tungle <[email protected]>
Co-authored-by: kienn6034 <[email protected]>

* add scripts (#492)

* delete proposal #6

* use develop branch for ci

* use another image

* test

* removing more broken proposals

* introduce goreleaser

* remove separate gha for building docker images

* rename registry owner

* clean comments

* use version with v

* add additional tags

* fix org

* update docker image

* added jq

* introduce ibc transfer custom module

* custom ibc transfer module ready to replace for testing.

* activate custom ibc module for cosmos chain. chain works.

* added ibc transfer module that is going to store all params for eth fees

* resolve conflict with a same name for MsgUpdateEpochParams from staking.

* add dependency to transfer keeper from ibc transfer middleware/params

* added repeated FeeItem into Params + MVP logic in transfer msg server

* finalized the Transfer method. send fee to fee. build. chain works.

* only useful params in genesis for ibc transfer module. Works

* golangci-lint run

* slashing fixes

* remove unused types in proto

* add docs and fix all requested changes by reviewers

* review fixes

* fix tests

* local setup

* allow devnet with custom key gov

* relay from master

* porting fix from v7

* refactoring.

* add runtime upgrade handler. for ibc fee feature.

* upgrade merged. BankKeeper + GovKeeper + IbcTransferMiddlewareKeeper

* Revert "Merge pull request #451 from ComposableFi/slashing_fix"

This reverts commit 1ad4293, reversing
changes made to 85e2bf9.

* revert banksy changes to resolve halted chain.

* Revert "allow devnet with custom key gov"

This reverts commit 2457d87.

* create a new chain upgrade handler for chain upgrade.

* chore: change centaurid -> picad and prefix name to pica

* chore: update name prefix

* refactor: remove old upgrade

* refactor: update prefix

* refactor: update prefix

* test: change govAuthorityAddress

* ci: rollback

* wip

* feat: add script upgrade_test

* chore: update script

* wip

* refactor: remove set prefix

* refactor: update test

* chore: rollback

* chore: ignore build folder

* perf: make blocktime run faster

* fix: use key with balances

* chore: ignore screen log

* refactor: using default flag for test

* test: increment and assert counter value to be equal 1

* chore: rollback

* chore: rollback script

* test: add script upgrade

* fix: correct upgrade height

* feat: add post scripts

* test: assertion for post scripts

* chore: stream unnecessary output to null

* feat: add test for the new address

* wip

* chore: log for test upgrade

* test: completed ibc transfer

* verify affection of alliance module

* test/ica_migration

* add migration test for mint, ratelimit, ibc-hooks, transfermiddleware module

* finalize script upgrade test

* pick denom for testing as stake

* remove unused fnc

* modify testup

* fix unused fnc

* merge variable

* chore: remove release.yml

* refactor: change v6.4.6 -> v6.4.7

* feaT: migrate contract info

* test: assert contract info && code info

* fix: change repo secret name

* refactor: change v6.4.7 -> v6.4.8

* revert change version

* rebase and change conflict version

* merge from develop2

* feat: add v6_6_0 handler

* remove old upgrade

* fix lint

* fix lint

* fix test

* update script

* update address and ibc-go

* fix lint

* fix lint

* feat: init deps

* Kien/e2e test migrate (#23)

* feat: run locanode and push wasm code

* feat: setup relayer

* feat: using ngit for repo with nix

* chore: update notes install deps

* feat: script to upgrade

* fix: upgrade scripts

* fix: init deps script

* fix/migration: wrong prefix relay addresS

* fix: migration transfermiddleware

* allow pica12smx2wdlyttvyzvzg54y2vnqwq2qjate0ww798 in local

* fix lint

---------

Co-authored-by: kkast <[email protected]>
Co-authored-by: Kanstantsin Kastsevich <[email protected]>
Co-authored-by: rjonczy <[email protected]>
Co-authored-by: rustdev <[email protected]>
Co-authored-by: rust.dev <[email protected]>
Co-authored-by: dzmitry-lahoda <[email protected]>
Co-authored-by: tungle <[email protected]>
Co-authored-by: kienn6034 <[email protected]>

* update gitignore

* update gitignore (#493)

* refactor: remove before release testnet

* update ibc-go version update ibc-go version

* fix releaser

* chore: bech32 migration script to sdk 50

* feat: sync sdk 50

* fix: scripts to deploy pica node

* feat: add todo

* fix: running pica node

* chore: update

* deps: correct version to psuh wasm code

* test: upgrade chain successfully

---------

Co-authored-by: rustdev <[email protected]>
Co-authored-by: rust.dev <[email protected]>
Co-authored-by: kkast <[email protected]>
Co-authored-by: Kanstantsin Kastsevich <[email protected]>
Co-authored-by: Hoa Nguyen <[email protected]>
Co-authored-by: rjonczy <[email protected]>
Co-authored-by: dzmitry-lahoda <[email protected]>
Co-authored-by: tungle <[email protected]>

* merge from develop2

* feat: add prescript add rly account

---------

Co-authored-by: rustdev <[email protected]>
Co-authored-by: rust.dev <[email protected]>
Co-authored-by: kkast <[email protected]>
Co-authored-by: Kanstantsin Kastsevich <[email protected]>
Co-authored-by: rjonczy <[email protected]>
Co-authored-by: dzmitry-lahoda <[email protected]>
Co-authored-by: tungle <[email protected]>
Co-authored-by: kienn6034 <[email protected]>
  • Loading branch information
9 people committed Apr 25, 2024
1 parent ad0c4aa commit 90a333d
Show file tree
Hide file tree
Showing 80 changed files with 1,712 additions and 797 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/interchaintest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
password: ${{ secrets.GHCR_PAT }}
- name: Build and push
id: build_push_image
uses: docker/build-push-action@v3
Expand Down
8 changes: 5 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ dist/

# Test binary, built with `go test -c`
*.test

# Test data
data/*
# Output of the go coverage tool, specifically when used with LiteIDE
*.out

Expand All @@ -48,8 +49,9 @@ vendor
go.work
go.work.sum

_build/

_build
mytestnet/

screenlog.0
mytestnet
.idea
10 changes: 5 additions & 5 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# .goreleaser.yml

project_name: centaurid
project_name: picad

env:
- CGO_ENABLED=1

builds:
- id: linux
main: ./cmd/centaurid
binary: centaurid
main: ./cmd/picad
binary: picad
hooks:
pre:
- cmd: bash scripts/release_pre_linux.sh
Expand All @@ -28,8 +28,8 @@ builds:
- -mod=readonly
- -trimpath
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.Name=pica
- -X github.com/cosmos/cosmos-sdk/version.AppName=picad
- -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=netgo,ledger,muslc"
Expand Down
24 changes: 12 additions & 12 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ RUN apk add --no-cache \
linux-headers

# Download go dependencies
WORKDIR /centauri
WORKDIR /pica
COPY go.mod go.sum ./
RUN --mount=type=cache,target=/root/.cache/go-build \
--mount=type=cache,target=/root/go/pkg/mod \
Expand All @@ -36,30 +36,30 @@ RUN set -eux; \
# Copy the remaining files
COPY . .

# Build centaurid binary
# Build picad binary
RUN --mount=type=cache,target=/root/.cache/go-build \
--mount=type=cache,target=/root/go/pkg/mod \
GOWORK=off go build \
-mod=readonly \
-tags "netgo,ledger,muslc" \
-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.Name="pica" \
-X github.com/cosmos/cosmos-sdk/version.AppName="picad" \
-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 /centauri/build/centaurid \
/centauri/cmd/centaurid
-o /pica/build/picad \
/pica/cmd/picad


# --------------------------------------------------------
# toolkit
# --------------------------------------------------------

FROM busybox:1.35.0-uclibc as busybox
RUN addgroup --gid 1025 -S composable && adduser --uid 1025 -S composable -G composable
RUN addgroup --gid 1025 -S pica && adduser --uid 1025 -S pica -G pica


# --------------------------------------------------------
Expand All @@ -69,14 +69,14 @@ FROM ${RUNNER_IMAGE}

COPY --from=busybox:1.35.0-uclibc /bin/sh /bin/sh

COPY --from=builder /centauri/build/centaurid /bin/centaurid
COPY --from=builder /pica/build/picad /bin/picad

# Install composable user
COPY --from=busybox /etc/passwd /etc/passwd
COPY --from=busybox --chown=1025:1025 /home/composable /home/composable
COPY --from=busybox --chown=1025:1025 /home/pica /home/pica

WORKDIR /home/composable
USER composable
WORKDIR /home/pica
USER pica

# rest server
EXPOSE 1317
Expand All @@ -87,4 +87,4 @@ EXPOSE 26657
# grpc
EXPOSE 9090

ENTRYPOINT ["centaurid"]
ENTRYPOINT ["picad"]
18 changes: 9 additions & 9 deletions Dockerfile.dev
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ RUN apk add --no-cache \
linux-headers

# Download go dependencies
WORKDIR /centauri
WORKDIR /pica
COPY go.mod go.sum ./

# Cosmwasm - Download correct libwasmvm version
Expand All @@ -33,34 +33,34 @@ RUN set -eux; \
# Copy the remaining files
COPY . .

# Build centaurid binary
# Build picad binary
RUN GOWORK=off go build \
-mod=readonly \
-tags "netgo,ledger,muslc" \
-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.Name="pica" \
-X github.com/cosmos/cosmos-sdk/version.AppName="picad" \
-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 /centauri/build/centaurid \
/centauri/cmd/centaurid
-o /pica/build/picad \
/pica/cmd/picad

# --------------------------------------------------------
# Runner
# --------------------------------------------------------

FROM ${RUNNER_IMAGE}

COPY --from=builder /centauri/build/centaurid /bin/centaurid
COPY --from=builder /pica/build/picad /bin/picad

ENV HOME /centauri
ENV HOME /pica

WORKDIR $HOME

COPY scripts/* /centauri/
COPY scripts/* /pica/
# rest server
EXPOSE 1317
# tendermint p2p
Expand Down
50 changes: 44 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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=centauri \
-X github.com/cosmos/cosmos-sdk/version.AppName=centaurid \
ldflags = -X github.com/cosmos/cosmos-sdk/version.Name=pica \
-X github.com/cosmos/cosmos-sdk/version.AppName=picad \
-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)"
Expand All @@ -86,18 +86,18 @@ endif
all: install

install: go.sum
go install -mod=readonly $(BUILD_FLAGS) ./cmd/centaurid
go install -mod=readonly $(BUILD_FLAGS) ./cmd/picad

build:
go build $(BUILD_FLAGS) -o bin/centaurid ./cmd/centaurid
go build $(BUILD_FLAGS) -o bin/picad ./cmd/picad

docker-build-debug:
@DOCKER_BUILDKIT=1 docker build -t centauri:local -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 .
@find . -name '*.go' -type f -not -path "./vendor*" -not -path "*.git*" -not -name '*.pb.go' -not -name '*.gw.go' | xargs go run github.com/client9/misspell/cmd/misspell -w
@find . -name '*.go' -type f -not -path "./vendor*" -not -path "*.git*" -not -name '*.pb.go' -not -name '*.gw.go' | xargs go run golang.org/x/tools/cmd/goimports -w -local github.com/notional-labs/centauri
@find . -name '*.go' -type f -not -path "./vendor*" -not -path "*.git*" -not -name '*.pb.go' -not -name '*.gw.go' | xargs go run golang.org/x/tools/cmd/goimports -w -local github.com/notional-labs/pica
.PHONY: lint

###############################################################################
Expand Down Expand Up @@ -156,6 +156,21 @@ ictest-all: ictest-start-cosmos ictest-start-polkadot ictest-ibc
ictest-push-wasm:
cd tests/interchaintest && go test -race -v -run TestPushWasmClientCode .

# Init 2 cosmos chains and setup ibc between them
init-test-interchain: clean-testing-data install
./scripts/test-upgrade-cosmos-chains.sh

### Upgrade Test ###
test-upgrade: clean-testing-data
@echo "Starting upgrade test"
./scripts/test-upgrade.sh

clean-testing-data:
@echo "Killing binary and removing previous data"
-@pkill picad 2>/dev/null
-@pkill rly 2>/dev/null
-@rm -rf ./mytestnet

.PHONY: ictest-start-cosmos ictest-start-polkadot ictest-ibc ictest-push-wasm ictest-all

include contrib/make/release.mk
Expand All @@ -169,5 +184,28 @@ test-upgrade: clean-testing-data
clean-testing-data:
@echo "Killing binary and removing previous data"
-@pkill centaurid 2>/dev/null
-@pkill picad 2>/dev/null
-@rm -rf ./screenlog.0
-@rm -rf ./mytestnet

## Scripts for testing sdk 50
init-deps:
@echo "Installing dependencies"
bash ./scripts/upgrade/init-deps.sh

localnet-pica: clean-testing-data
@echo "Starting localnet"
bash ./scripts/upgrade/setup-old-picad-node.sh

localnet-picasso:
@echo "Starting localnet"
bash ./scripts/upgrade/setup-polkadot-node.sh

relayer-start:
@echo "Starting relayer"
bash ./scripts/upgrade/setup-relayer.sh

pica-upgrade:
@echo "Starting upgrade"
bash ./scripts/upgrade/upgrade.sh

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Centauri
# Pica
Cosmos blockchain with IBC-v7 and wasm client enable.

## Hardware Recommendation
Expand All @@ -13,7 +13,7 @@ Requires [Go 1.20](https://go.dev/doc/install) or higher.

```bash
make install
centaurid version
picad version
```
Then you can run a node with a single command.

Expand Down
31 changes: 20 additions & 11 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
"cosmossdk.io/client/v2/autocli"
"cosmossdk.io/core/appmodule"
"fmt"
tmproto "github.com/cometbft/cometbft/proto/tendermint/types"
runtimeservices "github.com/cosmos/cosmos-sdk/runtime/services"
authcodec "github.com/cosmos/cosmos-sdk/x/auth/codec"
"github.com/notional-labs/composable/v6/app/upgrades/v6_5_1"
"io"
"os"
"path/filepath"
Expand Down Expand Up @@ -101,8 +101,8 @@ import (
customstaking "github.com/notional-labs/composable/v6/custom/staking"
"github.com/spf13/cast"

router "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v8/packetforward"
routertypes "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v8/packetforward/types"
pfm "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v8/packetforward"
pfmtypes "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v8/packetforward/types"

custombankmodule "github.com/notional-labs/composable/v6/custom/bank"

Expand Down Expand Up @@ -138,7 +138,7 @@ import (
)

const (
Name = "centauri"
Name = "picasso"
dirName = "banksy"
ForkHeight = 244008
)
Expand All @@ -152,7 +152,7 @@ var (
// https://github.com/CosmWasm/wasmd/blob/02a54d33ff2c064f3539ae12d75d027d9c665f05/x/wasm/internal/types/proposal.go#L28-L34
EnableSpecificProposals = ""

Upgrades = []upgrades.Upgrade{v6_5_1.Upgrade, v7_0_1.Upgrade}
Upgrades = []upgrades.Upgrade{v7_0_1.Upgrade}
Forks = []upgrades.Fork{}
)

Expand Down Expand Up @@ -200,7 +200,7 @@ var (
tendermint.AppModuleBasic{},
mint.AppModuleBasic{},
wasm.AppModuleBasic{},
router.AppModuleBasic{},
pfm.AppModuleBasic{},
ica.AppModuleBasic{},
ibc_hooks.AppModuleBasic{},
transfermiddleware.AppModuleBasic{},
Expand Down Expand Up @@ -341,7 +341,7 @@ func NewComposableApp(

// transferModule := transfer.NewAppModule(app.TransferKeeper)
transferModule := customibctransfer.NewAppModule(appCodec, app.TransferKeeper, app.BankKeeper)
routerModule := router.NewAppModule(app.RouterKeeper, app.GetSubspace(routertypes.ModuleName))
pfmModule := pfm.NewAppModule(app.PfmKeeper, app.GetSubspace(pfmtypes.ModuleName))
transfermiddlewareModule := transfermiddleware.NewAppModule(&app.TransferMiddlewareKeeper)
txBoundaryModule := txBoundary.NewAppModule(appCodec, app.TxBoundaryKeepper)
ratelimitModule := ratelimitmodule.NewAppModule(&app.RatelimitKeeper)
Expand Down Expand Up @@ -388,7 +388,7 @@ func NewComposableApp(
consensus.NewAppModule(appCodec, app.ConsensusParamsKeeper),
wasm.NewAppModule(appCodec, &app.WasmKeeper, app.StakingKeeper, app.AccountKeeper, app.BankKeeper, app.MsgServiceRouter(), app.GetSubspace(wasmtypes.ModuleName)),
wasm08.NewAppModule(app.Wasm08Keeper),
routerModule,
pfmModule,
transfermiddlewareModule,
txBoundaryModule,
icaModule,
Expand Down Expand Up @@ -420,7 +420,7 @@ func NewComposableApp(
vestingtypes.ModuleName,
ibcexported.ModuleName,
ibctransfertypes.ModuleName,
routertypes.ModuleName,
pfmtypes.ModuleName,
transfermiddlewaretypes.ModuleName,
txBoundaryTypes.ModuleName,
ratelimitmoduletypes.ModuleName,
Expand Down Expand Up @@ -464,7 +464,7 @@ func NewComposableApp(
group.ModuleName,
paramstypes.ModuleName,
upgradetypes.ModuleName,
routertypes.ModuleName,
pfmtypes.ModuleName,
transfermiddlewaretypes.ModuleName,
txBoundaryTypes.ModuleName,
ratelimitmoduletypes.ModuleName,
Expand Down Expand Up @@ -504,7 +504,7 @@ func NewComposableApp(
upgradetypes.ModuleName,
ibctransfertypes.ModuleName,
icqtypes.ModuleName,
routertypes.ModuleName,
pfmtypes.ModuleName,
transfermiddlewaretypes.ModuleName,
txBoundaryTypes.ModuleName,
ratelimitmoduletypes.ModuleName,
Expand Down Expand Up @@ -596,6 +596,15 @@ func NewComposableApp(
if err := app.LoadLatestVersion(); err != nil {
tmos.Exit(err.Error())
}
ctx := app.BaseApp.NewUncachedContext(true, tmproto.Header{})
// Initialize pinned codes in wasmvm as they are not persisted there
if err := app.WasmKeeper.InitializePinnedCodes(ctx); err != nil {
tmos.Exit(fmt.Sprintf("failed initialize pinned codes %s", err))
}

//if err := wasm08keeper.InitializePinnedCodes(ctx); err != nil {
// tmos.Exit(fmt.Sprintf("failed initialize pinned codes %s", err))
//}
}

return app
Expand Down
Loading

0 comments on commit 90a333d

Please sign in to comment.