From d19d8e7914aef3df2a1c8d6ca8faa0d3e8f92ac1 Mon Sep 17 00:00:00 2001 From: Ethan Buchman Date: Fri, 2 Jun 2017 23:18:10 -0400 Subject: [PATCH 1/4] update readme and changelog --- CHANGELOG.md | 75 +++++++++++++++++++++++++++++++++++----------------- README.md | 17 +++++++----- 2 files changed, 61 insertions(+), 31 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 89e1948dc..b110bdbe3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,10 +1,43 @@ # Changelog -## 0.10.0 (May 18, 2017) +## 0.10.0 (June 2, 2017) + +Includes major updates to configuration, logging, and json serialization. +Also includes the Grand Repo-Merge of 2017. BREAKING CHANGES: -- New JSON encoding for `go-crypto` types (using `go-wire/data`): +- Config and Flags: + - The `config` map is replaced with a [`Config` struct](https://github.com/tendermint/tendermint/blob/master/config/config.go#L11), +containing substructs: `BaseConfig`, `P2PConfig`, `MempoolConfig`, `ConsensusConfig`, `RPCConfig` + - This affects the following flags: + - `--seeds` is now `--p2p.seeds` + - `--node_laddr` is now `--p2p.laddr` + - `--pex` is now `--p2p.pex` + - `--skip_upnp` is now `--p2p.skip_upnp` + - `--rpc_laddr` is now `--rpc.laddr` + - `--grpc_laddr` is now `--rpc.grpc_laddr` + - Any configuration option now within a substract must come under that heading in the `config.toml`, for instance: + +``` +[p2p] +laddr="tcp://1.2.3.4:46656" + +[consensus] +timeout_propose=1000 +``` + + - Use viper and `DefaultConfig() / `TestConfig()` functions to handle defaults, and remove `config/tendermint` and `config/tendermint_test` + - Change some function and method signatures to accomodate new config: https://gist.github.com/ebuchman/640d5fc6c2605f73497992fe107ebe0b for comprehensive list. + +- [Logger](https://github.com/tendermint/tmlibs/log) + - Replace static `log15` logger with a simple interface, and provide a new implementation using `go-kit`. +tSee our [blog post](https://tendermint.com/blog/abstracting-the-logger-interface-in-go) for more details + - Levels `warn` and `notice` are removed (you may need to change them in your `config.toml`!) + - Change some function and method signatures to accept a logger: https://gist.github.com/ebuchman/640d5fc6c2605f73497992fe107ebe0b for comprehensive list. + +- JSON serialization: + - Replace `[TypeByte, Xxx]` with `{"type": "some-type", "data": Xxx}` in RPC and all `.json` files by using `go-wire/data`. For instance, a public key is now: ``` "pub_key": { @@ -13,32 +46,23 @@ BREAKING CHANGES: } ``` -- New config - - Isolate viper to `cmd/tendermint/commands` - - New Config structs in `config/`: `BaseConfig`, `P2PConfig`, `MempoolConfig`, `ConsensusConfig` - - Remove config/tendermint and config/tendermint_test. Defaults are handled by viper and `DefaultConfig() / `TestConfig()` functions - - Tests do not read config from file -- New logger (`github.com/tendermint/tmlibs/log`) - - Reduced to three levels: `error`, `info`, and `debug` - - NOTE: The default in previous versions was `notice`, which is no longer valid. Please change it in the `config.toml` - - Per-module log levels - - The new default is `state:info,*:error`, which means the `state` package logs at `info` level, and everything else logs at `error` level - - No global loggers (loggers are passed into constructors, or preferably set with a `SetLogger` method) -- RPC serialization cleanup: - - Lowercase json names for ValidatorSet fields - - No longer uses go-wire, so no more `[TypeByte, XXX]` madness - - Responses have no type information + - Remove type information about RPC responses, so `[TypeByte, {"jsonrpc": "2.0", ... }]` is now just `{"jsonrpc": "2.0", ... }` + - Change `[]byte` to `data.Bytes` in all serialized types (for hex encoding) + - Lowercase the JSON tags in `ValidatorSet` fields - Introduce EventDataInner for serializing events -- Remove all use of go-wire (and `[TypeByte, XXX]`) in the `genesis.json` and `priv_validator.json` -- [consensus/abci] Send InitChain message in handshake if `appBlockHeight == 0` -- [types] `[]byte -> data.Bytes` -- [types] Do not include the `Accum` field when computing the hash of a validator. This makes the ValidatorSetHash unique for a given validator set, rather than changing with every block (as the Accum changes) -- A number of functions and methods ahd their signatures modified to accomodate new config and logger. See https://gist.github.com/ebuchman/640d5fc6c2605f73497992fe107ebe0b for comprehensive list. Note many also had `[]byte` arguments changed to `data.Bytes`, but this is not actually breaking. + +- Other: + - Send InitChain message in handshake if `appBlockHeight == 0` + - Do not include the `Accum` field when computing the validator hash. This makes the ValidatorSetHash unique for a given validator set, rather than changing with every block (as the Accum changes) + - Unsafe RPC calls are not enabled by default. This includes `/dial_seeds`, and all calls prefixed with `unsafe`. Use the `--rpc.unsafe` flag to enable. + FEATURES: +- Per-module log levels. For instance, the new default is 'state:info,*:error', which means the `state` package logs at `info` level, and everything else logs at `error` level - Log if a node is validator or not in every consensus round - Use ldflags to set git hash as part of the version +- Ignore `address` and `pub_key` fields in `priv_validator.json` and overwrite them with the values derrived from the `priv_key` IMPROVEMENTS: @@ -46,11 +70,14 @@ IMPROVEMENTS: - Update paths for grand repo merge: - `go-common -> tmlibs/common` - `go-data -> go-wire/data` - - All other `go-*` libs, except `go-crypto` and `go-wire`, merged under `tmlibs` + - All other `go-` libs, except `go-crypto` and `go-wire`, are merged under `tmlibs` +- No global loggers (loggers are passed into constructors, or preferably set with a SetLogger method) - Return HTTP status codes with errors for RPC responses +- Limit `/blockchain_info` call to return a maximum of 20 blocks - Use `.Wrap()` and `.Unwrap()` instead of eg. `PubKeyS` for `go-crypto` types -- Color code different instances of the consensus for tests - RPC JSON responses use pretty printing (via `json.MarshalIndent`) +- Color code different instances of the consensus for tests +- Isolate viper to `cmd/tendermint/commands` and do not read config from file for tests ## 0.9.2 (April 26, 2017) diff --git a/README.md b/README.md index 34320f9a9..250516ed4 100644 --- a/README.md +++ b/README.md @@ -51,16 +51,19 @@ Yay open source! Please see our [contributing guidelines](https://tendermint.com ### Sub-projects -* [ABCI](http://github.com/tendermint/abci) -* [Mintnet-kubernetes](https://github.com/tendermint/tools/tree/master/mintnet-kubernetes) -* [Go-Wire](http://github.com/tendermint/go-wire) -* [Go-P2P](http://github.com/tendermint/tendermint/p2p) -* [Go-Merkle](http://github.com/tendermint/go-merkle) +* [ABCI, for enabling applications in any language](http://github.com/tendermint/abci) +* [Go-Wire, our serialization library](http://github.com/tendermint/go-wire) +* [Go-Crypto, our cryptography library](http://github.com/tendermint/go-crypto) +* [TmLibs, our assortment of Go librarues](http://github.com/tendermint/tmlibs) +* [Merkleeyes, a balanced, binary Merkle tree for ABCI apps](http://github.com/tendermint/merkleeyes) + +### Tools +* [Deployment, Benchmarking, and Monitoring](https://github.com/tendermint/tools) ### Applications -* [Ethermint](http://github.com/tendermint/ethermint) -* [Basecoin](http://github.com/tendermint/basecoin) +* [Ethermint, for running Ethereum on Tendermint](http://github.com/tendermint/ethermint) +* [Basecoin, our cryptocurrency application framework](http://github.com/tendermint/basecoin) ### More From d608e2b7ad4cb4ab2a537706d1654dc9a0724c78 Mon Sep 17 00:00:00 2001 From: Ethan Buchman Date: Fri, 2 Jun 2017 23:19:30 -0400 Subject: [PATCH 2/4] bump version to 0.10.0 --- version/version.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version/version.go b/version/version.go index fe4757b54..494b6a895 100644 --- a/version/version.go +++ b/version/version.go @@ -6,7 +6,7 @@ const Fix = "0" var ( // The full version string - Version = "0.10.0-rc2" + Version = "0.10.0" // GitCommit is set with --ldflags "-X main.gitCommit=$(git rev-parse HEAD)" GitCommit string From 84fea82043c58c60e36297915ee2f198491a0a63 Mon Sep 17 00:00:00 2001 From: Ethan Buchman Date: Fri, 2 Jun 2017 23:20:02 -0400 Subject: [PATCH 3/4] dist: dont mkdir in container --- scripts/dist.sh | 10 ++++------ scripts/dist_build.sh | 5 ----- scripts/publish.sh | 7 +++---- 3 files changed, 7 insertions(+), 15 deletions(-) diff --git a/scripts/dist.sh b/scripts/dist.sh index 0f368de97..c144c7fdd 100755 --- a/scripts/dist.sh +++ b/scripts/dist.sh @@ -19,12 +19,10 @@ DIR="$( cd -P "$( dirname "$SOURCE" )/.." && pwd )" # Change into that dir because we expect that. cd "$DIR" -## Generate the tag. -#if [ -z "$NOTAG" ]; then -# echo "==> Tagging..." -# git commit --allow-empty -a -m "Release v$VERSION" -# git tag -a -m "Version $VERSION" "v${VERSION}" master -#fi +# Delete the old dir +echo "==> Removing old directory..." +rm -rf build/pkg +mkdir -p build/pkg # Do a hermetic build inside a Docker container. docker build -t tendermint/tendermint-builder scripts/tendermint-builder/ diff --git a/scripts/dist_build.sh b/scripts/dist_build.sh index f75faee58..3e6d5abce 100755 --- a/scripts/dist_build.sh +++ b/scripts/dist_build.sh @@ -18,11 +18,6 @@ GIT_IMPORT="github.com/tendermint/tendermint/version" XC_ARCH=${XC_ARCH:-"386 amd64 arm"} XC_OS=${XC_OS:-"solaris darwin freebsd linux windows"} -# Delete the old dir -echo "==> Removing old directory..." -rm -rf build/pkg -mkdir -p build/pkg - # Make sure build tools are available. make tools diff --git a/scripts/publish.sh b/scripts/publish.sh index e87fea0d3..3091575ff 100755 --- a/scripts/publish.sh +++ b/scripts/publish.sh @@ -1,8 +1,8 @@ #!/usr/bin/env bash -set -eu +set -e VERSION=$1 -DIST_DIR=$2 # ./build/dist +DIST_DIR=./build/dist # Get the version from the environment, or try to figure it out. if [ -z $VERSION ]; then @@ -14,7 +14,6 @@ if [ -z "$VERSION" ]; then fi # copy to s3 -aws s3 cp --recursive ${DIST_DIR} s3://tendermint/${VERSION} --acl public-read --exclude "*" --include "*.zip" -aws s3 cp ${DIST_DIR}/tendermint_${VERSION}_SHA256SUMS s3://tendermint/0.9.0 --acl public-read +aws s3 cp --recursive ${DIST_DIR} s3://tendermint/binaries/tendermint/v${VERSION} --acl public-read exit 0 From c94a92b30dbad7962466c66dbc7a2d2d161d46e0 Mon Sep 17 00:00:00 2001 From: Ethan Buchman Date: Fri, 2 Jun 2017 23:28:10 -0400 Subject: [PATCH 4/4] update changelog and readme --- CHANGELOG.md | 47 ++++++++++++++++++++++------------------------- README.md | 14 +++++++------- 2 files changed, 29 insertions(+), 32 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b110bdbe3..4cf90ba87 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,38 +18,35 @@ containing substructs: `BaseConfig`, `P2PConfig`, `MempoolConfig`, `ConsensusCon - `--rpc_laddr` is now `--rpc.laddr` - `--grpc_laddr` is now `--rpc.grpc_laddr` - Any configuration option now within a substract must come under that heading in the `config.toml`, for instance: - -``` -[p2p] -laddr="tcp://1.2.3.4:46656" - -[consensus] -timeout_propose=1000 -``` - - - Use viper and `DefaultConfig() / `TestConfig()` functions to handle defaults, and remove `config/tendermint` and `config/tendermint_test` - - Change some function and method signatures to accomodate new config: https://gist.github.com/ebuchman/640d5fc6c2605f73497992fe107ebe0b for comprehensive list. - -- [Logger](https://github.com/tendermint/tmlibs/log) + ``` + [p2p] + laddr="tcp://1.2.3.4:46656" + + [consensus] + timeout_propose=1000 + ``` + - Use viper and `DefaultConfig() / TestConfig()` functions to handle defaults, and remove `config/tendermint` and `config/tendermint_test` + - Change some function and method signatures to + - Change some [function and method signatures](https://gist.github.com/ebuchman/640d5fc6c2605f73497992fe107ebe0b) accomodate new config + +- Logger - Replace static `log15` logger with a simple interface, and provide a new implementation using `go-kit`. -tSee our [blog post](https://tendermint.com/blog/abstracting-the-logger-interface-in-go) for more details +See our new [logging library](https://github.com/tendermint/tmlibs/log) and [blog post](https://tendermint.com/blog/abstracting-the-logger-interface-in-go) for more details - Levels `warn` and `notice` are removed (you may need to change them in your `config.toml`!) - - Change some function and method signatures to accept a logger: https://gist.github.com/ebuchman/640d5fc6c2605f73497992fe107ebe0b for comprehensive list. + - Change some [function and method signatures](https://gist.github.com/ebuchman/640d5fc6c2605f73497992fe107ebe0b) to accept a logger - JSON serialization: - Replace `[TypeByte, Xxx]` with `{"type": "some-type", "data": Xxx}` in RPC and all `.json` files by using `go-wire/data`. For instance, a public key is now: - -``` -"pub_key": { - "type": "ed25519", - "data": "83DDF8775937A4A12A2704269E2729FCFCD491B933C4B0A7FFE37FE41D7760D0" -} -``` - + ``` + "pub_key": { + "type": "ed25519", + "data": "83DDF8775937A4A12A2704269E2729FCFCD491B933C4B0A7FFE37FE41D7760D0" + } + ``` - Remove type information about RPC responses, so `[TypeByte, {"jsonrpc": "2.0", ... }]` is now just `{"jsonrpc": "2.0", ... }` - Change `[]byte` to `data.Bytes` in all serialized types (for hex encoding) - Lowercase the JSON tags in `ValidatorSet` fields - - Introduce EventDataInner for serializing events + - Introduce `EventDataInner` for serializing events - Other: - Send InitChain message in handshake if `appBlockHeight == 0` @@ -59,7 +56,7 @@ tSee our [blog post](https://tendermint.com/blog/abstracting-the-logger-interfac FEATURES: -- Per-module log levels. For instance, the new default is 'state:info,*:error', which means the `state` package logs at `info` level, and everything else logs at `error` level +- Per-module log levels. For instance, the new default is `state:info,*:error`, which means the `state` package logs at `info` level, and everything else logs at `error` level - Log if a node is validator or not in every consensus round - Use ldflags to set git hash as part of the version - Ignore `address` and `pub_key` fields in `priv_validator.json` and overwrite them with the values derrived from the `priv_key` diff --git a/README.md b/README.md index 250516ed4..d37ef6357 100644 --- a/README.md +++ b/README.md @@ -51,19 +51,19 @@ Yay open source! Please see our [contributing guidelines](https://tendermint.com ### Sub-projects -* [ABCI, for enabling applications in any language](http://github.com/tendermint/abci) -* [Go-Wire, our serialization library](http://github.com/tendermint/go-wire) -* [Go-Crypto, our cryptography library](http://github.com/tendermint/go-crypto) -* [TmLibs, our assortment of Go librarues](http://github.com/tendermint/tmlibs) -* [Merkleeyes, a balanced, binary Merkle tree for ABCI apps](http://github.com/tendermint/merkleeyes) +* [ABCI](http://github.com/tendermint/abci), the Application Blockchain Interface +* [Go-Wire](http://github.com/tendermint/go-wire), a deterministic serialization library +* [Go-Crypto](http://github.com/tendermint/go-crypto), an elliptic curve cryptography library +* [TmLibs](http://github.com/tendermint/tmlibs), an assortment of Go libraries +* [Merkleeyes](http://github.com/tendermint/merkleeyes), a balanced, binary Merkle tree for ABCI apps ### Tools * [Deployment, Benchmarking, and Monitoring](https://github.com/tendermint/tools) ### Applications -* [Ethermint, for running Ethereum on Tendermint](http://github.com/tendermint/ethermint) -* [Basecoin, our cryptocurrency application framework](http://github.com/tendermint/basecoin) +* [Ethermint](http://github.com/tendermint/ethermint): Ethereum on Tendermint +* [Basecoin](http://github.com/tendermint/basecoin), a cryptocurrency application framework ### More