From debbf122db0a4cfc90f73ed2421e333822283451 Mon Sep 17 00:00:00 2001 From: Ethan Buchman Date: Mon, 22 Aug 2016 14:01:26 -0400 Subject: [PATCH 1/6] add version/block/config to Info. add header to BeginBlock --- client/client.go | 6 +- client/grpc_client.go | 12 +- client/local_client.go | 22 +- client/socket_client.go | 14 +- cmd/tmsp-cli/tmsp-cli.go | 2 +- example/counter/counter.go | 4 +- example/dummy/dummy.go | 4 +- example/nil/nil_app.go | 4 +- server/socket_server.go | 13 +- types/application.go | 9 +- types/messages.go | 8 +- types/types.pb.go | 420 ++++++++++++++++++++++++++++--------- types/types.proto | 45 +++- 13 files changed, 414 insertions(+), 149 deletions(-) diff --git a/client/client.go b/client/client.go index 291c4863a..be1383e4b 100644 --- a/client/client.go +++ b/client/client.go @@ -25,7 +25,7 @@ type Client interface { FlushSync() error EchoSync(msg string) (res types.Result) - InfoSync() (res types.Result) + InfoSync() (types.Result, *types.TMSPInfo, *types.LastBlockInfo, *types.ConfigInfo) SetOptionSync(key string, value string) (res types.Result) AppendTxSync(tx []byte) (res types.Result) CheckTxSync(tx []byte) (res types.Result) @@ -33,11 +33,11 @@ type Client interface { CommitSync() (res types.Result) InitChainAsync(validators []*types.Validator) *ReqRes - BeginBlockAsync(height uint64) *ReqRes + BeginBlockAsync(header *types.Header) *ReqRes EndBlockAsync(height uint64) *ReqRes InitChainSync(validators []*types.Validator) (err error) - BeginBlockSync(height uint64) (err error) + BeginBlockSync(header *types.Header) (err error) EndBlockSync(height uint64) (changedValidators []*types.Validator, err error) } diff --git a/client/grpc_client.go b/client/grpc_client.go index 0c1ecf1c5..f7a802689 100644 --- a/client/grpc_client.go +++ b/client/grpc_client.go @@ -200,8 +200,8 @@ func (cli *grpcClient) InitChainAsync(validators []*types.Validator) *ReqRes { return cli.finishAsyncCall(req, &types.Response{&types.Response_InitChain{res}}) } -func (cli *grpcClient) BeginBlockAsync(height uint64) *ReqRes { - req := types.ToRequestBeginBlock(height) +func (cli *grpcClient) BeginBlockAsync(header *types.Header) *ReqRes { + req := types.ToRequestBeginBlock(header) res, err := cli.client.BeginBlock(context.Background(), req.GetBeginBlock(), grpc.FailFast(true)) if err != nil { cli.StopForError(err) @@ -262,13 +262,13 @@ func (cli *grpcClient) FlushSync() error { return nil } -func (cli *grpcClient) InfoSync() (res types.Result) { +func (cli *grpcClient) InfoSync() (types.Result, *types.TMSPInfo, *types.LastBlockInfo, *types.ConfigInfo) { reqres := cli.InfoAsync() if res := cli.checkErrGetResult(); res.IsErr() { return res } resp := reqres.Response.GetInfo() - return types.NewResultOK([]byte(resp.Info), LOG) + return types.NewResultOK([]byte(resp.Info), LOG), r.TmspInfo, r.LastBlock, r.Config } func (cli *grpcClient) SetOptionSync(key string, value string) (res types.Result) { @@ -321,8 +321,8 @@ func (cli *grpcClient) InitChainSync(validators []*types.Validator) (err error) return cli.Error() } -func (cli *grpcClient) BeginBlockSync(height uint64) (err error) { - cli.BeginBlockAsync(height) +func (cli *grpcClient) BeginBlockSync(header *types.Header) (err error) { + cli.BeginBlockAsync(header) return cli.Error() } diff --git a/client/local_client.go b/client/local_client.go index ce17f6c07..0ce735c80 100644 --- a/client/local_client.go +++ b/client/local_client.go @@ -51,11 +51,11 @@ func (app *localClient) EchoAsync(msg string) *ReqRes { func (app *localClient) InfoAsync() *ReqRes { app.mtx.Lock() - info := app.Application.Info() + info, tmspInfo, blockInfo, configInfo := app.Application.Info() app.mtx.Unlock() return app.callback( types.ToRequestInfo(), - types.ToResponseInfo(info), + types.ToResponseInfo(info, tmspInfo, blockInfo, configInfo), ) } @@ -122,14 +122,14 @@ func (app *localClient) InitChainAsync(validators []*types.Validator) *ReqRes { return reqRes } -func (app *localClient) BeginBlockAsync(height uint64) *ReqRes { +func (app *localClient) BeginBlockAsync(header *types.Header) *ReqRes { app.mtx.Lock() if bcApp, ok := app.Application.(types.BlockchainAware); ok { - bcApp.BeginBlock(height) + bcApp.BeginBlock(header) } app.mtx.Unlock() return app.callback( - types.ToRequestBeginBlock(height), + types.ToRequestBeginBlock(header), types.ToResponseBeginBlock(), ) } @@ -157,11 +157,11 @@ func (app *localClient) EchoSync(msg string) (res types.Result) { return types.OK.SetData([]byte(msg)) } -func (app *localClient) InfoSync() (res types.Result) { +func (app *localClient) InfoSync() (types.Result, *types.TMSPInfo, *types.LastBlockInfo, *types.ConfigInfo) { app.mtx.Lock() - info := app.Application.Info() - app.mtx.Unlock() - return types.OK.SetData([]byte(info)) + defer app.mtx.Unlock() + info, tmspInfo, blockInfo, configInfo := app.Application.Info() + return types.OK.SetData([]byte(info)), tmspInfo, blockInfo, configInfo } func (app *localClient) SetOptionSync(key string, value string) (res types.Result) { @@ -208,10 +208,10 @@ func (app *localClient) InitChainSync(validators []*types.Validator) (err error) return nil } -func (app *localClient) BeginBlockSync(height uint64) (err error) { +func (app *localClient) BeginBlockSync(header *types.Header) (err error) { app.mtx.Lock() if bcApp, ok := app.Application.(types.BlockchainAware); ok { - bcApp.BeginBlock(height) + bcApp.BeginBlock(header) } app.mtx.Unlock() return nil diff --git a/client/socket_client.go b/client/socket_client.go index f650bd5c9..18dc0b0e4 100644 --- a/client/socket_client.go +++ b/client/socket_client.go @@ -263,8 +263,8 @@ func (cli *socketClient) InitChainAsync(validators []*types.Validator) *ReqRes { return cli.queueRequest(types.ToRequestInitChain(validators)) } -func (cli *socketClient) BeginBlockAsync(height uint64) *ReqRes { - return cli.queueRequest(types.ToRequestBeginBlock(height)) +func (cli *socketClient) BeginBlockAsync(header *types.Header) *ReqRes { + return cli.queueRequest(types.ToRequestBeginBlock(header)) } func (cli *socketClient) EndBlockAsync(height uint64) *ReqRes { @@ -292,14 +292,14 @@ func (cli *socketClient) FlushSync() error { return cli.Error() } -func (cli *socketClient) InfoSync() (res types.Result) { +func (cli *socketClient) InfoSync() (types.Result, *types.TMSPInfo, *types.LastBlockInfo, *types.ConfigInfo) { reqres := cli.queueRequest(types.ToRequestInfo()) cli.FlushSync() if err := cli.Error(); err != nil { - return types.ErrInternalError.SetLog(err.Error()) + return types.ErrInternalError.SetLog(err.Error()), nil, nil, nil } resp := reqres.Response.GetInfo() - return types.Result{Code: OK, Data: []byte(resp.Info), Log: LOG} + return types.Result{Code: OK, Data: []byte(resp.Info), Log: LOG}, resp.TmspInfo, resp.LastBlock, resp.Config } func (cli *socketClient) SetOptionSync(key string, value string) (res types.Result) { @@ -361,8 +361,8 @@ func (cli *socketClient) InitChainSync(validators []*types.Validator) (err error return nil } -func (cli *socketClient) BeginBlockSync(height uint64) (err error) { - cli.queueRequest(types.ToRequestBeginBlock(height)) +func (cli *socketClient) BeginBlockSync(header *types.Header) (err error) { + cli.queueRequest(types.ToRequestBeginBlock(header)) cli.FlushSync() if err := cli.Error(); err != nil { return err diff --git a/cmd/tmsp-cli/tmsp-cli.go b/cmd/tmsp-cli/tmsp-cli.go index 084241290..fe6dbd451 100644 --- a/cmd/tmsp-cli/tmsp-cli.go +++ b/cmd/tmsp-cli/tmsp-cli.go @@ -191,7 +191,7 @@ func cmdEcho(c *cli.Context) error { // Get some info from the application func cmdInfo(c *cli.Context) error { - res := client.InfoSync() + res, _, _, _ := client.InfoSync() printResponse(c, res, string(res.Data), false) return nil } diff --git a/example/counter/counter.go b/example/counter/counter.go index 711ddc3f4..2596eb107 100644 --- a/example/counter/counter.go +++ b/example/counter/counter.go @@ -18,8 +18,8 @@ func NewCounterApplication(serial bool) *CounterApplication { return &CounterApplication{serial: serial} } -func (app *CounterApplication) Info() string { - return Fmt("hashes:%v, txs:%v", app.hashCount, app.txCount) +func (app *CounterApplication) Info() (string, *types.TMSPInfo, *types.LastBlockInfo, *types.ConfigInfo) { + return Fmt("hashes:%v, txs:%v", app.hashCount, app.txCount), nil, nil, nil } func (app *CounterApplication) SetOption(key string, value string) (log string) { diff --git a/example/dummy/dummy.go b/example/dummy/dummy.go index ca3a8c03a..5bf52a78a 100644 --- a/example/dummy/dummy.go +++ b/example/dummy/dummy.go @@ -20,8 +20,8 @@ func NewDummyApplication() *DummyApplication { return &DummyApplication{state: state} } -func (app *DummyApplication) Info() string { - return Fmt("size:%v", app.state.Size()) +func (app *DummyApplication) Info() (string, *types.TMSPInfo, *types.LastBlockInfo, *types.ConfigInfo) { + return Fmt("size:%v", app.state.Size()), nil, nil, nil } func (app *DummyApplication) SetOption(key string, value string) (log string) { diff --git a/example/nil/nil_app.go b/example/nil/nil_app.go index 40474a9f2..05b5c7883 100644 --- a/example/nil/nil_app.go +++ b/example/nil/nil_app.go @@ -11,8 +11,8 @@ func NewNilApplication() *NilApplication { return &NilApplication{} } -func (app *NilApplication) Info() string { - return "nil" +func (app *NilApplication) Info() (string, *types.TMSPInfo, *types.LastBlockInfo, *types.ConfigInfo) { + return "nil", nil, nil, nil } func (app *NilApplication) SetOption(key string, value string) (log string) { diff --git a/server/socket_server.go b/server/socket_server.go index 12d39fefa..fb141aa9e 100644 --- a/server/socket_server.go +++ b/server/socket_server.go @@ -168,8 +168,7 @@ func (s *SocketServer) handleRequest(req *types.Request, responses chan<- *types case *types.Request_Flush: responses <- types.ToResponseFlush() case *types.Request_Info: - data := s.app.Info() - responses <- types.ToResponseInfo(data) + responses <- types.ToResponseInfo(s.app.Info()) case *types.Request_SetOption: so := r.SetOption logStr := s.app.SetOption(so.Key, so.Value) @@ -189,17 +188,13 @@ func (s *SocketServer) handleRequest(req *types.Request, responses chan<- *types case *types.Request_InitChain: if app, ok := s.app.(types.BlockchainAware); ok { app.InitChain(r.InitChain.Validators) - responses <- types.ToResponseInitChain() - } else { - responses <- types.ToResponseInitChain() } + responses <- types.ToResponseInitChain() case *types.Request_BeginBlock: if app, ok := s.app.(types.BlockchainAware); ok { - app.BeginBlock(r.BeginBlock.Height) - responses <- types.ToResponseBeginBlock() - } else { - responses <- types.ToResponseBeginBlock() + app.BeginBlock(r.BeginBlock.Header) } + responses <- types.ToResponseBeginBlock() case *types.Request_EndBlock: if app, ok := s.app.(types.BlockchainAware); ok { validators := app.EndBlock(r.EndBlock.Height) diff --git a/types/application.go b/types/application.go index c6e6f24b8..ba6565f54 100644 --- a/types/application.go +++ b/types/application.go @@ -8,7 +8,7 @@ import ( type Application interface { // Return application info - Info() (info string) + Info() (string, *TMSPInfo, *LastBlockInfo, *ConfigInfo) // Set application option (e.g. mode=mempool, mode=consensus) SetOption(key string, value string) (log string) @@ -34,7 +34,7 @@ type BlockchainAware interface { InitChain(validators []*Validator) // Signals the beginning of a block - BeginBlock(height uint64) + BeginBlock(header *Header) // Signals the end of a block // diffs: changed validators from app to TendermintCore @@ -59,7 +59,8 @@ func (app *GRPCApplication) Flush(ctx context.Context, req *RequestFlush) (*Resp } func (app *GRPCApplication) Info(ctx context.Context, req *RequestInfo) (*ResponseInfo, error) { - return &ResponseInfo{app.app.Info()}, nil + info, tmspInfo, blockInfo, configInfo := app.app.Info() + return &ResponseInfo{info, tmspInfo, blockInfo, configInfo}, nil } func (app *GRPCApplication) SetOption(ctx context.Context, req *RequestSetOption) (*ResponseSetOption, error) { @@ -95,7 +96,7 @@ func (app *GRPCApplication) InitChain(ctx context.Context, req *RequestInitChain func (app *GRPCApplication) BeginBlock(ctx context.Context, req *RequestBeginBlock) (*ResponseBeginBlock, error) { if chainAware, ok := app.app.(BlockchainAware); ok { - chainAware.BeginBlock(req.Height) + chainAware.BeginBlock(req.Header) } return &ResponseBeginBlock{}, nil } diff --git a/types/messages.go b/types/messages.go index 6b047d47b..304289e47 100644 --- a/types/messages.go +++ b/types/messages.go @@ -61,9 +61,9 @@ func ToRequestInitChain(validators []*Validator) *Request { } } -func ToRequestBeginBlock(height uint64) *Request { +func ToRequestBeginBlock(header *Header) *Request { return &Request{ - Value: &Request_BeginBlock{&RequestBeginBlock{height}}, + Value: &Request_BeginBlock{&RequestBeginBlock{header}}, } } @@ -93,9 +93,9 @@ func ToResponseFlush() *Response { } } -func ToResponseInfo(info string) *Response { +func ToResponseInfo(info string, tmspInfo *TMSPInfo, blockInfo *LastBlockInfo, configInfo *ConfigInfo) *Response { return &Response{ - Value: &Response_Info{&ResponseInfo{info}}, + Value: &Response_Info{&ResponseInfo{info, tmspInfo, blockInfo, configInfo}}, } } diff --git a/types/types.pb.go b/types/types.pb.go index 40630bf2c..d8251961b 100644 --- a/types/types.pb.go +++ b/types/types.pb.go @@ -34,6 +34,11 @@ It has these top-level messages: ResponseInitChain ResponseBeginBlock ResponseEndBlock + TMSPInfo + LastBlockInfo + ConfigInfo + Header + PartSetHeader Validator */ package types @@ -753,7 +758,7 @@ func (m *RequestInitChain) GetValidators() []*Validator { } type RequestBeginBlock struct { - Height uint64 `protobuf:"varint,1,opt,name=height" json:"height,omitempty"` + Header *Header `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"` } func (m *RequestBeginBlock) Reset() { *m = RequestBeginBlock{} } @@ -761,11 +766,11 @@ func (m *RequestBeginBlock) String() string { return proto.CompactTex func (*RequestBeginBlock) ProtoMessage() {} func (*RequestBeginBlock) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{10} } -func (m *RequestBeginBlock) GetHeight() uint64 { +func (m *RequestBeginBlock) GetHeader() *Header { if m != nil { - return m.Height + return m.Header } - return 0 + return nil } type RequestEndBlock struct { @@ -1256,7 +1261,10 @@ func (*ResponseFlush) ProtoMessage() {} func (*ResponseFlush) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{15} } type ResponseInfo struct { - Info string `protobuf:"bytes,1,opt,name=info" json:"info,omitempty"` + Info string `protobuf:"bytes,1,opt,name=info" json:"info,omitempty"` + TmspInfo *TMSPInfo `protobuf:"bytes,2,opt,name=tmsp_info,json=tmspInfo" json:"tmsp_info,omitempty"` + LastBlock *LastBlockInfo `protobuf:"bytes,3,opt,name=last_block,json=lastBlock" json:"last_block,omitempty"` + Config *ConfigInfo `protobuf:"bytes,4,opt,name=config" json:"config,omitempty"` } func (m *ResponseInfo) Reset() { *m = ResponseInfo{} } @@ -1271,6 +1279,27 @@ func (m *ResponseInfo) GetInfo() string { return "" } +func (m *ResponseInfo) GetTmspInfo() *TMSPInfo { + if m != nil { + return m.TmspInfo + } + return nil +} + +func (m *ResponseInfo) GetLastBlock() *LastBlockInfo { + if m != nil { + return m.LastBlock + } + return nil +} + +func (m *ResponseInfo) GetConfig() *ConfigInfo { + if m != nil { + return m.Config + } + return nil +} + type ResponseSetOption struct { Log string `protobuf:"bytes,1,opt,name=log" json:"log,omitempty"` } @@ -1447,6 +1476,182 @@ func (m *ResponseEndBlock) GetDiffs() []*Validator { return nil } +type TMSPInfo struct { + Version string `protobuf:"bytes,1,opt,name=Version" json:"Version,omitempty"` +} + +func (m *TMSPInfo) Reset() { *m = TMSPInfo{} } +func (m *TMSPInfo) String() string { return proto.CompactTextString(m) } +func (*TMSPInfo) ProtoMessage() {} +func (*TMSPInfo) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{25} } + +func (m *TMSPInfo) GetVersion() string { + if m != nil { + return m.Version + } + return "" +} + +type LastBlockInfo struct { + BlockHeight uint64 `protobuf:"varint,1,opt,name=block_height,json=blockHeight" json:"block_height,omitempty"` + BlockHash []byte `protobuf:"bytes,2,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` + AppHash []byte `protobuf:"bytes,3,opt,name=app_hash,json=appHash,proto3" json:"app_hash,omitempty"` +} + +func (m *LastBlockInfo) Reset() { *m = LastBlockInfo{} } +func (m *LastBlockInfo) String() string { return proto.CompactTextString(m) } +func (*LastBlockInfo) ProtoMessage() {} +func (*LastBlockInfo) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{26} } + +func (m *LastBlockInfo) GetBlockHeight() uint64 { + if m != nil { + return m.BlockHeight + } + return 0 +} + +func (m *LastBlockInfo) GetBlockHash() []byte { + if m != nil { + return m.BlockHash + } + return nil +} + +func (m *LastBlockInfo) GetAppHash() []byte { + if m != nil { + return m.AppHash + } + return nil +} + +type ConfigInfo struct { + MaxBlockSize uint64 `protobuf:"varint,1,opt,name=max_block_size,json=maxBlockSize" json:"max_block_size,omitempty"` +} + +func (m *ConfigInfo) Reset() { *m = ConfigInfo{} } +func (m *ConfigInfo) String() string { return proto.CompactTextString(m) } +func (*ConfigInfo) ProtoMessage() {} +func (*ConfigInfo) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{27} } + +func (m *ConfigInfo) GetMaxBlockSize() uint64 { + if m != nil { + return m.MaxBlockSize + } + return 0 +} + +type Header struct { + ChainId string `protobuf:"bytes,1,opt,name=chain_id,json=chainId" json:"chain_id,omitempty"` + Height uint64 `protobuf:"varint,2,opt,name=height" json:"height,omitempty"` + Time uint64 `protobuf:"varint,3,opt,name=time" json:"time,omitempty"` + NumTxs uint64 `protobuf:"varint,4,opt,name=num_txs,json=numTxs" json:"num_txs,omitempty"` + LastBlockHash []byte `protobuf:"bytes,5,opt,name=last_block_hash,json=lastBlockHash,proto3" json:"last_block_hash,omitempty"` + LastBlockParts *PartSetHeader `protobuf:"bytes,6,opt,name=last_block_parts,json=lastBlockParts" json:"last_block_parts,omitempty"` + LastCommitHash []byte `protobuf:"bytes,7,opt,name=last_commit_hash,json=lastCommitHash,proto3" json:"last_commit_hash,omitempty"` + DataHash []byte `protobuf:"bytes,8,opt,name=data_hash,json=dataHash,proto3" json:"data_hash,omitempty"` + ValidatorsHash []byte `protobuf:"bytes,9,opt,name=validators_hash,json=validatorsHash,proto3" json:"validators_hash,omitempty"` + AppHash []byte `protobuf:"bytes,10,opt,name=app_hash,json=appHash,proto3" json:"app_hash,omitempty"` +} + +func (m *Header) Reset() { *m = Header{} } +func (m *Header) String() string { return proto.CompactTextString(m) } +func (*Header) ProtoMessage() {} +func (*Header) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{28} } + +func (m *Header) GetChainId() string { + if m != nil { + return m.ChainId + } + return "" +} + +func (m *Header) GetHeight() uint64 { + if m != nil { + return m.Height + } + return 0 +} + +func (m *Header) GetTime() uint64 { + if m != nil { + return m.Time + } + return 0 +} + +func (m *Header) GetNumTxs() uint64 { + if m != nil { + return m.NumTxs + } + return 0 +} + +func (m *Header) GetLastBlockHash() []byte { + if m != nil { + return m.LastBlockHash + } + return nil +} + +func (m *Header) GetLastBlockParts() *PartSetHeader { + if m != nil { + return m.LastBlockParts + } + return nil +} + +func (m *Header) GetLastCommitHash() []byte { + if m != nil { + return m.LastCommitHash + } + return nil +} + +func (m *Header) GetDataHash() []byte { + if m != nil { + return m.DataHash + } + return nil +} + +func (m *Header) GetValidatorsHash() []byte { + if m != nil { + return m.ValidatorsHash + } + return nil +} + +func (m *Header) GetAppHash() []byte { + if m != nil { + return m.AppHash + } + return nil +} + +type PartSetHeader struct { + Total uint64 `protobuf:"varint,1,opt,name=total" json:"total,omitempty"` + Hash []byte `protobuf:"bytes,2,opt,name=hash,proto3" json:"hash,omitempty"` +} + +func (m *PartSetHeader) Reset() { *m = PartSetHeader{} } +func (m *PartSetHeader) String() string { return proto.CompactTextString(m) } +func (*PartSetHeader) ProtoMessage() {} +func (*PartSetHeader) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{29} } + +func (m *PartSetHeader) GetTotal() uint64 { + if m != nil { + return m.Total + } + return 0 +} + +func (m *PartSetHeader) GetHash() []byte { + if m != nil { + return m.Hash + } + return nil +} + type Validator struct { PubKey []byte `protobuf:"bytes,1,opt,name=pubKey,proto3" json:"pubKey,omitempty"` Power uint64 `protobuf:"varint,2,opt,name=power" json:"power,omitempty"` @@ -1455,7 +1660,7 @@ type Validator struct { func (m *Validator) Reset() { *m = Validator{} } func (m *Validator) String() string { return proto.CompactTextString(m) } func (*Validator) ProtoMessage() {} -func (*Validator) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{25} } +func (*Validator) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{30} } func (m *Validator) GetPubKey() []byte { if m != nil { @@ -1497,6 +1702,11 @@ func init() { proto.RegisterType((*ResponseInitChain)(nil), "types.ResponseInitChain") proto.RegisterType((*ResponseBeginBlock)(nil), "types.ResponseBeginBlock") proto.RegisterType((*ResponseEndBlock)(nil), "types.ResponseEndBlock") + proto.RegisterType((*TMSPInfo)(nil), "types.TMSPInfo") + proto.RegisterType((*LastBlockInfo)(nil), "types.LastBlockInfo") + proto.RegisterType((*ConfigInfo)(nil), "types.ConfigInfo") + proto.RegisterType((*Header)(nil), "types.Header") + proto.RegisterType((*PartSetHeader)(nil), "types.PartSetHeader") proto.RegisterType((*Validator)(nil), "types.Validator") proto.RegisterEnum("types.MessageType", MessageType_name, MessageType_value) proto.RegisterEnum("types.CodeType", CodeType_name, CodeType_value) @@ -1907,93 +2117,113 @@ var _TMSPApplication_serviceDesc = grpc.ServiceDesc{ func init() { proto.RegisterFile("types/types.proto", fileDescriptor0) } var fileDescriptor0 = []byte{ - // 1393 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xac, 0x57, 0x59, 0x53, 0xdc, 0xc6, - 0x16, 0x1e, 0xc1, 0xac, 0x67, 0x60, 0x68, 0x0e, 0x03, 0xc8, 0x53, 0xf7, 0xc1, 0x57, 0xf7, 0x26, - 0x01, 0xdb, 0x65, 0xa7, 0x70, 0xd9, 0x65, 0xc7, 0xa9, 0x54, 0x81, 0x8d, 0x81, 0x72, 0xd9, 0x26, - 0xf2, 0xf2, 0x90, 0xa5, 0x28, 0xa1, 0xe9, 0x99, 0x51, 0x18, 0xba, 0x65, 0x2d, 0x18, 0xf2, 0x0f, - 0xfc, 0x83, 0xf2, 0x92, 0xd7, 0x3c, 0x65, 0x5f, 0x7e, 0x51, 0xaa, 0x17, 0x49, 0x23, 0x21, 0xf9, - 0xc9, 0x2f, 0x53, 0xdd, 0x67, 0xeb, 0x9e, 0x73, 0xbe, 0xf3, 0xe9, 0x34, 0x2c, 0x47, 0x17, 0x3e, - 0x0d, 0x6f, 0xc9, 0xdf, 0x9b, 0x7e, 0xc0, 0x23, 0x8e, 0x0d, 0xb9, 0xb1, 0x7e, 0xaa, 0x43, 0xcb, - 0xa6, 0x6f, 0x62, 0x1a, 0x46, 0xb8, 0x01, 0x75, 0xea, 0x4e, 0xb8, 0x69, 0x5c, 0x35, 0x36, 0xba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19, 0xf0, 0x92, 0x0d, 0x3e, 0x80, 0xee, 0x31, 0x1d, 0x7b, 0xec, 0xe8, 0x78, - 0xca, 0xdd, 0x13, 0x13, 0xa4, 0xab, 0x99, 0x77, 0xdd, 0x11, 0x06, 0x3b, 0x42, 0xbf, 0x5f, 0xb3, - 0xe1, 0x38, 0xdd, 0x89, 0xf4, 0x89, 0xdc, 0x29, 0xd7, 0x6e, 0x59, 0xfa, 0x76, 0xd9, 0x30, 0x71, - 0x6c, 0x53, 0xbd, 0xde, 0x69, 0x41, 0xe3, 0xcc, 0x99, 0xc6, 0xd4, 0xfa, 0x04, 0xba, 0x33, 0x30, - 0x41, 0x13, 0x5a, 0xa7, 0x34, 0x0c, 0x9d, 0x31, 0x95, 0x58, 0xea, 0xd8, 0xc9, 0xd6, 0xea, 0xc1, - 0xc2, 0x2c, 0x48, 0xac, 0xc5, 0xd4, 0x51, 0x00, 0xc1, 0xfa, 0x0c, 0x48, 0xb1, 0xce, 0x48, 0x60, - 0xfe, 0x84, 0x5e, 0xe8, 0x40, 0x62, 0x89, 0x7d, 0x7d, 0xac, 0x44, 0x5f, 0xc7, 0xd6, 0x77, 0xf8, - 0x2f, 0x2c, 0x15, 0x4a, 0x8d, 0x3d, 0x98, 0x8b, 0xce, 0xa5, 0xe7, 0x82, 0x3d, 0x17, 0x9d, 0x5b, - 0x57, 0xa1, 0x97, 0xaf, 0xeb, 0x25, 0x8b, 0xff, 0xa7, 0xf7, 0x93, 0x85, 0x11, 0x47, 0xa9, 0xe2, - 0x29, 0x13, 0xb5, 0xb1, 0x96, 0x60, 0x31, 0x57, 0x6d, 0xeb, 0x51, 0x7a, 0xef, 0xb4, 0x3a, 0xf8, - 0x29, 0xc0, 0x99, 0x33, 0xf5, 0x86, 0x4e, 0xc4, 0x83, 0xd0, 0x34, 0xae, 0xce, 0x6f, 0x74, 0xb7, - 0x88, 0x4e, 0xea, 0xeb, 0x44, 0x61, 0xcf, 0xd8, 0x58, 0xd7, 0x61, 0xf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05, 0x7a, 0x99, 0x58, 0xda, 0xfe, 0x6d, 0xe0, 0x00, 0x56, 0x73, 0x42, 0x8f, - 0x8d, 0x0f, 0x45, 0xc7, 0x91, 0x7f, 0x8c, 0xad, 0x77, 0x0d, 0x58, 0x7a, 0xf9, 0xf4, 0xc5, 0xe1, - 0xb6, 0xaf, 0x0e, 0x10, 0x94, 0x7d, 0x4b, 0xf5, 0x19, 0x96, 0xbc, 0x57, 0x06, 0x65, 0x43, 0x0a, - 0x6e, 0xe9, 0x76, 0xc4, 0xb2, 0x67, 0xcb, 0xa0, 0x74, 0x56, 0x11, 0x87, 0xa8, 0x0f, 0xc9, 0xe5, - 0xd7, 0xcb, 0xa0, 0x6c, 0x60, 0xc1, 0x2f, 0x66, 0xda, 0x1b, 0xab, 0xde, 0x30, 0x83, 0xca, 0xd1, - 0x05, 0x1f, 0x64, 0x04, 0x80, 0x15, 0x2f, 0x99, 0x41, 0xd5, 0xf8, 0x82, 0xf7, 0x52, 0xbe, 0xc0, - 0xf2, 0xf7, 0xcc, 0xa0, 0x62, 0x84, 0x11, 0xb9, 0x51, 0x1f, 0x8a, 0xb2, 0x67, 0xca, 0xa0, 0x74, - 0x2a, 0xc1, 0x3b, 0x09, 0x21, 0x61, 0xe9, 0x53, 0x68, 0x50, 0x3e, 0xfb, 0x88, 0x0c, 0x65, 0xc3, - 0x72, 0xd5, 0x1b, 0x67, 0x50, 0x39, 0xd5, 0xe0, 0xf6, 0x2c, 0xc3, 0x61, 0xe5, 0x4b, 0x67, 0x50, - 0x3d, 0xdb, 0x88, 0x24, 0x67, 0xc3, 0x73, 0xf9, 0x7b, 0x67, 0x50, 0x35, 0xde, 0x1c, 0x37, 0xe5, - 0x3b, 0xfa, 0xf6, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x9c, 0xac, 0x2d, 0x4b, 0x5c, 0x0f, 0x00, - 0x00, + // 1721 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x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, 0xa3, + 0x26, 0x91, 0xba, 0x57, 0xfa, 0xa8, 0x76, 0x0a, 0xc7, 0x4f, 0x53, 0x40, 0xc2, 0xda, 0x7f, 0x02, + 0x46, 0xf5, 0xb3, 0x3e, 0x45, 0x28, 0x7f, 0x2b, 0xae, 0x7a, 0xe2, 0x8f, 0x56, 0x4e, 0xf1, 0xf8, + 0xb8, 0x88, 0x70, 0xb8, 0xf2, 0xa1, 0x3f, 0x5a, 0x3d, 0xcb, 0x53, 0x90, 0xf3, 0xc7, 0x62, 0xfd, + 0x73, 0x7f, 0xb4, 0x6a, 0x9c, 0xbf, 0x6c, 0xcb, 0xbf, 0x91, 0x1e, 0xfc, 0x3f, 0x00, 0x00, 0xff, + 0xff, 0x89, 0x5e, 0xff, 0xe3, 0x5b, 0x12, 0x00, 0x00, } diff --git a/types/types.proto b/types/types.proto index cb3d82c1a..e2c7d9b4a 100644 --- a/types/types.proto +++ b/types/types.proto @@ -124,7 +124,7 @@ message RequestInitChain{ } message RequestBeginBlock{ - uint64 height = 1; + Header header = 1; } message RequestEndBlock{ @@ -164,7 +164,11 @@ message ResponseFlush{ } message ResponseInfo { - string info = 1; + string info = 1; // backwards compatible + + TMSPInfo tmsp_info = 2; + LastBlockInfo last_block = 3; + ConfigInfo config = 4; } message ResponseSetOption{ @@ -207,7 +211,42 @@ message ResponseEndBlock{ } //---------------------------------------- -// Misc types +// Info types + +message TMSPInfo { + string Version = 1; +} + +message LastBlockInfo { + uint64 block_height = 1; + bytes block_hash = 2; + bytes app_hash = 3; +} + +message ConfigInfo { + uint64 max_block_size = 1; +} + +//---------------------------------------- +// Blockchain Types + +message Header { + string chain_id = 1; + uint64 height = 2; + uint64 time = 3; + uint64 num_txs = 4; + bytes last_block_hash = 5; + PartSetHeader last_block_parts = 6; + bytes last_commit_hash = 7; + bytes data_hash = 8; + bytes validators_hash = 9; + bytes app_hash = 10; +} + +message PartSetHeader { + uint64 total = 1; + bytes hash = 2; +} message Validator { bytes pubKey = 1; From 7901825ad93a69556cb33e63b295555cd01d1306 Mon Sep 17 00:00:00 2001 From: Ethan Buchman Date: Wed, 24 Aug 2016 01:42:57 -0400 Subject: [PATCH 2/6] persistent dummy --- client/grpc_client.go | 4 +- cmd/dummy/main.go | 12 ++- example/dummy/dummy.go | 1 + example/dummy/log.go | 7 ++ example/dummy/persistent_dummy.go | 117 ++++++++++++++++++++++++++++++ 5 files changed, 138 insertions(+), 3 deletions(-) create mode 100644 example/dummy/log.go create mode 100644 example/dummy/persistent_dummy.go diff --git a/client/grpc_client.go b/client/grpc_client.go index f7a802689..36589322a 100644 --- a/client/grpc_client.go +++ b/client/grpc_client.go @@ -265,10 +265,10 @@ func (cli *grpcClient) FlushSync() error { func (cli *grpcClient) InfoSync() (types.Result, *types.TMSPInfo, *types.LastBlockInfo, *types.ConfigInfo) { reqres := cli.InfoAsync() if res := cli.checkErrGetResult(); res.IsErr() { - return res + return res, nil, nil, nil } resp := reqres.Response.GetInfo() - return types.NewResultOK([]byte(resp.Info), LOG), r.TmspInfo, r.LastBlock, r.Config + return types.NewResultOK([]byte(resp.Info), LOG), resp.TmspInfo, resp.LastBlock, resp.Config } func (cli *grpcClient) SetOptionSync(key string, value string) (res types.Result) { diff --git a/cmd/dummy/main.go b/cmd/dummy/main.go index 8efa69e6b..8a1465c49 100644 --- a/cmd/dummy/main.go +++ b/cmd/dummy/main.go @@ -6,16 +6,26 @@ import ( . "github.com/tendermint/go-common" "github.com/tendermint/tmsp/example/dummy" "github.com/tendermint/tmsp/server" + "github.com/tendermint/tmsp/types" ) func main() { addrPtr := flag.String("addr", "tcp://0.0.0.0:46658", "Listen address") tmspPtr := flag.String("tmsp", "socket", "socket | grpc") + persistencePtr := flag.String("persist", "", "directory to use for a database") flag.Parse() + // Create the application - in memory or persisted to disk + var app types.Application + if *persistencePtr == "" { + app = dummy.NewDummyApplication() + } else { + app = dummy.NewPersistentDummyApplication(*persistencePtr) + } + // Start the listener - _, err := server.NewServer(*addrPtr, *tmspPtr, dummy.NewDummyApplication()) + _, err := server.NewServer(*addrPtr, *tmspPtr, app) if err != nil { Exit(err.Error()) } diff --git a/example/dummy/dummy.go b/example/dummy/dummy.go index 5bf52a78a..0c6a90893 100644 --- a/example/dummy/dummy.go +++ b/example/dummy/dummy.go @@ -50,6 +50,7 @@ func (app *DummyApplication) Commit() types.Result { func (app *DummyApplication) Query(query []byte) types.Result { index, value, exists := app.state.Get(query) + resStr := Fmt("Index=%v value=%v exists=%v", index, string(value), exists) return types.NewResultOK([]byte(resStr), "") } diff --git a/example/dummy/log.go b/example/dummy/log.go new file mode 100644 index 000000000..8571fa01e --- /dev/null +++ b/example/dummy/log.go @@ -0,0 +1,7 @@ +package dummy + +import ( + "github.com/tendermint/go-logger" +) + +var log = logger.New("module", "dummy") diff --git a/example/dummy/persistent_dummy.go b/example/dummy/persistent_dummy.go new file mode 100644 index 000000000..60e677e99 --- /dev/null +++ b/example/dummy/persistent_dummy.go @@ -0,0 +1,117 @@ +package dummy + +import ( + "bytes" + + . "github.com/tendermint/go-common" + dbm "github.com/tendermint/go-db" + "github.com/tendermint/go-merkle" + "github.com/tendermint/go-wire" + "github.com/tendermint/tmsp/types" +) + +//----------------------------------------- +// persist the last block info + +var lastBlockKey = []byte("lastblock") + +// Get the last block from the db +func LoadLastBlock(db dbm.DB) (lastBlock types.LastBlockInfo) { + buf := db.Get(lastBlockKey) + if len(buf) != 0 { + r, n, err := bytes.NewReader(buf), new(int), new(error) + wire.ReadBinaryPtr(&lastBlock, r, 0, n, err) + if *err != nil { + // DATA HAS BEEN CORRUPTED OR THE SPEC HAS CHANGED + Exit(Fmt("Data has been corrupted or its spec has changed: %v\n", *err)) + } + // TODO: ensure that buf is completely read. + } + + return lastBlock +} + +func SaveLastBlock(db dbm.DB, lastBlock types.LastBlockInfo) { + log.Notice("Saving block", "height", lastBlock.BlockHeight, "hash", lastBlock.BlockHash, "root", lastBlock.AppHash) + buf, n, err := new(bytes.Buffer), new(int), new(error) + wire.WriteBinary(lastBlock, buf, n, err) + if *err != nil { + // TODO + PanicCrisis(*err) + } + db.Set(lastBlockKey, buf.Bytes()) +} + +//----------------------------------------- + +type PersistentDummyApplication struct { + app *DummyApplication + db dbm.DB +} + +func NewPersistentDummyApplication(dbDir string) *PersistentDummyApplication { + db := dbm.NewDB("dummy", "leveldb", dbDir) + lastBlock := LoadLastBlock(db) + + stateTree := merkle.NewIAVLTree( + 0, + db, + ) + stateTree.Load(lastBlock.AppHash) + + log.Notice("Loaded state", "block", lastBlock.BlockHeight, "root", stateTree.Hash()) + + return &PersistentDummyApplication{ + app: &DummyApplication{state: stateTree}, + db: db, + } +} + +func (app *PersistentDummyApplication) Info() (string, *types.TMSPInfo, *types.LastBlockInfo, *types.ConfigInfo) { + s, _, _, _ := app.app.Info() + lastBlock := LoadLastBlock(app.db) + return s, nil, &lastBlock, nil +} + +func (app *PersistentDummyApplication) SetOption(key string, value string) (log string) { + return app.app.SetOption(key, value) +} + +// tx is either "key=value" or just arbitrary bytes +func (app *PersistentDummyApplication) AppendTx(tx []byte) types.Result { + return app.app.AppendTx(tx) +} + +func (app *PersistentDummyApplication) CheckTx(tx []byte) types.Result { + return app.app.CheckTx(tx) +} + +func (app *PersistentDummyApplication) Commit() types.Result { + // Save + hash := app.app.state.Save() + log.Info("Saved state", "root", hash) + return types.NewResultOK(hash, "") +} + +func (app *PersistentDummyApplication) Query(query []byte) types.Result { + return app.app.Query(query) +} + +func (app *PersistentDummyApplication) InitChain(validators []*types.Validator) { + return +} + +func (app *PersistentDummyApplication) BeginBlock(header *types.Header) { + // we commit the previous block state on BeginBlock because thats + // when we get the prev block hash and the app hash + lastBlock := types.LastBlockInfo{ + BlockHeight: header.Height - 1, + BlockHash: header.LastBlockHash, + AppHash: header.AppHash, + } + SaveLastBlock(app.db, lastBlock) +} + +func (app *PersistentDummyApplication) EndBlock(height uint64) (diffs []*types.Validator) { + return nil +} From ddb2b0163184704756299198758789eb654c77ca Mon Sep 17 00:00:00 2001 From: Ethan Buchman Date: Fri, 9 Sep 2016 23:01:53 -0400 Subject: [PATCH 3/6] BeginBlock(hash, header) --- client/client.go | 4 +- client/grpc_client.go | 8 +- client/local_client.go | 10 +- client/socket_client.go | 8 +- example/dummy/persistent_dummy.go | 29 ++-- server/socket_server.go | 2 +- types/application.go | 4 +- types/messages.go | 4 +- types/types.pb.go | 229 ++++++++++++++++-------------- types/types.proto | 3 +- 10 files changed, 158 insertions(+), 143 deletions(-) diff --git a/client/client.go b/client/client.go index be1383e4b..d1954e3fe 100644 --- a/client/client.go +++ b/client/client.go @@ -33,11 +33,11 @@ type Client interface { CommitSync() (res types.Result) InitChainAsync(validators []*types.Validator) *ReqRes - BeginBlockAsync(header *types.Header) *ReqRes + BeginBlockAsync(hash []byte, header *types.Header) *ReqRes EndBlockAsync(height uint64) *ReqRes InitChainSync(validators []*types.Validator) (err error) - BeginBlockSync(header *types.Header) (err error) + BeginBlockSync(hash []byte, header *types.Header) (err error) EndBlockSync(height uint64) (changedValidators []*types.Validator, err error) } diff --git a/client/grpc_client.go b/client/grpc_client.go index 36589322a..1e0169738 100644 --- a/client/grpc_client.go +++ b/client/grpc_client.go @@ -200,8 +200,8 @@ func (cli *grpcClient) InitChainAsync(validators []*types.Validator) *ReqRes { return cli.finishAsyncCall(req, &types.Response{&types.Response_InitChain{res}}) } -func (cli *grpcClient) BeginBlockAsync(header *types.Header) *ReqRes { - req := types.ToRequestBeginBlock(header) +func (cli *grpcClient) BeginBlockAsync(hash []byte, header *types.Header) *ReqRes { + req := types.ToRequestBeginBlock(hash, header) res, err := cli.client.BeginBlock(context.Background(), req.GetBeginBlock(), grpc.FailFast(true)) if err != nil { cli.StopForError(err) @@ -321,8 +321,8 @@ func (cli *grpcClient) InitChainSync(validators []*types.Validator) (err error) return cli.Error() } -func (cli *grpcClient) BeginBlockSync(header *types.Header) (err error) { - cli.BeginBlockAsync(header) +func (cli *grpcClient) BeginBlockSync(hash []byte, header *types.Header) (err error) { + cli.BeginBlockAsync(hash, header) return cli.Error() } diff --git a/client/local_client.go b/client/local_client.go index 0ce735c80..e50763a8d 100644 --- a/client/local_client.go +++ b/client/local_client.go @@ -122,14 +122,14 @@ func (app *localClient) InitChainAsync(validators []*types.Validator) *ReqRes { return reqRes } -func (app *localClient) BeginBlockAsync(header *types.Header) *ReqRes { +func (app *localClient) BeginBlockAsync(hash []byte, header *types.Header) *ReqRes { app.mtx.Lock() if bcApp, ok := app.Application.(types.BlockchainAware); ok { - bcApp.BeginBlock(header) + bcApp.BeginBlock(hash, header) } app.mtx.Unlock() return app.callback( - types.ToRequestBeginBlock(header), + types.ToRequestBeginBlock(hash, header), types.ToResponseBeginBlock(), ) } @@ -208,10 +208,10 @@ func (app *localClient) InitChainSync(validators []*types.Validator) (err error) return nil } -func (app *localClient) BeginBlockSync(header *types.Header) (err error) { +func (app *localClient) BeginBlockSync(hash []byte, header *types.Header) (err error) { app.mtx.Lock() if bcApp, ok := app.Application.(types.BlockchainAware); ok { - bcApp.BeginBlock(header) + bcApp.BeginBlock(hash, header) } app.mtx.Unlock() return nil diff --git a/client/socket_client.go b/client/socket_client.go index 18dc0b0e4..01a330366 100644 --- a/client/socket_client.go +++ b/client/socket_client.go @@ -263,8 +263,8 @@ func (cli *socketClient) InitChainAsync(validators []*types.Validator) *ReqRes { return cli.queueRequest(types.ToRequestInitChain(validators)) } -func (cli *socketClient) BeginBlockAsync(header *types.Header) *ReqRes { - return cli.queueRequest(types.ToRequestBeginBlock(header)) +func (cli *socketClient) BeginBlockAsync(hash []byte, header *types.Header) *ReqRes { + return cli.queueRequest(types.ToRequestBeginBlock(hash, header)) } func (cli *socketClient) EndBlockAsync(height uint64) *ReqRes { @@ -361,8 +361,8 @@ func (cli *socketClient) InitChainSync(validators []*types.Validator) (err error return nil } -func (cli *socketClient) BeginBlockSync(header *types.Header) (err error) { - cli.queueRequest(types.ToRequestBeginBlock(header)) +func (cli *socketClient) BeginBlockSync(hash []byte, header *types.Header) (err error) { + cli.queueRequest(types.ToRequestBeginBlock(hash, header)) cli.FlushSync() if err := cli.Error(); err != nil { return err diff --git a/example/dummy/persistent_dummy.go b/example/dummy/persistent_dummy.go index 60e677e99..df46b8d14 100644 --- a/example/dummy/persistent_dummy.go +++ b/example/dummy/persistent_dummy.go @@ -47,6 +47,10 @@ func SaveLastBlock(db dbm.DB, lastBlock types.LastBlockInfo) { type PersistentDummyApplication struct { app *DummyApplication db dbm.DB + + // latest received + blockHash []byte + blockHeader *types.Header } func NewPersistentDummyApplication(dbDir string) *PersistentDummyApplication { @@ -88,9 +92,16 @@ func (app *PersistentDummyApplication) CheckTx(tx []byte) types.Result { func (app *PersistentDummyApplication) Commit() types.Result { // Save - hash := app.app.state.Save() - log.Info("Saved state", "root", hash) - return types.NewResultOK(hash, "") + appHash := app.app.state.Save() + log.Info("Saved state", "root", appHash) + + lastBlock := types.LastBlockInfo{ + BlockHeight: app.blockHeader.Height, + BlockHash: app.blockHash, + AppHash: appHash, // this hash will be in the next block header + } + SaveLastBlock(app.db, lastBlock) + return types.NewResultOK(appHash, "") } func (app *PersistentDummyApplication) Query(query []byte) types.Result { @@ -101,15 +112,9 @@ func (app *PersistentDummyApplication) InitChain(validators []*types.Validator) return } -func (app *PersistentDummyApplication) BeginBlock(header *types.Header) { - // we commit the previous block state on BeginBlock because thats - // when we get the prev block hash and the app hash - lastBlock := types.LastBlockInfo{ - BlockHeight: header.Height - 1, - BlockHash: header.LastBlockHash, - AppHash: header.AppHash, - } - SaveLastBlock(app.db, lastBlock) +func (app *PersistentDummyApplication) BeginBlock(hash []byte, header *types.Header) { + app.blockHash = hash + app.blockHeader = header } func (app *PersistentDummyApplication) EndBlock(height uint64) (diffs []*types.Validator) { diff --git a/server/socket_server.go b/server/socket_server.go index fb141aa9e..43b4ed638 100644 --- a/server/socket_server.go +++ b/server/socket_server.go @@ -192,7 +192,7 @@ func (s *SocketServer) handleRequest(req *types.Request, responses chan<- *types responses <- types.ToResponseInitChain() case *types.Request_BeginBlock: if app, ok := s.app.(types.BlockchainAware); ok { - app.BeginBlock(r.BeginBlock.Header) + app.BeginBlock(r.BeginBlock.Hash, r.BeginBlock.Header) } responses <- types.ToResponseBeginBlock() case *types.Request_EndBlock: diff --git a/types/application.go b/types/application.go index ba6565f54..0137f1e1a 100644 --- a/types/application.go +++ b/types/application.go @@ -34,7 +34,7 @@ type BlockchainAware interface { InitChain(validators []*Validator) // Signals the beginning of a block - BeginBlock(header *Header) + BeginBlock(hash []byte, header *Header) // Signals the end of a block // diffs: changed validators from app to TendermintCore @@ -96,7 +96,7 @@ func (app *GRPCApplication) InitChain(ctx context.Context, req *RequestInitChain func (app *GRPCApplication) BeginBlock(ctx context.Context, req *RequestBeginBlock) (*ResponseBeginBlock, error) { if chainAware, ok := app.app.(BlockchainAware); ok { - chainAware.BeginBlock(req.Header) + chainAware.BeginBlock(req.Hash, req.Header) } return &ResponseBeginBlock{}, nil } diff --git a/types/messages.go b/types/messages.go index 304289e47..16e4fbd2b 100644 --- a/types/messages.go +++ b/types/messages.go @@ -61,9 +61,9 @@ func ToRequestInitChain(validators []*Validator) *Request { } } -func ToRequestBeginBlock(header *Header) *Request { +func ToRequestBeginBlock(hash []byte, header *Header) *Request { return &Request{ - Value: &Request_BeginBlock{&RequestBeginBlock{header}}, + Value: &Request_BeginBlock{&RequestBeginBlock{hash, header}}, } } diff --git a/types/types.pb.go b/types/types.pb.go index d8251961b..3eafb4832 100644 --- a/types/types.pb.go +++ b/types/types.pb.go @@ -758,7 +758,8 @@ func (m *RequestInitChain) GetValidators() []*Validator { } type RequestBeginBlock struct { - Header *Header `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"` + Hash []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` + Header *Header `protobuf:"bytes,2,opt,name=header" json:"header,omitempty"` } func (m *RequestBeginBlock) Reset() { *m = RequestBeginBlock{} } @@ -766,6 +767,13 @@ func (m *RequestBeginBlock) String() string { return proto.CompactTex func (*RequestBeginBlock) ProtoMessage() {} func (*RequestBeginBlock) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{10} } +func (m *RequestBeginBlock) GetHash() []byte { + if m != nil { + return m.Hash + } + return nil +} + func (m *RequestBeginBlock) GetHeader() *Header { if m != nil { return m.Header @@ -2117,113 +2125,114 @@ var _TMSPApplication_serviceDesc = grpc.ServiceDesc{ func init() { proto.RegisterFile("types/types.proto", fileDescriptor0) } var fileDescriptor0 = []byte{ - // 1721 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xac, 0x58, 0x5b, 0x73, 0xdb, 0xc6, - 0x15, 0x16, 0x25, 0xde, 0x70, 0x48, 0x51, 0xab, 0xa3, 0x1b, 0xcd, 0xb6, 0x33, 0x0e, 0xea, 0x24, - 0x52, 0xea, 0xb1, 0x3b, 0xf2, 0x24, 0x63, 0x27, 0x9d, 0xcc, 0x58, 0x8e, 0x62, 0x69, 0x52, 0xc7, - 0x2a, 0xec, 0xf8, 0xa1, 0x97, 0xe1, 0x40, 0xc4, 0x92, 0x44, 0x05, 0x02, 0x30, 0xb0, 0x70, 0x28, - 0xff, 0x83, 0xfc, 0x9b, 0xbe, 0xf4, 0xa5, 0xaf, 0x7d, 0xea, 0xfd, 0xf2, 0xda, 0x3f, 0xd3, 0x39, - 0xbb, 0x8b, 0xab, 0x40, 0x3f, 0xf9, 0x85, 0x83, 0x73, 0xdd, 0xdd, 0x73, 0xf9, 0xf6, 0x2c, 0x61, - 0x5b, 0x5c, 0x87, 0x3c, 0xbe, 0x2f, 0x7f, 0xef, 0x85, 0x51, 0x20, 0x02, 0x6c, 0x49, 0xc2, 0xfc, - 0x73, 0x13, 0x3a, 0x16, 0x7f, 0x9d, 0xf0, 0x58, 0xe0, 0x21, 0x34, 0xf9, 0x64, 0x1e, 0x0c, 0x1b, - 0xb7, 0x1b, 0x87, 0xbd, 0x63, 0xbc, 0xa7, 0xd4, 0xb5, 0xf4, 0x74, 0x32, 0x0f, 0xce, 0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9b, 0xd3, 0x22, 0x6a, 0x6e, 0xba, 0xf9, 0x78, 0x1f, 0xd5, 0x0d, 0xe8, 0xf8, 0x65, 0xa1, 0xbd, - 0x71, 0xd5, 0x13, 0x7e, 0xb4, 0x72, 0x54, 0xc7, 0x2f, 0x72, 0x00, 0xc0, 0x15, 0x0f, 0xf9, 0xd1, - 0xaa, 0x71, 0x1d, 0x1f, 0x66, 0x78, 0x81, 0xf5, 0xcf, 0xf9, 0xd1, 0x8a, 0x91, 0x9d, 0x62, 0xa3, - 0x26, 0x91, 0xba, 0x57, 0xfa, 0xa8, 0x76, 0x0a, 0xc7, 0x4f, 0x53, 0x40, 0xc2, 0xda, 0x7f, 0x02, - 0x46, 0xf5, 0xb3, 0x3e, 0x45, 0x28, 0x7f, 0x2b, 0xae, 0x7a, 0xe2, 0x8f, 0x56, 0x4e, 0xf1, 0xf8, - 0xb8, 0x88, 0x70, 0xb8, 0xf2, 0xa1, 0x3f, 0x5a, 0x3d, 0xcb, 0x53, 0x90, 0xf3, 0xc7, 0x62, 0xfd, - 0x73, 0x7f, 0xb4, 0x6a, 0x9c, 0xbf, 0x6c, 0xcb, 0xbf, 0x91, 0x1e, 0xfc, 0x3f, 0x00, 0x00, 0xff, - 0xff, 0x89, 0x5e, 0xff, 0xe3, 0x5b, 0x12, 0x00, 0x00, + // 1732 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xac, 0x58, 0x49, 0x73, 0x1b, 0xc7, + 0x15, 0x26, 0x40, 0xac, 0x0f, 0x20, 0xd8, 0x7c, 0xdc, 0x20, 0x24, 0xa9, 0x92, 0x27, 0xb2, 0x4d, + 0x3a, 0x2a, 0x29, 0x45, 0x95, 0x5d, 0x52, 0x9c, 0x72, 0x95, 0x28, 0xd3, 0x02, 0xcb, 0x91, 0xc4, + 0x8c, 0x64, 0x1d, 0xb2, 0x14, 0x6a, 0x88, 0x69, 0x00, 0x13,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1, + 0x3f, 0x5a, 0x3f, 0xcb, 0x53, 0x90, 0xb3, 0xc7, 0x62, 0xf5, 0x5f, 0x00, 0xa3, 0x75, 0xe3, 0xfc, + 0x65, 0x4b, 0xfe, 0xb5, 0xf4, 0xe0, 0xfb, 0x00, 0x00, 0x00, 0xff, 0xff, 0x70, 0x47, 0x17, 0xd1, + 0x6f, 0x12, 0x00, 0x00, } diff --git a/types/types.proto b/types/types.proto index e2c7d9b4a..7b6a7915a 100644 --- a/types/types.proto +++ b/types/types.proto @@ -124,7 +124,8 @@ message RequestInitChain{ } message RequestBeginBlock{ - Header header = 1; + bytes hash = 1; + Header header = 2; } message RequestEndBlock{ From df299d03c4a3c151a4afa949e45d7e5f3e43d08e Mon Sep 17 00:00:00 2001 From: Ethan Buchman Date: Sun, 6 Nov 2016 02:02:08 +0000 Subject: [PATCH 4/6] block_height is int32 --- example/dummy/persistent_dummy.go | 64 +++++++++++++++---------------- types/types.proto | 2 +- 2 files changed, 33 insertions(+), 33 deletions(-) diff --git a/example/dummy/persistent_dummy.go b/example/dummy/persistent_dummy.go index df46b8d14..cb2171f55 100644 --- a/example/dummy/persistent_dummy.go +++ b/example/dummy/persistent_dummy.go @@ -10,38 +10,6 @@ import ( "github.com/tendermint/tmsp/types" ) -//----------------------------------------- -// persist the last block info - -var lastBlockKey = []byte("lastblock") - -// Get the last block from the db -func LoadLastBlock(db dbm.DB) (lastBlock types.LastBlockInfo) { - buf := db.Get(lastBlockKey) - if len(buf) != 0 { - r, n, err := bytes.NewReader(buf), new(int), new(error) - wire.ReadBinaryPtr(&lastBlock, r, 0, n, err) - if *err != nil { - // DATA HAS BEEN CORRUPTED OR THE SPEC HAS CHANGED - Exit(Fmt("Data has been corrupted or its spec has changed: %v\n", *err)) - } - // TODO: ensure that buf is completely read. - } - - return lastBlock -} - -func SaveLastBlock(db dbm.DB, lastBlock types.LastBlockInfo) { - log.Notice("Saving block", "height", lastBlock.BlockHeight, "hash", lastBlock.BlockHash, "root", lastBlock.AppHash) - buf, n, err := new(bytes.Buffer), new(int), new(error) - wire.WriteBinary(lastBlock, buf, n, err) - if *err != nil { - // TODO - PanicCrisis(*err) - } - db.Set(lastBlockKey, buf.Bytes()) -} - //----------------------------------------- type PersistentDummyApplication struct { @@ -120,3 +88,35 @@ func (app *PersistentDummyApplication) BeginBlock(hash []byte, header *types.Hea func (app *PersistentDummyApplication) EndBlock(height uint64) (diffs []*types.Validator) { return nil } + +//----------------------------------------- +// persist the last block info + +var lastBlockKey = []byte("lastblock") + +// Get the last block from the db +func LoadLastBlock(db dbm.DB) (lastBlock types.LastBlockInfo) { + buf := db.Get(lastBlockKey) + if len(buf) != 0 { + r, n, err := bytes.NewReader(buf), new(int), new(error) + wire.ReadBinaryPtr(&lastBlock, r, 0, n, err) + if *err != nil { + // DATA HAS BEEN CORRUPTED OR THE SPEC HAS CHANGED + Exit(Fmt("Data has been corrupted or its spec has changed: %v\n", *err)) + } + // TODO: ensure that buf is completely read. + } + + return lastBlock +} + +func SaveLastBlock(db dbm.DB, lastBlock types.LastBlockInfo) { + log.Notice("Saving block", "height", lastBlock.BlockHeight, "hash", lastBlock.BlockHash, "root", lastBlock.AppHash) + buf, n, err := new(bytes.Buffer), new(int), new(error) + wire.WriteBinary(lastBlock, buf, n, err) + if *err != nil { + // TODO + PanicCrisis(*err) + } + db.Set(lastBlockKey, buf.Bytes()) +} diff --git a/types/types.proto b/types/types.proto index 7b6a7915a..6633d4e3c 100644 --- a/types/types.proto +++ b/types/types.proto @@ -219,7 +219,7 @@ message TMSPInfo { } message LastBlockInfo { - uint64 block_height = 1; + int32 block_height = 1; bytes block_hash = 2; bytes app_hash = 3; } From 60e0842ef9a87c840d0bf95eea7b54a1e3d312b3 Mon Sep 17 00:00:00 2001 From: Ethan Buchman Date: Wed, 16 Nov 2016 16:11:36 -0500 Subject: [PATCH 5/6] Header.LastBlockID --- types/types.pb.go | 287 ++++++++++++++++++++++++---------------------- types/types.proto | 18 +-- 2 files changed, 164 insertions(+), 141 deletions(-) diff --git a/types/types.pb.go b/types/types.pb.go index 3eafb4832..0b3248a35 100644 --- a/types/types.pb.go +++ b/types/types.pb.go @@ -38,6 +38,7 @@ It has these top-level messages: LastBlockInfo ConfigInfo Header + BlockID PartSetHeader Validator */ @@ -1501,7 +1502,7 @@ func (m *TMSPInfo) GetVersion() string { } type LastBlockInfo struct { - BlockHeight uint64 `protobuf:"varint,1,opt,name=block_height,json=blockHeight" json:"block_height,omitempty"` + BlockHeight int32 `protobuf:"varint,1,opt,name=block_height,json=blockHeight" json:"block_height,omitempty"` BlockHash []byte `protobuf:"bytes,2,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` AppHash []byte `protobuf:"bytes,3,opt,name=app_hash,json=appHash,proto3" json:"app_hash,omitempty"` } @@ -1511,7 +1512,7 @@ func (m *LastBlockInfo) String() string { return proto.CompactTextStr func (*LastBlockInfo) ProtoMessage() {} func (*LastBlockInfo) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{26} } -func (m *LastBlockInfo) GetBlockHeight() uint64 { +func (m *LastBlockInfo) GetBlockHeight() int32 { if m != nil { return m.BlockHeight } @@ -1549,16 +1550,15 @@ func (m *ConfigInfo) GetMaxBlockSize() uint64 { } type Header struct { - ChainId string `protobuf:"bytes,1,opt,name=chain_id,json=chainId" json:"chain_id,omitempty"` - Height uint64 `protobuf:"varint,2,opt,name=height" json:"height,omitempty"` - Time uint64 `protobuf:"varint,3,opt,name=time" json:"time,omitempty"` - NumTxs uint64 `protobuf:"varint,4,opt,name=num_txs,json=numTxs" json:"num_txs,omitempty"` - LastBlockHash []byte `protobuf:"bytes,5,opt,name=last_block_hash,json=lastBlockHash,proto3" json:"last_block_hash,omitempty"` - LastBlockParts *PartSetHeader `protobuf:"bytes,6,opt,name=last_block_parts,json=lastBlockParts" json:"last_block_parts,omitempty"` - LastCommitHash []byte `protobuf:"bytes,7,opt,name=last_commit_hash,json=lastCommitHash,proto3" json:"last_commit_hash,omitempty"` - DataHash []byte `protobuf:"bytes,8,opt,name=data_hash,json=dataHash,proto3" json:"data_hash,omitempty"` - ValidatorsHash []byte `protobuf:"bytes,9,opt,name=validators_hash,json=validatorsHash,proto3" json:"validators_hash,omitempty"` - AppHash []byte `protobuf:"bytes,10,opt,name=app_hash,json=appHash,proto3" json:"app_hash,omitempty"` + ChainId string `protobuf:"bytes,1,opt,name=chain_id,json=chainId" json:"chain_id,omitempty"` + Height int32 `protobuf:"varint,2,opt,name=height" json:"height,omitempty"` + Time uint64 `protobuf:"varint,3,opt,name=time" json:"time,omitempty"` + NumTxs uint64 `protobuf:"varint,4,opt,name=num_txs,json=numTxs" 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"` } func (m *Header) Reset() { *m = Header{} } @@ -1573,7 +1573,7 @@ func (m *Header) GetChainId() string { return "" } -func (m *Header) GetHeight() uint64 { +func (m *Header) GetHeight() int32 { if m != nil { return m.Height } @@ -1594,16 +1594,9 @@ func (m *Header) GetNumTxs() uint64 { return 0 } -func (m *Header) GetLastBlockHash() []byte { +func (m *Header) GetLastBlockId() *BlockID { if m != nil { - return m.LastBlockHash - } - return nil -} - -func (m *Header) GetLastBlockParts() *PartSetHeader { - if m != nil { - return m.LastBlockParts + return m.LastBlockId } return nil } @@ -1636,6 +1629,30 @@ func (m *Header) GetAppHash() []byte { return nil } +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"` +} + +func (m *BlockID) Reset() { *m = BlockID{} } +func (m *BlockID) String() string { return proto.CompactTextString(m) } +func (*BlockID) ProtoMessage() {} +func (*BlockID) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{29} } + +func (m *BlockID) GetHash() []byte { + if m != nil { + return m.Hash + } + return nil +} + +func (m *BlockID) GetParts() *PartSetHeader { + if m != nil { + return m.Parts + } + return nil +} + type PartSetHeader struct { Total uint64 `protobuf:"varint,1,opt,name=total" json:"total,omitempty"` Hash []byte `protobuf:"bytes,2,opt,name=hash,proto3" json:"hash,omitempty"` @@ -1644,7 +1661,7 @@ type PartSetHeader struct { func (m *PartSetHeader) Reset() { *m = PartSetHeader{} } func (m *PartSetHeader) String() string { return proto.CompactTextString(m) } func (*PartSetHeader) ProtoMessage() {} -func (*PartSetHeader) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{29} } +func (*PartSetHeader) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{30} } func (m *PartSetHeader) GetTotal() uint64 { if m != nil { @@ -1668,7 +1685,7 @@ type Validator struct { func (m *Validator) Reset() { *m = Validator{} } func (m *Validator) String() string { return proto.CompactTextString(m) } func (*Validator) ProtoMessage() {} -func (*Validator) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{30} } +func (*Validator) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{31} } func (m *Validator) GetPubKey() []byte { if m != nil { @@ -1714,6 +1731,7 @@ func init() { proto.RegisterType((*LastBlockInfo)(nil), "types.LastBlockInfo") proto.RegisterType((*ConfigInfo)(nil), "types.ConfigInfo") proto.RegisterType((*Header)(nil), "types.Header") + proto.RegisterType((*BlockID)(nil), "types.BlockID") proto.RegisterType((*PartSetHeader)(nil), "types.PartSetHeader") proto.RegisterType((*Validator)(nil), "types.Validator") proto.RegisterEnum("types.MessageType", MessageType_name, MessageType_value) @@ -2125,114 +2143,115 @@ var _TMSPApplication_serviceDesc = grpc.ServiceDesc{ func init() { proto.RegisterFile("types/types.proto", fileDescriptor0) } var fileDescriptor0 = []byte{ - // 1732 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xac, 0x58, 0x49, 0x73, 0x1b, 0xc7, - 0x15, 0x26, 0x40, 0xac, 0x0f, 0x20, 0xd8, 0x7c, 0xdc, 0x20, 0x24, 0xa9, 0x92, 0x27, 0xb2, 0x4d, - 0x3a, 0x2a, 0x29, 0x45, 0x95, 0x5d, 0x52, 0x9c, 0x72, 0x95, 0x28, 0xd3, 0x02, 0xcb, 0x91, 0xc4, - 0x8c, 0x64, 0x1d, 0xb2, 0x14, 0x6a, 0x88, 0x69, 0x00, 0x13, 0x0e, 0x66, 0x46, 0x33, 0x3d, 0x32, - 0xa8, 0x7f, 0xe0, 0x7f, 0x93, 0x4b, 0x2e, 0xb9, 0xe6, 0x94, 0x7d, 0xb9, 0xe6, 0xcf, 0xb8, 0x5e, - 0x77, 0xcf, 0xca, 0x81, 0x4f, 0xba, 0xa0, 0xe6, 0xad, 0xdd, 0xfd, 0x96, 0xaf, 0x5f, 0x03, 0x76, - 0xc4, 0x75, 0xc0, 0xa3, 0xfb, 0xf2, 0xf7, 0x5e, 0x10, 0xfa, 0xc2, 0xc7, 0xa6, 0x24, 0x8c, 0xbf, - 0x34, 0xa0, 0x6d, 0xf2, 0x37, 0x31, 0x8f, 0x04, 0x1e, 0x41, 0x83, 0x4f, 0x17, 0xfe, 0xb0, 0x76, - 0xbb, 0x76, 0xd4, 0x3b, 0xc1, 0x7b, 0x4a, 0x5d, 0x4b, 0xcf, 0xa6, 0x0b, 0x7f, 0xbc, 0x61, 0x4a, - 0x0d, 0xfc, 0x19, 0x34, 0x67, 0x6e, 0x1c, 0x2d, 0x86, 0x75, 0xa9, 0xba, 0x5b, 0x54, 0xfd, 0x8a, - 0x44, 0xe3, 0x0d, 0x53, 0xe9, 0x90, 0x5b,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0x01, 0x59, 0x3a, 0xf3, 0x85, 0x90, 0xfe, 0x1a, 0xa6, 0xa6, 0x8c, 0xef, 0x9a, 0xd0, - 0x31, 0x79, 0x14, 0xf8, 0x5e, 0xc4, 0xf1, 0x21, 0x74, 0xf9, 0x6a, 0xca, 0x55, 0x17, 0xd6, 0x4a, - 0x85, 0xa4, 0x74, 0xce, 0x12, 0x39, 0x15, 0x61, 0xaa, 0x8c, 0xc7, 0x1a, 0x41, 0xca, 0xb0, 0xa0, - 0x8d, 0xf2, 0x10, 0x72, 0x37, 0x81, 0x90, 0xcd, 0x52, 0x17, 0x29, 0xdd, 0x12, 0x86, 0x1c, 0x6b, - 0x0c, 0x69, 0x54, 0x3a, 0x2e, 0x80, 0xc8, 0xa3, 0x02, 0x88, 0x34, 0x2b, 0xb7, 0xbf, 0x06, 0x45, - 0x3e, 0xcb, 0xa3, 0x48, 0xab, 0xd4, 0x7c, 0xca, 0xb2, 0x12, 0x46, 0x1e, 0xe4, 0x60, 0xa4, 0x5d, - 0xea, 0x1e, 0x65, 0x56, 0x81, 0x23, 0xf7, 0x53, 0x1c, 0xe9, 0x94, 0x90, 0x47, 0x9b, 0x94, 0x81, - 0xe4, 0x6e, 0x52, 0x8b, 0xdd, 0xca, 0x88, 0x95, 0x90, 0xe4, 0x51, 0x01, 0x49, 0xa0, 0x32, 0x0c, - 0x6b, 0xa0, 0xe4, 0x97, 0x45, 0x28, 0x51, 0x78, 0x70, 0xab, 0x64, 0xbb, 0x16, 0x4b, 0x3e, 0xcb, - 0x63, 0x49, 0xbf, 0x32, 0x88, 0x3f, 0x0c, 0x26, 0xc7, 0xd4, 0x06, 0xa5, 0x32, 0xa3, 0x46, 0xe4, - 0x61, 0xe8, 0x87, 0x1a, 0x07, 0x14, 0x61, 0x1c, 0x51, 0xbb, 0x66, 0xc5, 0xf5, 0x03, 0xc0, 0x23, - 0x5b, 0x36, 0x57, 0x5a, 0xc6, 0x1f, 0x6b, 0x99, 0x2d, 0xd5, 0x0f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xb6, 0x5c, 0x48, 0x6a, 0x6a, 0x3c, 0xa7, 0x95, - 0x7e, 0x04, 0x5d, 0xaa, 0x22, 0xa5, 0xd2, 0x91, 0x2a, 0x1d, 0x62, 0x48, 0xe1, 0xc7, 0xb0, 0x9d, - 0xcd, 0x04, 0x4a, 0xa5, 0xab, 0xbc, 0x64, 0xec, 0x1b, 0x19, 0x81, 0x62, 0x46, 0x1e, 0xc1, 0x56, - 0x61, 0xaf, 0x04, 0x9f, 0xc2, 0x17, 0x96, 0xab, 0x73, 0xa1, 0x88, 0x74, 0xb6, 0xa8, 0x67, 0xb3, - 0x85, 0xf1, 0x08, 0xba, 0x69, 0xd1, 0x51, 0xfc, 0x83, 0xf8, 0xf2, 0x6b, 0x9e, 0xcc, 0x3f, 0x9a, - 0x22, 0x77, 0x81, 0xff, 0xad, 0x9e, 0x3f, 0x1a, 0xa6, 0x22, 0x3e, 0xf9, 0x73, 0x0d, 0x7a, 0xcf, - 0x14, 0xde, 0x52, 0xfb, 0xe0, 0x36, 0xf4, 0x9e, 0xc7, 0xae, 0xab, 0x59, 0x6c, 0x03, 0x3b, 0xd0, - 0x20, 0x98, 0x66, 0x35, 0xec, 0x42, 0x53, 0xc2, 0x30, 0xab, 0x13, 0x93, 0xea, 0x86, 0x6d, 0xe2, - 0x16, 0x74, 0x53, 0x5c, 0x63, 0x0d, 0x22, 0x53, 0xfc, 0x67, 0x4d, 0xec, 0x43, 0x27, 0x81, 0x33, - 0xb6, 0x83, 0x3d, 0x68, 0x6b, 0xf4, 0x61, 0x88, 0x00, 0x2d, 0x15, 0x5d, 0xb6, 0x4b, 0x9e, 0x25, - 0x70, 0xb0, 0x3d, 0x72, 0x90, 0xb6, 0x22, 0xdb, 0xc7, 0x01, 0x40, 0xd6, 0x84, 0xec, 0x80, 0x1c, - 0x26, 0xed, 0xc7, 0x0e, 0x3f, 0xf9, 0x53, 0x13, 0x3a, 0x49, 0xe3, 0x63, 0x0b, 0xea, 0x2f, 0xbe, - 0x66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xbd, 0x71, 0xdd, 0xb3, 0x7e, 0xb4, 0x76, - 0x54, 0xc7, 0xcf, 0x33, 0x00, 0xc0, 0x35, 0x8f, 0xfb, 0xd1, 0xba, 0x71, 0x1d, 0x1f, 0xa6, 0x78, - 0x81, 0xd5, 0x4f, 0xfc, 0xd1, 0x9a, 0x91, 0x9d, 0x62, 0xa3, 0x26, 0x91, 0xaa, 0x97, 0xfb, 0xa8, - 0x72, 0x0a, 0xc7, 0x4f, 0x13, 0x40, 0xc2, 0xca, 0x7f, 0x07, 0x46, 0xd5, 0xb3, 0x3e, 0x45, 0x28, - 0x7b, 0x3f, 0xae, 0x7b, 0xf6, 0x8f, 0xd6, 0x4e, 0xf1, 0xf8, 0x38, 0x8f, 0x70, 0xb8, 0xf6, 0xf1, - 0x3f, 0x5a, 0x3f, 0xcb, 0x53, 0x90, 0xb3, 0xc7, 0x62, 0xf5, 0x5f, 0x00, 0xa3, 0x75, 0xe3, 0xfc, - 0x65, 0x4b, 0xfe, 0xb5, 0xf4, 0xe0, 0xfb, 0x00, 0x00, 0x00, 0xff, 0xff, 0x70, 0x47, 0x17, 0xd1, - 0x6f, 0x12, 0x00, 0x00, + // 1746 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xac, 0x58, 0x49, 0x73, 0xdb, 0xc8, + 0x15, 0x16, 0x29, 0x6e, 0x78, 0xa4, 0xa8, 0xd6, 0xd3, 0x46, 0x33, 0x49, 0x95, 0x07, 0xf1, 0x64, + 0x24, 0xc7, 0x65, 0xa7, 0xe4, 0x9a, 0x29, 0x3b, 0x93, 0x4a, 0x95, 0x65, 0x6b, 0x2c, 0xd5, 0xc4, + 0xb6, 0x02, 0x7b, 0x7c, 0xc8, 0x52, 0x2c, 0x88, 0x68, 0x92, 0x88, 0x40, 0x00, 0x06, 0x1a, 0x1a, + 0xca, 0xff, 0x60, 0x7e, 0x49, 0xae, 0xb9, 0xe4,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 0xed, 0xbe, 0xe7, 0xe6, 0x1f, 0xeb, 0xd0, 0x52, 0xd7, 0x15, 0x79, + 0x96, 0x20, 0x35, 0x72, 0x9d, 0xf4, 0x1c, 0x92, 0x3e, 0x73, 0x96, 0xae, 0xab, 0xba, 0xdc, 0xb0, + 0xa6, 0x28, 0x25, 0xc2, 0x9d, 0x73, 0xb9, 0x91, 0x86, 0x25, 0xbf, 0x71, 0x1f, 0xda, 0x7e, 0x32, + 0x1f, 0x89, 0x45, 0x2c, 0x3b, 0xa9, 0x61, 0xb5, 0xfc, 0x64, 0xfe, 0x66, 0x11, 0xe3, 0x11, 0x6c, + 0xe4, 0x6d, 0x49, 0x8b, 0xa8, 0x3b, 0xa1, 0xaf, 0x43, 0xac, 0x82, 0xf4, 0xcc, 0xea, 0x66, 0x3d, + 0x79, 0xe6, 0xe0, 0x01, 0x30, 0x69, 0xa3, 0xa0, 0x57, 0x9d, 0xba, 0x25, 0x4f, 0xdd, 0x27, 0xbe, + 0xc6, 0x66, 0x8a, 0xcb, 0x0f, 0xc0, 0xa0, 0x8a, 0x50, 0x2a, 0x6d, 0xa9, 0xd2, 0x21, 0x86, 0x14, + 0x7e, 0x06, 0x9b, 0xf9, 0xfd, 0xae, 0x54, 0x3a, 0xca, 0x4b, 0xce, 0xbe, 0x11, 0x5d, 0xa3, 0x18, + 0xdd, 0x33, 0x68, 0xeb, 0x2d, 0x56, 0xce, 0x02, 0x77, 0xa1, 0x19, 0xda, 0x91, 0x88, 0x35, 0x3c, + 0xa5, 0x78, 0x73, 0x6e, 0x47, 0x34, 0x43, 0xe9, 0x89, 0x40, 0xa9, 0x98, 0x8f, 0x61, 0xa3, 0xc0, + 0x27, 0x54, 0x15, 0x81, 0xb0, 0x3d, 0x9d, 0x22, 0x45, 0x64, 0xcb, 0xd4, 0xf3, 0x65, 0xcc, 0xc7, + 0x60, 0x64, 0xb5, 0x48, 0x69, 0x09, 0x93, 0x8b, 0xaf, 0x79, 0x3a, 0x16, 0x69, 0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c, 0xae, 0xfc, 0x4f, 0x60, 0xb8, + 0x7a, 0xc4, 0xa7, 0x20, 0xe7, 0x6f, 0xc8, 0xea, 0x7f, 0x06, 0x86, 0xab, 0xa6, 0xfc, 0x8b, 0x96, + 0xfc, 0xc7, 0xe9, 0xe1, 0xf7, 0x01, 0x00, 0x00, 0xff, 0xff, 0xa1, 0x0f, 0x72, 0x7a, 0x86, 0x12, + 0x00, 0x00, } diff --git a/types/types.proto b/types/types.proto index 6633d4e3c..db25fbba3 100644 --- a/types/types.proto +++ b/types/types.proto @@ -233,15 +233,19 @@ message ConfigInfo { message Header { string chain_id = 1; - uint64 height = 2; + int32 height = 2; uint64 time = 3; uint64 num_txs = 4; - bytes last_block_hash = 5; - PartSetHeader last_block_parts = 6; - bytes last_commit_hash = 7; - bytes data_hash = 8; - bytes validators_hash = 9; - bytes app_hash = 10; + BlockID last_block_id = 5; + bytes last_commit_hash = 6; + bytes data_hash = 7; + bytes validators_hash = 8; + bytes app_hash = 9; +} + +message BlockID { + bytes hash = 1; + PartSetHeader parts = 2; } message PartSetHeader { From 0bdb3b887e70b1ef16d32eece0248ec071fd8490 Mon Sep 17 00:00:00 2001 From: Ethan Buchman Date: Wed, 16 Nov 2016 16:22:52 -0500 Subject: [PATCH 6/6] fix chain_aware app --- example/chain_aware/chain_aware_app.go | 6 +++--- example/chain_aware/chain_aware_test.go | 5 ++++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/example/chain_aware/chain_aware_app.go b/example/chain_aware/chain_aware_app.go index df18891b5..aec7fe1b2 100644 --- a/example/chain_aware/chain_aware_app.go +++ b/example/chain_aware/chain_aware_app.go @@ -36,8 +36,8 @@ func NewChainAwareApplication() *ChainAwareApplication { return &ChainAwareApplication{} } -func (app *ChainAwareApplication) Info() string { - return "nil" +func (app *ChainAwareApplication) Info() (string, *types.TMSPInfo, *types.LastBlockInfo, *types.ConfigInfo) { + return "nil", nil, nil, nil } func (app *ChainAwareApplication) SetOption(key string, value string) (log string) { @@ -60,7 +60,7 @@ func (app *ChainAwareApplication) Query(query []byte) types.Result { return types.NewResultOK([]byte(Fmt("%d,%d", app.beginCount, app.endCount)), "") } -func (app *ChainAwareApplication) BeginBlock(height uint64) { +func (app *ChainAwareApplication) BeginBlock(hash []byte, header *types.Header) { app.beginCount += 1 return } diff --git a/example/chain_aware/chain_aware_test.go b/example/chain_aware/chain_aware_test.go index 21eb1b3f9..bad7c8120 100644 --- a/example/chain_aware/chain_aware_test.go +++ b/example/chain_aware/chain_aware_test.go @@ -8,6 +8,7 @@ import ( . "github.com/tendermint/go-common" "github.com/tendermint/tmsp/client" "github.com/tendermint/tmsp/server" + "github.com/tendermint/tmsp/types" ) func TestChainAware(t *testing.T) { @@ -29,8 +30,10 @@ func TestChainAware(t *testing.T) { defer client.Stop() n := uint64(5) + hash := []byte("fake block hash") + header := &types.Header{} for i := uint64(0); i < n; i++ { - client.BeginBlockSync(i) + client.BeginBlockSync(hash, header) client.EndBlockSync(i) client.CommitSync() }