From 9b9f1beef3cfc5e501fc494afeb4862bd86482f3 Mon Sep 17 00:00:00 2001 From: Marko Date: Mon, 3 Feb 2020 18:15:27 +0100 Subject: [PATCH] docs: update guides proto paths (#4365) * update guides with correct path to libs/kv proto files * Apply suggestions from code review Co-Authored-By: Anton Kaliaev * format something to rerun ci Co-authored-by: Anton Kaliaev --- Makefile | 12 ------------ README.md | 6 +++--- docs/guides/go-built-in.md | 12 +++++------- docs/guides/go.md | 15 +++++++-------- docs/guides/java.md | 10 +++++----- docs/guides/kotlin.md | 11 ++++++----- 6 files changed, 26 insertions(+), 40 deletions(-) diff --git a/Makefile b/Makefile index a6c1df45c..f6ca17d18 100644 --- a/Makefile +++ b/Makefile @@ -94,10 +94,6 @@ protoc_libs: libs/kv/types.pb.go # generates certificates for TLS testing in remotedb and RPC server gen_certs: clean_certs certstrap init --common-name "tendermint.com" --passphrase "" - certstrap request-cert --common-name "remotedb" -ip "127.0.0.1" --passphrase "" - certstrap sign "remotedb" --CA "tendermint.com" --passphrase "" - mv out/remotedb.crt libs/db/remotedb/test.crt - mv out/remotedb.key libs/db/remotedb/test.key 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 @@ -106,17 +102,9 @@ gen_certs: clean_certs # deletes generated certificates clean_certs: - rm -f libs/db/remotedb/test.crt - rm -f libs/db/remotedb/test.key rm -f rpc/lib/server/test.crt rm -f rpc/lib/server/test.key -test_libs: - go test -tags clevedb boltdb $(PACKAGES) - -grpc_dbserver: - protoc -I libs/db/remotedb/proto/ libs/db/remotedb/proto/defs.proto --go_out=plugins=grpc:libs/db/remotedb/proto - protoc_grpc: rpc/grpc/types.pb.go protoc_merkle: crypto/merkle/merkle.pb.go diff --git a/README.md b/README.md index 6d25546e1..9e87b4962 100644 --- a/README.md +++ b/README.md @@ -47,9 +47,9 @@ For examples of the kinds of bugs we're looking for, see [SECURITY.md](SECURITY. ## Minimum requirements -| Requirement | Notes | -| ----------- | ------------------ | -| Go version | Go1.13 or higher | +| Requirement | Notes | +| ----------- | ---------------- | +| Go version | Go1.13 or higher | ## Documentation diff --git a/docs/guides/go-built-in.md b/docs/guides/go-built-in.md index 56f910331..5ab71b829 100644 --- a/docs/guides/go-built-in.md +++ b/docs/guides/go-built-in.md @@ -1,6 +1,6 @@ ---- + # Creating a built-in application in Go @@ -55,8 +55,8 @@ $ echo $GOPATH We'll start by creating a new Go project. ```sh -$ mkdir -p $GOPATH/src/github.com/me/kvstore -$ cd $GOPATH/src/github.com/me/kvstore +$ mkdir kvstore +$ cd kvstore ``` Inside the example directory create a `main.go` file with the following content: @@ -569,7 +569,6 @@ We are going to use [Go modules](https://github.com/golang/go/wiki/Modules) for dependency management. ```sh -$ export GO111MODULE=on $ go mod init github.com/me/example $ go build ``` @@ -580,8 +579,7 @@ To create a default configuration, nodeKey and private validator files, let's execute `tendermint init`. But before we do that, we will need to install Tendermint Core. Please refer to [the official guide](https://docs.tendermint.com/master/introduction/install.html). If you're -installing from source, don't forget to checkout the latest release (`git -checkout vX.Y.Z`). +installing from source, don't forget to checkout the latest release (`git checkout vX.Y.Z`). ```sh $ rm -rf /tmp/example diff --git a/docs/guides/go.md b/docs/guides/go.md index 6559a0005..f688d0e4e 100644 --- a/docs/guides/go.md +++ b/docs/guides/go.md @@ -1,6 +1,6 @@ ---- + # Creating an application in Go @@ -58,8 +58,8 @@ $ echo $GOPATH We'll start by creating a new Go project. ```sh -$ mkdir -p $GOPATH/src/github.com/me/kvstore -$ cd $GOPATH/src/github.com/me/kvstore +$ mkdir kvstore +$ cd kvstore ``` Inside the example directory create a `main.go` file with the following content: @@ -228,9 +228,9 @@ func NewKVStoreApplication(db *badger.DB) *KVStoreApplication { ### 1.3.2 BeginBlock -> DeliverTx -> EndBlock -> Commit -When Tendermint Core has decided on the block, it's transfered to the +When Tendermint Core has decided on the block, it's transferred to the application in 3 parts: `BeginBlock`, one `DeliverTx` per transaction and -`EndBlock` in the end. DeliverTx are being transfered asynchronously, but the +`EndBlock` in the end. DeliverTx are being transferred asynchronously, but the responses are expected to come in order. ``` @@ -437,8 +437,7 @@ To create a default configuration, nodeKey and private validator files, let's execute `tendermint init`. But before we do that, we will need to install Tendermint Core. Please refer to [the official guide](https://docs.tendermint.com/master/introduction/install.html). If you're -installing from source, don't forget to checkout the latest release (`git -checkout vX.Y.Z`). +installing from source, don't forget to checkout the latest release (`git checkout vX.Y.Z`). ```sh $ rm -rf /tmp/example diff --git a/docs/guides/java.md b/docs/guides/java.md index 4109f042f..12bbc4565 100644 --- a/docs/guides/java.md +++ b/docs/guides/java.md @@ -1,6 +1,6 @@ ---- + # Creating an application in Java @@ -170,15 +170,15 @@ Copy the necessary `.proto` files to your project: mkdir -p \ $KVSTORE_HOME/src/main/proto/github.com/tendermint/tendermint/abci/types \ $KVSTORE_HOME/src/main/proto/github.com/tendermint/tendermint/crypto/merkle \ - $KVSTORE_HOME/src/main/proto/github.com/tendermint/tendermint/libs/common \ + $KVSTORE_HOME/src/main/proto/github.com/tendermint/tendermint/libs/kv \ $KVSTORE_HOME/src/main/proto/github.com/gogo/protobuf/gogoproto cp $GOPATH/src/github.com/tendermint/tendermint/abci/types/types.proto \ $KVSTORE_HOME/src/main/proto/github.com/tendermint/tendermint/abci/types/types.proto cp $GOPATH/src/github.com/tendermint/tendermint/crypto/merkle/merkle.proto \ $KVSTORE_HOME/src/main/proto/github.com/tendermint/tendermint/crypto/merkle/merkle.proto -cp $GOPATH/src/github.com/tendermint/tendermint/libs/common/types.proto \ - $KVSTORE_HOME/src/main/proto/github.com/tendermint/tendermint/libs/common/types.proto +cp $GOPATH/src/github.com/tendermint/tendermint/libs/kv/types.proto \ + $KVSTORE_HOME/src/main/proto/github.com/tendermint/tendermint/libs/kv/types.proto cp $GOPATH/src/github.com/gogo/protobuf/gogoproto/gogo.proto \ $KVSTORE_HOME/src/main/proto/github.com/gogo/protobuf/gogoproto/gogo.proto ``` diff --git a/docs/guides/kotlin.md b/docs/guides/kotlin.md index 1829e1074..0c15098a4 100644 --- a/docs/guides/kotlin.md +++ b/docs/guides/kotlin.md @@ -1,6 +1,7 @@ ---- + + # Creating an application in Kotlin ## Guide Assumptions @@ -169,15 +170,15 @@ Copy the necessary `.proto` files to your project: mkdir -p \ $KVSTORE_HOME/src/main/proto/github.com/tendermint/tendermint/abci/types \ $KVSTORE_HOME/src/main/proto/github.com/tendermint/tendermint/crypto/merkle \ - $KVSTORE_HOME/src/main/proto/github.com/tendermint/tendermint/libs/common \ + $KVSTORE_HOME/src/main/proto/github.com/tendermint/tendermint/libs/kv \ $KVSTORE_HOME/src/main/proto/github.com/gogo/protobuf/gogoproto cp $GOPATH/src/github.com/tendermint/tendermint/abci/types/types.proto \ $KVSTORE_HOME/src/main/proto/github.com/tendermint/tendermint/abci/types/types.proto cp $GOPATH/src/github.com/tendermint/tendermint/crypto/merkle/merkle.proto \ $KVSTORE_HOME/src/main/proto/github.com/tendermint/tendermint/crypto/merkle/merkle.proto -cp $GOPATH/src/github.com/tendermint/tendermint/libs/common/types.proto \ - $KVSTORE_HOME/src/main/proto/github.com/tendermint/tendermint/libs/common/types.proto +cp $GOPATH/src/github.com/tendermint/tendermint/libs/kv/types.proto \ + $KVSTORE_HOME/src/main/proto/github.com/tendermint/tendermint/libs/kv/types.proto cp $GOPATH/src/github.com/gogo/protobuf/gogoproto/gogo.proto \ $KVSTORE_HOME/src/main/proto/github.com/gogo/protobuf/gogoproto/gogo.proto ```