Skip to content

Commit

Permalink
Update support feature wasmd (#170) (#171) (#172)
Browse files Browse the repository at this point in the history
* Bump dev-drprasad/delete-older-releases from 0.2.0 to 0.3.2

Bumps [dev-drprasad/delete-older-releases](https://github.com/dev-drprasad/delete-older-releases) from 0.2.0 to 0.3.2.
- [Release notes](https://github.com/dev-drprasad/delete-older-releases/releases)
- [Commits](dev-drprasad/delete-older-releases@v0.2.0...v0.3.2)

---
updated-dependencies:
- dependency-name: dev-drprasad/delete-older-releases
  dependency-type: direct:production
  update-type: version-update:semver-minor
...



* Bump docker/setup-buildx-action from 2 to 3

Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 2 to 3.
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](docker/setup-buildx-action@v2...v3)

---
updated-dependencies:
- dependency-name: docker/setup-buildx-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...



* Bump docker/setup-qemu-action from 2 to 3

Bumps [docker/setup-qemu-action](https://github.com/docker/setup-qemu-action) from 2 to 3.
- [Release notes](https://github.com/docker/setup-qemu-action/releases)
- [Commits](docker/setup-qemu-action@v2...v3)

---
updated-dependencies:
- dependency-name: docker/setup-qemu-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...



* Bump actions/checkout from 3 to 4

Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](actions/checkout@v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...
---

* update max metadata lenght of proposal

* add release note template

* upgrade v0.7.2 - support wasmvm capabilities (#169)

* bump patch version

* modify release changelog

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: phanhoc <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Narutobacoshiba <[email protected]>
Co-authored-by: Endless <[email protected]>
  • Loading branch information
5 people authored Dec 5, 2023
1 parent fdf7ce2 commit 2cab28f
Show file tree
Hide file tree
Showing 9 changed files with 55 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v0.7.1
v0.7.2
2 changes: 1 addition & 1 deletion .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
- uses: actions/setup-go@v3
with:
go-version: 1.19
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/pre-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

Expand All @@ -39,18 +39,18 @@ jobs:
exit 1
- name: Delete the "latest" Pre-Release
uses: dev-drprasad/delete-older-releases@v0.2.0
uses: dev-drprasad/delete-older-releases@v0.3.2
with:
keep_latest: 0
delete_tag_pattern: .*-${{ github.head_ref || github.ref_name }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3

- name: Publish the Pre-Release
run: make release
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

Expand All @@ -26,10 +26,10 @@ jobs:
echo "VERSION=$VER" >> $GITHUB_ENV
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3

- name: Publish the Release
run: make release
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v3
Expand Down
2 changes: 2 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ builds:
tags:
- netgo
- muslc
changelog:
use: github-native
release:
prerelease: auto
checksum:
Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,14 @@ Ref: https://keepachangelog.com/en/1.0.0/

## Unreleased

## [v0.7.2] - 2023-11-20

### Features
- Support wasmvm capabilities:
- "cosmwasm_1_1"
- "cosmwasm_1_2"
- "cosmwasm_1_3"

## [v0.7.1] - 2023-10-18
Update smartaccount

Expand Down
18 changes: 15 additions & 3 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import (
v601 "github.com/aura-nw/aura/app/upgrades/v0.6.1"
v700 "github.com/aura-nw/aura/app/upgrades/v0.7.0"
v701 "github.com/aura-nw/aura/app/upgrades/v0.7.1"
v702 "github.com/aura-nw/aura/app/upgrades/v0.7.2"

"github.com/aura-nw/aura/app/internal"

Expand Down Expand Up @@ -124,6 +125,7 @@ import (
authzkeeper "github.com/cosmos/cosmos-sdk/x/authz/keeper"
authzmodule "github.com/cosmos/cosmos-sdk/x/authz/module"

wasmapp "github.com/CosmWasm/wasmd/app"
"github.com/CosmWasm/wasmd/x/wasm"
wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper"
wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types"
Expand Down Expand Up @@ -534,7 +536,7 @@ func New(

// The last arguments can contain custom message handlers, and custom query handlers,
// if we want to allow any custom callbacks
supportedFeatures := "iterator,staking,stargate"
availableCapabilities := strings.Join(wasmapp.AllCapabilities(), ",")
wasmOpts := GetWasmOpts(appOpts)
app.WasmKeeper = wasmkeeper.NewKeeper(
appCodec,
Expand All @@ -552,7 +554,7 @@ func New(
app.BaseApp.GRPCQueryRouter(),
wasmDir,
wasmConfig,
supportedFeatures,
availableCapabilities,
govModAddress,
wasmOpts...,
)
Expand Down Expand Up @@ -580,9 +582,11 @@ func New(
govRouter.AddRoute(wasmtypes.RouterKey, wasm.NewWasmProposalHandler(app.WasmKeeper, enabledProposals)) //nolint:staticcheck // still use same ver 0.41.0 of wasmd
}

customGovConfig := govtypes.DefaultConfig()
customGovConfig.MaxMetadataLen = 2000
app.GovKeeper = govkeeper.NewKeeper(
appCodec, keys[govtypes.StoreKey], app.AccountKeeper, app.BankKeeper,
stakingKeeper, app.BaseApp.MsgServiceRouter(), govtypes.DefaultConfig(), govModAddress,
stakingKeeper, app.BaseApp.MsgServiceRouter(), customGovConfig, govModAddress,
)

// Set legacy router for backwards compatibility with gov v1beta1
Expand Down Expand Up @@ -1127,6 +1131,11 @@ func (app *App) setupUpgradeHandlers() {
),
)

app.UpgradeKeeper.SetUpgradeHandler(
v702.UpgradeName,
v702.CreateUpgradeHandler(app.mm, app.configurator),
)

// When a planned update height is reached, the old binary will panic
// writing on disk the height and name of the update that triggered it
// This will read that value, and execute the preparations for the upgrade.
Expand Down Expand Up @@ -1200,6 +1209,9 @@ func (app *App) setupUpgradeHandlers() {
},
}
}

case v702.UpgradeName:
// no store upgrades in v0.7.2
}

if storeUpgrades != nil {
Expand Down
20 changes: 20 additions & 0 deletions app/upgrades/v0.7.2/upgrades.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package v702

import (
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/module"
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"
)

// UpgradeName is the name of upgrade. This upgrade added new module
const UpgradeName = "v0.7.2"

func CreateUpgradeHandler(
mm *module.Manager,
configurator module.Configurator,
) upgradetypes.UpgradeHandler {
return func(ctx sdk.Context, _ upgradetypes.Plan, vm module.VersionMap) (module.VersionMap, error) {

return mm.RunMigrations(ctx, configurator, vm)
}
}

0 comments on commit 2cab28f

Please sign in to comment.