mirror of
https://github.com/tendermint/tendermint.git
synced 2026-01-06 21:36:26 +00:00
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 <anton.kalyaev@gmail.com> * format something to rerun ci Co-authored-by: Anton Kaliaev <anton.kalyaev@gmail.com>
This commit is contained in:
12
Makefile
12
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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
<!---
|
||||
order: 2
|
||||
---
|
||||
--->
|
||||
|
||||
# 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
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
<!---
|
||||
order: 1
|
||||
---
|
||||
--->
|
||||
|
||||
# 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
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
<!---
|
||||
order: 3
|
||||
---
|
||||
--->
|
||||
|
||||
# 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
|
||||
```
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
---
|
||||
<!---
|
||||
order: 4
|
||||
---
|
||||
--->
|
||||
|
||||
# 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
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user