Browse Source

Merge branch 'master' into callum/clean-lite-tests

pull/4389/head
Anton Kaliaev 5 years ago
committed by GitHub
parent
commit
16aae3a361
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 233 additions and 191 deletions
  1. +121
    -119
      abci/types/types.proto
  2. +7
    -7
      crypto/merkle/merkle.proto
  3. +10
    -10
      libs/kv/types.proto
  4. +6
    -0
      lite2/provider/http/http.go
  5. +33
    -0
      lite2/provider/mock/deadmock.go
  6. +17
    -22
      lite2/provider/mock/mock.go
  7. +3
    -1
      lite2/provider/provider.go
  8. +6
    -0
      rpc/client/httpclient.go
  9. +12
    -14
      rpc/grpc/types.proto
  10. +18
    -18
      types/proto3/block.proto

+ 121
- 119
abci/types/types.proto View File

@ -1,6 +1,6 @@
syntax = "proto3";
package tendermint.abci.types;
option go_package = "github.com/tendermint/tendermint/abci/types";
option go_package = "github.com/tendermint/tendermint/abci/types";
// For more information on gogo.proto, see:
// https://github.com/gogo/protobuf/blob/master/extensions.md
@ -14,31 +14,31 @@ import "google/protobuf/duration.proto";
// NOTE: When using custom types, mind the warnings.
// https://github.com/gogo/protobuf/blob/master/custom_types.md#warnings-and-issues
option (gogoproto.marshaler_all) = true;
option (gogoproto.unmarshaler_all) = true;
option (gogoproto.sizer_all) = true;
option (gogoproto.marshaler_all) = true;
option (gogoproto.unmarshaler_all) = true;
option (gogoproto.sizer_all) = true;
option (gogoproto.goproto_registration) = true;
// Generate tests
option (gogoproto.populate_all) = true;
option (gogoproto.equal_all) = true;
option (gogoproto.testgen_all) = true;
option (gogoproto.equal_all) = true;
option (gogoproto.testgen_all) = true;
//----------------------------------------
// Request types
message Request {
oneof value {
RequestEcho echo = 2;
RequestFlush flush = 3;
RequestInfo info = 4;
RequestSetOption set_option = 5;
RequestInitChain init_chain = 6;
RequestQuery query = 7;
RequestEcho echo = 2;
RequestFlush flush = 3;
RequestInfo info = 4;
RequestSetOption set_option = 5;
RequestInitChain init_chain = 6;
RequestQuery query = 7;
RequestBeginBlock begin_block = 8;
RequestCheckTx check_tx = 9;
RequestDeliverTx deliver_tx = 19;
RequestEndBlock end_block = 11;
RequestCommit commit = 12;
RequestCheckTx check_tx = 9;
RequestDeliverTx deliver_tx = 19;
RequestEndBlock end_block = 11;
RequestCommit commit = 12;
}
}
@ -46,50 +46,49 @@ message RequestEcho {
string message = 1;
}
message RequestFlush {
}
message RequestFlush {}
message RequestInfo {
string version = 1;
string version = 1;
uint64 block_version = 2;
uint64 p2p_version = 3;
uint64 p2p_version = 3;
}
// nondeterministic
message RequestSetOption {
string key = 1;
string key = 1;
string value = 2;
}
message RequestInitChain {
google.protobuf.Timestamp time = 1 [(gogoproto.nullable)=false, (gogoproto.stdtime)=true];
string chain_id = 2;
ConsensusParams consensus_params = 3;
repeated ValidatorUpdate validators = 4 [(gogoproto.nullable)=false];
bytes app_state_bytes = 5;
google.protobuf.Timestamp time = 1 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true];
string chain_id = 2;
ConsensusParams consensus_params = 3;
repeated ValidatorUpdate validators = 4 [(gogoproto.nullable) = false];
bytes app_state_bytes = 5;
}
message RequestQuery {
bytes data = 1;
string path = 2;
int64 height = 3;
bool prove = 4;
bytes data = 1;
string path = 2;
int64 height = 3;
bool prove = 4;
}
message RequestBeginBlock {
bytes hash = 1;
Header header = 2 [(gogoproto.nullable)=false];
LastCommitInfo last_commit_info = 3 [(gogoproto.nullable)=false];
repeated Evidence byzantine_validators = 4 [(gogoproto.nullable)=false];
bytes hash = 1;
Header header = 2 [(gogoproto.nullable) = false];
LastCommitInfo last_commit_info = 3 [(gogoproto.nullable) = false];
repeated Evidence byzantine_validators = 4 [(gogoproto.nullable) = false];
}
enum CheckTxType {
New = 0;
New = 0;
Recheck = 1;
}
message RequestCheckTx {
bytes tx = 1;
bytes tx = 1;
CheckTxType type = 2;
}
@ -101,26 +100,25 @@ message RequestEndBlock {
int64 height = 1;
}
message RequestCommit {
}
message RequestCommit {}
//----------------------------------------
// Response types
message Response {
oneof value {
ResponseException exception = 1;
ResponseEcho echo = 2;
ResponseFlush flush = 3;
ResponseInfo info = 4;
ResponseSetOption set_option = 5;
ResponseInitChain init_chain = 6;
ResponseQuery query = 7;
ResponseException exception = 1;
ResponseEcho echo = 2;
ResponseFlush flush = 3;
ResponseInfo info = 4;
ResponseSetOption set_option = 5;
ResponseInitChain init_chain = 6;
ResponseQuery query = 7;
ResponseBeginBlock begin_block = 8;
ResponseCheckTx check_tx = 9;
ResponseDeliverTx deliver_tx = 10;
ResponseEndBlock end_block = 11;
ResponseCommit commit = 12;
ResponseCheckTx check_tx = 9;
ResponseDeliverTx deliver_tx = 10;
ResponseEndBlock end_block = 11;
ResponseCommit commit = 12;
}
}
@ -133,16 +131,15 @@ message ResponseEcho {
string message = 1;
}
message ResponseFlush {
}
message ResponseFlush {}
message ResponseInfo {
string data = 1;
string version = 2;
string version = 2;
uint64 app_version = 3;
int64 last_block_height = 4;
int64 last_block_height = 4;
bytes last_block_app_hash = 5;
}
@ -150,58 +147,62 @@ message ResponseInfo {
message ResponseSetOption {
uint32 code = 1;
// bytes data = 2;
string log = 3;
string log = 3;
string info = 4;
}
message ResponseInitChain {
ConsensusParams consensus_params = 1;
repeated ValidatorUpdate validators = 2 [(gogoproto.nullable)=false];
ConsensusParams consensus_params = 1;
repeated ValidatorUpdate validators = 2 [(gogoproto.nullable) = false];
}
message ResponseQuery {
uint32 code = 1;
// bytes data = 2; // use "value" instead.
string log = 3; // nondeterministic
string info = 4; // nondeterministic
int64 index = 5;
bytes key = 6;
bytes value = 7;
tendermint.crypto.merkle.Proof proof = 8;
int64 height = 9;
string codespace = 10;
string log = 3; // nondeterministic
string info = 4; // nondeterministic
int64 index = 5;
bytes key = 6;
bytes value = 7;
tendermint.crypto.merkle.Proof proof = 8;
int64 height = 9;
string codespace = 10;
}
message ResponseBeginBlock {
repeated Event events = 1 [(gogoproto.nullable)=false, (gogoproto.jsontag)="events,omitempty"];
repeated Event events = 1
[(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"];
}
message ResponseCheckTx {
uint32 code = 1;
bytes data = 2;
string log = 3; // nondeterministic
string info = 4; // nondeterministic
int64 gas_wanted = 5;
int64 gas_used = 6;
repeated Event events = 7 [(gogoproto.nullable)=false, (gogoproto.jsontag)="events,omitempty"];
uint32 code = 1;
bytes data = 2;
string log = 3; // nondeterministic
string info = 4; // nondeterministic
int64 gas_wanted = 5;
int64 gas_used = 6;
repeated Event events = 7
[(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"];
string codespace = 8;
}
message ResponseDeliverTx {
uint32 code = 1;
bytes data = 2;
string log = 3; // nondeterministic
string info = 4; // nondeterministic
int64 gas_wanted = 5;
int64 gas_used = 6;
repeated Event events = 7 [(gogoproto.nullable)=false, (gogoproto.jsontag)="events,omitempty"];
uint32 code = 1;
bytes data = 2;
string log = 3; // nondeterministic
string info = 4; // nondeterministic
int64 gas_wanted = 5;
int64 gas_used = 6;
repeated Event events = 7
[(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"];
string codespace = 8;
}
message ResponseEndBlock {
repeated ValidatorUpdate validator_updates = 1 [(gogoproto.nullable)=false];
ConsensusParams consensus_param_updates = 2;
repeated Event events = 3 [(gogoproto.nullable)=false, (gogoproto.jsontag)="events,omitempty"];
repeated ValidatorUpdate validator_updates = 1 [(gogoproto.nullable) = false];
ConsensusParams consensus_param_updates = 2;
repeated Event events = 3
[(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"];
}
message ResponseCommit {
@ -215,8 +216,8 @@ message ResponseCommit {
// ConsensusParams contains all consensus-relevant parameters
// that can be adjusted by the abci app
message ConsensusParams {
BlockParams block = 1;
EvidenceParams evidence = 2;
BlockParams block = 1;
EvidenceParams evidence = 2;
ValidatorParams validator = 3;
}
@ -230,8 +231,9 @@ message BlockParams {
message EvidenceParams {
// Note: must be greater than 0
int64 max_age_num_blocks = 1;
google.protobuf.Duration max_age_duration = 2 [(gogoproto.nullable)=false, (gogoproto.stdduration)=true];
int64 max_age_num_blocks = 1;
google.protobuf.Duration max_age_duration = 2
[(gogoproto.nullable) = false, (gogoproto.stdduration) = true];
}
// ValidatorParams contains limits on validators.
@ -240,13 +242,14 @@ message ValidatorParams {
}
message LastCommitInfo {
int32 round = 1;
repeated VoteInfo votes = 2 [(gogoproto.nullable)=false];
int32 round = 1;
repeated VoteInfo votes = 2 [(gogoproto.nullable) = false];
}
message Event {
string type = 1;
repeated tendermint.libs.kv.Pair attributes = 2 [(gogoproto.nullable)=false, (gogoproto.jsontag)="attributes,omitempty"];
string type = 1;
repeated tendermint.libs.kv.Pair attributes = 2
[(gogoproto.nullable) = false, (gogoproto.jsontag) = "attributes,omitempty"];
}
//----------------------------------------
@ -254,63 +257,62 @@ message Event {
message Header {
// basic block info
Version version = 1 [(gogoproto.nullable)=false];
string chain_id = 2 [(gogoproto.customname)="ChainID"];
int64 height = 3;
google.protobuf.Timestamp time = 4 [(gogoproto.nullable)=false, (gogoproto.stdtime)=true];
Version version = 1 [(gogoproto.nullable) = false];
string chain_id = 2 [(gogoproto.customname) = "ChainID"];
int64 height = 3;
google.protobuf.Timestamp time = 4 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true];
// prev block info
BlockID last_block_id = 5 [(gogoproto.nullable)=false];
BlockID last_block_id = 5 [(gogoproto.nullable) = false];
// hashes of block data
bytes last_commit_hash = 6; // commit from validators from the last block
bytes data_hash = 7; // transactions
bytes last_commit_hash = 6; // commit from validators from the last block
bytes data_hash = 7; // transactions
// hashes from the app output from the prev block
bytes validators_hash = 8; // validators for the current block
bytes validators_hash = 8; // validators for the current block
bytes next_validators_hash = 9; // validators for the next block
bytes consensus_hash = 10; // consensus params for current block
bytes app_hash = 11; // state after txs from the previous block
bytes last_results_hash = 12;// root hash of all results from the txs from the previous block
bytes consensus_hash = 10; // consensus params for current block
bytes app_hash = 11; // state after txs from the previous block
bytes last_results_hash = 12; // root hash of all results from the txs from the previous block
// consensus info
bytes evidence_hash = 13; // evidence included in the block
bytes proposer_address = 14; // original proposer of the block
bytes evidence_hash = 13; // evidence included in the block
bytes proposer_address = 14; // original proposer of the block
}
message Version {
uint64 Block = 1;
uint64 App = 2;
uint64 App = 2;
}
message BlockID {
bytes hash = 1;
PartSetHeader parts_header = 2 [(gogoproto.nullable)=false];
bytes hash = 1;
PartSetHeader parts_header = 2 [(gogoproto.nullable) = false];
}
message PartSetHeader {
int32 total = 1;
bytes hash = 2;
bytes hash = 2;
}
// Validator
message Validator {
bytes address = 1;
//PubKey pub_key = 2 [(gogoproto.nullable)=false];
// PubKey pub_key = 2 [(gogoproto.nullable)=false];
int64 power = 3;
}
// ValidatorUpdate
message ValidatorUpdate {
PubKey pub_key = 1 [(gogoproto.nullable)=false];
int64 power = 2;
PubKey pub_key = 1 [(gogoproto.nullable) = false];
int64 power = 2;
}
// VoteInfo
message VoteInfo {
Validator validator = 1 [(gogoproto.nullable)=false];
bool signed_last_block = 2;
Validator validator = 1 [(gogoproto.nullable) = false];
bool signed_last_block = 2;
}
message PubKey {
@ -319,18 +321,18 @@ message PubKey {
}
message Evidence {
string type = 1;
Validator validator = 2 [(gogoproto.nullable)=false];
int64 height = 3;
google.protobuf.Timestamp time = 4 [(gogoproto.nullable)=false, (gogoproto.stdtime)=true];
int64 total_voting_power = 5;
string type = 1;
Validator validator = 2 [(gogoproto.nullable) = false];
int64 height = 3;
google.protobuf.Timestamp time = 4 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true];
int64 total_voting_power = 5;
}
//----------------------------------------
// Service Definition
service ABCIApplication {
rpc Echo(RequestEcho) returns (ResponseEcho) ;
rpc Echo(RequestEcho) returns (ResponseEcho);
rpc Flush(RequestFlush) returns (ResponseFlush);
rpc Info(RequestInfo) returns (ResponseInfo);
rpc SetOption(RequestSetOption) returns (ResponseSetOption);


+ 7
- 7
crypto/merkle/merkle.proto View File

@ -1,17 +1,17 @@
syntax = "proto3";
package tendermint.crypto.merkle;
option go_package = "github.com/tendermint/tendermint/crypto/merkle";
option go_package = "github.com/tendermint/tendermint/crypto/merkle";
// For more information on gogo.proto, see:
// https://github.com/gogo/protobuf/blob/master/extensions.md
import "third_party/proto/gogoproto/gogo.proto";
option (gogoproto.marshaler_all) = true;
option (gogoproto.marshaler_all) = true;
option (gogoproto.unmarshaler_all) = true;
option (gogoproto.sizer_all) = true;
option (gogoproto.sizer_all) = true;
option (gogoproto.populate_all) = true;
option (gogoproto.equal_all) = true;
option (gogoproto.equal_all) = true;
//----------------------------------------
// Message types
@ -21,11 +21,11 @@ option (gogoproto.equal_all) = true;
// for example neighbouring node hash
message ProofOp {
string type = 1;
bytes key = 2;
bytes data = 3;
bytes key = 2;
bytes data = 3;
}
// Proof is Merkle proof defined by the list of ProofOps
message Proof {
repeated ProofOp ops = 1 [(gogoproto.nullable)=false];
repeated ProofOp ops = 1 [(gogoproto.nullable) = false];
}

+ 10
- 10
libs/kv/types.proto View File

@ -1,29 +1,29 @@
syntax = "proto3";
package tendermint.libs.kv;
option go_package = "github.com/tendermint/tendermint/libs/kv";
option go_package = "github.com/tendermint/tendermint/libs/kv";
import "third_party/proto/gogoproto/gogo.proto";
option (gogoproto.marshaler_all) = true;
option (gogoproto.unmarshaler_all) = true;
option (gogoproto.sizer_all) = true;
option (gogoproto.marshaler_all) = true;
option (gogoproto.unmarshaler_all) = true;
option (gogoproto.sizer_all) = true;
option (gogoproto.goproto_registration) = true;
// Generate tests
option (gogoproto.populate_all) = true;
option (gogoproto.equal_all) = true;
option (gogoproto.testgen_all) = true;
option (gogoproto.equal_all) = true;
option (gogoproto.testgen_all) = true;
//----------------------------------------
// Abstract types
// Define these here for compatibility but use tmlibs/common.KVPair.
// Define these here for compatibility but use tmlibs/kv.Pair.
message Pair {
bytes key = 1;
bytes key = 1;
bytes value = 2;
}
// Define these here for compatibility but use tmlibs/common.KI64Pair.
// Define these here for compatibility but use tmlibs/kv.KI64Pair.
message KI64Pair {
bytes key = 1;
bytes key = 1;
int64 value = 2;
}

+ 6
- 0
lite2/provider/http/http.go View File

@ -13,6 +13,8 @@ import (
type SignStatusClient interface {
rpcclient.SignClient
rpcclient.StatusClient
// Remote returns the remote network address in a string form.
Remote() string
}
// http provider uses an RPC client (or SignStatusClient more generally) to
@ -45,6 +47,10 @@ func (p *http) ChainID() string {
return p.chainID
}
func (p *http) String() string {
return fmt.Sprintf("http{%s}", p.client.Remote())
}
// SignedHeader fetches a SignedHeader at the given height and checks the
// chainID matches.
func (p *http) SignedHeader(height int64) (*types.SignedHeader, error) {


+ 33
- 0
lite2/provider/mock/deadmock.go View File

@ -0,0 +1,33 @@
package mock
import (
"errors"
"github.com/tendermint/tendermint/lite2/provider"
"github.com/tendermint/tendermint/types"
)
type deadMock struct {
chainID string
}
// NewDeadMock creates a mock provider that always errors.
func NewDeadMock(chainID string) provider.Provider {
return &deadMock{chainID: chainID}
}
func (p *deadMock) ChainID() string {
return p.chainID
}
func (p *deadMock) String() string {
return "deadMock"
}
func (p *deadMock) SignedHeader(height int64) (*types.SignedHeader, error) {
return nil, errors.New("no response from provider")
}
func (p *deadMock) ValidatorSet(height int64) (*types.ValidatorSet, error) {
return nil, errors.New("no response from provider")
}

+ 17
- 22
lite2/provider/mock/mock.go View File

@ -1,7 +1,8 @@
package mock
import (
"github.com/pkg/errors"
"fmt"
"strings"
"github.com/tendermint/tendermint/lite2/provider"
"github.com/tendermint/tendermint/types"
@ -23,10 +24,25 @@ func New(chainID string, headers map[int64]*types.SignedHeader, vals map[int64]*
}
}
// ChainID returns the blockchain ID.
func (p *mock) ChainID() string {
return p.chainID
}
func (p *mock) String() string {
var headers strings.Builder
for _, h := range p.headers {
fmt.Fprintf(&headers, " %d:%X", h.Height, h.Hash())
}
var vals strings.Builder
for _, v := range p.vals {
fmt.Fprintf(&vals, " %X", v.Hash())
}
return fmt.Sprintf("mock{headers: %s, vals: %v}", headers.String(), vals.String())
}
func (p *mock) SignedHeader(height int64) (*types.SignedHeader, error) {
if height == 0 && len(p.headers) > 0 {
return p.headers[int64(len(p.headers))], nil
@ -46,24 +62,3 @@ func (p *mock) ValidatorSet(height int64) (*types.ValidatorSet, error) {
}
return nil, provider.ErrValidatorSetNotFound
}
type deadMock struct {
chainID string
}
// NewDeadMock creates a mock provider that always errors.
func NewDeadMock(chainID string) provider.Provider {
return &deadMock{chainID: chainID}
}
func (p *deadMock) ChainID() string {
return p.chainID
}
func (p *deadMock) SignedHeader(height int64) (*types.SignedHeader, error) {
return nil, errors.New("no response from provider")
}
func (p *deadMock) ValidatorSet(height int64) (*types.ValidatorSet, error) {
return nil, errors.New("no response from provider")
}

+ 3
- 1
lite2/provider/provider.go View File

@ -1,6 +1,8 @@
package provider
import "github.com/tendermint/tendermint/types"
import (
"github.com/tendermint/tendermint/types"
)
// Provider provides information for the lite client to sync (verification
// happens in the client).


+ 6
- 0
rpc/client/httpclient.go View File

@ -123,10 +123,16 @@ func NewHTTPWithClient(remote, wsEndpoint string, client *http.Client) (*HTTP, e
var _ Client = (*HTTP)(nil)
// SetLogger sets a logger.
func (c *HTTP) SetLogger(l log.Logger) {
c.WSEvents.SetLogger(l)
}
// Remote returns the remote network address in a string form.
func (c *HTTP) Remote() string {
return c.remote
}
// NewBatch creates a new batch client for this HTTP client.
func (c *HTTP) NewBatch() *BatchHTTP {
rpcBatch := c.rpc.NewRequestBatch()


+ 12
- 14
rpc/grpc/types.proto View File

@ -1,26 +1,25 @@
syntax = "proto3";
package tendermint.rpc.grpc;
option go_package = "github.com/tendermint/tendermint/rpc/grpc;coregrpc";
option go_package = "github.com/tendermint/tendermint/rpc/grpc;coregrpc";
import "third_party/proto/gogoproto/gogo.proto";
import "abci/types/types.proto";
option (gogoproto.marshaler_all) = true;
option (gogoproto.unmarshaler_all) = true;
option (gogoproto.sizer_all) = true;
option (gogoproto.marshaler_all) = true;
option (gogoproto.unmarshaler_all) = true;
option (gogoproto.sizer_all) = true;
option (gogoproto.goproto_registration) = true;
// Generate tests
option (gogoproto.populate_all) = true;
option (gogoproto.equal_all) = true;
option (gogoproto.testgen_all) = true;
option (gogoproto.equal_all) = true;
option (gogoproto.testgen_all) = true;
//----------------------------------------
// Message types
//----------------------------------------
// Request types
message RequestPing {
}
message RequestPing {}
message RequestBroadcastTx {
bytes tx = 1;
@ -29,11 +28,10 @@ message RequestBroadcastTx {
//----------------------------------------
// Response types
message ResponsePing{
}
message ResponsePing {}
message ResponseBroadcastTx{
tendermint.abci.types.ResponseCheckTx check_tx = 1;
message ResponseBroadcastTx {
tendermint.abci.types.ResponseCheckTx check_tx = 1;
tendermint.abci.types.ResponseDeliverTx deliver_tx = 2;
}
@ -41,6 +39,6 @@ message ResponseBroadcastTx{
// Service Definition
service BroadcastAPI {
rpc Ping(RequestPing) returns (ResponsePing) ;
rpc BroadcastTx(RequestBroadcastTx) returns (ResponseBroadcastTx) ;
rpc Ping(RequestPing) returns (ResponsePing);
rpc BroadcastTx(RequestBroadcastTx) returns (ResponseBroadcastTx);
}

+ 18
- 18
types/proto3/block.proto View File

@ -1,47 +1,47 @@
syntax = "proto3";
package tendermint.types.proto3;
option go_package = "github.com/tendermint/tendermint/types/proto3";
option go_package = "github.com/tendermint/tendermint/types/proto3";
message PartSetHeader {
int32 Total = 1;
bytes Hash = 2;
bytes Hash = 2;
}
message BlockID {
bytes Hash = 1;
bytes Hash = 1;
PartSetHeader PartsHeader = 2;
}
message Header {
// basic block info
Version Version = 1;
string ChainID = 2;
int64 Height = 3;
Timestamp Time = 4;
Version Version = 1;
string ChainID = 2;
int64 Height = 3;
Timestamp Time = 4;
// prev block info
BlockID LastBlockID = 5;
// hashes of block data
bytes LastCommitHash = 6; // commit from validators from the last block
bytes DataHash = 7; // transactions
bytes LastCommitHash = 6; // commit from validators from the last block
bytes DataHash = 7; // transactions
// hashes from the app output from the prev block
bytes ValidatorsHash = 8; // validators for the current block
bytes NextValidatorsHash = 9; // validators for the next block
bytes ConsensusHash = 10; // consensus params for current block
bytes AppHash = 11; // state after txs from the previous block
bytes LastResultsHash = 12; // root hash of all results from the txs from the previous block
bytes ValidatorsHash = 8; // validators for the current block
bytes NextValidatorsHash = 9; // validators for the next block
bytes ConsensusHash = 10; // consensus params for current block
bytes AppHash = 11; // state after txs from the previous block
bytes LastResultsHash = 12; // root hash of all results from the txs from the previous block
// consensus info
bytes EvidenceHash = 13; // evidence included in the block
bytes ProposerAddress = 14; // original proposer of the block
bytes EvidenceHash = 13; // evidence included in the block
bytes ProposerAddress = 14; // original proposer of the block
}
message Version {
uint64 Block = 1;
uint64 App = 2;
uint64 App = 2;
}
// Timestamp wraps how amino encodes time.
@ -51,5 +51,5 @@ message Version {
// NOTE/XXX: nanos do not get skipped if they are zero in amino.
message Timestamp {
int64 seconds = 1;
int32 nanos = 2;
int32 nanos = 2;
}

Loading…
Cancel
Save