Skip to content

Commit

Permalink
Merge pull request #114 from line/release/v0.33.5-0.3
Browse files Browse the repository at this point in the history
Release v0.33.5-0.3
  • Loading branch information
zemyblue authored Aug 5, 2020
2 parents e007be0 + f607ced commit b571372
Show file tree
Hide file tree
Showing 221 changed files with 13,212 additions and 2,035 deletions.
14 changes: 12 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@ commands:
command: |
sudo apt-get update && sudo apt-get -y install libtool
make libsodium
setup_bls_library_build:
steps:
- run:
name: "Install build tools to build BLS library"
command: |
sudo apt-get update && sudo apt-get -y install gcc
run_test:
parameters:
script_path:
Expand All @@ -48,6 +54,7 @@ commands:
keys:
- go-mod-v1-{{ checksum "go.sum" }}
- make_libsodium
- setup_bls_library_build
- run:
name: "Running test"
command: |
Expand Down Expand Up @@ -75,6 +82,7 @@ jobs:
- attach_workspace:
at: /tmp/workspace
- make_libsodium
- setup_bls_library_build
- run:
name: "Build binaries"
command: make install install_abci
Expand Down Expand Up @@ -147,7 +155,7 @@ jobs:
name: run localnet and exit on failure
command: |
set -x
docker run --rm -v "$PWD":/go/src/github.com/tendermint/tendermint -w /go/src/github.com/tendermint/tendermint golang:1.14.1-alpine /bin/sh -c "apk add --update make && make build-linux"
docker run --rm -v "$PWD":/go/src/github.com/tendermint/tendermint -w /go/src/github.com/tendermint/tendermint golang:1.14.1-alpine /bin/sh -c "apk add --update git make gcc libc-dev build-base && make build"
make localnet-start &
./scripts/localnet-blocks-test.sh 40 5 10 localhost
Expand All @@ -165,6 +173,7 @@ jobs:
steps:
- checkout_with_submodules
- make_libsodium
- setup_bls_library_build
- run: mkdir -p $GOPATH/src/github.com/tendermint
- run: ln -sf /home/circleci/project $GOPATH/src/github.com/tendermint/tendermint
- run: bash test/p2p/circleci.sh << parameters.ipv >>
Expand Down Expand Up @@ -351,6 +360,7 @@ jobs:
parallelism: 1
steps:
- checkout_with_submodules
- setup_bls_library_build
- run:
name: Test RPC endpoints against swagger documentation
command: |
Expand All @@ -360,7 +370,7 @@ jobs:
./scripts/get_nodejs.sh
# build the binaries with a proper version of Go
# Build Tendermint
docker run --rm -v "$PWD":/go/src/github.com/tendermint/tendermint -w /go/src/github.com/tendermint/tendermint golang:1.14.1-alpine /bin/sh -c "apk add --update make git && make build-linux"
docker run --rm -v "$PWD":/go/src/github.com/tendermint/tendermint -w /go/src/github.com/tendermint/tendermint golang:1.14.1-alpine /bin/sh -c "apk add --update git make gcc libc-dev build-base && make build"
# Build contract-tests
docker run --rm -v "$PWD":/go/src/github.com/tendermint/tendermint -w /go/src/github.com/tendermint/tendermint ubuntu:20.10 ./scripts/prepare_dredd_test.sh
# This docker image works with go 1.7, we can install here the hook handler that contract-tests is going to use
Expand Down
22 changes: 22 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,27 @@
# Changelog

## v0.3
* The voter to be elected has been changed so that it can be determined in the n-1 block
from the one determined by the n-2 block.
* A BLS signature library was added. The ability to use the BLS signature library will be added in the next version.
* When distributing rewards in Cosmos-SDK, some ABCIs have been modified to distribute the voting power of elected voters.
* Base Tendermint version is v0.33.5. please see the [CHANGELOGS](./CHANGELOG_OF_TENDERMINT.md#v0.33.5) of the Tendermint.

### BREAKING CHANGES:

- State
- [state] [\#100](https://github.com/line/tendermint/pull/100) Remove `NextVoters` from state

- P2P Protocol
- [abci] [\#100](https://github.com/line/tendermint/pull/100) Add `voters_hash` field, which is needed for verification of a block header
- [abci] [\#102](https://github.com/line/tendermint/pull/102) Add voting power in `VoterInfo` of abci

### FEATURES:
- [BLS] [\#81](https://github.com/line/tendermint/issues/81) Modify to generate at the same time as Ed25519 key generation
- [lite] [\#100](https://github.com/line/tendermint/pull/100) Lite calls `Genesis()` rpc when it starts up



## v0.2
* Changed from the consensus way which the entire validator agrees to a part of the validators is elected as a voter to consensus.
The selected validator is called `voter`
Expand Down
58 changes: 58 additions & 0 deletions CHANGELOG_OF_TENDERMINT.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,63 @@
# Changelog

## v.0.33.5

Special thanks to our external contributor on this release: @tau3

Friendly reminder: We have a [bug bounty program](https://hackerone.com/tendermint).

### BREAKING CHANGES:

- Go API

- [privval] [\#4744](https://github.com/tendermint/tendermint/pull/4744) Remove deprecated `OldFilePV` (@melekes)
- [mempool] [\#4759](https://github.com/tendermint/tendermint/pull/4759) Modify `Mempool#InitWAL` to return an error (@melekes)
- [node] [\#4832](https://github.com/tendermint/tendermint/pull/4832) `ConfigureRPC` returns an error (@melekes)
- [rpc] [\#4836](https://github.com/tendermint/tendermint/pull/4836) Overhaul `lib` folder (@melekes)
Move lib/ folder to jsonrpc/.
Rename:
rpc package -> jsonrpc package
rpcclient package -> client package
rpcserver package -> server package
JSONRPCClient to Client
JSONRPCRequestBatch to RequestBatch
JSONRPCCaller to Caller
StartHTTPServer to Serve
StartHTTPAndTLSServer to ServeTLS
NewURIClient to NewURI
NewJSONRPCClient to New
NewJSONRPCClientWithHTTPClient to NewWithHTTPClient
NewWSClient to NewWS
Unexpose ResponseWriterWrapper
Remove unused http_params.go


### FEATURES:

- [pex] [\#4439](https://github.com/tendermint/tendermint/pull/4439) Use highwayhash for pex buckets (@tau3)

### IMPROVEMENTS:

- [abci/server] [\#4719](https://github.com/tendermint/tendermint/pull/4719) Print panic & stack trace to STDERR if logger is not set (@melekes)
- [types] [\#4638](https://github.com/tendermint/tendermint/pull/4638) Implement `Header#ValidateBasic` (@alexanderbez)
- [buildsystem] [\#4378](https://github.com/tendermint/tendermint/pull/4738) Replace build_c and install_c with TENDERMINT_BUILD_OPTIONS parsing. The following options are available:
- nostrip: don't strip debugging symbols nor DWARF tables.
- cleveldb: use cleveldb as db backend instead of goleveldb.
- race: pass -race to go build and enable data race detection.
- [mempool] [\#4759](https://github.com/tendermint/tendermint/pull/4759) Allow ReapX and CheckTx functions to run in parallel (@melekes)
- [rpc/core] [\#4844](https://github.com/tendermint/tendermint/pull/4844) Do not lock consensus state in `/validators`, `/consensus_params` and `/status` (@melekes)

### BUG FIXES:

- [blockchain/v2] [\#4761](https://github.com/tendermint/tendermint/pull/4761) Fix excessive CPU usage caused by spinning on closed channels (@erikgrinaker)
- [blockchain/v2] Respect `fast_sync` option (@erikgrinaker)
- [light] [\#4741](https://github.com/tendermint/tendermint/pull/4741) Correctly return `ErrSignedHeaderNotFound` and `ErrValidatorSetNotFound` on corresponding RPC errors (@erikgrinaker)
- [rpc] [\#4805](https://github.com/tendermint/tendermint/issues/4805) Attempt to handle panics during panic recovery (@erikgrinaker)
- [types] [\#4764](https://github.com/tendermint/tendermint/pull/4764) Return an error if voting power overflows in `VerifyCommitTrusting` (@melekes)
- [privval] [\#4812](https://github.com/tendermint/tendermint/pull/4812) Retry `GetPubKey/SignVote/SignProposal` a few times before returning an error (@melekes)
- [p2p] [\#4847](https://github.com/tendermint/tendermint/pull/4847) Return masked IP (not the actual IP) in addrbook#groupKey (@melekes)


## v0.33.4

- Nodes are no longer guaranteed to contain all blocks up to the latest height. The ABCI app can now control which blocks to retain through the ABCI field `ResponseCommit.retain_height`, all blocks and associated data below this height will be removed.
Expand Down
5 changes: 3 additions & 2 deletions CHANGELOG_PENDING.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## v0.3
## v0.4

\*\*

Expand All @@ -11,9 +11,10 @@
- Apps

- P2P Protocol

- Go API

- Blockchain Protocol

### FEATURES:

Expand Down
2 changes: 1 addition & 1 deletion DOCKER/Dockerfile.build_c-amazonlinux
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ ENV GOPATH=/go/src
RUN mkdir -p /tendermint
WORKDIR /tendermint

CMD ["/usr/bin/make", "build_c"]
CMD ["/usr/bin/make", "build", "TENDERMINT_BUILD_OPTIONS=cleveldb"]

61 changes: 33 additions & 28 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,11 @@ PACKAGES=$(shell go list ./...)
SRCPATH=$(shell pwd)
OUTPUT?=build/tendermint

BUILD_TAGS?='tendermint'
CGO_OPTPTION=0
BUILD_TAGS?=tendermint
LIBSODIUM_TARGET=
PREPARE_LIBSODIUM_TARGET=
ifeq ($(LIBSODIUM), 1)
BUILD_TAGS='libsodium tendermint'
CGO_OPTPTION=1
LIBSODIUM_TARGET=libsodium
ifneq ($(OS), Windows_NT)
ifeq ($(shell uname -s), Linux)
Expand All @@ -22,7 +20,26 @@ BUILD_FLAGS = -mod=readonly -ldflags "$(LD_FLAGS)"
HTTPS_GIT := https://github.com/tendermint/tendermint.git
DOCKER_BUF := docker run -v $(shell pwd):/workspace --workdir /workspace bufbuild/buf

all: check build test install
# handle nostrip
ifeq (,$(findstring nostrip,$(TENDERMINT_BUILD_OPTIONS)))
BUILD_FLAGS += -trimpath
LD_FLAGS += -s -w
endif

# handle race
ifeq (race,$(findstring race,$(TENDERMINT_BUILD_OPTIONS)))
BUILD_FLAGS += -race
endif

# handle cleveldb
ifeq (cleveldb,$(findstring cleveldb,$(TENDERMINT_BUILD_OPTIONS)))
BUILD_TAGS += cleveldb
endif

# allow users to pass additional flags via the conventional LDFLAGS variable
LD_FLAGS += $(LDFLAGS)

all: check $(LIBSODIUM_TARGET) build test install
.PHONY: all

# The below include contains the tools.
Expand All @@ -34,25 +51,13 @@ include tests.mk
###############################################################################

build: $(LIBSODIUM_TARGET)
CGO_ENABLED=$(CGO_OPTION) go build $(BUILD_FLAGS) -tags $(BUILD_TAGS) -o $(OUTPUT) ./cmd/tendermint/
CGO_ENABLED=1 go build $(BUILD_FLAGS) -tags '$(BUILD_TAGS)' -o $(OUTPUT) ./cmd/tendermint/
.PHONY: build

build_c: $(LIBSODIUM_TARGET)
CGO_ENABLED=$(CGO_OPTION) go build $(BUILD_FLAGS) -tags "$(BUILD_TAGS) cleveldb" -o $(OUTPUT) ./cmd/tendermint/
.PHONY: build_c

build_race: $(LIBSODIUM_TARGET)
CGO_ENABLED=$(CGO_OPTION) go build -race $(BUILD_FLAGS) -tags $(BUILD_TAGS) -o $(OUTPUT) ./cmd/tendermint
.PHONY: build_race

install:
CGO_ENABLED=$(CGO_OPTION) go install $(BUILD_FLAGS) -tags $(BUILD_TAGS) ./cmd/tendermint
CGO_ENABLED=1 go install $(BUILD_FLAGS) -tags $(BUILD_TAGS) ./cmd/tendermint
.PHONY: install

install_c:
CGO_ENABLED=$(CGO_OPTION) go install $(BUILD_FLAGS) -tags "$(BUILD_TAGS) cleveldb" ./cmd/tendermint
.PHONY: install_c

###############################################################################
### Protobuf ###
###############################################################################
Expand Down Expand Up @@ -156,15 +161,15 @@ gen_certs: clean_certs
certstrap init --common-name "tendermint.com" --passphrase ""
certstrap request-cert --common-name "server" -ip "127.0.0.1" --passphrase ""
certstrap sign "server" --CA "tendermint.com" --passphrase ""
mv out/server.crt rpc/lib/server/test.crt
mv out/server.key rpc/lib/server/test.key
mv out/server.crt rpc/jsonrpc/server/test.crt
mv out/server.key rpc/jsonrpc/server/test.key
rm -rf out
.PHONY: gen_certs

# deletes generated certificates
clean_certs:
rm -f rpc/lib/server/test.crt
rm -f rpc/lib/server/test.key
rm -f rpc/jsonrpc/server/test.crt
rm -f rpc/jsonrpc/server/test.key
.PHONY: clean_certs

###############################################################################
Expand Down Expand Up @@ -222,17 +227,17 @@ build-docker:
###############################################################################

# Build linux binary on other platforms
build-linux: tools $(PREPARE_LIBSODIUM_TARGET) $(LIBSODIUM_TARGET)
GOOS=linux GOARCH=amd64 $(MAKE) build
build-linux:
docker run --rm -v `pwd`:/go/src/github.com/tendermint/tendermint -w /go/src/github.com/tendermint/tendermint golang:1.14.1-alpine /bin/sh -c "apk add --update git make gcc libc-dev build-base && make build"
.PHONY: build-linux

build-docker-localnode:
@cd networks/local && make
.PHONY: build-docker-localnode

# Runs `make build_c` from within an Amazon Linux (v2)-based Docker build
# container in order to build an Amazon Linux-compatible binary. Produces a
# compatible binary at ./build/tendermint
# Runs `make build TENDERMINT_BUILD_OPTIONS=cleveldb` from within an Amazon
# Linux (v2)-based Docker build container in order to build an Amazon
# Linux-compatible binary. Produces a compatible binary at ./build/tendermint
build_c-amazonlinux:
$(MAKE) -C ./DOCKER build_amazonlinux_buildimage
docker run --rm -it -v `pwd`:/tendermint tendermint/tendermint:build_c-amazonlinux
Expand Down Expand Up @@ -263,6 +268,6 @@ endif
# prerequisits: build-contract-tests-hooks build-linux
# the two build commands were not added to let this command run from generic containers or machines.
# The binaries should be built beforehand
contract-tests:
contract-tests: build-docker-localnode
dredd
.PHONY: contract-tests
13 changes: 6 additions & 7 deletions abci/server/grpc_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,25 +34,24 @@ func NewGRPCServer(protoAddr string, app types.ABCIApplicationServer) service.Se
return s
}

// OnStart starts the gRPC service
// OnStart starts the gRPC service.
func (s *GRPCServer) OnStart() error {
if err := s.BaseService.OnStart(); err != nil {
return err
}
ln, err := net.Listen(s.proto, s.addr)
if err != nil {
return err
}
s.Logger.Info("Listening", "proto", s.proto, "addr", s.addr)

s.listener = ln
s.server = grpc.NewServer()
types.RegisterABCIApplicationServer(s.server, s.app)

s.Logger.Info("Listening", "proto", s.proto, "addr", s.addr)
go s.server.Serve(s.listener)

return nil
}

// OnStop stops the gRPC server
// OnStop stops the gRPC server.
func (s *GRPCServer) OnStop() {
s.BaseService.OnStop()
s.server.Stop()
}
Loading

0 comments on commit b571372

Please sign in to comment.