From 923742622a8cb9bb9b9723836caba08fb857aa5f Mon Sep 17 00:00:00 2001 From: Jae Kwon Date: Sat, 7 Apr 2018 00:08:53 -0700 Subject: [PATCH] Fix docs; Bump version; Fix makefile --- CHANGELOG.md | 6 ++++++ Gopkg.lock | 4 ++-- Makefile | 2 +- docs/apps.md | 4 ++-- docs/guide.md | 6 +++--- docs/sdk/glossary.rst | 7 +++---- docs/sdk/overview.rst | 6 +++--- examples/basecoin/types/account.go | 2 +- version/version.go | 6 +++--- 9 files changed, 24 insertions(+), 19 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7ced59c5ff..a37bb46187 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## 0.14.0 (April 7, 2018) + +BREAKING CHANGES + +* Remove go-wire, use go-amino + ## 0.13.1 (April 3, 2018) BUG FIXES diff --git a/Gopkg.lock b/Gopkg.lock index 7d61f6f1b7..ec3d458e5d 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -346,7 +346,6 @@ version = "0.19.0-rc1" [[projects]] - branch = "develop" name = "github.com/tendermint/tmlibs" packages = [ "autofile", @@ -362,6 +361,7 @@ "pubsub/query" ] revision = "2e24b64fc121dcdf1cabceab8dc2f7257675483c" + version = "0.8.1" [[projects]] branch = "master" @@ -459,6 +459,6 @@ [solve-meta] analyzer-name = "dep" analyzer-version = 1 - inputs-digest = "2d266cd1c87ae063451b8c6cbce64d24463fd6edc61aa391be618c0447b7cd57" + inputs-digest = "14adc8fa3c1dd74dc5245e876158600265f86051b6d03f08f8a2d9f26dc347c2" solver-name = "gps-cdcl" solver-version = 1 diff --git a/Makefile b/Makefile index 8d6fb9952d..b5177621aa 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -PACKAGES=$(shell go list ./... | grep -v '/vendor/' | grep -v 'client/lcd') # XXX +PACKAGES=$(shell go list ./... | grep -v '/vendor/') COMMIT_HASH := $(shell git rev-parse --short HEAD) BUILD_FLAGS = -ldflags "-X github.com/cosmos/cosmos-sdk/version.GitCommit=${COMMIT_HASH}" diff --git a/docs/apps.md b/docs/apps.md index 76434791c2..29fb905cba 100644 --- a/docs/apps.md +++ b/docs/apps.md @@ -40,7 +40,7 @@ Basecoin implements a `BaseApp` state machine using the `x/auth` and `x/bank` ex which define how transaction signers are authenticated and how coins are transferred. It should also use `x/ibc` and probably a simple staking extension. -Basecoin and the native `x` extensions use go-wire for all serialization needs, +Basecoin and the native `x` extensions use go-amino for all serialization needs, including for transactions and accounts. ## Your Cosmos App @@ -62,7 +62,7 @@ Ethermint is a new implementation of `BaseApp` that does not depend on Basecoin. Instead of `cosmos-sdk/x/` it has its own `ethermint/x` based on `go-ethereum`. Ethermint uses a Patricia store for its accounts, and an IAVL store for IBC. -It has `x/ante`, which is quite similar to Basecoin's but uses RLP instead of go-wire. +It has `x/ante`, which is quite similar to Basecoin's but uses RLP instead of go-amino. Instead of `x/bank`, it has `x/eth`, which defines the single Ethereum transaction type and all the semantics of the Ethereum state machine. diff --git a/docs/guide.md b/docs/guide.md index 5c31d2e271..12a9b534cb 100644 --- a/docs/guide.md +++ b/docs/guide.md @@ -168,8 +168,8 @@ into a `Tx`: type TxDecoder func(txBytes []byte) (Tx, error) ``` -In `Basecoin`, we use the Tendermint wire format and the `go-wire` library for -encoding and decoding all message types. The `go-wire` library has the nice +In `Basecoin`, we use the Tendermint wire format and the `go-amino` library for +encoding and decoding all message types. The `go-amino` library has the nice property that it can unmarshal into interface types, but it requires the relevant types to be registered ahead of type. Registration happens on a `Codec` object, so as not to taint the global name space. @@ -186,7 +186,7 @@ cdc.RegisterConcrete(bank.IssueMsg{}, "cosmos-sdk/IssueMsg", nil) Note how each concrete type is given a name - these name determine the type's unique "prefix bytes" during encoding. A registered type will always use the same prefix-bytes, regardless of what interface it is satisfying. For more -details, see the [go-wire documentation](https://github.com/tendermint/go-wire/blob/develop). +details, see the [go-amino documentation](https://github.com/tendermint/go-amino/blob/develop). ## MultiStore diff --git a/docs/sdk/glossary.rst b/docs/sdk/glossary.rst index 1480e7b38c..faf682da45 100644 --- a/docs/sdk/glossary.rst +++ b/docs/sdk/glossary.rst @@ -18,8 +18,7 @@ store), and it must have a deterministic action. The transaction is the main piece of one request. We currently make heavy use of -`go-wire `__ and -`data `__ to +`go-amino `__ to provide binary and json encodings and decodings for ``struct`` or interface\ ``objects. Here, encoding and decoding operations are designed to operate with interfaces nested any amount times (like an onion!). There is one public``\ TxMapper\` in the basecoin root package, and all modules can register their own @@ -162,13 +161,13 @@ also implements the ``Handler`` interface. We then register a list of modules with the dispatcher. Every module has a unique ``Name()``, which is used for isolating its state space. We use this same name for routing transactions. Each transaction implementation must be registed with -go-wire via ``TxMapper``, so we just look at the registered name of this +go-amino via ``TxMapper``, so we just look at the registered name of this transaction, which should be of the form ``/xxx``. The dispatcher grabs the appropriate module name from the tx name and routes it if the module is present. This all seems like a bit of magic, but really we're just making use of -go-wire magic that we are already using, rather than add another layer. +go-amino magic that we are already using, rather than add another layer. For all the transactions to be properly routed, the only thing you need to remember is to use the following pattern: diff --git a/docs/sdk/overview.rst b/docs/sdk/overview.rst index 9e79dd04ff..1356d7dc1d 100644 --- a/docs/sdk/overview.rst +++ b/docs/sdk/overview.rst @@ -278,8 +278,8 @@ into a ``Tx``: type TxDecoder func(txBytes []byte) (Tx, error) -In ``Basecoin``, we use the Tendermint wire format and the ``go-wire`` library for -encoding and decoding all message types. The ``go-wire`` library has the nice +In ``Basecoin``, we use the Tendermint wire format and the ``go-amino`` library for +encoding and decoding all message types. The ``go-amino`` library has the nice property that it can unmarshal into interface types, but it requires the relevant types to be registered ahead of type. Registration happens on a ``Codec`` object, so as not to taint the global name space. @@ -296,7 +296,7 @@ types: Note how each concrete type is given a name - these name determine the type's unique "prefix bytes" during encoding. A registered type will always use the same prefix-bytes, regardless of what interface it is satisfying. For more -details, see the `go-wire documentation `__. +details, see the `go-amino documentation `__. MultiStore diff --git a/examples/basecoin/types/account.go b/examples/basecoin/types/account.go index 35b37c7b2f..b9b735a27f 100644 --- a/examples/basecoin/types/account.go +++ b/examples/basecoin/types/account.go @@ -12,7 +12,7 @@ var _ sdk.Account = (*AppAccount)(nil) // extending auth.BaseAccount with custom fields. // // This is compatible with the stock auth.AccountStore, since -// auth.AccountStore uses the flexible go-wire library. +// auth.AccountStore uses the flexible go-amino library. type AppAccount struct { auth.BaseAccount Name string `json:"name"` diff --git a/version/version.go b/version/version.go index 324db29dc9..53ba7f8c3f 100644 --- a/version/version.go +++ b/version/version.go @@ -6,10 +6,10 @@ package version // TODO improve const Maj = "0" -const Min = "13" -const Fix = "2" +const Min = "14" +const Fix = "0" -const Version = "0.13.2-dev" +const Version = "0.14.0-rc1" // GitCommit set by build flags var GitCommit = ""