Skip to content

Commit

Permalink
Merge pull request #422 from terra-project/develop
Browse files Browse the repository at this point in the history
Master branch update to support Columbus-4
  • Loading branch information
hanjukim authored Nov 23, 2020
2 parents 99581ba + ee1cd6e commit 748b7a7
Show file tree
Hide file tree
Showing 399 changed files with 27,142 additions and 6,417 deletions.
69 changes: 18 additions & 51 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -221,10 +221,7 @@ jobs:
sudo mv go /usr/local
popd
set -x
make tools
make build-linux
make build-docker-terradnode
make localnet-start
make clean build-docker-terradnode localnet-start
./contrib/localnet-blocks-test.sh 40 5 10 localhost
macos-ci:
Expand Down Expand Up @@ -275,9 +272,9 @@ jobs:
if [ -z "${TERRAD_VERSION}" ]; then
docker build .
else
docker build -t tendermint/terra:$TERRAD_VERSION .
# docker login --password-stdin -u $DOCKER_USER \<<<$DOCKER_PASS
# docker push tendermint/terra:$TERRAD_VERSION
docker build -t terramoney/core:$TERRAD_VERSION .
docker login --password-stdin -u $DOCKER_USER \<<<$DOCKER_PASS
docker push terramoney/core:$TERRAD_VERSION
fi
docker-tagged:
Expand All @@ -289,9 +286,9 @@ jobs:
- setup_remote_docker:
docker_layer_caching: true
- run: |
docker build -t tendermint/terra:$CIRCLE_TAG .
# docker login --password-stdin -u $DOCKER_USER \<<<$DOCKER_PASS
# docker push tendermint/terra:$CIRCLE_TAG
docker build -t terramoney/core:$CIRCLE_TAG .
docker login --password-stdin -u $DOCKER_USER \<<<$DOCKER_PASS
docker push terramoney/core:$CIRCLE_TAG
reproducible-builds:
executor: golang
Expand All @@ -306,38 +303,11 @@ jobs:
no_output_timeout: 20m
command: |
sudo apt-get install -y ruby
bash -x ./contrib/gitian-build.sh all
for os in darwin linux windows; do
cp gitian-build-${os}/result/terra-${os}-res.yml .
rm -rf gitian-build-${os}/
done
- store_artifacts:
path: /go/src/github.com/terra-project/core/terra-darwin-res.yml
bash -x ./contrib/gitian-build.sh multi
cp gitian-build-multi/result/terra-multi-res.yml .
rm -rf gitian-build-multi/
- store_artifacts:
path: /go/src/github.com/terra-project/core/terra-linux-res.yml
- store_artifacts:
path: /go/src/github.com/terra-project/core/terra-windows-res.yml

# FIXME: The `setup-contract-tests-data` make target is broken as it completely
# overrides the .terrad directory.
#
# contract-tests:
# executor: golang
# steps:
# - attach_workspace:
# at: /tmp/workspace
# - checkout
# - setup_remote_docker:
# docker_layer_caching: true
# - run:
# name: Get Node.js and test REST implementation against swagger documentation at https://swagger.terra.money/rpc/
# command: |
# go get github.com/snikch/goodman/cmd/goodman
# make build
# make build-contract-tests-hooks
# make setup-contract-tests-data
# export PATH=~/.local/bin:$PATH
# ./contrib/get_node.sh && make contract-tests
path: /go/src/github.com/terra-project/core/terra-multi-res.yml

workflows:
version: 2
Expand Down Expand Up @@ -407,13 +377,10 @@ workflows:
- master
requires:
- setup-dependencies
- release:
# Only run this job on git tag pushes
filters:
branches:
ignore: /.*/
tags:
only: /v[0-9]+(\.[0-9]+)*(-.*)*/
# - contract-tests:
# requires:
# - setup-dependencies
# - release:
# # Only run this job on git tag pushes
# filters:
# branches:
# ignore: /.*/
# tags:
# only: /v[0-9]+(\.[0-9]+)*(-.*)*/
7 changes: 5 additions & 2 deletions .codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,15 @@ coverage:
changes: false

comment:
layout: "header, diff"
layout: "reach, diff, files"
behavior: default # update if exists else create new

ignore:
- "docs"
- "*.md"
- "*.rst"
- "cmd/"
- "contrib/"
- "docs/"
- "networks/"
- "**/cli"
- "**/rest"
2 changes: 1 addition & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

- [ ] Github issue OR spec proposal link
- [ ] Wrote tests
- [ ] Updated relevant documentation (docs/)
- [ ] Updated API documentation (client/lcd/swagger-ui/swagger.yaml)
- [ ] Added a relevant changelog entry: clog add [section] [stanza] [message]

----
Expand Down
15 changes: 4 additions & 11 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ builds:
main: cmd/terracli/main.go
binary: terracli
flags:
- -tags=netgo
- -tags="netgo ledger"
asmflags:
- all=-trimpath={{.Env.GOPATH}}
gcflags:
Expand All @@ -22,28 +22,25 @@ builds:
-X github.com/cosmos/cosmos-sdk/version.ClientName=terracli
-X github.com/cosmos/cosmos-sdk/version.Version={{.Version}}
-X github.com/cosmos/cosmos-sdk/version.Commit={{.Commit}}
-X "github.com/cosmos/cosmos-sdk/version.BuildTags=netgo"
-X "github.com/cosmos/cosmos-sdk/version.BuildTags=netgo,ledger"
env:
- GO111MODULE=on
- CGO_ENABLED=0
goos:
- windows
- darwin
- linux
goarch:
- amd64
ignore:
- goos: darwin
goarch: 386
- goos: windows
goarch: 386

-
id: 'terrad'
main: ./cmd/terrad
binary: terrad
flags:
- -tags=netgo
- -tags="netgo ledger"
asmflags:
- all=-trimpath={{.Env.GOPATH}}
gcflags:
Expand All @@ -54,28 +51,24 @@ builds:
-X github.com/cosmos/cosmos-sdk/version.ClientName=terracli
-X github.com/cosmos/cosmos-sdk/version.Version={{.Version}}
-X github.com/cosmos/cosmos-sdk/version.Commit={{.Commit}}
-X "github.com/cosmos/cosmos-sdk/version.BuildTags=netgo"
-X "github.com/cosmos/cosmos-sdk/version.BuildTags=netgo,ledger"
env:
- GO111MODULE=on
- CGO_ENABLED=0
goos:
- windows
- darwin
- linux
goarch:
- amd64
ignore:
- goos: darwin
goarch: 386
- goos: windows
goarch: 386

archives:
-
replacements:
darwin: Darwin
linux: Linux
windows: Windows
amd64: x86_64
checksum:
name_template: 'checksums.txt'
Expand Down
79 changes: 73 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,85 @@
## v0.3.4
## 0.4.0

### Release Notes
- [Cosmos-SDK v0.38 Release Notes](https://github.com/cosmos/cosmos-sdk/wiki/v0.38-Release-Notes)
- [Cosmos-SDK v0.39.0 Release Notes](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.39.0)
- [Cosmos-SDK v0.39.1 Release Notes](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.39.1)
- [Cosmos-SDK Breaking Changes](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.38.0)

### Improvements

* (sdk) Bump SDK version to [v0.37.9](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.37.9).
* [\#407](https://github.com/terra-project/core/pull/407) Allow `gov/MsgVote` to be grantable
* [\#405](https://github.com/terra-project/core/pull/405) CosmWasm oracle exchange rates query interface
* [\#388](https://github.com/terra-project/core/pull/388) Bump CosmWasm to v0.10.1
* [\#383](https://github.com/terra-project/core/pull/383) Bump SDK version to v0.39.1
* [\#374](https://github.com/terra-project/core/pull/374) Bump SDK version to v0.39 and CosmWasm to v0.9.4
* [\#357](https://github.com/terra-project/core/pull/357) Bump CosmWasm to v0.9
* [\#352](https://github.com/terra-project/core/pull/352) MsgAuthorization module to allow subkey feature
* [\#349](https://github.com/terra-project/core/pull/349) Add `--old-hd-path` flag to support 118 coin type users
* [\#348](https://github.com/terra-project/core/pull/348) MsgSwapSend to allow sending all swap coin
* [\#347](https://github.com/terra-project/core/pull/347) CosmWasm custom msg & querier handler
* [\#343](https://github.com/terra-project/core/pull/343) Burn Address
* [\#335](https://github.com/terra-project/core/pull/335) CosmWasm integration
* [\#325](https://github.com/terra-project/core/pull/325) New oracle msgs for vote process optimization
* [\#324](https://github.com/terra-project/core/pull/324) Update to emit events at proposal handler
* [\#323](https://github.com/terra-project/core/pull/323) Bump SDK version to v0.38.x

### Bug Fixes
* [\#360](https://github.com/terra-project/core/pull/360) Fix market module pool adjustment to apply delta with actual minted amount
* [\#336](https://github.com/terra-project/core/pull/336) Allow zero tobin tax rate

## 0.3.3
### Breaking Changes

#### Keys Migration
Any existing keys that were managed via Keybase in prior versions must be migrated. To migrate keys, execute the following:
```
$ terracli keys migrate [--home] [--keyring-backend]
```

The above command will provide a prompt for each existing key and ask if you wish for it to be skipped or not. If the key is not to be skipped, you must provide the correct passphrase for it to be migrated successfully.

#### Pruning Configuration

The operator can now set the pruning options by passing a pruning configuration via command line option or `app.toml`. The pruning flag supports the following
options: `default`, `everything`, `nothing`, `custom` - see the [PR](https://github.com/cosmos/cosmos-sdk/pull/6475) for further details. If the operator chooses `custom`, they may want to provide either of the granular pruning values:

- `pruning-keep-recent`
- `pruning-keep-every`
- `pruning-interval`

The former two options dictate how many recent versions are kept on disk and the offset of what versions are kept after that
respectively, and the latter defines the height interval in which versions are deleted in a batch.

**The operator, who wants to upgrade the node from v0.3 to v0.4, must change pruning option in `app.toml` to one of above options.**

#### API Changes
* The `block_meta` field has been removed from `/blocks/{block_height}` becasuse it was redandunt data with `block_header`.
* The `whitelist` of`/oracle/parameters` response has been changed from `[]string` to `[]{ name: string; tobin_tax: string; }`

## 0.3.6

### Improvements
* [\#319](https://github.com/terra-project/core/pull/319) Bump SDK version to [v0.37.6]((https://github.com/cosmos/cosmos-sdk/releases/tag/v0.37.6))
#### [99581ba](https://github.com/terra-project/core/commit/99581baf89a838cf09a25d47adc2fd2cc97ab4a2) Ledger update(custom ledger library) & Bump SDK to v0.37.13

## 0.3.5

### Improvements
#### [654b5cb](https://github.com/terra-project/core/commit/654b5cb66a9152dcf6e53f73e7935522251a1ede) Bump SDK to v0.37.11

### Bug Fixes
* [\#321](https://github.com/terra-project/core/pull/321) revert to distribute zero oracle reward (#321)

#### [7a3d01c](https://github.com/terra-project/core/commit/7a3d01c9198cfdcc67d90593c92ce5cb465e4516) Oracle slashing unbonding state check

## 0.3.4

### Improvements
#### [\#338](https://github.com/terra-project/core/pull/338) Bump SDK to v0.37.9 for Tendermint security patch

## 0.3.3

### Improvements
#### [\#319](https://github.com/terra-project/core/pull/319) Bump SDK to v0.37.6
#### [\#321](https://github.com/terra-project/core/pull/321) Revert to distribute zero oracle rewards

## 0.3.2

### Improvements
Expand Down
58 changes: 25 additions & 33 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,43 +1,35 @@
# Simple usage with a mounted data directory:
# > docker build -t terra .
# > docker run -it -p 46657:46657 -p 46656:46656 -v ~/.terrad:/root/.terrad -v ~/.terracli:/root/.terracli terra terrad init
# > docker run -it -p 46657:46657 -p 46656:46656 -v ~/.terrad:/root/.terrad -v ~/.terracli:/root/.terracli terra terrad start
# > docker run -it -p 46657:46657 -p 46656:46656 -v ~/.terrad:/root/.terrad -v ~/.terracli:/root/.terracli terra terrad init
# > docker run -it -p 46657:46657 -p 46656:46656 -v ~/.terrad:/root/.terrad -v ~/.terracli:/root/.terracli terra terrad start
FROM golang:alpine AS build-env
FROM cosmwasm/go-ext-builder:0001-alpine AS rust-builder

# Set up dependencies
ENV PACKAGES make git libc-dev bash gcc linux-headers eudev-dev
WORKDIR /go/src/github.com/terra-project/core

# Set working directory for the build
WORKDIR /go/src/terra
COPY go.* /go/src/github.com/terra-project/core/

# Add source files
COPY . .
RUN apk add --no-cache git \
&& go mod download github.com/CosmWasm/go-cosmwasm \
&& export GO_WASM_DIR=$(go list -f "{{ .Dir }}" -m github.com/CosmWasm/go-cosmwasm) \
&& cd ${GO_WASM_DIR} \
&& cargo build --release --features backtraces --example muslc \
&& mv ${GO_WASM_DIR}/target/release/examples/libmuslc.a /lib/libgo_cosmwasm_muslc.a


FROM cosmwasm/go-ext-builder:0001-alpine AS go-builder

# Install minimum necessary dependencies, build Cosmos SDK, remove packages
RUN apk add --no-cache $PACKAGES && \
make tools && \
make go-mod-cache && \
make build-linux && \
make install
WORKDIR /go/src/github.com/terra-project/core

RUN apk add --no-cache git libusb-dev linux-headers

COPY . .
COPY --from=rust-builder /lib/libgo_cosmwasm_muslc.a /lib/libgo_cosmwasm_muslc.a

# Final image
FROM alpine:edge
# force it to use static lib (from above) not standard libgo_cosmwasm.so file
RUN BUILD_TAGS=muslc make update-swagger-docs build

# Install ca-certificates
RUN apk add --update ca-certificates rsync jq curl

# Copy over binaries from the build-env
COPY --from=build-env /go/bin/terrad /usr/bin/terrad
COPY --from=build-env /go/bin/terracli /usr/bin/terracli
FROM alpine:3

# Create a terra group and a terra user
RUN addgroup -S terra -g 54524 && adduser -S terra -u 54524 -h /home/terra -G terra
WORKDIR /root

# Tell docker that all future commands should run as the terra user
USER terra
WORKDIR /home/terra
COPY --from=go-builder /go/src/github.com/terra-project/core/build/terrad /usr/local/bin/terrad
COPY --from=go-builder /go/src/github.com/terra-project/core/build/terracli /usr/local/bin/terracli

# Run terrad by default, omit entrypoint to ease using container with terracli
CMD ["terrad"]
CMD [ "terrad", "--help" ]
Loading

0 comments on commit 748b7a7

Please sign in to comment.