Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cosmos SDK v46 #863

Closed
wants to merge 159 commits into from
Closed
Show file tree
Hide file tree
Changes from 150 commits
Commits
Show all changes
159 commits
Select commit Hold shift + click to select a range
09207af
bump
faddat Feb 23, 2022
43b7ae7
update ibc stuff
faddat Feb 23, 2022
fdf15f9
store keys updated to store/types
faddat Feb 23, 2022
017459a
add CountTx Middleware
vuong177 Feb 23, 2022
a3623f3
add CountTx Middleware
vuong177 Feb 23, 2022
904c958
clean CountTxMiddleware and add LimitSimulationGasMiddleware
vuong177 Feb 23, 2022
001f33f
update go.mod, go.sum
catShaark Feb 24, 2022
3bf50b1
rm rest handler from gov proposal handler
catShaark Feb 24, 2022
c27981c
add missing codec param to keyring.New(); assign 2 values to info.Get…
catShaark Feb 24, 2022
8b046c2
no legacyctx anymore
vuong177 Feb 25, 2022
607d695
no legacyctx anymore
vuong177 Feb 25, 2022
51909a9
fixing test_helper, add middleware test, and add wasm middleware
vuong177 Feb 25, 2022
5b67451
fix bug by update cosmos-sdk in ./cmd
vuong177 Feb 25, 2022
a088901
fix bug by update ibc-v2 to ibc-v3
vuong177 Feb 25, 2022
a6fc68a
update gov types
catShaark Feb 26, 2022
5d2f237
remote ante handler
vuong177 Feb 26, 2022
23953b7
update sdk
faddat Feb 26, 2022
387d719
remove rest and begin app.go refactor
faddat Feb 26, 2022
72bd8fd
This is a somewhat messy commit that adds more of the ica features
faddat Feb 26, 2022
c8a1735
more cleanup
faddat Feb 26, 2022
78d815e
app.go completed
faddat Feb 26, 2022
189e95c
fix export
faddat Feb 26, 2022
aad3312
message router
faddat Feb 26, 2022
9540d01
more auth antehandler to middleware conversions in /x/wasm
faddat Feb 26, 2022
4670e3a
remove RegisterProposalTypeCodec from proposal.go init()
catShaark Feb 26, 2022
63a4077
fix abci.EventAttribute error in msg_dispatcher_test.go
catShaark Feb 26, 2022
a0f1823
fix storetypes
catShaark Feb 26, 2022
d503f41
remove rest from module.go
faddat Feb 26, 2022
a85abd4
Merge branch 'fortysix' of https://github.com/notional-labs/wasmd int…
faddat Feb 26, 2022
578009c
add empty RegisterRESTRoutes in appmodulebasic
catShaark Feb 26, 2022
81f1241
Update to laterst ibc-go
faddat Feb 26, 2022
7b8fe93
Merge branch 'fortysix' of https://github.com/notional-labs/wasmd int…
faddat Feb 26, 2022
049f54d
height counters
faddat Feb 26, 2022
20a17c7
Rename Keepers
faddat Feb 26, 2022
0d66940
cleanup
faddat Feb 26, 2022
332f6a9
arm support
faddat Feb 26, 2022
1019ec6
more tests fixed
faddat Feb 27, 2022
ecf54e4
fix staking test
faddat Feb 27, 2022
d755653
add the testnet command to wasmd
faddat Feb 27, 2022
0b3a6b1
Use routes in test_common.go instead of directly using the handlers
faddat Feb 27, 2022
776aae9
test_common.go fixed to legacy standards but still needs to be migrat…
faddat Feb 27, 2022
9fe840e
add testnet code (does not work perfectly yet)
faddat Feb 27, 2022
7849c28
mod wasm IBCHandler OnChanOpenTry()
catShaark Feb 27, 2022
bd77037
remove runas gov proposal
catShaark Feb 27, 2022
a9f0f8a
remove runas gov proposal handler
catShaark Feb 27, 2022
aa0760b
exclude testnets from git
faddat Feb 28, 2022
f5272e7
update sdk
faddat Feb 28, 2022
7e3effc
update tendermint and annotate go.mod
faddat Feb 28, 2022
de147ba
remove runas gov proposal proto
catShaark Feb 28, 2022
06c7cce
fmt
faddat Feb 28, 2022
5ed13d2
Auto-linter-fixes
faddat Feb 28, 2022
a550d85
various linter fixes
faddat Feb 28, 2022
c192ef7
linter fixes
faddat Feb 28, 2022
9eb23bc
remove legacy router
faddat Feb 28, 2022
39d37b2
Linter fixes
faddat Feb 28, 2022
aa8c710
fix runtimGasForContract() as infinite gas meter now return math.MaxU…
catShaark Mar 2, 2022
9984183
change createTestInput() in test_common.go
catShaark Mar 2, 2022
871b316
change some func in test_helpers.go, fix error in app.go and app_test.go
catShaark Mar 2, 2022
13924c4
revert Runas code that Khanh removed
vuong177 Mar 2, 2022
33c4b9a
fix bug in proposal_integration_test && change test_common.go for v0.46
vuong177 Mar 2, 2022
6b54222
update TxHandler in app.go
vuong177 Mar 2, 2022
fd45ec0
update wasm.go in ibctesting for cosmos-sdk v0.46
vuong177 Mar 2, 2022
d1620d0
add ibc middleware to TxHandler
vuong177 Mar 2, 2022
1154042
Merge https://github.com/cosmwasm/wasmd into fortysix
faddat Mar 2, 2022
46e134d
tidy
faddat Mar 2, 2022
80f1f23
Merge branch 'fortysix' of https://github.com/notional-labs/wasmd int…
faddat Mar 2, 2022
f63a51f
v1beta2 for gov in cli
faddat Mar 2, 2022
ccaa503
change wasm RegisterLegacyAminoCodec;register wasm type to legacy.Cdc…
catShaark Mar 2, 2022
d207ee9
change wasmd RegisterInterfaces; fix wrong gov types in gov_tx.go ;ch…
catShaark Mar 3, 2022
765b8ee
fix test TestInstantiateWithPermissions
catShaark Mar 3, 2022
5a38f6e
Fix all linting issues
faddat Mar 3, 2022
be68be3
add check gasLimit in LimitSimulationGasHandler && change logic in Te…
vuong177 Mar 3, 2022
a5eea20
right gas in TestDispatchSubMsgErrorHandling, from 112000 to117166
vuong177 Mar 3, 2022
bc40d42
change const value in test
vuong177 Mar 3, 2022
49a31f8
change logic of OnChanOpenTry()
catShaark Mar 3, 2022
12082af
fix wrong logic in middleware && change test in middleware
vuong177 Mar 3, 2022
da2e48d
Merge branch 'master' into fortysix
faddat Mar 3, 2022
fea8d75
add counterpartyChannelID param to wasm IBCHandler.OnChainOpenAck
catShaark Mar 5, 2022
7e10035
add SetChannel to wasmtypes.ChannelKeeper; set counterparty channel o…
catShaark Mar 5, 2022
540264f
Merge https://github.com/cosmwasm/wasmd into fortysix
faddat Mar 7, 2022
c781698
update ibc-go
faddat Mar 7, 2022
4e53546
update ibc
faddat Mar 7, 2022
fb6233b
wasm + ibc-go v3 (w/ chanconect ack) + sdk 46
faddat Mar 7, 2022
dcd17d6
fix bench_test, ~~pass test
vuong177 Mar 8, 2022
a30c4ef
update to gov v1
faddat Mar 13, 2022
a10de6e
fix gov handlers
faddat Mar 13, 2022
bd0fe66
Merge branch 'master' into fortysix
faddat Mar 19, 2022
ccdb5fc
fmt
faddat Mar 19, 2022
6d1d48f
tidy
faddat Mar 19, 2022
d86ce08
Marshaler -> Codec
faddat Mar 19, 2022
5e8d44d
switched from github.com/notional-labs/ibc-go/v3 to github.com/cosmos…
Apr 5, 2022
b630b22
removed the deprecated NegotiateAppVersion handler
Apr 7, 2022
348f50a
Merge pull request #23 from oopcode/fortysix-official-ibc
faddat Apr 11, 2022
daea304
Merge https://github.com/cosmwasm/wasmd into fortysix
faddat Apr 19, 2022
c2a2306
v46+ica patch
faddat Apr 19, 2022
eb41894
fix middleware
faddat Apr 19, 2022
8cc42c2
Merge https://github.com/cosmwasm/wasmd into fortysix
faddat Apr 26, 2022
0ca3896
merge upstream
faddat Apr 26, 2022
337e8da
Merge commit '0ca3896ec438' into HEAD
faddat May 17, 2022
b95c5bf
46
faddat May 17, 2022
f42a6ce
close 815: upgrade to go 1.18
faddat May 18, 2022
81df0ab
Update CHANGELOG.md
faddat May 18, 2022
fda10aa
updater ci and docker to go 1.18
faddat May 23, 2022
88ae9c6
update image per: https://discuss.circleci.com/t/legacy-convenience-i…
faddat May 23, 2022
84a66d8
Merge branch 'main' into faddat/ibc3-sdk46final
faddat May 23, 2022
c4771b8
begin cleanup for sdk46-rc0
faddat May 23, 2022
feccb5f
middleware cleanup
faddat May 23, 2022
e97668b
tidy
faddat May 23, 2022
11d5be8
wasmd
faddat May 23, 2022
09a91c1
removing middleware
faddat May 23, 2022
572c675
fix issues in handler_plugin.go
faddat May 23, 2022
25e0b36
gov tests
faddat May 24, 2022
ddcdaf3
update sdk
faddat May 24, 2022
16453e9
snapshot
faddat May 24, 2022
288c9ae
remove Setup func in testhelper.go
vuong177 May 24, 2022
5b10cf0
minor
vuong177 May 25, 2022
1331263
Delete .gitpod.yml
faddat May 26, 2022
c0372e9
Update testnet.yml
faddat May 26, 2022
3410b30
Rename reflect_test.go to ibc_reflect_test.go
faddat May 26, 2022
5bd5efe
Makefile can match upstream 1:1
faddat May 26, 2022
d74aff1
Merge branch 'faddat/ibc3-sdk46final' of https://github.com/notional-…
faddat May 26, 2022
e377d71
needless filename change
faddat May 26, 2022
387cbf9
the antehandler test should be here
faddat May 26, 2022
ed31f73
goimports
faddat May 26, 2022
6b88c6c
attempt build with modded sdk to fix snapshot issue
faddat May 26, 2022
3a9b6d5
reattempt fixing ci
faddat May 26, 2022
3e6c9c7
remove tab in circleci config
faddat May 26, 2022
e6cf38f
remove tab in circleci config
faddat May 26, 2022
52f6ae7
Update config.yml
faddat May 26, 2022
ca0fb53
set Pruning nothing
vuong177 May 27, 2022
30ff7fb
lint
vuong177 May 27, 2022
c3ff30f
add keys to composite literal
faddat May 27, 2022
c95d595
update app.go
catShaark May 27, 2022
6d75e58
remove pruning nothing in test setup()
catShaark May 28, 2022
0c0e703
fix ibc module and test cordinator
catShaark May 29, 2022
20f4f89
rm debugging fmt.Println
catShaark May 29, 2022
1988d6a
add SnapshotOptions to testing wasm app
catShaark May 29, 2022
9144280
Merge branch 'main' into faddat/upgrade-to-go-v-815
faddat Jun 2, 2022
79601ea
go get -> go install, except dockerfile for protos
faddat Jun 2, 2022
dd6b7d3
v46
faddat Jul 5, 2022
12a22c3
protobufs
faddat Jul 5, 2022
d4d1ad3
update mod and sum
faddat Jul 5, 2022
55e2dd7
mock keepers
faddat Jul 5, 2022
bd5085c
mock keepers
faddat Jul 5, 2022
ef7e773
consensusparams
faddat Jul 5, 2022
79ca106
finish gov cleanup
faddat Jul 5, 2022
9ca6e1b
Merge remote-tracking branch 'upstream/main' into faddat/ibc3-sdk46final
faddat Jul 5, 2022
7e8e47e
ApplySnapshotChunk
faddat Jul 5, 2022
1d2537f
Merge remote-tracking branch 'origin/faddat/upgrade-to-go-v-815' into…
faddat Jul 5, 2022
f71289c
Delete .gitpod.yml
faddat Jul 5, 2022
d56e61c
fix the double-codec-registration issue
faddat Jul 5, 2022
acdb77d
go mod
vuong177 Jul 6, 2022
4ddf89b
ica controller
vuong177 Jul 6, 2022
2974b1d
fix more test && fix app.go
vuong177 Jul 7, 2022
b60c051
register concrete wasm types to gov amino codec; pass TestProposalJso…
catShaark Jul 8, 2022
068083d
ibc v5
faddat Jul 20, 2022
6a7250c
bump ibc-go
faddat Jul 23, 2022
e74146d
fixes
faddat Jul 23, 2022
8573654
refactor tests to match 46 style
faddat Jul 23, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ version: 2.1
executors:
golang:
docker:
- image: circleci/golang:1.17
working_directory: /go/src/github.com/cosmwasm/wasmd
- image: cimg/go:1.18

commands:
make:
Expand Down
31 changes: 31 additions & 0 deletions .github/workflows/testnet.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: 200s testnet

# Controls when the action will run. Workflow runs when manually triggered using the UI
# or API.
on: [push, pull_request, workflow_dispatch]

# This workflow runs a 200 second long multi-node testnet directly from the wasmd binary.

jobs:
build:
runs-on: ubuntu-latest

name: 200 second testnet
steps:
- uses: actions/checkout@v2
- uses: actions/[email protected]
with:
go-version: '^1.18'


# we build and install in case we want to run it or capture an artifact as we do in the step below.
# we also start a chain, so that if we can't do that we know we've failed and move on
- name: Compile chain
run: |
cd cmd/wasmd
go build .
go install .
./wasmd testnet start --enable-logging | true



2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ docs/node_modules
baseapp/data/*
client/lcd/keys/*
mytestnet
.testnets
x/wasm/keeper/tempDir

# Testing
coverage.txt
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## [Unreleased](https://github.com/CosmWasm/wasmd/tree/HEAD)

- Upgrade go to v1.18 [\#866]https://github.com/CosmWasm/wasmd/pull/866/) ([faddat](https://github.com/faddat))

[Full Changelog](https://github.com/CosmWasm/wasmd/compare/v0.27.0...HEAD)

## [v0.27.0](https://github.com/CosmWasm/wasmd/tree/v0.27.0) (2022-05-19)
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# docker build . -t cosmwasm/wasmd:latest
# docker run --rm -it cosmwasm/wasmd:latest /bin/sh
FROM golang:1.17-alpine3.15 AS go-builder
FROM golang:1.18-alpine3.15 AS go-builder
ARG arch=x86_64

# this comes from standard alpine nightly file
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ go.sum: go.mod

draw-deps:
@# requires brew install graphviz or apt-get install graphviz
go get github.com/RobotsAndPencils/goviz
go install github.com/RobotsAndPencils/goviz
@goviz -i ./cmd/wasmd -d 2 | dot -Tpng -o dependency-graph.png

clean:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ This code was forked from the `cosmos/gaia` repository as a basis and then we ad
many gaia-specific files. However, the `wasmd` binary should function just like `gaiad` except for the
addition of the `x/wasm` module.

**Note**: Requires [Go 1.17+](https://golang.org/dl/)
**Note**: Requires [Go 1.18+](https://golang.org/dl/)

For critical security issues & disclosure, see [SECURITY.md](SECURITY.md).
## Compatibility with CosmWasm contracts
Expand Down
13 changes: 7 additions & 6 deletions app/ante.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
package app

import (
storetypes "github.com/cosmos/cosmos-sdk/store/types"
sdk "github.com/cosmos/cosmos-sdk/types"
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
"github.com/cosmos/cosmos-sdk/x/auth/ante"
ibcante "github.com/cosmos/ibc-go/v3/modules/core/ante"
"github.com/cosmos/ibc-go/v3/modules/core/keeper"
ibcante "github.com/cosmos/ibc-go/v4/modules/core/ante"
"github.com/cosmos/ibc-go/v4/modules/core/keeper"

wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper"
wasmTypes "github.com/CosmWasm/wasmd/x/wasm/types"
Expand All @@ -18,7 +19,7 @@ type HandlerOptions struct {

IBCKeeper *keeper.Keeper
WasmConfig *wasmTypes.WasmConfig
TXCounterStoreKey sdk.StoreKey
TXCounterStoreKey storetypes.StoreKey
}

func NewAnteHandler(options HandlerOptions) (sdk.AnteHandler, error) {
Expand Down Expand Up @@ -47,13 +48,13 @@ func NewAnteHandler(options HandlerOptions) (sdk.AnteHandler, error) {
ante.NewSetUpContextDecorator(), // outermost AnteDecorator. SetUpContext must be called first
wasmkeeper.NewLimitSimulationGasDecorator(options.WasmConfig.SimulationGasLimit), // after setup context to enforce limits early
wasmkeeper.NewCountTXDecorator(options.TXCounterStoreKey),
ante.NewRejectExtensionOptionsDecorator(),
ante.NewMempoolFeeDecorator(),
// ante.NewRejectExtensionOptionsDecorator(),
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I only think I did this right, pls let me know if it is wrong :)

// ante.NewMempoolFeeDecorator(),
ante.NewValidateBasicDecorator(),
ante.NewTxTimeoutHeightDecorator(),
ante.NewValidateMemoDecorator(options.AccountKeeper),
ante.NewConsumeGasForTxSizeDecorator(options.AccountKeeper),
ante.NewDeductFeeDecorator(options.AccountKeeper, options.BankKeeper, options.FeegrantKeeper),
ante.NewDeductFeeDecorator(options.AccountKeeper, options.BankKeeper, options.FeegrantKeeper, options.TxFeeChecker),
// SetPubKeyDecorator must be called before all signature verification decorators
ante.NewSetPubKeyDecorator(options.AccountKeeper),
ante.NewValidateSigCountDecorator(options.AccountKeeper),
Expand Down
Loading