Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into dependabot/go_mod…
Browse files Browse the repository at this point in the history
…ules/tests/interchaintest/github.com/ethereum/go-ethereum-1.12.1
  • Loading branch information
faddat committed Dec 17, 2023
2 parents 1fa1495 + d07818f commit 125389e
Show file tree
Hide file tree
Showing 146 changed files with 1,956 additions and 1,604 deletions.
28 changes: 11 additions & 17 deletions .github/workflows/push_docker_images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@
#
# On every new `vX.Y.Z` tag the following images are pushed:
#
# 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
# ghcr.io/composablefi/composable-cosmos:X.Y.Z # is pushed
# ghcr.io/composablefi/composable-cosmos:X.Y # is updated to X.Y.Z
# ghcr.io/composablefi/composable-cosmos:X # is updated to X.Y.Z
#
# All the images above have support for linux/amd64 and linux/arm64.
#
Expand All @@ -29,23 +28,19 @@ jobs:
feeapp-images:
runs-on: ubuntu-latest
steps:
-
name: Check out the repo
- name: Check out the repo
uses: actions/checkout@v3
-
name: Set up QEMU
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
-
name: Set up Docker Buildx
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
-
name: Parse tag
- name: Parse tag
id: tag
run: |
VERSION=$(echo ${{ github.ref_name }} | sed "s/v//")
Expand All @@ -56,8 +51,7 @@ jobs:
echo "MAJOR_VERSION=$MAJOR_VERSION" >> $GITHUB_ENV
echo "MINOR_VERSION=$MINOR_VERSION" >> $GITHUB_ENV
echo "PATCH_VERSION=$PATCH_VERSION" >> $GITHUB_ENV
-
name: Build and push
- name: Build and push
id: build_push_image
uses: docker/build-push-action@v3
with:
Expand All @@ -66,6 +60,6 @@ jobs:
push: true
platforms: linux/amd64,linux/arm64
tags: |
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 }}
ghcr.io/composablefi/composable-cosmos:${{ env.MAJOR_VERSION }}
ghcr.io/composablefi/composable-cosmos:${{ env.MAJOR_VERSION }}.${{ env.MINOR_VERSION }}
ghcr.io/composablefi/composable-cosmos:${{ env.MAJOR_VERSION }}.${{ env.MINOR_VERSION }}.${{ env.PATCH_VERSION }}
23 changes: 19 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -51,18 +51,32 @@ RUN --mount=type=cache,target=/root/.cache/go-build \
-w -s -linkmode=external -extldflags '-Wl,-z,muldefs -static'" \
-trimpath \
-o /centauri/build/centaurid \
/centauri/cmd/centaurid/main.go
/centauri/cmd/centaurid


# --------------------------------------------------------
# Runner
# toolkit
# --------------------------------------------------------

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


# --------------------------------------------------------
# Runner
# --------------------------------------------------------
FROM ${RUNNER_IMAGE}

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

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

ENV HOME /centauri
WORKDIR $HOME
# Install composable user
COPY --from=busybox /etc/passwd /etc/passwd
COPY --from=busybox --chown=1025:1025 /home/composable /home/composable

WORKDIR /home/composable
USER composable

# rest server
EXPOSE 1317
Expand All @@ -72,4 +86,5 @@ EXPOSE 26656
EXPOSE 26657
# grpc
EXPOSE 9090

ENTRYPOINT ["centaurid"]
2 changes: 1 addition & 1 deletion Dockerfile.dev
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ RUN GOWORK=off go build \
-w -s -linkmode=external -extldflags '-Wl,-z,muldefs -static'" \
-trimpath \
-o /centauri/build/centaurid \
/centauri/cmd/centaurid/main.go
/centauri/cmd/centaurid

# --------------------------------------------------------
# Runner
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ SDK_PACK := $(shell go list -m github.com/cosmos/cosmos-sdk | sed 's/ /\@/g')
DOCKER := $(shell which docker)
DOCKER_BUF := $(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace bufbuild/buf:1.0.0-rc8
BUILDDIR ?= $(CURDIR)/build
HTTPS_GIT := https://github.com/notional-labs/composable-testnet/.git
HTTPS_GIT := https://github.com/notional-labs/composable-centauri.git

export GO111MODULE = on

Expand Down Expand Up @@ -140,7 +140,7 @@ ictest-validator:

# Executes start chain tests via interchaintest
ictest-start-polkadot:
cd tests/interchaintest && go test -timeout=25m -race -v -run TestPolkadotComposableChainStart .
cd tests/interchaintest && go test -timeout=25m -race -v -run TestPolkadotcentauriChainStart .

# Executes IBC tests via interchaintest
ictest-ibc:
Expand Down
15 changes: 8 additions & 7 deletions app/ante/ante.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,32 +9,33 @@ import (
sdk "github.com/cosmos/cosmos-sdk/types"
ante "github.com/cosmos/cosmos-sdk/x/auth/ante"
"github.com/cosmos/cosmos-sdk/x/auth/signing"

tfmwKeeper "github.com/notional-labs/centauri/v5/x/transfermiddleware/keeper"
txBoundaryAnte "github.com/notional-labs/centauri/v5/x/tx-boundary/ante"
txBoundaryKeeper "github.com/notional-labs/centauri/v5/x/tx-boundary/keeper"
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
tfmwKeeper "github.com/notional-labs/composable/v6/x/transfermiddleware/keeper"
)

// Link to default ante handler used by cosmos sdk:
// https://github.com/cosmos/cosmos-sdk/blob/v0.43.0/x/auth/ante/ante.go#L41
func NewAnteHandler(
_ servertypes.AppOptions,
options servertypes.AppOptions,
ak ante.AccountKeeper,
bk authtypes.BankKeeper,
feegrantKeeper ante.FeegrantKeeper,
txFeeChecker ante.TxFeeChecker,
sigGasConsumer ante.SignatureVerificationGasConsumer,
signModeHandler signing.SignModeHandler,
channelKeeper *ibckeeper.Keeper,
tfmwKeeper tfmwKeeper.Keeper,
txBoundaryKeeper txBoundaryKeeper.Keeper,
codec codec.BinaryCodec,
) sdk.AnteHandler {
return sdk.ChainAnteDecorators(
ante.NewSetUpContextDecorator(), // // outermost AnteDecorator. SetUpContext must be called first
ante.NewValidateBasicDecorator(),
ante.NewConsumeGasForTxSizeDecorator(ak),
ante.NewDeductFeeDecorator(ak, bk, feegrantKeeper, txFeeChecker),
ante.NewTxTimeoutHeightDecorator(),
ante.NewValidateMemoDecorator(ak),
ante.NewConsumeGasForTxSizeDecorator(ak),
NewIBCPermissionDecorator(codec, tfmwKeeper),
txBoundaryAnte.NewStakingPermissionDecorator(codec, txBoundaryKeeper),
ante.NewSetPubKeyDecorator(ak), // SetPubKeyDecorator must be called before all signature verification decorators
ante.NewValidateSigCountDecorator(ak),
ante.NewSigGasConsumeDecorator(ak, sigGasConsumer),
Expand Down
2 changes: 1 addition & 1 deletion app/ante/ibc_ante.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"github.com/cosmos/cosmos-sdk/x/authz"
clienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types"

tfmwKeeper "github.com/notional-labs/centauri/v5/x/transfermiddleware/keeper"
tfmwKeeper "github.com/notional-labs/composable/v6/x/transfermiddleware/keeper"
)

type IBCPermissionDecorator struct {
Expand Down
Loading

0 comments on commit 125389e

Please sign in to comment.