Skip to content

Commit

Permalink
Merge PR #7502: [Stargate] Merge & tag v0.40.0-rc0
Browse files Browse the repository at this point in the history
  • Loading branch information
clevinson authored Oct 10, 2020
1 parent 87a7f9c commit 1532492
Show file tree
Hide file tree
Showing 431 changed files with 7,333 additions and 4,130 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/sims.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
if: "!contains(github.event.head_commit.message, 'skip-sims')"
steps:
- uses: actions/checkout@v2
- uses: actions/[email protected].2
- uses: actions/[email protected].3
with:
go-version: 1.15
- name: Display go version
Expand All @@ -32,7 +32,7 @@ jobs:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/[email protected].2
- uses: actions/[email protected].3
with:
go-version: 1.15
- name: Display go version
Expand All @@ -49,7 +49,7 @@ jobs:
needs: [build, install-runsim]
steps:
- uses: actions/checkout@v2
- uses: actions/[email protected].2
- uses: actions/[email protected].3
with:
go-version: 1.15
- name: Display go version
Expand Down Expand Up @@ -77,7 +77,7 @@ jobs:
needs: [build, install-runsim]
steps:
- uses: actions/checkout@v2
- uses: actions/[email protected].2
- uses: actions/[email protected].3
with:
go-version: 1.15
- name: Display go version
Expand Down Expand Up @@ -105,7 +105,7 @@ jobs:
needs: [build, install-runsim]
steps:
- uses: actions/checkout@v2
- uses: actions/[email protected].2
- uses: actions/[email protected].3
with:
go-version: 1.15
- name: Display go version
Expand Down Expand Up @@ -133,7 +133,7 @@ jobs:
needs: [build, install-runsim]
steps:
- uses: actions/checkout@v2
- uses: actions/[email protected].2
- uses: actions/[email protected].3
with:
go-version: 1.15
- name: Display go version
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Install Go
uses: actions/[email protected].2
uses: actions/[email protected].3
with:
go-version: 1.15
- name: Unshallow
Expand Down
40 changes: 20 additions & 20 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
install-tparse:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected].2
- uses: actions/[email protected].3
with:
go-version: 1.15
- name: Display go version
Expand All @@ -35,7 +35,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/[email protected].2
- uses: actions/[email protected].3
with:
go-version: 1.15
- name: Display go version
Expand All @@ -57,7 +57,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/[email protected].2
- uses: actions/[email protected].3
with:
go-version: 1.15
- name: Display go version
Expand Down Expand Up @@ -90,7 +90,7 @@ jobs:
timeout-minutes: 15
steps:
- uses: actions/checkout@v2
- uses: actions/[email protected].2
- uses: actions/[email protected].3
with:
go-version: 1.15
- name: Display go version
Expand Down Expand Up @@ -132,7 +132,7 @@ jobs:
timeout-minutes: 15
steps:
- uses: actions/checkout@v2
- uses: actions/[email protected].2
- uses: actions/[email protected].3
with:
go-version: 1.15
- name: Display go version
Expand Down Expand Up @@ -174,7 +174,7 @@ jobs:
timeout-minutes: 15
steps:
- uses: actions/checkout@v2
- uses: actions/[email protected].2
- uses: actions/[email protected].3
with:
go-version: 1.15
- name: Display go version
Expand Down Expand Up @@ -216,7 +216,7 @@ jobs:
timeout-minutes: 15
steps:
- uses: actions/checkout@v2
- uses: actions/[email protected].2
- uses: actions/[email protected].3
with:
go-version: 1.15
- name: Display go version
Expand Down Expand Up @@ -255,10 +255,10 @@ jobs:
test-race-1:
runs-on: ubuntu-latest
needs: split-test-files
timeout-minutes: 15
timeout-minutes: 30
steps:
- uses: actions/checkout@v2
- uses: actions/[email protected].2
- uses: actions/[email protected].3
with:
go-version: 1.15
- name: Display go version
Expand All @@ -275,7 +275,7 @@ jobs:
name: "${{ github.sha }}-aa"
if: "env.GIT_DIFF != ''"
- name: Run tests with race detector
run: cat xaa.txt | xargs go test -mod=readonly -json -timeout 15m -race -tags='cgo ledger test_ledger_mock' > xaa-race-output.txt
run: cat xaa.txt | xargs go test -mod=readonly -json -timeout 30m -race -tags='cgo ledger test_ledger_mock' > xaa-race-output.txt
if: "env.GIT_DIFF != ''"
- uses: actions/upload-artifact@v2
with:
Expand All @@ -285,10 +285,10 @@ jobs:
test-race-2:
runs-on: ubuntu-latest
needs: split-test-files
timeout-minutes: 15
timeout-minutes: 30
steps:
- uses: actions/checkout@v2
- uses: actions/[email protected].2
- uses: actions/[email protected].3
with:
go-version: 1.15
- name: Display go version
Expand All @@ -305,7 +305,7 @@ jobs:
name: "${{ github.sha }}-ab"
if: "env.GIT_DIFF != ''"
- name: Run tests with race detector
run: cat xab.txt | xargs go test -mod=readonly -json -timeout 15m -race -tags='cgo ledger test_ledger_mock' > xab-race-output.txt
run: cat xab.txt | xargs go test -mod=readonly -json -timeout 30m -race -tags='cgo ledger test_ledger_mock' > xab-race-output.txt
if: "env.GIT_DIFF != ''"
- uses: actions/upload-artifact@v2
with:
Expand All @@ -315,10 +315,10 @@ jobs:
test-race-3:
runs-on: ubuntu-latest
needs: split-test-files
timeout-minutes: 15
timeout-minutes: 30
steps:
- uses: actions/checkout@v2
- uses: actions/[email protected].2
- uses: actions/[email protected].3
with:
go-version: 1.15
- name: Display go version
Expand All @@ -335,7 +335,7 @@ jobs:
name: "${{ github.sha }}-ac"
if: "env.GIT_DIFF != ''"
- name: Run tests with race detector
run: cat xac.txt | xargs go test -mod=readonly -json -timeout 15m -race -tags='cgo ledger test_ledger_mock' > xac-race-output.txt
run: cat xac.txt | xargs go test -mod=readonly -json -timeout 30m -race -tags='cgo ledger test_ledger_mock' > xac-race-output.txt
if: "env.GIT_DIFF != ''"
- uses: actions/upload-artifact@v2
with:
Expand All @@ -345,10 +345,10 @@ jobs:
test-race-4:
runs-on: ubuntu-latest
needs: split-test-files
timeout-minutes: 15
timeout-minutes: 30
steps:
- uses: actions/checkout@v2
- uses: actions/[email protected].2
- uses: actions/[email protected].3
with:
go-version: 1.15
- name: Display go version
Expand All @@ -365,7 +365,7 @@ jobs:
name: "${{ github.sha }}-ad"
if: "env.GIT_DIFF != ''"
- name: Run tests with race detector
run: cat xad.txt | xargs go test -mod=readonly -json -timeout 15m -race -tags='cgo ledger test_ledger_mock' > xad-race-output.txt
run: cat xad.txt | xargs go test -mod=readonly -json -timeout 30m -race -tags='cgo ledger test_ledger_mock' > xad-race-output.txt
if: "env.GIT_DIFF != ''"
- uses: actions/upload-artifact@v2
with:
Expand Down Expand Up @@ -430,7 +430,7 @@ jobs:
run: |
./contrib/localnet_liveness.sh 100 5 50 localhost
if: "env.GIT_DIFF != ''"

docker-build:
runs-on: ubuntu-latest
timeout-minutes: 10
Expand Down
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Ref: https://keepachangelog.com/en/1.0.0/

# Changelog

## v0.40.0-rc1 - YYYY-MM-DD
## v0.40.0-rc0 - 2020-10-13

v0.40.0, known as the Stargate release of the Cosmos SDK, is one of the largest releases
of the Cosmos SDK since launch. Please read through this changelog and [release notes](./RELEASE_NOTES.md) to make sure you are aware of any relevant breaking changes.
Expand Down Expand Up @@ -232,6 +232,8 @@ of the Cosmos SDK since launch. Please read through this changelog and [release
* (x/auth) [\#6350](https://github.com/cosmos/cosmos-sdk/pull/6350) New sign-batch command to sign StdTx batch files.
* (baseapp) [\#5803](https://github.com/cosmos/cosmos-sdk/pull/5803) Added support for taking state snapshots at regular height intervals, via options `snapshot-interval` and `snapshot-keep-recent`.
* (client) [\#5921](https://github.com/cosmos/cosmos-sdk/issues/5921) Introduce new gRPC and gRPC Gateway based APIs for querying app & module data. See [ADR021](https://github.com/cosmos/cosmos-sdk/blob/master/docs/architecture/adr-021-protobuf-query-encoding.md) for more details
* (cli) [\#7485](https://github.com/cosmos/cosmos-sdk/pull/7485) Introduce a new optional `--keyring-dir` flag that allows clients to specify a Keyring directory if it does not reside in the directory specified by `--home`.
* (coin) [\#6755](https://github.com/cosmos/cosmos-sdk/pull/6755) Add custom regex validation for `Coin` denom by overwriting `CoinDenomRegex` when using `/types/coin.go`.
* (config) [\#7265](https://github.com/cosmos/cosmos-sdk/pull/7265) Support Tendermint block pruning through a new `min-retain-blocks` configuration that can be set in either `app.toml` or via the CLI. This parameter is used in conjunction with other criteria to determine the height at which Tendermint should prune blocks.
* (events) [\#7121](https://github.com/cosmos/cosmos-sdk/pull/7121) The application now derives what events are indexed by Tendermint via the `index-events` configuration in `app.toml`, which is a list of events taking the form `{eventType}.{attributeKey}`.
* (tx) [\#6089](https://github.com/cosmos/cosmos-sdk/pull/6089) Transactions can now have a `TimeoutHeight` set which allows the transaction to be rejected if it's committed at a height greater than the timeout.
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ WORKDIR /go/src/github.com/cosmos/cosmos-sdk
COPY . .

# install simapp, remove packages
RUN make simd-linux
RUN make build-linux


# Final image
Expand Down
56 changes: 21 additions & 35 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,12 @@ ifeq (badgerdb,$(findstring badgerdb,$(COSMOS_BUILD_OPTIONS)))
ldflags += -X github.com/cosmos/cosmos-sdk/types.DBBackend=badgerdb
endif
# handle rocksdb
ifeq (rocksdb,$(findstring rocksdb,$(TENDERMINT_BUILD_OPTIONS)))
ifeq (rocksdb,$(findstring rocksdb,$(COSMOS_BUILD_OPTIONS)))
CGO_ENABLED=1
BUILD_TAGS += rocksdb
endif
# handle boltdb
ifeq (boltdb,$(findstring boltdb,$(TENDERMINT_BUILD_OPTIONS)))
ifeq (boltdb,$(findstring boltdb,$(COSMOS_BUILD_OPTIONS)))
BUILD_TAGS += boltdb
endif

Expand All @@ -97,46 +97,45 @@ include contrib/devtools/Makefile
### Build ###
###############################################################################

build: go.sum
go build -mod=readonly ./...
BUILD_TARGETS := build install

simd:
mkdir -p $(BUILDDIR)
go build -mod=readonly $(BUILD_FLAGS) -o $(BUILDDIR) ./simapp/simd
build: BUILD_ARGS=-o $(BUILDDIR)/
build-linux:
GOOS=linux GOARCH=amd64 LEDGER_ENABLED=false $(MAKE) build

simd-linux: go.sum
$(MAKE) simd GOOS=linux GOARCH=amd64 LEDGER_ENABLED=false
$(BUILD_TARGETS): go.sum $(BUILDDIR)/
go $@ -mod=readonly $(BUILD_FLAGS) $(BUILD_ARGS) ./...

$(BUILDDIR)/:
mkdir -p $(BUILDDIR)/

build-simd-all: go.sum
$(if $(shell docker inspect -f '{{ .Id }}' cosmossdk/rbuilder 2>/dev/null),$(info found image cosmossdk/rbuilder),docker pull cosmossdk/rbuilder:latest)
docker rm latest-build || true
docker run --volume=$(CURDIR):/sources:ro \
--env TARGET_OS='darwin linux windows' \
--env TARGET_PLATFORMS='linux/amd64 darwin/amd64 linux/arm64 windows/amd64' \
--env APP=simd \
--env VERSION=$(VERSION) \
--env COMMIT=$(COMMIT) \
--env LEDGER_ENABLED=$(LEDGER_ENABLED) \
--name latest-build cosmossdk/rbuilder:latest
docker cp -a latest-build:/home/builder/artifacts/ $(CURDIR)/

build-simd-linux: go.sum
$(if $(shell docker inspect -f '{{ .Id }}' cosmossdk/rbuilder 2>/dev/null),$(info found image cosmossdk/rbuilder),docker pull cosmossdk/rbuilder:latest)
build-simd-linux: go.sum $(BUILDDIR)/
docker rm latest-build || true
docker run --volume=$(CURDIR):/sources:ro \
--env TARGET_OS='linux' \
--env TARGET_PLATFORMS='linux/amd64' \
--env APP=simd \
--env VERSION=$(VERSION) \
--env COMMIT=$(COMMIT) \
--env LEDGER_ENABLED=false \
--name latest-build cosmossdk/rbuilder:latest
docker cp -a latest-build:/home/builder/artifacts/ $(CURDIR)/
mkdir -p $(BUILDDIR)
cp artifacts/simd-*-linux-amd64 $(BUILDDIR)/simd

cosmovisor:
$(MAKE) -C cosmovisor cosmovisor

.PHONY: build simd simd-linux build-simd-all build-simd-linux cosmovisor
.PHONY: build build-linux build-simd-all build-simd-linux cosmovisor

mocks: $(MOCKS_DIR)
mockgen -source=client/account_retriever.go -package mocks -destination tests/mocks/account_retriever.go
Expand All @@ -152,13 +151,7 @@ mocks: $(MOCKS_DIR)
$(MOCKS_DIR):
mkdir -p $(MOCKS_DIR)

distclean: clean
rm -rf \
gitian-build-darwin/ \
gitian-build-linux/ \
gitian-build-windows/ \
.gitian-builder-cache/

distclean: clean tools-clean
clean:
rm -rf \
$(BUILDDIR)/ \
Expand All @@ -171,15 +164,10 @@ clean:
### Tools & Dependencies ###
###############################################################################

go-mod-cache: go.sum
@echo "--> Download go modules to local cache"
@go mod download
.PHONY: go-mod-cache

go.sum: go.mod
@echo "--> Ensure dependencies have not been modified"
@go mod verify
@go mod tidy
echo "Ensure dependencies have not been modified ..." >&2
go mod verify
go mod tidy

###############################################################################
### Documentation ###
Expand All @@ -204,9 +192,7 @@ godocs:
# the `versions` file will be the default root index.html.
build-docs:
@cd docs && \
while read -a p; do \
branch=$${p[0]} ; \
path_prefix=$${p[1]} ; \
while read -r branch path_prefix; do \
(git checkout $${branch} && npm install && VUEPRESS_BASE="/$${path_prefix}/" npm run build) ; \
mkdir -p ~/output/$${path_prefix} ; \
cp -r .vuepress/dist/* ~/output/$${path_prefix}/ ; \
Expand Down Expand Up @@ -459,7 +445,7 @@ proto-update-deps:
###############################################################################

# Run a 4-node testnet locally
localnet-start: $(BUILDDIR)/simd localnet-stop
localnet-start: build-linux localnet-stop
$(if $(shell docker inspect -f '{{ .Id }}' cosmossdk/simd-env 2>/dev/null),$(info found image cosmossdk/simd-env),$(MAKE) -C contrib/images simd-env)
if ! [ -f build/node0/simd/config/genesis.json ]; then docker run --rm \
--user $(shell id -u):$(shell id -g) \
Expand Down
2 changes: 1 addition & 1 deletion baseapp/params.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ func ValidateEvidenceParams(i interface{}) error {
}

if v.MaxNum <= 0 {
return fmt.Errorf("evidence maximum number of evidence must be positive: %v", v.MaxAgeDuration)
return fmt.Errorf("evidence maximum number of evidence must be positive: %v", v.MaxNum)
}

return nil
Expand Down
Loading

0 comments on commit 1532492

Please sign in to comment.