Skip to content

Commit

Permalink
Merge tag 'v0.17.0' into shiki_tak/feat/merge-wasmd-0.17.0
Browse files Browse the repository at this point in the history
  • Loading branch information
shiki-tak committed Jun 29, 2021
2 parents d6ae4dc + d2e35c2 commit e1550a9
Show file tree
Hide file tree
Showing 132 changed files with 4,858 additions and 2,483 deletions.
41 changes: 22 additions & 19 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,66 +6,69 @@ require (
github.com/99designs/keyring v1.1.6
github.com/DataDog/zstd v1.4.5 // indirect
github.com/VictoriaMetrics/fastcache v1.5.8
github.com/armon/go-metrics v0.3.6
github.com/armon/go-metrics v0.3.8
github.com/bgentry/speakeasy v0.1.0
github.com/btcsuite/btcd v0.21.0-beta
github.com/btcsuite/btcutil v1.0.2
github.com/confio/ics23/go v0.6.3
github.com/confio/ics23/go v0.6.6
github.com/cosmos/go-bip39 v1.0.0
github.com/cosmos/ledger-cosmos-go v0.11.1
github.com/dgraph-io/ristretto v0.0.3-0.20200630154024-f66de99634de
github.com/dgraph-io/ristretto v0.0.3
github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 // indirect
github.com/dvsekhvalnov/jose2go v0.0.0-20200901110807-248326c1351b
github.com/enigmampc/btcutil v1.0.3-0.20200723161021-e2fb6adb2a25
github.com/go-kit/kit v0.10.0
github.com/gogo/gateway v1.1.0
github.com/gogo/protobuf v1.3.3
github.com/golang/mock v1.4.4
github.com/golang/protobuf v1.4.3
github.com/google/go-cmp v0.5.4 // indirect
github.com/golang/protobuf v1.5.2
github.com/golangci/golangci-lint v1.41.1 // indirect
github.com/google/gofuzz v1.2.0
github.com/gorilla/handlers v1.5.1
github.com/gorilla/mux v1.8.0
github.com/grpc-ecosystem/go-grpc-middleware v1.2.2
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0
github.com/grpc-ecosystem/grpc-gateway v1.16.0
github.com/hashicorp/golang-lru v0.5.4 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/line/iavl/v2 v2.0.0-init.1.0.20210602045707-fddfe1f85001
github.com/line/ostracon v0.34.9-0.20210610071151-a52812ac9add
github.com/line/tm-db/v2 v2.0.0-init.1.0.20210413083915-5bb60e117524
github.com/line/wasmvm v0.14.0-0.5.0
github.com/magiconair/properties v1.8.4
github.com/magiconair/properties v1.8.5
github.com/mailru/easyjson v0.7.7
github.com/mattn/go-isatty v0.0.12
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect
github.com/nxadm/tail v1.4.8 // indirect
github.com/onsi/ginkgo v1.15.0 // indirect
github.com/onsi/gomega v1.10.5 // indirect
github.com/pelletier/go-toml v1.8.0 // indirect
github.com/mitchellh/mapstructure v1.3.3 // indirect
github.com/onsi/ginkgo v1.16.1 // indirect
github.com/onsi/gomega v1.11.0 // indirect
github.com/pelletier/go-toml v1.8.1 // indirect
github.com/pkg/errors v0.9.1
github.com/prometheus/client_golang v1.8.0
github.com/prometheus/common v0.15.0
github.com/prometheus/client_golang v1.10.0
github.com/prometheus/common v0.23.0
github.com/rakyll/statik v0.1.7
github.com/regen-network/cosmos-proto v0.3.1
github.com/rs/zerolog v1.20.0
github.com/rs/zerolog v1.21.0
github.com/spf13/afero v1.3.4 // indirect
github.com/spf13/cast v1.3.1
github.com/spf13/cobra v1.1.3
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/spf13/pflag v1.0.5
github.com/spf13/viper v1.7.1
github.com/stretchr/testify v1.7.0
github.com/syndtr/goleveldb v1.0.1-0.20200815110645-5c35d600f0ca
github.com/tendermint/btcd v0.1.1
github.com/tendermint/crypto v0.0.0-20191022145703-50d29ede1e15
github.com/tendermint/go-amino v0.16.0
github.com/tendermint/tendermint v0.34.11
golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83
golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4 // indirect
golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57 // indirect
golang.org/x/sys v0.0.0-20210510120138-977fb7262007 // indirect
golang.org/x/text v0.3.5 // indirect
google.golang.org/genproto v0.0.0-20210114201628-6edceaf6022f
google.golang.org/grpc v1.35.0
google.golang.org/protobuf v1.25.0
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f // indirect
google.golang.org/grpc v1.37.0
google.golang.org/protobuf v1.26.0
gopkg.in/ini.v1 v1.61.0 // indirect
gopkg.in/yaml.v2 v2.4.0
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
)

replace (
Expand Down
626 changes: 592 additions & 34 deletions go.sum

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions scripts/protocgen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ protoc_gen_gocosmos() {

protoc_gen_gocosmos

proto_dirs=$(find ./proto ./x/wasm/internal/types -path -prune -o -name '*.proto' -print0 | xargs -0 -n1 dirname | sort | uniq)
proto_dirs=$(find ./proto ./x/wasm/types -path -prune -o -name '*.proto' -print0 | xargs -0 -n1 dirname | sort | uniq)
for dir in $proto_dirs; do
buf protoc \
-I "proto" \
-I "third_party/proto" \
-I "x/wasm/internal/types" \
-I "x/wasm/types" \
--gocosmos_out=plugins=interfacetype+grpc,\
Mgoogle/protobuf/any.proto=github.com/line/lfb-sdk/codec/types:. \
--grpc-gateway_out=logtostderr=true:. \
Expand Down
18 changes: 9 additions & 9 deletions x/wasm/Governance.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,22 @@ We have added 5 new wasm specific proposal types that cover the contract's live
* `UpdateAdminProposal` - set a new admin for a contract
* `ClearAdminProposal` - clear admin for a contract to prevent further migrations

For details see the proposal type [implementation](https://github.com/CosmWasm/wasmd/blob/master/x/wasm/internal/types/proposal.go)
For details see the proposal type [implementation](https://github.com/CosmWasm/wasmd/blob/master/x/wasm/types/proposal.go)

A wasm message but no proposal type:
* `ExecuteContract` - execute a command on a wasm contract

### Unit tests
[Proposal type validations](https://github.com/CosmWasm/wasmd/blob/master/x/wasm/internal/types/proposal_test.go)
[Proposal type validations](https://github.com/CosmWasm/wasmd/blob/master/x/wasm/types/proposal_test.go)

## Proposal Handler
The [wasmd proposal_handler](https://github.com/CosmWasm/wasmd/blob/master/x/wasm/internal/keeper/proposal_handler.go) implements the `gov.Handler` function
The [wasmd proposal_handler](https://github.com/CosmWasm/wasmd/blob/master/x/wasm/keeper/proposal_handler.go) implements the `gov.Handler` function
and executes the wasmd proposal types after a successful tally.

The proposal handler uses a [`GovAuthorizationPolicy`](https://github.com/CosmWasm/wasmd/blob/master/x/wasm/internal/keeper/authz_policy.go#L29) to bypass the existing contract's authorization policy.
The proposal handler uses a [`GovAuthorizationPolicy`](https://github.com/CosmWasm/wasmd/blob/master/x/wasm/keeper/authz_policy.go#L29) to bypass the existing contract's authorization policy.

### Tests
* [Integration: Submit and execute proposal](https://github.com/CosmWasm/wasmd/blob/master/x/wasm/internal/keeper/proposal_integration_test.go)
* [Integration: Submit and execute proposal](https://github.com/CosmWasm/wasmd/blob/master/x/wasm/keeper/proposal_integration_test.go)

## Gov Integration
The wasmd proposal handler can be added to the gov router in the [abci app](https://github.com/CosmWasm/wasmd/blob/master/app/app.go#L306)
Expand All @@ -44,7 +44,7 @@ Settings via sdk `params` module:
- `code_upload_access` - who can upload a wasm binary: `Nobody`, `Everybody`, `OnlyAddress`
- `instantiate_default_permission` - platform default, who can instantiate a wasm binary when the code owner has not set it

See [params.go](https://github.com/CosmWasm/wasmd/blob/master/x/wasm/internal/types/params.go)
See [params.go](https://github.com/CosmWasm/wasmd/blob/master/x/wasm/types/params.go)

### Init Params Via Genesis

Expand All @@ -69,9 +69,9 @@ As gov proposals bypass the existing authorzation policy they are diabled and re
```

### Tests
* [params validation unit tests](https://github.com/CosmWasm/wasmd/blob/master/x/wasm/internal/types/params_test.go)
* [genesis validation tests](https://github.com/CosmWasm/wasmd/blob/master/x/wasm/internal/types/genesis_test.go)
* [policy integration tests](https://github.com/CosmWasm/wasmd/blob/master/x/wasm/internal/keeper/keeper_test.go)
* [params validation unit tests](https://github.com/CosmWasm/wasmd/blob/master/x/wasm/types/params_test.go)
* [genesis validation tests](https://github.com/CosmWasm/wasmd/blob/master/x/wasm/types/genesis_test.go)
* [policy integration tests](https://github.com/CosmWasm/wasmd/blob/master/x/wasm/keeper/keeper_test.go)

## CLI

Expand Down
Loading

0 comments on commit e1550a9

Please sign in to comment.