Browse Source

Merge pull request #171 from tendermint/sdk2

WIP: Sdk2
pull/1780/head
Ethan Buchman 7 years ago
committed by GitHub
parent
commit
ffbe912ff3
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
28 changed files with 588 additions and 662 deletions
  1. +2
    -0
      .gitignore
  2. +11
    -0
      CHANGELOG.md
  3. +105
    -55
      Makefile
  4. +18
    -5
      README.md
  5. +1
    -1
      circle.yml
  6. +10
    -10
      cmd/abci-cli/abci-cli.go
  7. +0
    -2
      example/code/code.go
  8. +11
    -9
      example/counter/counter.go
  9. +8
    -10
      example/dummy/dummy.go
  10. +13
    -13
      example/dummy/dummy_test.go
  11. +4
    -4
      example/dummy/helpers.go
  12. +12
    -13
      example/dummy/persistent_dummy.go
  13. +21
    -26
      glide.lock
  14. +1
    -1
      glide.yaml
  15. +13
    -13
      scripts/dist_build.sh
  16. +0
    -17
      specification.rst
  17. +7
    -10
      tests/server/client.go
  18. +3
    -1
      tests/test.sh
  19. +0
    -3
      tests/test_app/app.go
  20. +23
    -23
      tests/test_cli/test.sh
  21. +2
    -2
      types/application.go
  22. +7
    -5
      types/messages_test.go
  23. +1
    -36
      types/result.go
  24. +0
    -74
      types/result_test.go
  25. +267
    -245
      types/types.pb.go
  26. +43
    -41
      types/types.proto
  27. +5
    -28
      types/util.go
  28. +0
    -15
      types/util_test.go

+ 2
- 0
.gitignore View File

@ -1,3 +1,5 @@
vendor
.glide
types/types.pb.go
*.sw[op]
abci-cli

+ 11
- 0
CHANGELOG.md View File

@ -1,5 +1,16 @@
# Changelog
## 0.10.0 (TBD)
BREAKING CHANGES:
- [types] Drop gogo custom type magic with data.Bytes
- [types] Add `info string` field to responses for SetOption, Query, CheckTx, DeliverTx
- [types] Remove IsOk/IsErr methods from response types.
- [types] Replace KVPair with common.KVPair
- [types] Updates to CheckTx/DeliverTx around tags and fees
- [types] Remove code and log from Commit
## 0.9.0 (December 28, 2017)
BREAKING CHANGES:


+ 105
- 55
Makefile View File

@ -1,18 +1,56 @@
GOTOOLS = \
github.com/mitchellh/gox \
github.com/Masterminds/glide \
github.com/gogo/protobuf/protoc-gen-gogo \
github.com/gogo/protobuf/gogoproto
#gopkg.in/alecthomas/gometalinter.v2 \
github.com/mitchellh/gox \
github.com/Masterminds/glide \
gopkg.in/alecthomas/gometalinter.v2 \
github.com/gogo/protobuf/protoc-gen-gogo \
github.com/gogo/protobuf/gogoproto
GOTOOLS_CHECK = gox glide gometalinter.v2 protoc protoc-gen-gogo
PACKAGES=$(shell go list ./... | grep -v '/vendor/')
INCLUDE = -I=. -I=${GOPATH}/src -I=${GOPATH}/src/github.com/gogo/protobuf/protobuf
all: protoc install test
all: check get_vendor_deps protoc build test install metalinter
PACKAGES=$(shell go list ./... | grep -v '/vendor/')
check: check_tools
########################################
### Build
protoc:
## If you get the following error,
## "error while loading shared libraries: libprotobuf.so.14: cannot open shared object file: No such file or directory"
## See https://stackoverflow.com/a/25518702
protoc $(INCLUDE) --gogo_out=plugins=grpc:. types/*.proto
@echo "--> adding nolint declarations to protobuf generated files"
@awk '/package types/ { print "//nolint: gas"; print; next }1' types/types.pb.go > types/types.pb.go.new
@mv types/types.pb.go.new types/types.pb.go
build:
@go build -i ./cmd/...
dist:
@bash scripts/dist.sh
@bash scripts/publish.sh
install_protoc:
# https://github.com/google/protobuf/releases
install:
@go install ./cmd/...
########################################
### Tools & dependencies
check_tools:
@# https://stackoverflow.com/a/25668869
@echo "Found tools: $(foreach tool,$(GOTOOLS_CHECK),\
$(if $(shell which $(tool)),$(tool),$(error "No $(tool) in PATH")))"
get_tools:
@echo "--> Installing tools"
go get -u -v $(GOTOOLS)
@gometalinter.v2 --install
get_protoc:
@# https://github.com/google/protobuf/releases
curl -L https://github.com/google/protobuf/releases/download/v3.4.1/protobuf-cpp-3.4.1.tar.gz | tar xvz && \
cd protobuf-3.4.1 && \
DIST_LANG=cpp ./configure && \
@ -21,60 +59,41 @@ install_protoc:
cd .. && \
rm -rf protobuf-3.4.1
protoc:
## Note to self:
## On "error while loading shared libraries: libprotobuf.so.14: cannot open shared object file: No such file or directory"
## ldconfig (may require sudo)
## https://stackoverflow.com/a/25518702
protoc $(INCLUDE) --gogo_out=plugins=grpc:. types/*.proto
@ echo "--> adding nolint declarations to protobuf generated files"
@ awk '/package types/ { print "//nolint: gas"; print; next }1' types/types.pb.go > types/types.pb.go.new
@ mv types/types.pb.go.new types/types.pb.go
update_tools:
@echo "--> Updating tools"
@go get -u $(GOTOOLS)
install:
@ go install ./cmd/...
get_vendor_deps:
@rm -rf vendor/
@echo "--> Running glide install"
@glide install
build:
@ go build -i ./cmd/...
dist:
@ bash scripts/dist.sh
@ bash scripts/publish.sh
########################################
### Testing
test:
@ find . -path ./vendor -prune -o -name "*.sock" -exec rm {} \;
@ echo "==> Running go test"
@ go test $(PACKAGES)
@find . -path ./vendor -prune -o -name "*.sock" -exec rm {} \;
@echo "==> Running go test"
@go test $(PACKAGES)
test_race:
@ find . -path ./vendor -prune -o -name "*.sock" -exec rm {} \;
@ echo "==> Running go test --race"
@ go test -v -race $(PACKAGES)
@find . -path ./vendor -prune -o -name "*.sock" -exec rm {} \;
@echo "==> Running go test --race"
@go test -v -race $(PACKAGES)
test_integrations:
@ bash test.sh
fmt:
@ go fmt ./...
@bash test.sh
get_deps:
@ go get -d $(PACKAGES)
ensure_tools:
go get -u -v $(GOTOOLS)
#@ gometalinter.v2 --install
get_vendor_deps: ensure_tools
@ rm -rf vendor/
@ echo "--> Running glide install"
@ glide install
########################################
### Formatting, linting, and vetting
metalinter_all:
protoc $(INCLUDE) --lint_out=. types/*.proto
gometalinter.v2 --vendor --deadline=600s --enable-all --disable=lll ./...
fmt:
@go fmt ./...
metalinter:
@ echo "==> Running linter"
@echo "==> Running linter"
gometalinter.v2 --vendor --deadline=600s --disable-all \
--enable=maligned \
--enable=deadcode \
@ -92,7 +111,6 @@ metalinter:
--enable=varcheck \
--enable=vetshadow \
./...
#--enable=gas \
#--enable=dupl \
#--enable=errcheck \
@ -103,10 +121,42 @@ metalinter:
#--enable=unparam \
#--enable=vet \
build-docker:
metalinter_all:
protoc $(INCLUDE) --lint_out=. types/*.proto
gometalinter.v2 --vendor --deadline=600s --enable-all --disable=lll ./...
########################################
### Docker
DEVDOC_SAVE = docker commit `docker ps -a -n 1 -q` devdoc:local
docker_build:
docker build -t "tendermint/abci-dev" -f Dockerfile.develop .
run-docker:
docker run -it --rm -v "$PWD:/go/src/github.com/tendermint/abci" -w "/go/src/github.com/tendermint/abci" "tendermint/abci-dev" /bin/bash
docker_run:
docker run -it -v "$(CURDIR):/go/src/github.com/tendermint/abci" -w "/go/src/github.com/tendermint/abci" "tendermint/abci-dev" /bin/bash
docker_run_rm:
docker run -it --rm -v "$(CURDIR):/go/src/github.com/tendermint/abci" -w "/go/src/github.com/tendermint/abci" "tendermint/abci-dev" /bin/bash
devdoc_init:
docker run -it -v "$(CURDIR):/go/src/github.com/tendermint/abci" -w "/go/src/github.com/tendermint/abci" tendermint/devdoc echo
# TODO make this safer
$(call DEVDOC_SAVE)
devdoc:
docker run -it -v "$(CURDIR):/go/src/github.com/tendermint/abci" -w "/go/src/github.com/tendermint/abci" devdoc:local bash
devdoc_save:
# TODO make this safer
$(call DEVDOC_SAVE)
devdoc_clean:
docker rmi $$(docker images -f "dangling=true" -q)
.PHONY: all build test fmt get_deps ensure_tools protoc install_protoc build-docker run-docker
# To avoid unintended conflicts with file names, always add to .PHONY
# unless there is a reason not to.
# https://www.gnu.org/software/make/manual/html_node/Phony-Targets.html
.PHONY: check protoc build dist install check_tools get_tools get_protoc update_tools get_vendor_deps test test_race test_integrations fmt metalinter metalinter_all docker_build docker_run docker_run_rm devdoc_init devdoc devdoc_save devdoc_clean

+ 18
- 5
README.md View File

@ -15,6 +15,24 @@ Previously, the ABCI was referred to as TMSP.
The community has provided a number of addtional implementations, see the [Tendermint Ecosystem](https://tendermint.com/ecosystem)
## Specification
The [primary specification](https://github.com/tendermint/abci/blob/master/types/types.proto)
is made using Protocol Buffers. To build it, run
```
make protoc
```
See `protoc --help` and [the Protocol Buffers site](https://developers.google.com/protocol-buffers)
for details on compiling for other languages. Note we also include a [GRPC](http://www.grpc.io/docs)
service definition.
For the specification as an interface in Go, see the
[types/application.go file](https://github.com/tendermint/abci/blob/master/types/application.go).
See the [spec file](specification.rst) for a detailed description of the message types.
## Install
```
@ -140,8 +158,3 @@ func cmdDummy(cmd *cobra.Command, args []string) error {
}
```
and can be found in [this file](cmd/abci-cli/abci-cli.go).
## Specification
See the [spec file](specification.rst) for more information.

+ 1
- 1
circle.yml View File

@ -15,7 +15,7 @@ checkout:
test:
override:
- cd $REPO && make get_vendor_deps && make test_integrations
- cd $REPO && make get_tools check get_vendor_deps install test_integrations
post:
- cd "$REPO" && bash <(curl -s https://codecov.io/bash) -f coverage.txt
- cd "$REPO" && mv coverage.txt "${CIRCLE_ARTIFACTS}"

+ 10
- 10
cmd/abci-cli/abci-cli.go View File

@ -92,6 +92,7 @@ type response struct {
// generic abci response
Data []byte
Code uint32
Info string
Log string
Query *queryResponse
@ -184,7 +185,7 @@ var consoleCmd = &cobra.Command{
Use: "console",
Short: "start an interactive ABCI console for multiple commands",
Long: `start an interactive ABCI console for multiple commands
This command opens an interactive console for running any of the other commands
without opening a new connection each time
`,
@ -519,14 +520,11 @@ func cmdSetOption(cmd *cobra.Command, args []string) error {
}
key, val := args[0], args[1]
res, err := client.SetOptionSync(types.RequestSetOption{key, val})
_, err := client.SetOptionSync(types.RequestSetOption{key, val})
if err != nil {
return err
}
printResponse(cmd, args, response{
Code: res.Code,
Log: res.Log,
})
printResponse(cmd, args, response{Log: "OK (SetOption doesn't return anything.)"}) // NOTE: Nothing to show...
return nil
}
@ -550,6 +548,7 @@ func cmdDeliverTx(cmd *cobra.Command, args []string) error {
printResponse(cmd, args, response{
Code: res.Code,
Data: res.Data,
Info: res.Info,
Log: res.Log,
})
return nil
@ -560,7 +559,7 @@ func cmdCheckTx(cmd *cobra.Command, args []string) error {
if len(args) == 0 {
printResponse(cmd, args, response{
Code: codeBad,
Log: "want the tx",
Info: "want the tx",
})
return nil
}
@ -575,6 +574,7 @@ func cmdCheckTx(cmd *cobra.Command, args []string) error {
printResponse(cmd, args, response{
Code: res.Code,
Data: res.Data,
Info: res.Info,
Log: res.Log,
})
return nil
@ -587,9 +587,7 @@ func cmdCommit(cmd *cobra.Command, args []string) error {
return err
}
printResponse(cmd, args, response{
Code: res.Code,
Data: res.Data,
Log: res.Log,
})
return nil
}
@ -599,7 +597,8 @@ func cmdQuery(cmd *cobra.Command, args []string) error {
if len(args) == 0 {
printResponse(cmd, args, response{
Code: codeBad,
Log: "want the query",
Info: "want the query",
Log: "",
})
return nil
}
@ -619,6 +618,7 @@ func cmdQuery(cmd *cobra.Command, args []string) error {
}
printResponse(cmd, args, response{
Code: resQuery.Code,
Info: resQuery.Info,
Log: resQuery.Log,
Query: &queryResponse{
Key: resQuery.Key,


+ 0
- 2
example/code/code.go View File

@ -6,6 +6,4 @@ const (
CodeTypeEncodingError uint32 = 1
CodeTypeBadNonce uint32 = 2
CodeTypeUnauthorized uint32 = 3
CodeTypeBadOption uint32 = 101
)

+ 11
- 9
example/counter/counter.go View File

@ -30,15 +30,17 @@ func (app *CounterApplication) SetOption(req types.RequestSetOption) types.Respo
if key == "serial" && value == "on" {
app.serial = true
} else {
return types.ResponseSetOption{
Code: code.CodeTypeBadOption,
Log: cmn.Fmt("Unknown key (%s) or value (%s)", key, value),
}
/*
TODO Panic and have the ABCI server pass an exception.
The client can call SetOptionSync() and get an `error`.
return types.ResponseSetOption{
Error: cmn.Fmt("Unknown key (%s) or value (%s)", key, value),
}
*/
return types.ResponseSetOption{}
}
return types.ResponseSetOption{
Code: code.CodeTypeOK,
}
return types.ResponseSetOption{}
}
func (app *CounterApplication) DeliverTx(tx []byte) types.ResponseDeliverTx {
@ -83,11 +85,11 @@ func (app *CounterApplication) CheckTx(tx []byte) types.ResponseCheckTx {
func (app *CounterApplication) Commit() (resp types.ResponseCommit) {
app.hashCount++
if app.txCount == 0 {
return types.ResponseCommit{Code: code.CodeTypeOK}
return types.ResponseCommit{}
}
hash := make([]byte, 8)
binary.BigEndian.PutUint64(hash, uint64(app.txCount))
return types.ResponseCommit{Code: code.CodeTypeOK, Data: hash}
return types.ResponseCommit{Data: hash}
}
func (app *CounterApplication) Query(reqQuery types.RequestQuery) types.ResponseQuery {


+ 8
- 10
example/dummy/dummy.go View File

@ -6,8 +6,8 @@ import (
"github.com/tendermint/abci/example/code"
"github.com/tendermint/abci/types"
wire "github.com/tendermint/go-wire"
"github.com/tendermint/iavl"
cmn "github.com/tendermint/tmlibs/common"
dbm "github.com/tendermint/tmlibs/db"
)
@ -20,7 +20,7 @@ type DummyApplication struct {
}
func NewDummyApplication() *DummyApplication {
state := iavl.NewVersionedTree(0, dbm.NewMemDB())
state := iavl.NewVersionedTree(dbm.NewMemDB(), 0)
return &DummyApplication{state: state}
}
@ -39,9 +39,9 @@ func (app *DummyApplication) DeliverTx(tx []byte) types.ResponseDeliverTx {
}
app.state.Set(key, value)
tags := []*types.KVPair{
{Key: "app.creator", ValueType: types.KVPair_STRING, ValueString: "jae"},
{Key: "app.key", ValueType: types.KVPair_STRING, ValueString: string(key)},
tags := []cmn.KVPair{
{[]byte("app.creator"), []byte("jae")},
{[]byte("app.key"), key},
}
return types.ResponseDeliverTx{Code: code.CodeTypeOK, Tags: tags}
}
@ -56,16 +56,14 @@ func (app *DummyApplication) Commit() types.ResponseCommit {
var err error
if app.state.Size() > 0 {
// just add one more to height (kind of arbitrarily stupid)
height := app.state.LatestVersion() + 1
hash, err = app.state.SaveVersion(height)
hash, _, err = app.state.SaveVersion()
if err != nil {
// if this wasn't a dummy app, we'd do something smarter
panic(err)
}
}
return types.ResponseCommit{Code: code.CodeTypeOK, Data: hash}
return types.ResponseCommit{Data: hash}
}
func (app *DummyApplication) Query(reqQuery types.RequestQuery) (resQuery types.ResponseQuery) {
@ -78,7 +76,7 @@ func (app *DummyApplication) Query(reqQuery types.RequestQuery) (resQuery types.
resQuery.Index = -1 // TODO make Proof return index
resQuery.Key = reqQuery.Data
resQuery.Value = value
resQuery.Proof = wire.BinaryBytes(proof)
resQuery.Proof = proof.Bytes()
if value != nil {
resQuery.Log = "exists"
} else {


+ 13
- 13
example/dummy/dummy_test.go View File

@ -41,9 +41,9 @@ func testDummy(t *testing.T, app types.Application, tx []byte, key, value string
})
require.EqualValues(t, code.CodeTypeOK, resQuery.Code)
require.Equal(t, value, string(resQuery.Value))
proof, err := iavl.ReadKeyExistsProof(resQuery.Proof)
proof, err := iavl.ReadKeyProof(resQuery.Proof)
require.Nil(t, err)
err = proof.Verify([]byte(key), resQuery.Value, proof.RootHash)
err = proof.Verify([]byte(key), resQuery.Value, proof.Root())
require.Nil(t, err, "%+v", err) // NOTE: we have no way to verify the RootHash
}
@ -92,7 +92,7 @@ func TestPersistentDummyInfo(t *testing.T) {
// make and apply block
height = int64(1)
hash := []byte("foo")
header := &types.Header{
header := types.Header{
Height: int64(height),
}
dummy.BeginBlock(types.RequestBeginBlock{hash, header, nil, nil})
@ -124,11 +124,11 @@ func TestValUpdates(t *testing.T) {
vals1, vals2 := vals[:nInit], dummy.Validators()
valsEqual(t, vals1, vals2)
var v1, v2, v3 *types.Validator
var v1, v2, v3 types.Validator
// add some validators
v1, v2 = vals[nInit], vals[nInit+1]
diff := []*types.Validator{v1, v2}
diff := []types.Validator{v1, v2}
tx1 := MakeValSetChangeTx(v1.PubKey, v1.Power)
tx2 := MakeValSetChangeTx(v2.PubKey, v2.Power)
@ -142,7 +142,7 @@ func TestValUpdates(t *testing.T) {
v1.Power = 0
v2.Power = 0
v3.Power = 0
diff = []*types.Validator{v1, v2, v3}
diff = []types.Validator{v1, v2, v3}
tx1 = MakeValSetChangeTx(v1.PubKey, v1.Power)
tx2 = MakeValSetChangeTx(v2.PubKey, v2.Power)
tx3 := MakeValSetChangeTx(v3.PubKey, v3.Power)
@ -160,22 +160,22 @@ func TestValUpdates(t *testing.T) {
} else {
v1.Power = 5
}
diff = []*types.Validator{v1}
diff = []types.Validator{v1}
tx1 = MakeValSetChangeTx(v1.PubKey, v1.Power)
makeApplyBlock(t, dummy, 3, diff, tx1)
vals1 = append([]*types.Validator{v1}, vals1[1:]...)
vals1 = append([]types.Validator{v1}, vals1[1:]...)
vals2 = dummy.Validators()
valsEqual(t, vals1, vals2)
}
func makeApplyBlock(t *testing.T, dummy types.Application, heightInt int, diff []*types.Validator, txs ...[]byte) {
func makeApplyBlock(t *testing.T, dummy types.Application, heightInt int, diff []types.Validator, txs ...[]byte) {
// make and apply block
height := int64(heightInt)
hash := []byte("foo")
header := &types.Header{
header := types.Header{
Height: height,
}
@ -193,7 +193,7 @@ func makeApplyBlock(t *testing.T, dummy types.Application, heightInt int, diff [
}
// order doesn't matter
func valsEqual(t *testing.T, vals1, vals2 []*types.Validator) {
func valsEqual(t *testing.T, vals1, vals2 []types.Validator) {
if len(vals1) != len(vals2) {
t.Fatalf("vals dont match in len. got %d, expected %d", len(vals2), len(vals1))
}
@ -310,8 +310,8 @@ func testClient(t *testing.T, app abcicli.Client, tx []byte, key, value string)
require.Nil(t, err)
require.Equal(t, code.CodeTypeOK, resQuery.Code)
require.Equal(t, value, string(resQuery.Value))
proof, err := iavl.ReadKeyExistsProof(resQuery.Proof)
proof, err := iavl.ReadKeyProof(resQuery.Proof)
require.Nil(t, err)
err = proof.Verify([]byte(key), resQuery.Value, proof.RootHash)
err = proof.Verify([]byte(key), resQuery.Value, proof.Root())
require.Nil(t, err, "%+v", err) // NOTE: we have no way to verify the RootHash
}

+ 4
- 4
example/dummy/helpers.go View File

@ -8,18 +8,18 @@ import (
// RandVal creates one random validator, with a key derived
// from the input value
func RandVal(i int) *types.Validator {
func RandVal(i int) types.Validator {
pubkey := crypto.GenPrivKeyEd25519FromSecret([]byte(cmn.Fmt("test%d", i))).PubKey().Bytes()
power := cmn.RandUint16() + 1
return &types.Validator{pubkey, int64(power)}
return types.Validator{pubkey, int64(power)}
}
// RandVals returns a list of cnt validators for initializing
// the application. Note that the keys are deterministically
// derived from the index in the array, while the power is
// random (Change this if not desired)
func RandVals(cnt int) []*types.Validator {
res := make([]*types.Validator, cnt)
func RandVals(cnt int) []types.Validator {
res := make([]types.Validator, cnt)
for i := 0; i < cnt; i++ {
res[i] = RandVal(i)
}


+ 12
- 13
example/dummy/persistent_dummy.go View File

@ -28,7 +28,7 @@ type PersistentDummyApplication struct {
app *DummyApplication
// validator set
ValUpdates []*types.Validator
ValUpdates []types.Validator
logger log.Logger
}
@ -40,7 +40,7 @@ func NewPersistentDummyApplication(dbDir string) *PersistentDummyApplication {
panic(err)
}
stateTree := iavl.NewVersionedTree(500, db)
stateTree := iavl.NewVersionedTree(db, 500)
stateTree.Load()
return &PersistentDummyApplication{
@ -55,8 +55,7 @@ func (app *PersistentDummyApplication) SetLogger(l log.Logger) {
func (app *PersistentDummyApplication) Info(req types.RequestInfo) types.ResponseInfo {
res := app.app.Info(req)
var latestVersion uint64 = app.app.state.LatestVersion() // TODO: change to int64
res.LastBlockHeight = int64(latestVersion)
res.LastBlockHeight = app.app.state.Version64()
res.LastBlockAppHash = app.app.state.Hash()
return res
}
@ -87,18 +86,18 @@ func (app *PersistentDummyApplication) CheckTx(tx []byte) types.ResponseCheckTx
func (app *PersistentDummyApplication) Commit() types.ResponseCommit {
// Save a new version for next height
height := app.app.state.LatestVersion() + 1
var height int64
var appHash []byte
var err error
appHash, err = app.app.state.SaveVersion(height)
appHash, height, err = app.app.state.SaveVersion()
if err != nil {
// if this wasn't a dummy app, we'd do something smarter
panic(err)
}
app.logger.Info("Commit block", "height", height, "root", appHash)
return types.ResponseCommit{Code: code.CodeTypeOK, Data: appHash}
return types.ResponseCommit{Data: appHash}
}
func (app *PersistentDummyApplication) Query(reqQuery types.RequestQuery) types.ResponseQuery {
@ -119,7 +118,7 @@ func (app *PersistentDummyApplication) InitChain(req types.RequestInitChain) typ
// Track the block hash and header information
func (app *PersistentDummyApplication) BeginBlock(req types.RequestBeginBlock) types.ResponseBeginBlock {
// reset valset changes
app.ValUpdates = make([]*types.Validator, 0)
app.ValUpdates = make([]types.Validator, 0)
return types.ResponseBeginBlock{}
}
@ -131,7 +130,7 @@ func (app *PersistentDummyApplication) EndBlock(req types.RequestEndBlock) types
//---------------------------------------------
// update validators
func (app *PersistentDummyApplication) Validators() (validators []*types.Validator) {
func (app *PersistentDummyApplication) Validators() (validators []types.Validator) {
app.app.state.Iterate(func(key, value []byte) bool {
if isValidatorTx(key) {
validator := new(types.Validator)
@ -139,7 +138,7 @@ func (app *PersistentDummyApplication) Validators() (validators []*types.Validat
if err != nil {
panic(err)
}
validators = append(validators, validator)
validators = append(validators, *validator)
}
return false
})
@ -190,11 +189,11 @@ func (app *PersistentDummyApplication) execValidatorTx(tx []byte) types.Response
}
// update
return app.updateValidator(&types.Validator{pubkey, power})
return app.updateValidator(types.Validator{pubkey, power})
}
// add, update, or remove a validator
func (app *PersistentDummyApplication) updateValidator(v *types.Validator) types.ResponseDeliverTx {
func (app *PersistentDummyApplication) updateValidator(v types.Validator) types.ResponseDeliverTx {
key := []byte("val:" + string(v.PubKey))
if v.Power == 0 {
// remove validator
@ -207,7 +206,7 @@ func (app *PersistentDummyApplication) updateValidator(v *types.Validator) types
} else {
// add or update validator
value := bytes.NewBuffer(make([]byte, 0))
if err := types.WriteMessage(v, value); err != nil {
if err := types.WriteMessage(&v, value); err != nil {
return types.ResponseDeliverTx{
Code: code.CodeTypeEncodingError,
Log: fmt.Sprintf("Error encoding validator: %v", err)}


+ 21
- 26
glide.lock View File

@ -1,34 +1,31 @@
hash: 6cb2c869c8ce7d9e43b1e8930b9b1bc974ebb3d36d4b704fc78b77efba956a13
updated: 2017-11-30T17:08:29.176515576-05:00
hash: 1fbe2d780f4901d78d2e986a694e6335ae07715317c7d680db64e1d69f08aff7
updated: 2018-01-05T22:07:26.119496005-05:00
imports:
- name: github.com/btcsuite/btcd
version: 2e60448ffcc6bf78332d1fe590260095f554dd78
version: c7588cbf7690cd9f047a28efa2dcd8f2435a4e5e
subpackages:
- btcec
- name: github.com/go-kit/kit
version: e3b2152e0063c5f05efea89ecbe297852af2a92d
version: e2b298466b32c7cd5579a9b9b07e968fc9d9452c
subpackages:
- log
- log/level
- log/term
- name: github.com/go-logfmt/logfmt
version: 390ab7935ee28ec6b286364bba9b4dd6410cb3d5
- name: github.com/go-playground/locales
version: e4cbcb5d0652150d40ad0646651076b6bd2be4f6
subpackages:
- currency
- name: github.com/go-playground/universal-translator
version: 71201497bace774495daed26a3874fd339e0b538
- name: github.com/go-stack/stack
version: 259ab82a6cad3992b4e21ff5cac294ccb06474bc
version: 817915b46b97fd7bb80e8ab6b69f01a53ac3eebf
- name: github.com/gogo/protobuf
version: 342cbe0a04158f6dcb03ca0079991a51a4248c02
subpackages:
- gogoproto
- jsonpb
- proto
- protoc-gen-gogo/descriptor
- sortkeys
- types
- name: github.com/golang/protobuf
version: 1e59b77b52bf8e4b449a57e6f79f21226d571845
version: 1643683e1b54a9e88ad26d98f81400c8c9d9f4f9
subpackages:
- proto
- ptypes
@ -44,13 +41,13 @@ imports:
- name: github.com/kr/logfmt
version: b84e30acd515aadc4b783ad4ff83aff3299bdfe0
- name: github.com/pkg/errors
version: f15c970de5b76fac0b59abb32d62c17cc7bed265
version: 645ef00459ed84a119197bfb8d8205042c6df63d
- name: github.com/spf13/cobra
version: 7b2c5ac9fc04fc5efafb60700713d4fa609b777b
- name: github.com/spf13/pflag
version: 4c012f6dcd9546820e378d0bdda4d8fc772cdfea
version: 97afa5e7ca8a08a383cb259e06636b5e2cc7897f
- name: github.com/syndtr/goleveldb
version: adf24ef3f94bd13ec4163060b21a5678f22b429b
version: b89cc31ef7977104127d34c1bd31ebd1a9db2199
subpackages:
- leveldb
- leveldb/cache
@ -65,27 +62,27 @@ imports:
- leveldb/table
- leveldb/util
- name: github.com/tendermint/ed25519
version: d8387025d2b9d158cf4efb07e7ebf814bcce2057
version: 1f52c6f8b8a5c7908aff4497c186af344b428925
subpackages:
- edwards25519
- extra25519
- name: github.com/tendermint/go-crypto
version: b4f04f196cd719660e43b91202cd60d9a95b1837
version: 3ebe3250ff67e8af92f00ec3dc427c14a7eb1066
- name: github.com/tendermint/go-wire
version: 5ab49b4c6ad674da6b81442911cf713ef0afb544
version: 27be46e25124ddf775e23317a83647ce62a93f6b
subpackages:
- data
- name: github.com/tendermint/iavl
version: 595f3dcd5b6cd4a292e90757ae6d367fd7a6e653
version: ed0bbf0acc51e75f72c76099293113c2d67199b9
- name: github.com/tendermint/tmlibs
version: 21fb7819891997c96838308b4eba5a50b07ff03f
version: 1afc0340069d38e71f137bc9e4fa4fadf12f76df
subpackages:
- common
- db
- log
- process
- name: golang.org/x/crypto
version: 94eea52f7b742c7cbe0b03b22f0c4c8631ece122
version: edd5e9b0879d13ee6970a50153d85b8fec9f7686
subpackages:
- nacl/secretbox
- openpgp/armor
@ -94,7 +91,7 @@ imports:
- ripemd160
- salsa20/salsa
- name: golang.org/x/net
version: a8b9294777976932365dabb6640cf1468d95c70f
version: cd69bc3fc700721b709c3a59e16e24c67b58f6ff
subpackages:
- context
- http2
@ -104,14 +101,14 @@ imports:
- lex/httplex
- trace
- name: golang.org/x/text
version: 75cc3cad82b5f47d3fb229ddda8c5167da14f294
version: c01e4764d870b77f8abe5096ee19ad20d80e8075
subpackages:
- secure/bidirule
- transform
- unicode/bidi
- unicode/norm
- name: google.golang.org/genproto
version: 7f0da29060c682909f650ad8ed4e515bd74fa12a
version: f676e0f3ac6395ff1a529ae59a6670878a8371a6
subpackages:
- googleapis/rpc/status
- name: google.golang.org/grpc
@ -133,8 +130,6 @@ imports:
- status
- tap
- transport
- name: gopkg.in/go-playground/validator.v9
version: 61caf9d3038e1af346dbf5c2e16f6678e1548364
testImports:
- name: github.com/davecgh/go-spew
version: 04cdfd42973bb9c8589fd6a731800cf222fde1a9


+ 1
- 1
glide.yaml View File

@ -13,7 +13,7 @@ import:
subpackages:
- data
- package: github.com/tendermint/iavl
version: develop
version: sdk2
- package: github.com/tendermint/tmlibs
version: develop
subpackages:


+ 13
- 13
scripts/dist_build.sh View File

@ -19,7 +19,7 @@ XC_ARCH=${XC_ARCH:-"386 amd64 arm"}
XC_OS=${XC_OS:-"solaris darwin freebsd linux windows"}
# Make sure build tools are available.
make tools
make get_tools
# Get VENDORED dependencies
make get_vendor_deps
@ -29,23 +29,23 @@ BINARY="abci-cli"
# Build!
echo "==> Building..."
"$(which gox)" \
-os="${XC_OS}" \
-arch="${XC_ARCH}" \
-osarch="!darwin/arm !solaris/amd64 !freebsd/amd64" \
-ldflags "-X ${GIT_IMPORT}.GitCommit='${GIT_COMMIT}' -X ${GIT_IMPORT}.GitDescribe='${GIT_DESCRIBE}'" \
-output "build/pkg/{{.OS}}_{{.Arch}}/$BINARY" \
-tags="${BUILD_TAGS}" \
github.com/tendermint/abci/cmd/$BINARY
-os="${XC_OS}" \
-arch="${XC_ARCH}" \
-osarch="!darwin/arm !solaris/amd64 !freebsd/amd64" \
-ldflags "-X ${GIT_IMPORT}.GitCommit='${GIT_COMMIT}' -X ${GIT_IMPORT}.GitDescribe='${GIT_DESCRIBE}'" \
-output "build/pkg/{{.OS}}_{{.Arch}}/$BINARY" \
-tags="${BUILD_TAGS}" \
github.com/tendermint/abci/cmd/$BINARY
# Zip all the files.
echo "==> Packaging..."
for PLATFORM in $(find ./build/pkg -mindepth 1 -maxdepth 1 -type d); do
OSARCH=$(basename "${PLATFORM}")
echo "--> ${OSARCH}"
OSARCH=$(basename "${PLATFORM}")
echo "--> ${OSARCH}"
pushd "$PLATFORM" >/dev/null 2>&1
zip "../${OSARCH}.zip" ./*
popd >/dev/null 2>&1
pushd "$PLATFORM" >/dev/null 2>&1
zip "../${OSARCH}.zip" ./*
popd >/dev/null 2>&1
done


+ 0
- 17
specification.rst View File

@ -1,23 +1,6 @@
Specification
=============
The `primary
specification <https://github.com/tendermint/abci/blob/master/types/types.proto>`__
is made using Protocol Buffers. To build it, run
::
make protoc
See ``protoc --help`` and `the Protocol Buffers
site <https://developers.google.com/protocol-buffers/>`__ for details on
compiling for other languages. Note we also include a
`GRPC <http://www.grpc.io/docs>`__ service definition.
For the specification as an interface in Go, see the
`types/application.go
file <https://github.com/tendermint/abci/blob/master/types/application.go>`__.
Message Types
~~~~~~~~~~~~~


+ 7
- 10
tests/server/client.go View File

@ -13,11 +13,11 @@ import (
func InitChain(client abcicli.Client) error {
total := 10
vals := make([]*types.Validator, total)
vals := make([]types.Validator, total)
for i := 0; i < total; i++ {
pubkey := crypto.GenPrivKeyEd25519FromSecret([]byte(cmn.Fmt("test%d", i))).PubKey().Bytes()
power := cmn.RandInt()
vals[i] = &types.Validator{pubkey, int64(power)}
vals[i] = types.Validator{pubkey, int64(power)}
}
_, err := client.InitChainSync(types.RequestInitChain{Validators: vals})
if err != nil {
@ -29,12 +29,10 @@ func InitChain(client abcicli.Client) error {
}
func SetOption(client abcicli.Client, key, value string) error {
res, err := client.SetOptionSync(types.RequestSetOption{Key: key, Value: value})
log := res.GetLog()
_, err := client.SetOptionSync(types.RequestSetOption{Key: key, Value: value})
if err != nil {
fmt.Println("Failed test: SetOption")
fmt.Printf("setting %v=%v: \nlog: %v\n", key, value, log)
fmt.Println("Failed test: SetOption")
fmt.Printf("error while setting %v=%v: \nerror: %v\n", key, value)
return err
}
fmt.Println("Passed test: SetOption")
@ -43,16 +41,15 @@ func SetOption(client abcicli.Client, key, value string) error {
func Commit(client abcicli.Client, hashExp []byte) error {
res, err := client.CommitSync()
_, data := res.Code, res.Data
data := res.Data
if err != nil {
fmt.Println("Failed test: Commit")
fmt.Printf("committing %v\nlog: %v\n", res.GetLog(), err)
fmt.Printf("error while committing: %v\n", err)
return err
}
if !bytes.Equal(data, hashExp) {
fmt.Println("Failed test: Commit")
fmt.Printf("Commit hash was unexpected. Got %X expected %X\n",
data.Bytes(), hashExp)
fmt.Printf("Commit hash was unexpected. Got %X expected %X\n", data, hashExp)
return errors.New("CommitTx failed")
}
fmt.Println("Passed test: Commit")


+ 3
- 1
tests/test.sh View File

@ -5,5 +5,7 @@ set -e
bash tests/test_app/test.sh
# test the cli against the examples in the tutorial at tendermint.com
bash tests/test_cli/test.sh
# TODO: make these less fragile
# bash tests/test_cli/test.sh

+ 0
- 3
tests/test_app/app.go View File

@ -37,9 +37,6 @@ func commit(client abcicli.Client, hashExp []byte) {
if err != nil {
panicf("client error: %v", err)
}
if res.IsErr() {
panicf("committing err %v\n", res)
}
if !bytes.Equal(res.Data, hashExp) {
panicf("Commit hash was unexpected. Got %X expected %X", res.Data, hashExp)
}


+ 23
- 23
tests/test_cli/test.sh View File

@ -10,29 +10,29 @@ DIR="$( cd -P "$( dirname "$SOURCE" )/../.." && pwd )"
cd "$DIR" || exit
function testExample() {
N=$1
INPUT=$2
APP="$3 $4"
echo "Example $N: $APP"
$APP &> /dev/null &
sleep 2
abci-cli --log_level=error --verbose batch < "$INPUT" > "${INPUT}.out.new"
killall "$3"
pre=$(sha256sum < "${INPUT}.out")
post=$(sha256sum < "${INPUT}.out.new")
if [[ "$pre" != "$post" ]]; then
echo "You broke the tutorial"
echo "Got:"
cat "${INPUT}.out.new"
echo "Expected:"
cat "${INPUT}.out"
exit 1
fi
rm "${INPUT}".out.new
N=$1
INPUT=$2
APP="$3 $4"
echo "Example $N: $APP"
$APP &> /dev/null &
sleep 2
abci-cli --log_level=error --verbose batch < "$INPUT" > "${INPUT}.out.new"
killall "$3"
pre=$(shasum < "${INPUT}.out")
post=$(shasum < "${INPUT}.out.new")
if [[ "$pre" != "$post" ]]; then
echo "You broke the tutorial"
echo "Got:"
cat "${INPUT}.out.new"
echo "Expected:"
cat "${INPUT}.out"
exit 1
fi
rm "${INPUT}".out.new
}
testExample 1 tests/test_cli/ex1.abci abci-cli dummy


+ 2
- 2
types/application.go View File

@ -42,7 +42,7 @@ func (BaseApplication) Info(req RequestInfo) ResponseInfo {
}
func (BaseApplication) SetOption(req RequestSetOption) ResponseSetOption {
return ResponseSetOption{Code: CodeTypeOK}
return ResponseSetOption{}
}
func (BaseApplication) DeliverTx(tx []byte) ResponseDeliverTx {
@ -54,7 +54,7 @@ func (BaseApplication) CheckTx(tx []byte) ResponseCheckTx {
}
func (BaseApplication) Commit() ResponseCommit {
return ResponseCommit{Code: CodeTypeOK}
return ResponseCommit{}
}
func (BaseApplication) Query(req RequestQuery) ResponseQuery {


+ 7
- 5
types/messages_test.go View File

@ -8,18 +8,20 @@ import (
"github.com/gogo/protobuf/proto"
"github.com/stretchr/testify/assert"
cmn "github.com/tendermint/tmlibs/common"
)
func TestMarshalJSON(t *testing.T) {
b, err := json.Marshal(&ResponseDeliverTx{})
assert.Nil(t, err)
assert.True(t, strings.Contains(string(b), "code"))
// Do not include empty fields.
assert.False(t, strings.Contains(string(b), "code"))
r1 := ResponseCheckTx{
Code: 1,
Data: []byte("hello"),
Gas: 43,
Fee: 12,
Code: 1,
Data: []byte("hello"),
GasWanted: 43,
Fee: cmn.KI64Pair{[]byte("pho"), 12},
}
b, err = json.Marshal(&r1)
assert.Nil(t, err)


+ 1
- 36
types/result.go View File

@ -3,7 +3,6 @@ package types
import (
"bytes"
"encoding/json"
"fmt"
"github.com/gogo/protobuf/jsonpb"
)
@ -22,11 +21,6 @@ func (r ResponseCheckTx) IsErr() bool {
return r.Code != CodeTypeOK
}
// Error implements error interface by formatting response as string.
func (r ResponseCheckTx) Error() string {
return fmtError(r.Code, r.Log)
}
// IsOK returns true if Code is OK.
func (r ResponseDeliverTx) IsOK() bool {
return r.Code == CodeTypeOK
@ -37,26 +31,6 @@ func (r ResponseDeliverTx) IsErr() bool {
return r.Code != CodeTypeOK
}
// Error implements error interface by formatting response as string.
func (r ResponseDeliverTx) Error() string {
return fmtError(r.Code, r.Log)
}
// IsOK returns true if Code is OK.
func (r ResponseCommit) IsOK() bool {
return r.Code == CodeTypeOK
}
// IsErr returns true if Code is something other than OK.
func (r ResponseCommit) IsErr() bool {
return r.Code != CodeTypeOK
}
// Error implements error interface by formatting response as string.
func (r ResponseCommit) Error() string {
return fmtError(r.Code, r.Log)
}
// IsOK returns true if Code is OK.
func (r ResponseQuery) IsOK() bool {
return r.Code == CodeTypeOK
@ -67,15 +41,6 @@ func (r ResponseQuery) IsErr() bool {
return r.Code != CodeTypeOK
}
// Error implements error interface by formatting response as string.
func (r ResponseQuery) Error() string {
return fmtError(r.Code, r.Log)
}
func fmtError(code uint32, log string) string {
return fmt.Sprintf("Error code (%d): %s", code, log)
}
//---------------------------------------------------------------------------
// override JSON marshalling so we dont emit defaults (ie. disable omitempty)
// note we need Unmarshal functions too because protobuf had the bright idea
@ -84,7 +49,7 @@ func fmtError(code uint32, log string) string {
var (
jsonpbMarshaller = jsonpb.Marshaler{
EnumsAsInts: true,
EmitDefaults: true,
EmitDefaults: false,
}
jsonpbUnmarshaller = jsonpb.Unmarshaler{}
)


+ 0
- 74
types/result_test.go View File

@ -1,74 +0,0 @@
package types
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestResponseQuery(t *testing.T) {
res := ResponseQuery{
Code: CodeTypeOK,
Index: 0,
Key: []byte("hello"),
Value: []byte("world"),
Height: 1,
}
assert.False(t, res.IsErr())
res = ResponseQuery{
Code: 1,
Index: 0,
Key: []byte("hello"),
Value: []byte("world"),
Height: 1,
Log: "bad",
}
assert.True(t, res.IsErr())
assert.Equal(t, "Error code (1): bad", res.Error())
}
func TestResponseDeliverTx(t *testing.T) {
res := ResponseDeliverTx{
Code: CodeTypeOK,
Data: []byte("Victor Mancha"),
}
assert.False(t, res.IsErr())
res = ResponseDeliverTx{
Code: 1,
Log: "bad",
}
assert.True(t, res.IsErr())
assert.Equal(t, "Error code (1): bad", res.Error())
}
func TestResponseCheckTx(t *testing.T) {
res := ResponseCheckTx{
Code: CodeTypeOK,
Data: []byte("Talos"),
}
assert.False(t, res.IsErr())
res = ResponseCheckTx{
Code: 1,
Log: "bad",
}
assert.True(t, res.IsErr())
assert.Equal(t, "Error code (1): bad", res.Error())
}
func TestResponseCommit(t *testing.T) {
res := ResponseCommit{
Code: CodeTypeOK,
Data: []byte("Old Lace"),
}
assert.False(t, res.IsErr())
res = ResponseCommit{
Code: 1,
Log: "bad",
}
assert.True(t, res.IsErr())
assert.Equal(t, "Error code (1): bad", res.Error())
}

+ 267
- 245
types/types.pb.go View File

@ -42,7 +42,6 @@ It has these top-level messages:
PartSetHeader
Validator
Evidence
KVPair
*/
//nolint: gas
package types
@ -51,8 +50,7 @@ import proto "github.com/gogo/protobuf/proto"
import fmt "fmt"
import math "math"
import _ "github.com/gogo/protobuf/gogoproto"
import github_com_tendermint_go_wire_data "github.com/tendermint/go-wire/data"
import common "github.com/tendermint/tmlibs/common"
import context "golang.org/x/net/context"
import grpc "google.golang.org/grpc"
@ -68,27 +66,6 @@ var _ = math.Inf
// proto package needs to be updated.
const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
type KVPair_Type int32
const (
KVPair_STRING KVPair_Type = 0
KVPair_INT KVPair_Type = 1
)
var KVPair_Type_name = map[int32]string{
0: "STRING",
1: "INT",
}
var KVPair_Type_value = map[string]int32{
"STRING": 0,
"INT": 1,
}
func (x KVPair_Type) String() string {
return proto.EnumName(KVPair_Type_name, int32(x))
}
func (KVPair_Type) EnumDescriptor() ([]byte, []int) { return fileDescriptorTypes, []int{34, 0} }
type Request struct {
// Types that are valid to be assigned to Value:
// *Request_Echo
@ -529,6 +506,7 @@ func (m *RequestInfo) GetVersion() string {
return ""
}
// nondeterministic
type RequestSetOption struct {
Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
@ -554,7 +532,7 @@ func (m *RequestSetOption) GetValue() string {
}
type RequestInitChain struct {
Validators []*Validator `protobuf:"bytes,1,rep,name=validators" json:"validators,omitempty"`
Validators []Validator `protobuf:"bytes,1,rep,name=validators" json:"validators"`
}
func (m *RequestInitChain) Reset() { *m = RequestInitChain{} }
@ -562,7 +540,7 @@ func (m *RequestInitChain) String() string { return proto.CompactText
func (*RequestInitChain) ProtoMessage() {}
func (*RequestInitChain) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{5} }
func (m *RequestInitChain) GetValidators() []*Validator {
func (m *RequestInitChain) GetValidators() []Validator {
if m != nil {
return m.Validators
}
@ -610,10 +588,10 @@ func (m *RequestQuery) GetProve() bool {
}
type RequestBeginBlock struct {
Hash []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"`
Header *Header `protobuf:"bytes,2,opt,name=header" json:"header,omitempty"`
AbsentValidators []int32 `protobuf:"varint,3,rep,packed,name=absent_validators,json=absentValidators" json:"absent_validators,omitempty"`
ByzantineValidators []*Evidence `protobuf:"bytes,4,rep,name=byzantine_validators,json=byzantineValidators" json:"byzantine_validators,omitempty"`
Hash []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"`
Header Header `protobuf:"bytes,2,opt,name=header" json:"header"`
AbsentValidators []int32 `protobuf:"varint,3,rep,packed,name=absent_validators,json=absentValidators" json:"absent_validators,omitempty"`
ByzantineValidators []Evidence `protobuf:"bytes,4,rep,name=byzantine_validators,json=byzantineValidators" json:"byzantine_validators"`
}
func (m *RequestBeginBlock) Reset() { *m = RequestBeginBlock{} }
@ -628,11 +606,11 @@ func (m *RequestBeginBlock) GetHash() []byte {
return nil
}
func (m *RequestBeginBlock) GetHeader() *Header {
func (m *RequestBeginBlock) GetHeader() Header {
if m != nil {
return m.Header
}
return nil
return Header{}
}
func (m *RequestBeginBlock) GetAbsentValidators() []int32 {
@ -642,7 +620,7 @@ func (m *RequestBeginBlock) GetAbsentValidators() []int32 {
return nil
}
func (m *RequestBeginBlock) GetByzantineValidators() []*Evidence {
func (m *RequestBeginBlock) GetByzantineValidators() []Evidence {
if m != nil {
return m.ByzantineValidators
}
@ -1136,6 +1114,7 @@ func _Response_OneofSizer(msg proto.Message) (n int) {
return n
}
// nondeterministic
type ResponseException struct {
Error string `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"`
}
@ -1216,9 +1195,12 @@ func (m *ResponseInfo) GetLastBlockAppHash() []byte {
return nil
}
// nondeterministic
type ResponseSetOption struct {
Code uint32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
Log string `protobuf:"bytes,2,opt,name=log,proto3" json:"log,omitempty"`
// bytes data = 2;
Log string `protobuf:"bytes,3,opt,name=log,proto3" json:"log,omitempty"`
Info string `protobuf:"bytes,4,opt,name=info,proto3" json:"info,omitempty"`
}
func (m *ResponseSetOption) Reset() { *m = ResponseSetOption{} }
@ -1240,6 +1222,13 @@ func (m *ResponseSetOption) GetLog() string {
return ""
}
func (m *ResponseSetOption) GetInfo() string {
if m != nil {
return m.Info
}
return ""
}
type ResponseInitChain struct {
}
@ -1249,13 +1238,15 @@ func (*ResponseInitChain) ProtoMessage() {}
func (*ResponseInitChain) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{18} }
type ResponseQuery struct {
Code uint32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
Index int64 `protobuf:"varint,2,opt,name=index,proto3" json:"index,omitempty"`
Key github_com_tendermint_go_wire_data.Bytes `protobuf:"bytes,3,opt,name=key,proto3,customtype=github.com/tendermint/go-wire/data.Bytes" json:"key"`
Value github_com_tendermint_go_wire_data.Bytes `protobuf:"bytes,4,opt,name=value,proto3,customtype=github.com/tendermint/go-wire/data.Bytes" json:"value"`
Proof github_com_tendermint_go_wire_data.Bytes `protobuf:"bytes,5,opt,name=proof,proto3,customtype=github.com/tendermint/go-wire/data.Bytes" json:"proof"`
Height int64 `protobuf:"varint,6,opt,name=height,proto3" json:"height,omitempty"`
Log string `protobuf:"bytes,7,opt,name=log,proto3" json:"log,omitempty"`
Code uint32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
// bytes data = 2; // use "value" instead.
Log string `protobuf:"bytes,3,opt,name=log,proto3" json:"log,omitempty"`
Info string `protobuf:"bytes,4,opt,name=info,proto3" json:"info,omitempty"`
Index int64 `protobuf:"varint,5,opt,name=index,proto3" json:"index,omitempty"`
Key []byte `protobuf:"bytes,6,opt,name=key,proto3" json:"key,omitempty"`
Value []byte `protobuf:"bytes,7,opt,name=value,proto3" json:"value,omitempty"`
Proof []byte `protobuf:"bytes,8,opt,name=proof,proto3" json:"proof,omitempty"`
Height int64 `protobuf:"varint,9,opt,name=height,proto3" json:"height,omitempty"`
}
func (m *ResponseQuery) Reset() { *m = ResponseQuery{} }
@ -1270,6 +1261,20 @@ func (m *ResponseQuery) GetCode() uint32 {
return 0
}
func (m *ResponseQuery) GetLog() string {
if m != nil {
return m.Log
}
return ""
}
func (m *ResponseQuery) GetInfo() string {
if m != nil {
return m.Info
}
return ""
}
func (m *ResponseQuery) GetIndex() int64 {
if m != nil {
return m.Index
@ -1277,18 +1282,32 @@ func (m *ResponseQuery) GetIndex() int64 {
return 0
}
func (m *ResponseQuery) GetHeight() int64 {
func (m *ResponseQuery) GetKey() []byte {
if m != nil {
return m.Height
return m.Key
}
return 0
return nil
}
func (m *ResponseQuery) GetLog() string {
func (m *ResponseQuery) GetValue() []byte {
if m != nil {
return m.Log
return m.Value
}
return ""
return nil
}
func (m *ResponseQuery) GetProof() []byte {
if m != nil {
return m.Proof
}
return nil
}
func (m *ResponseQuery) GetHeight() int64 {
if m != nil {
return m.Height
}
return 0
}
type ResponseBeginBlock struct {
@ -1300,11 +1319,14 @@ func (*ResponseBeginBlock) ProtoMessage() {}
func (*ResponseBeginBlock) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{20} }
type ResponseCheckTx struct {
Code uint32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
Data github_com_tendermint_go_wire_data.Bytes `protobuf:"bytes,2,opt,name=data,proto3,customtype=github.com/tendermint/go-wire/data.Bytes" json:"data"`
Log string `protobuf:"bytes,3,opt,name=log,proto3" json:"log,omitempty"`
Gas int64 `protobuf:"varint,4,opt,name=gas,proto3" json:"gas,omitempty"`
Fee int64 `protobuf:"varint,5,opt,name=fee,proto3" json:"fee,omitempty"`
Code uint32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
Log string `protobuf:"bytes,3,opt,name=log,proto3" json:"log,omitempty"`
Info string `protobuf:"bytes,4,opt,name=info,proto3" json:"info,omitempty"`
GasWanted int64 `protobuf:"varint,5,opt,name=gas_wanted,json=gasWanted,proto3" json:"gas_wanted,omitempty"`
// int64 gas_used = 6;
Tags []common.KVPair `protobuf:"bytes,7,rep,name=tags" json:"tags,omitempty"`
Fee common.KI64Pair `protobuf:"bytes,8,opt,name=fee" json:"fee"`
}
func (m *ResponseCheckTx) Reset() { *m = ResponseCheckTx{} }
@ -1319,6 +1341,13 @@ func (m *ResponseCheckTx) GetCode() uint32 {
return 0
}
func (m *ResponseCheckTx) GetData() []byte {
if m != nil {
return m.Data
}
return nil
}
func (m *ResponseCheckTx) GetLog() string {
if m != nil {
return m.Log
@ -1326,25 +1355,42 @@ func (m *ResponseCheckTx) GetLog() string {
return ""
}
func (m *ResponseCheckTx) GetGas() int64 {
func (m *ResponseCheckTx) GetInfo() string {
if m != nil {
return m.Gas
return m.Info
}
return ""
}
func (m *ResponseCheckTx) GetGasWanted() int64 {
if m != nil {
return m.GasWanted
}
return 0
}
func (m *ResponseCheckTx) GetFee() int64 {
func (m *ResponseCheckTx) GetTags() []common.KVPair {
if m != nil {
return m.Tags
}
return nil
}
func (m *ResponseCheckTx) GetFee() common.KI64Pair {
if m != nil {
return m.Fee
}
return 0
return common.KI64Pair{}
}
type ResponseDeliverTx struct {
Code uint32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
Data github_com_tendermint_go_wire_data.Bytes `protobuf:"bytes,2,opt,name=data,proto3,customtype=github.com/tendermint/go-wire/data.Bytes" json:"data"`
Log string `protobuf:"bytes,3,opt,name=log,proto3" json:"log,omitempty"`
Tags []*KVPair `protobuf:"bytes,4,rep,name=tags" json:"tags,omitempty"`
Code uint32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
Log string `protobuf:"bytes,3,opt,name=log,proto3" json:"log,omitempty"`
Info string `protobuf:"bytes,4,opt,name=info,proto3" json:"info,omitempty"`
GasWanted int64 `protobuf:"varint,5,opt,name=gas_wanted,json=gasWanted,proto3" json:"gas_wanted,omitempty"`
GasUsed int64 `protobuf:"varint,6,opt,name=gas_used,json=gasUsed,proto3" json:"gas_used,omitempty"`
Tags []common.KVPair `protobuf:"bytes,7,rep,name=tags" json:"tags,omitempty"`
}
func (m *ResponseDeliverTx) Reset() { *m = ResponseDeliverTx{} }
@ -1359,6 +1405,13 @@ func (m *ResponseDeliverTx) GetCode() uint32 {
return 0
}
func (m *ResponseDeliverTx) GetData() []byte {
if m != nil {
return m.Data
}
return nil
}
func (m *ResponseDeliverTx) GetLog() string {
if m != nil {
return m.Log
@ -1366,7 +1419,28 @@ func (m *ResponseDeliverTx) GetLog() string {
return ""
}
func (m *ResponseDeliverTx) GetTags() []*KVPair {
func (m *ResponseDeliverTx) GetInfo() string {
if m != nil {
return m.Info
}
return ""
}
func (m *ResponseDeliverTx) GetGasWanted() int64 {
if m != nil {
return m.GasWanted
}
return 0
}
func (m *ResponseDeliverTx) GetGasUsed() int64 {
if m != nil {
return m.GasUsed
}
return 0
}
func (m *ResponseDeliverTx) GetTags() []common.KVPair {
if m != nil {
return m.Tags
}
@ -1374,7 +1448,7 @@ func (m *ResponseDeliverTx) GetTags() []*KVPair {
}
type ResponseEndBlock struct {
ValidatorUpdates []*Validator `protobuf:"bytes,1,rep,name=validator_updates,json=validatorUpdates" json:"validator_updates,omitempty"`
ValidatorUpdates []Validator `protobuf:"bytes,1,rep,name=validator_updates,json=validatorUpdates" json:"validator_updates"`
ConsensusParamUpdates *ConsensusParams `protobuf:"bytes,2,opt,name=consensus_param_updates,json=consensusParamUpdates" json:"consensus_param_updates,omitempty"`
}
@ -1383,7 +1457,7 @@ func (m *ResponseEndBlock) String() string { return proto.CompactText
func (*ResponseEndBlock) ProtoMessage() {}
func (*ResponseEndBlock) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{23} }
func (m *ResponseEndBlock) GetValidatorUpdates() []*Validator {
func (m *ResponseEndBlock) GetValidatorUpdates() []Validator {
if m != nil {
return m.ValidatorUpdates
}
@ -1398,9 +1472,8 @@ func (m *ResponseEndBlock) GetConsensusParamUpdates() *ConsensusParams {
}
type ResponseCommit struct {
Code uint32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
Data github_com_tendermint_go_wire_data.Bytes `protobuf:"bytes,2,opt,name=data,proto3,customtype=github.com/tendermint/go-wire/data.Bytes" json:"data"`
Log string `protobuf:"bytes,3,opt,name=log,proto3" json:"log,omitempty"`
// reserve 1
Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
}
func (m *ResponseCommit) Reset() { *m = ResponseCommit{} }
@ -1408,18 +1481,11 @@ func (m *ResponseCommit) String() string { return proto.CompactTextSt
func (*ResponseCommit) ProtoMessage() {}
func (*ResponseCommit) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{24} }
func (m *ResponseCommit) GetCode() uint32 {
func (m *ResponseCommit) GetData() []byte {
if m != nil {
return m.Code
}
return 0
}
func (m *ResponseCommit) GetLog() string {
if m != nil {
return m.Log
return m.Data
}
return ""
return nil
}
// ConsensusParams contains all consensus-relevant parameters
@ -1534,15 +1600,15 @@ func (m *BlockGossip) GetBlockPartSizeBytes() int32 {
}
type Header struct {
ChainID string `protobuf:"bytes,1,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"`
Height int64 `protobuf:"varint,2,opt,name=height,proto3" json:"height,omitempty"`
Time int64 `protobuf:"varint,3,opt,name=time,proto3" json:"time,omitempty"`
NumTxs int32 `protobuf:"varint,4,opt,name=num_txs,json=numTxs,proto3" json:"num_txs,omitempty"`
LastBlockID *BlockID `protobuf:"bytes,5,opt,name=last_block_id,json=lastBlockId" json:"last_block_id,omitempty"`
LastCommitHash []byte `protobuf:"bytes,6,opt,name=last_commit_hash,json=lastCommitHash,proto3" json:"last_commit_hash,omitempty"`
DataHash []byte `protobuf:"bytes,7,opt,name=data_hash,json=dataHash,proto3" json:"data_hash,omitempty"`
ValidatorsHash []byte `protobuf:"bytes,8,opt,name=validators_hash,json=validatorsHash,proto3" json:"validators_hash,omitempty"`
AppHash []byte `protobuf:"bytes,9,opt,name=app_hash,json=appHash,proto3" json:"app_hash,omitempty"`
ChainID string `protobuf:"bytes,1,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"`
Height int64 `protobuf:"varint,2,opt,name=height,proto3" json:"height,omitempty"`
Time int64 `protobuf:"varint,3,opt,name=time,proto3" json:"time,omitempty"`
NumTxs int32 `protobuf:"varint,4,opt,name=num_txs,json=numTxs,proto3" json:"num_txs,omitempty"`
LastBlockID BlockID `protobuf:"bytes,5,opt,name=last_block_id,json=lastBlockId" json:"last_block_id"`
LastCommitHash []byte `protobuf:"bytes,6,opt,name=last_commit_hash,json=lastCommitHash,proto3" json:"last_commit_hash,omitempty"`
DataHash []byte `protobuf:"bytes,7,opt,name=data_hash,json=dataHash,proto3" json:"data_hash,omitempty"`
ValidatorsHash []byte `protobuf:"bytes,8,opt,name=validators_hash,json=validatorsHash,proto3" json:"validators_hash,omitempty"`
AppHash []byte `protobuf:"bytes,9,opt,name=app_hash,json=appHash,proto3" json:"app_hash,omitempty"`
}
func (m *Header) Reset() { *m = Header{} }
@ -1578,11 +1644,11 @@ func (m *Header) GetNumTxs() int32 {
return 0
}
func (m *Header) GetLastBlockID() *BlockID {
func (m *Header) GetLastBlockID() BlockID {
if m != nil {
return m.LastBlockID
}
return nil
return BlockID{}
}
func (m *Header) GetLastCommitHash() []byte {
@ -1614,8 +1680,8 @@ func (m *Header) GetAppHash() []byte {
}
type BlockID struct {
Hash []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"`
Parts *PartSetHeader `protobuf:"bytes,2,opt,name=parts" json:"parts,omitempty"`
Hash []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"`
Parts PartSetHeader `protobuf:"bytes,2,opt,name=parts" json:"parts"`
}
func (m *BlockID) Reset() { *m = BlockID{} }
@ -1630,11 +1696,11 @@ func (m *BlockID) GetHash() []byte {
return nil
}
func (m *BlockID) GetParts() *PartSetHeader {
func (m *BlockID) GetParts() PartSetHeader {
if m != nil {
return m.Parts
}
return nil
return PartSetHeader{}
}
type PartSetHeader struct {
@ -1709,46 +1775,6 @@ func (m *Evidence) GetHeight() int64 {
return 0
}
type KVPair struct {
Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
ValueType KVPair_Type `protobuf:"varint,2,opt,name=value_type,json=valueType,proto3,enum=types.KVPair_Type" json:"value_type,omitempty"`
ValueString string `protobuf:"bytes,3,opt,name=value_string,json=valueString,proto3" json:"value_string,omitempty"`
ValueInt int64 `protobuf:"varint,4,opt,name=value_int,json=valueInt,proto3" json:"value_int,omitempty"`
}
func (m *KVPair) Reset() { *m = KVPair{} }
func (m *KVPair) String() string { return proto.CompactTextString(m) }
func (*KVPair) ProtoMessage() {}
func (*KVPair) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{34} }
func (m *KVPair) GetKey() string {
if m != nil {
return m.Key
}
return ""
}
func (m *KVPair) GetValueType() KVPair_Type {
if m != nil {
return m.ValueType
}
return KVPair_STRING
}
func (m *KVPair) GetValueString() string {
if m != nil {
return m.ValueString
}
return ""
}
func (m *KVPair) GetValueInt() int64 {
if m != nil {
return m.ValueInt
}
return 0
}
func init() {
proto.RegisterType((*Request)(nil), "types.Request")
proto.RegisterType((*RequestEcho)(nil), "types.RequestEcho")
@ -1784,8 +1810,6 @@ func init() {
proto.RegisterType((*PartSetHeader)(nil), "types.PartSetHeader")
proto.RegisterType((*Validator)(nil), "types.Validator")
proto.RegisterType((*Evidence)(nil), "types.Evidence")
proto.RegisterType((*KVPair)(nil), "types.KVPair")
proto.RegisterEnum("types.KVPair_Type", KVPair_Type_name, KVPair_Type_value)
}
// Reference imports to suppress errors if they are not otherwise used.
@ -2193,116 +2217,114 @@ var _ABCIApplication_serviceDesc = grpc.ServiceDesc{
func init() { proto.RegisterFile("types/types.proto", fileDescriptorTypes) }
var fileDescriptorTypes = []byte{
// 1766 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x58, 0xcd, 0x72, 0x1b, 0xc7,
0x11, 0x26, 0xfe, 0xb1, 0x0d, 0xfe, 0x80, 0x43, 0x4a, 0x82, 0xa1, 0x83, 0xe8, 0xad, 0x8a, 0x0d,
0xd9, 0x16, 0x69, 0xd3, 0xa5, 0x94, 0x68, 0x27, 0xae, 0x08, 0xa4, 0x2c, 0xa2, 0x9c, 0x52, 0x94,
0x15, 0xe3, 0x43, 0x2e, 0xa8, 0x01, 0x76, 0x08, 0x6c, 0x09, 0xd8, 0x5d, 0xef, 0x0e, 0x68, 0x50,
0x95, 0x47, 0xf0, 0x3d, 0xe7, 0xe4, 0x98, 0x17, 0xc8, 0x31, 0xa7, 0xa4, 0xf2, 0x0c, 0x39, 0xe8,
0xe0, 0x27, 0x49, 0x75, 0xcf, 0xec, 0x2f, 0x76, 0x53, 0x29, 0x1d, 0x74, 0x01, 0x66, 0xa6, 0x7f,
0xb6, 0xbb, 0xa7, 0xe7, 0xeb, 0x9e, 0x81, 0x7d, 0x79, 0xeb, 0x8b, 0xf0, 0x84, 0x7e, 0x8f, 0xfd,
0xc0, 0x93, 0x1e, 0x6b, 0xd0, 0xa4, 0xff, 0x68, 0xe6, 0xc8, 0xf9, 0x6a, 0x72, 0x3c, 0xf5, 0x96,
0x27, 0x33, 0x6f, 0xe6, 0x9d, 0x10, 0x75, 0xb2, 0xba, 0xa6, 0x19, 0x4d, 0x68, 0xa4, 0xa4, 0xcc,
0x7f, 0xd5, 0xa1, 0x65, 0x89, 0x1f, 0x56, 0x22, 0x94, 0x6c, 0x00, 0x75, 0x31, 0x9d, 0x7b,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xec, 0xf7, 0x87, 0x76, 0x5e, 0xab,
0x3d, 0xaa, 0x8a, 0x37, 0xaa, 0x07, 0xff, 0x0e, 0x00, 0x00, 0xff, 0xff, 0x13, 0xc6, 0x62, 0xb1,
0x1f, 0x13, 0x00, 0x00,
}

+ 43
- 41
types/types.proto View File

@ -4,8 +4,11 @@ package types;
// For more information on gogo.proto, see:
// https://github.com/gogo/protobuf/blob/master/extensions.md
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
import "github.com/tendermint/tmlibs/common/types.proto";
// This file is copied from http://github.com/tendermint/abci
// NOTE: When using custom types, mind the warnings.
// https://github.com/gogo/protobuf/blob/master/custom_types.md#warnings-and-issues
//----------------------------------------
// Request types
@ -37,16 +40,17 @@ message RequestInfo {
string version = 1;
}
// nondeterministic
message RequestSetOption {
string key = 1;
string value = 2;
}
message RequestInitChain {
repeated Validator validators = 1;
repeated Validator validators = 1 [(gogoproto.nullable)=false];
}
message RequestQuery{
message RequestQuery {
bytes data = 1;
string path = 2;
int64 height = 3;
@ -55,9 +59,9 @@ message RequestQuery{
message RequestBeginBlock {
bytes hash = 1;
Header header = 2;
Header header = 2 [(gogoproto.nullable)=false];
repeated int32 absent_validators = 3;
repeated Evidence byzantine_validators = 4;
repeated Evidence byzantine_validators = 4 [(gogoproto.nullable)=false];
}
message RequestCheckTx {
@ -68,7 +72,7 @@ message RequestDeliverTx {
bytes tx = 1;
}
message RequestEndBlock{
message RequestEndBlock {
int64 height = 1;
}
@ -95,6 +99,7 @@ message Response {
}
}
// nondeterministic
message ResponseException {
string error = 1;
}
@ -113,9 +118,12 @@ message ResponseInfo {
bytes last_block_app_hash = 4;
}
// nondeterministic
message ResponseSetOption {
uint32 code = 1;
string log = 2;
// bytes data = 2;
string log = 3;
string info = 4;
}
message ResponseInitChain {
@ -123,12 +131,14 @@ message ResponseInitChain {
message ResponseQuery {
uint32 code = 1;
int64 index = 2;
bytes key = 3 [(gogoproto.customtype) = "github.com/tendermint/go-wire/data.Bytes", (gogoproto.nullable) = false];
bytes value = 4 [(gogoproto.customtype) = "github.com/tendermint/go-wire/data.Bytes", (gogoproto.nullable) = false];
bytes proof = 5 [(gogoproto.customtype) = "github.com/tendermint/go-wire/data.Bytes", (gogoproto.nullable) = false];
int64 height = 6;
string log = 7;
// bytes data = 2; // use "value" instead.
string log = 3; // nondeterministic
string info = 4; // nondeterministic
int64 index = 5;
bytes key = 6;
bytes value = 7;
bytes proof = 8;
int64 height = 9;
}
message ResponseBeginBlock {
@ -136,28 +146,34 @@ message ResponseBeginBlock {
message ResponseCheckTx {
uint32 code = 1;
bytes data = 2 [(gogoproto.customtype) = "github.com/tendermint/go-wire/data.Bytes", (gogoproto.nullable) = false];
string log = 3;
int64 gas = 4;
int64 fee = 5;
bytes data = 2;
string log = 3; // nondeterministic
string info = 4; // nondeterministic
int64 gas_wanted = 5;
// int64 gas_used = 6;
repeated common.KVPair tags = 7 [(gogoproto.nullable)=false, (gogoproto.jsontag)="tags,omitempty"];
common.KI64Pair fee = 8 [(gogoproto.nullable)=false];
}
message ResponseDeliverTx {
uint32 code = 1;
bytes data = 2 [(gogoproto.customtype) = "github.com/tendermint/go-wire/data.Bytes", (gogoproto.nullable) = false];
string log = 3;
repeated KVPair tags = 4;
bytes data = 2;
string log = 3; // nondeterministic
string info = 4; // nondeterministic
int64 gas_wanted = 5;
int64 gas_used = 6;
repeated common.KVPair tags = 7 [(gogoproto.nullable)=false, (gogoproto.jsontag)="tags,omitempty"];
// common.KI64Pair fee = 8;
}
message ResponseEndBlock {
repeated Validator validator_updates = 1;
repeated Validator validator_updates = 1 [(gogoproto.nullable)=false];
ConsensusParams consensus_param_updates = 2;
}
message ResponseCommit {
uint32 code = 1;
bytes data = 2 [(gogoproto.customtype) = "github.com/tendermint/go-wire/data.Bytes", (gogoproto.nullable) = false];
string log = 3;
// reserve 1
bytes data = 2;
}
//----------------------------------------
@ -179,7 +195,7 @@ message BlockSize {
}
// TxSize contain limits on the tx size.
message TxSize{
message TxSize {
int32 max_bytes = 1;
int64 max_gas = 2;
}
@ -195,11 +211,11 @@ message BlockGossip {
// Blockchain Types
message Header {
string chain_id = 1 [(gogoproto.customname) = "ChainID"];
string chain_id = 1 [(gogoproto.customname)="ChainID"];
int64 height = 2;
int64 time = 3;
int32 num_txs = 4;
BlockID last_block_id = 5 [(gogoproto.customname) = "LastBlockID"];
BlockID last_block_id = 5 [(gogoproto.customname)="LastBlockID", (gogoproto.nullable)=false];
bytes last_commit_hash = 6;
bytes data_hash = 7;
bytes validators_hash = 8;
@ -208,7 +224,7 @@ message Header {
message BlockID {
bytes hash = 1;
PartSetHeader parts = 2;
PartSetHeader parts = 2 [(gogoproto.nullable)=false];
}
message PartSetHeader {
@ -226,20 +242,6 @@ message Evidence {
int64 height = 2;
}
//----------------------------------------
// Abstract types
message KVPair {
string key = 1;
enum Type {
STRING = 0;
INT = 1;
}
Type value_type = 2;
string value_string = 3;
int64 value_int = 4;
}
//----------------------------------------
// Service Definition


+ 5
- 28
types/util.go View File

@ -3,15 +3,12 @@ package types
import (
"bytes"
"encoding/json"
"github.com/tendermint/go-wire/data"
cmn "github.com/tendermint/tmlibs/common"
)
//------------------------------------------------------------------------------
// Validators is a list of validators that implements the Sort interface
type Validators []*Validator
type Validators []Validator
func (v Validators) Len() int {
return len(v)
@ -31,36 +28,16 @@ func (v Validators) Swap(i, j int) {
func ValidatorsString(vs Validators) string {
s := make([]validatorPretty, len(vs))
for i, v := range vs {
s[i] = validatorPretty{v.PubKey, v.Power}
s[i] = validatorPretty(v)
}
b, err := json.Marshal(s)
if err != nil {
cmn.PanicSanity(err.Error())
panic(err.Error())
}
return string(b)
}
type validatorPretty struct {
PubKey data.Bytes `json:"pub_key"`
Power int64 `json:"power"`
}
//------------------------------------------------------------------------------
// KVPairInt is a helper method to build KV pair with an integer value.
func KVPairInt(key string, val int64) *KVPair {
return &KVPair{
Key: key,
ValueInt: val,
ValueType: KVPair_INT,
}
}
// KVPairString is a helper method to build KV pair with a string value.
func KVPairString(key, val string) *KVPair {
return &KVPair{
Key: key,
ValueString: val,
ValueType: KVPair_STRING,
}
PubKey []byte `json:"pub_key"`
Power int64 `json:"power"`
}

+ 0
- 15
types/util_test.go View File

@ -1,15 +0,0 @@
package types
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestKVPairInt(t *testing.T) {
assert.Equal(t, KVPairInt("a", 1), &KVPair{Key: "a", ValueType: KVPair_INT, ValueInt: 1})
}
func TestKVPairString(t *testing.T) {
assert.Equal(t, KVPairString("a", "b"), &KVPair{Key: "a", ValueType: KVPair_STRING, ValueString: "b"})
}

Loading…
Cancel
Save