Skip to content

Commit

Permalink
Merge pull request #131 from queencre/124-bump-ibc-go
Browse files Browse the repository at this point in the history
build: upgrade ibc-go from v2 to v3
  • Loading branch information
queencre authored Dec 21, 2022
2 parents b531cf4 + 9ebf864 commit 388bf88
Show file tree
Hide file tree
Showing 17 changed files with 624 additions and 2,097 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Build Crescent Core
# This workflow is run on pushes to main & every Pull Requests where a .go, .mod, .sum have been changed
on:
pull_request:
push:
branches:
- main
- release/**
permissions:
contents: read

concurrency:
group: ci-${{ github.ref }}-build
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
go-arch: ["amd64"]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: "^1.18"
- uses: technote-space/get-diff-action@v6.1.2
id: git_diff
with:
PATTERNS: |
**/*.go
go.mod
go.sum
**/go.mod
**/go.sum
**/Makefile
Makefile
- name: Build
if: env.GIT_DIFF
run: GOARCH=${{ matrix.go-arch }} LEDGER_ENABLED=false make build
20 changes: 0 additions & 20 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,26 +15,6 @@ jobs:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
if: "!startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/main'"

build:
runs-on: ubuntu-latest
strategy:
matrix:
go-arch: ["amd64", "arm64"]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: 1.18
- uses: technote-space/get-diff-action@v6.0.1
id: git_diff
with:
PATTERNS: |
**/**.go
go.mod
go.sum
- name: Build
run: GOARCH=${{ matrix.go-arch }} LEDGER_ENABLED=false make build

test-coverage:
runs-on: ubuntu-latest
timeout-minutes: 15
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ Ref: https://keepachangelog.com/en/1.0.0/

## [Unreleased]

### State Machine Breaking

- (ibc) [\#131](https://github.com/crescent-network/crescent/pull/131) build!: upgrade ibc-go from v2.2.0 to v3.4.0

## [v3.0.0] - 2022-12-07

### State Machine Breaking
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@ crescentd version --long

Crescent core uses a fork of [cosmos-sdk](https://github.com/crescent-network/cosmos-sdk) and [ibc-go](https://github.com/crescent-network/ibc-go). If you would like to know which ones customized from the original `cosmos-sdk` and `ibc-go`, please reference the release notes in the respective repository.

| Requirement | Notes |
|---------------------|--------------------|
| cosmos-sdk (forked) | v1.1.2-sdk-0.45.9 |
| ibc-go (forked) | v2.2.0-crescent-v3 |
| Requirement | Notes |
|---------------------|----------------------|
| cosmos-sdk (forked) | v1.1.4-sdk-0.45.10 |
| ibc-go (forked) | v3.4.0-crescent-v4-2 |

## Documentation

Expand Down
9 changes: 5 additions & 4 deletions app/ante_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,17 @@ import (
sdk "github.com/cosmos/cosmos-sdk/types"
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
"github.com/cosmos/cosmos-sdk/x/auth/ante"
channelkeeper "github.com/cosmos/ibc-go/v2/modules/core/04-channel/keeper"
ibcante "github.com/cosmos/ibc-go/v2/modules/core/ante"

ibcante "github.com/cosmos/ibc-go/v3/modules/core/ante"
ibckeeper "github.com/cosmos/ibc-go/v3/modules/core/keeper"
)

// HandlerOptions extend the SDK's AnteHandler options by requiring the IBC
// channel keeper.
type HandlerOptions struct {
ante.HandlerOptions

IBCChannelkeeper channelkeeper.Keeper
IBCKeeper *ibckeeper.Keeper
}

func NewAnteHandler(options HandlerOptions) (sdk.AnteHandler, error) {
Expand Down Expand Up @@ -47,7 +48,7 @@ func NewAnteHandler(options HandlerOptions) (sdk.AnteHandler, error) {
ante.NewSigGasConsumeDecorator(options.AccountKeeper, sigGasConsumer),
ante.NewSigVerificationDecorator(options.AccountKeeper, options.SignModeHandler),
ante.NewIncrementSequenceDecorator(options.AccountKeeper),
ibcante.NewAnteDecorator(options.IBCChannelkeeper),
ibcante.NewAnteDecorator(options.IBCKeeper),
}

return sdk.ChainAnteDecorators(anteDecorators...), nil
Expand Down
Loading

0 comments on commit 388bf88

Please sign in to comment.