diff --git a/Makefile b/Makefile index a1c0109623e..c32fc39a609 100644 --- a/Makefile +++ b/Makefile @@ -15,6 +15,8 @@ GOOS ?= linux GOARCH ?= amd64 GOARM ?= +DOCKER := $(shell which docker) + ifeq (linux/arm,$(findstring linux/arm,$(TARGETPLATFORM))) GOOS=linux GOARCH=arm diff --git a/abci/client/grpc_client.go b/abci/client/grpc_client.go index 926e679d687..0b337eb8d43 100644 --- a/abci/client/grpc_client.go +++ b/abci/client/grpc_client.go @@ -245,3 +245,15 @@ func (cli *grpcClient) VerifyVoteExtension(ctx context.Context, req *types.Reque func (cli *grpcClient) FinalizeBlock(ctx context.Context, req *types.RequestFinalizeBlock) (*types.ResponseFinalizeBlock, error) { return cli.client.FinalizeBlock(ctx, types.ToRequestFinalizeBlock(req).GetFinalizeBlock(), grpc.WaitForReady(true)) } + +func (cli *grpcClient) CreateOracleResultTx(ctx context.Context, req *types.RequestCreateOracleResultTx) (*types.ResponseCreateOracleResultTx, error) { + return cli.client.CreateOracleResultTx(ctx, types.ToRequestCreateOracleResultTx(req).GetCreateOracleResultTx(), grpc.WaitForReady(true)) +} + +func (cli *grpcClient) FetchOracleVotes(ctx context.Context, req *types.RequestFetchOracleVotes) (*types.ResponseFetchOracleVotes, error) { + return cli.client.FetchOracleVotes(ctx, types.ToRequestFetchOracleVotes(req).GetFetchOracleVotes(), grpc.WaitForReady(true)) +} + +func (cli *grpcClient) ValidateOracleVotes(ctx context.Context, req *types.RequestValidateOracleVotes) (*types.ResponseValidateOracleVotes, error) { + return cli.client.ValidateOracleVotes(ctx, types.ToRequestValidateOracleVotes(req).GetValidateOracleVotes(), grpc.WaitForReady(true)) +} diff --git a/abci/client/mocks/client.go b/abci/client/mocks/client.go index 6494bdb5db7..b48cbdd19f1 100644 --- a/abci/client/mocks/client.go +++ b/abci/client/mocks/client.go @@ -406,6 +406,32 @@ func (_m *Client) OnStop() { _m.Called() } +// FetchOracleVotes provides a mock function with given fields: _a0, _a1 +func (_m *Client) FetchOracleVotes(_a0 context.Context, _a1 *types.RequestFetchOracleVotes) (*types.ResponseFetchOracleVotes, error) { + ret := _m.Called(_a0, _a1) + + var r0 *types.ResponseFetchOracleVotes + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *types.RequestFetchOracleVotes) (*types.ResponseFetchOracleVotes, error)); ok { + return rf(_a0, _a1) + } + if rf, ok := ret.Get(0).(func(context.Context, *types.RequestFetchOracleVotes) *types.ResponseFetchOracleVotes); ok { + r0 = rf(_a0, _a1) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*types.ResponseFetchOracleVotes) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, *types.RequestFetchOracleVotes) error); ok { + r1 = rf(_a0, _a1) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + // PrepareProposal provides a mock function with given fields: _a0, _a1 func (_m *Client) PrepareProposal(_a0 context.Context, _a1 *types.RequestPrepareProposal) (*types.ResponsePrepareProposal, error) { ret := _m.Called(_a0, _a1) @@ -524,6 +550,32 @@ func (_m *Client) SetResponseCallback(_a0 abcicli.Callback) { _m.Called(_a0) } +// CreateOracleResultTx provides a mock function with given fields: _a0, _a1 +func (_m *Client) CreateOracleResultTx(_a0 context.Context, _a1 *types.RequestCreateOracleResultTx) (*types.ResponseCreateOracleResultTx, error) { + ret := _m.Called(_a0, _a1) + + var r0 *types.ResponseCreateOracleResultTx + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *types.RequestCreateOracleResultTx) (*types.ResponseCreateOracleResultTx, error)); ok { + return rf(_a0, _a1) + } + if rf, ok := ret.Get(0).(func(context.Context, *types.RequestCreateOracleResultTx) *types.ResponseCreateOracleResultTx); ok { + r0 = rf(_a0, _a1) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*types.ResponseCreateOracleResultTx) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, *types.RequestCreateOracleResultTx) error); ok { + r1 = rf(_a0, _a1) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + // Start provides a mock function with given fields: func (_m *Client) Start() error { ret := _m.Called() @@ -566,6 +618,32 @@ func (_m *Client) String() string { return r0 } +// ValidateOracleVotes provides a mock function with given fields: _a0, _a1 +func (_m *Client) ValidateOracleVotes(_a0 context.Context, _a1 *types.RequestValidateOracleVotes) (*types.ResponseValidateOracleVotes, error) { + ret := _m.Called(_a0, _a1) + + var r0 *types.ResponseValidateOracleVotes + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *types.RequestValidateOracleVotes) (*types.ResponseValidateOracleVotes, error)); ok { + return rf(_a0, _a1) + } + if rf, ok := ret.Get(0).(func(context.Context, *types.RequestValidateOracleVotes) *types.ResponseValidateOracleVotes); ok { + r0 = rf(_a0, _a1) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*types.ResponseValidateOracleVotes) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, *types.RequestValidateOracleVotes) error); ok { + r1 = rf(_a0, _a1) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + // VerifyVoteExtension provides a mock function with given fields: _a0, _a1 func (_m *Client) VerifyVoteExtension(_a0 context.Context, _a1 *types.RequestVerifyVoteExtension) (*types.ResponseVerifyVoteExtension, error) { ret := _m.Called(_a0, _a1) diff --git a/abci/client/socket_client.go b/abci/client/socket_client.go index 47382e31292..a5012387047 100644 --- a/abci/client/socket_client.go +++ b/abci/client/socket_client.go @@ -412,6 +412,39 @@ func (cli *socketClient) FinalizeBlock(ctx context.Context, req *types.RequestFi return reqRes.Response.GetFinalizeBlock(), cli.Error() } +func (cli *socketClient) CreateOracleResultTx(ctx context.Context, req *types.RequestCreateOracleResultTx) (*types.ResponseCreateOracleResultTx, error) { + reqRes, err := cli.queueRequest(ctx, types.ToRequestCreateOracleResultTx(req)) + if err != nil { + return nil, err + } + if err := cli.Flush(ctx); err != nil { + return nil, err + } + return reqRes.Response.GetCreateOracleResultTx(), cli.Error() +} + +func (cli *socketClient) FetchOracleVotes(ctx context.Context, req *types.RequestFetchOracleVotes) (*types.ResponseFetchOracleVotes, error) { + reqRes, err := cli.queueRequest(ctx, types.ToRequestFetchOracleVotes(req)) + if err != nil { + return nil, err + } + if err := cli.Flush(ctx); err != nil { + return nil, err + } + return reqRes.Response.GetFetchOracleVotes(), cli.Error() +} + +func (cli *socketClient) ValidateOracleVotes(ctx context.Context, req *types.RequestValidateOracleVotes) (*types.ResponseValidateOracleVotes, error) { + reqRes, err := cli.queueRequest(ctx, types.ToRequestValidateOracleVotes(req)) + if err != nil { + return nil, err + } + if err := cli.Flush(ctx); err != nil { + return nil, err + } + return reqRes.Response.GetValidateOracleVotes(), cli.Error() +} + func (cli *socketClient) queueRequest(ctx context.Context, req *types.Request) (*ReqRes, error) { reqres := NewReqRes(req) @@ -493,6 +526,12 @@ func resMatchesReq(req *types.Request, res *types.Response) (ok bool) { _, ok = res.Value.(*types.Response_ProcessProposal) case *types.Request_FinalizeBlock: _, ok = res.Value.(*types.Response_FinalizeBlock) + case *types.Request_CreateOracleResultTx: + _, ok = res.Value.(*types.Response_CreateOracleResultTx) + case *types.Request_ValidateOracleVotes: + _, ok = res.Value.(*types.Response_ValidateOracleVotes) + case *types.Request_FetchOracleVotes: + _, ok = res.Value.(*types.Response_FetchOracleVotes) } return ok } diff --git a/abci/types/application.go b/abci/types/application.go index 4ccfd229ebc..ffb43865dd1 100644 --- a/abci/types/application.go +++ b/abci/types/application.go @@ -1,6 +1,8 @@ package types -import "context" +import ( + "context" +) //go:generate ../../scripts/mockery_generate.sh Application @@ -32,6 +34,11 @@ type Application interface { OfferSnapshot(context.Context, *RequestOfferSnapshot) (*ResponseOfferSnapshot, error) // Offer a snapshot to the application LoadSnapshotChunk(context.Context, *RequestLoadSnapshotChunk) (*ResponseLoadSnapshotChunk, error) // Load a snapshot chunk ApplySnapshotChunk(context.Context, *RequestApplySnapshotChunk) (*ResponseApplySnapshotChunk, error) // Apply a shapshot chunk + + // Hooks + CreateOracleResultTx(context.Context, *RequestCreateOracleResultTx) (*ResponseCreateOracleResultTx, error) + FetchOracleVotes(context.Context, *RequestFetchOracleVotes) (*ResponseFetchOracleVotes, error) + ValidateOracleVotes(context.Context, *RequestValidateOracleVotes) (*ResponseValidateOracleVotes, error) } //------------------------------------------------------- @@ -117,3 +124,15 @@ func (BaseApplication) FinalizeBlock(_ context.Context, req *RequestFinalizeBloc TxResults: txs, }, nil } + +func (BaseApplication) CreateOracleResultTx(_ context.Context, req *RequestCreateOracleResultTx) (*ResponseCreateOracleResultTx, error) { + return &ResponseCreateOracleResultTx{}, nil +} + +func (BaseApplication) FetchOracleVotes(_ context.Context, req *RequestFetchOracleVotes) (*ResponseFetchOracleVotes, error) { + return &ResponseFetchOracleVotes{}, nil +} + +func (BaseApplication) ValidateOracleVotes(_ context.Context, req *RequestValidateOracleVotes) (*ResponseValidateOracleVotes, error) { + return &ResponseValidateOracleVotes{}, nil +} diff --git a/abci/types/messages.go b/abci/types/messages.go index 44d2f956838..2bd4421de53 100644 --- a/abci/types/messages.go +++ b/abci/types/messages.go @@ -124,6 +124,24 @@ func ToRequestFinalizeBlock(req *RequestFinalizeBlock) *Request { } } +func ToRequestCreateOracleResultTx(req *RequestCreateOracleResultTx) *Request { + return &Request{ + Value: &Request_CreateOracleResultTx{req}, + } +} + +func ToRequestFetchOracleVotes(req *RequestFetchOracleVotes) *Request { + return &Request{ + Value: &Request_FetchOracleVotes{req}, + } +} + +func ToRequestValidateOracleVotes(req *RequestValidateOracleVotes) *Request { + return &Request{ + Value: &Request_ValidateOracleVotes{req}, + } +} + //---------------------------------------- func ToResponseException(errStr string) *Response { @@ -227,3 +245,9 @@ func ToResponseFinalizeBlock(res *ResponseFinalizeBlock) *Response { Value: &Response_FinalizeBlock{res}, } } + +func ToResponseCreateOracleResultTx(res *ResponseCreateOracleResultTx) *Response { + return &Response{ + Value: &Response_CreateOracleResultTx{res}, + } +} diff --git a/abci/types/mocks/application.go b/abci/types/mocks/application.go index b7f0b51ded0..061bee9c225 100644 --- a/abci/types/mocks/application.go +++ b/abci/types/mocks/application.go @@ -274,6 +274,32 @@ func (_m *Application) OfferSnapshot(_a0 context.Context, _a1 *types.RequestOffe return r0, r1 } +// FetchOracleVotes provides a mock function with given fields: _a0, _a1 +func (_m *Application) FetchOracleVotes(_a0 context.Context, _a1 *types.RequestFetchOracleVotes) (*types.ResponseFetchOracleVotes, error) { + ret := _m.Called(_a0, _a1) + + var r0 *types.ResponseFetchOracleVotes + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *types.RequestFetchOracleVotes) (*types.ResponseFetchOracleVotes, error)); ok { + return rf(_a0, _a1) + } + if rf, ok := ret.Get(0).(func(context.Context, *types.RequestFetchOracleVotes) *types.ResponseFetchOracleVotes); ok { + r0 = rf(_a0, _a1) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*types.ResponseFetchOracleVotes) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, *types.RequestFetchOracleVotes) error); ok { + r1 = rf(_a0, _a1) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + // PrepareProposal provides a mock function with given fields: _a0, _a1 func (_m *Application) PrepareProposal(_a0 context.Context, _a1 *types.RequestPrepareProposal) (*types.ResponsePrepareProposal, error) { ret := _m.Called(_a0, _a1) @@ -352,6 +378,58 @@ func (_m *Application) Query(_a0 context.Context, _a1 *types.RequestQuery) (*typ return r0, r1 } +// CreateOracleResultTx provides a mock function with given fields: _a0, _a1 +func (_m *Application) CreateOracleResultTx(_a0 context.Context, _a1 *types.RequestCreateOracleResultTx) (*types.ResponseCreateOracleResultTx, error) { + ret := _m.Called(_a0, _a1) + + var r0 *types.ResponseCreateOracleResultTx + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *types.RequestCreateOracleResultTx) (*types.ResponseCreateOracleResultTx, error)); ok { + return rf(_a0, _a1) + } + if rf, ok := ret.Get(0).(func(context.Context, *types.RequestCreateOracleResultTx) *types.ResponseCreateOracleResultTx); ok { + r0 = rf(_a0, _a1) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*types.ResponseCreateOracleResultTx) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, *types.RequestCreateOracleResultTx) error); ok { + r1 = rf(_a0, _a1) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// ValidateOracleVotes provides a mock function with given fields: _a0, _a1 +func (_m *Application) ValidateOracleVotes(_a0 context.Context, _a1 *types.RequestValidateOracleVotes) (*types.ResponseValidateOracleVotes, error) { + ret := _m.Called(_a0, _a1) + + var r0 *types.ResponseValidateOracleVotes + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *types.RequestValidateOracleVotes) (*types.ResponseValidateOracleVotes, error)); ok { + return rf(_a0, _a1) + } + if rf, ok := ret.Get(0).(func(context.Context, *types.RequestValidateOracleVotes) *types.ResponseValidateOracleVotes); ok { + r0 = rf(_a0, _a1) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*types.ResponseValidateOracleVotes) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, *types.RequestValidateOracleVotes) error); ok { + r1 = rf(_a0, _a1) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + // VerifyVoteExtension provides a mock function with given fields: _a0, _a1 func (_m *Application) VerifyVoteExtension(_a0 context.Context, _a1 *types.RequestVerifyVoteExtension) (*types.ResponseVerifyVoteExtension, error) { ret := _m.Called(_a0, _a1) diff --git a/abci/types/types.pb.go b/abci/types/types.pb.go index 203aeeeb313..25cc23dcafe 100644 --- a/abci/types/types.pb.go +++ b/abci/types/types.pb.go @@ -7,6 +7,7 @@ import ( context "context" fmt "fmt" crypto "github.com/cometbft/cometbft/proto/tendermint/crypto" + oracle "github.com/cometbft/cometbft/proto/tendermint/oracle" types1 "github.com/cometbft/cometbft/proto/tendermint/types" _ "github.com/cosmos/gogoproto/gogoproto" grpc1 "github.com/cosmos/gogoproto/grpc" @@ -121,7 +122,7 @@ func (x ResponseOfferSnapshot_Result) String() string { } func (ResponseOfferSnapshot_Result) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_252557cfdd89a31a, []int{27, 0} + return fileDescriptor_252557cfdd89a31a, []int{30, 0} } type ResponseApplySnapshotChunk_Result int32 @@ -158,7 +159,7 @@ func (x ResponseApplySnapshotChunk_Result) String() string { } func (ResponseApplySnapshotChunk_Result) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_252557cfdd89a31a, []int{29, 0} + return fileDescriptor_252557cfdd89a31a, []int{32, 0} } type ResponseProcessProposal_ProposalStatus int32 @@ -186,7 +187,7 @@ func (x ResponseProcessProposal_ProposalStatus) String() string { } func (ResponseProcessProposal_ProposalStatus) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_252557cfdd89a31a, []int{31, 0} + return fileDescriptor_252557cfdd89a31a, []int{34, 0} } type ResponseVerifyVoteExtension_VerifyStatus int32 @@ -218,7 +219,32 @@ func (x ResponseVerifyVoteExtension_VerifyStatus) String() string { } func (ResponseVerifyVoteExtension_VerifyStatus) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_252557cfdd89a31a, []int{33, 0} + return fileDescriptor_252557cfdd89a31a, []int{36, 0} +} + +type ResponseValidateOracleVotes_Status int32 + +const ( + ResponseValidateOracleVotes_ABSENT ResponseValidateOracleVotes_Status = 0 + ResponseValidateOracleVotes_PRESENT ResponseValidateOracleVotes_Status = 1 +) + +var ResponseValidateOracleVotes_Status_name = map[int32]string{ + 0: "ABSENT", + 1: "PRESENT", +} + +var ResponseValidateOracleVotes_Status_value = map[string]int32{ + "ABSENT": 0, + "PRESENT": 1, +} + +func (x ResponseValidateOracleVotes_Status) String() string { + return proto.EnumName(ResponseValidateOracleVotes_Status_name, int32(x)) +} + +func (ResponseValidateOracleVotes_Status) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_252557cfdd89a31a, []int{40, 0} } type Request struct { @@ -239,6 +265,9 @@ type Request struct { // *Request_ExtendVote // *Request_VerifyVoteExtension // *Request_FinalizeBlock + // *Request_CreateOracleResultTx + // *Request_FetchOracleVotes + // *Request_ValidateOracleVotes Value isRequest_Value `protobuf_oneof:"value"` } @@ -329,23 +358,35 @@ type Request_VerifyVoteExtension struct { type Request_FinalizeBlock struct { FinalizeBlock *RequestFinalizeBlock `protobuf:"bytes,20,opt,name=finalize_block,json=finalizeBlock,proto3,oneof" json:"finalize_block,omitempty"` } - -func (*Request_Echo) isRequest_Value() {} -func (*Request_Flush) isRequest_Value() {} -func (*Request_Info) isRequest_Value() {} -func (*Request_InitChain) isRequest_Value() {} -func (*Request_Query) isRequest_Value() {} -func (*Request_CheckTx) isRequest_Value() {} -func (*Request_Commit) isRequest_Value() {} -func (*Request_ListSnapshots) isRequest_Value() {} -func (*Request_OfferSnapshot) isRequest_Value() {} -func (*Request_LoadSnapshotChunk) isRequest_Value() {} -func (*Request_ApplySnapshotChunk) isRequest_Value() {} -func (*Request_PrepareProposal) isRequest_Value() {} -func (*Request_ProcessProposal) isRequest_Value() {} -func (*Request_ExtendVote) isRequest_Value() {} -func (*Request_VerifyVoteExtension) isRequest_Value() {} -func (*Request_FinalizeBlock) isRequest_Value() {} +type Request_CreateOracleResultTx struct { + CreateOracleResultTx *RequestCreateOracleResultTx `protobuf:"bytes,21,opt,name=create_oracle_result_tx,json=createOracleResultTx,proto3,oneof" json:"create_oracle_result_tx,omitempty"` +} +type Request_FetchOracleVotes struct { + FetchOracleVotes *RequestFetchOracleVotes `protobuf:"bytes,22,opt,name=fetch_oracle_votes,json=fetchOracleVotes,proto3,oneof" json:"fetch_oracle_votes,omitempty"` +} +type Request_ValidateOracleVotes struct { + ValidateOracleVotes *RequestValidateOracleVotes `protobuf:"bytes,23,opt,name=validate_oracle_votes,json=validateOracleVotes,proto3,oneof" json:"validate_oracle_votes,omitempty"` +} + +func (*Request_Echo) isRequest_Value() {} +func (*Request_Flush) isRequest_Value() {} +func (*Request_Info) isRequest_Value() {} +func (*Request_InitChain) isRequest_Value() {} +func (*Request_Query) isRequest_Value() {} +func (*Request_CheckTx) isRequest_Value() {} +func (*Request_Commit) isRequest_Value() {} +func (*Request_ListSnapshots) isRequest_Value() {} +func (*Request_OfferSnapshot) isRequest_Value() {} +func (*Request_LoadSnapshotChunk) isRequest_Value() {} +func (*Request_ApplySnapshotChunk) isRequest_Value() {} +func (*Request_PrepareProposal) isRequest_Value() {} +func (*Request_ProcessProposal) isRequest_Value() {} +func (*Request_ExtendVote) isRequest_Value() {} +func (*Request_VerifyVoteExtension) isRequest_Value() {} +func (*Request_FinalizeBlock) isRequest_Value() {} +func (*Request_CreateOracleResultTx) isRequest_Value() {} +func (*Request_FetchOracleVotes) isRequest_Value() {} +func (*Request_ValidateOracleVotes) isRequest_Value() {} func (m *Request) GetValue() isRequest_Value { if m != nil { @@ -466,6 +507,27 @@ func (m *Request) GetFinalizeBlock() *RequestFinalizeBlock { return nil } +func (m *Request) GetCreateOracleResultTx() *RequestCreateOracleResultTx { + if x, ok := m.GetValue().(*Request_CreateOracleResultTx); ok { + return x.CreateOracleResultTx + } + return nil +} + +func (m *Request) GetFetchOracleVotes() *RequestFetchOracleVotes { + if x, ok := m.GetValue().(*Request_FetchOracleVotes); ok { + return x.FetchOracleVotes + } + return nil +} + +func (m *Request) GetValidateOracleVotes() *RequestValidateOracleVotes { + if x, ok := m.GetValue().(*Request_ValidateOracleVotes); ok { + return x.ValidateOracleVotes + } + return nil +} + // XXX_OneofWrappers is for the internal use of the proto package. func (*Request) XXX_OneofWrappers() []interface{} { return []interface{}{ @@ -485,6 +547,9 @@ func (*Request) XXX_OneofWrappers() []interface{} { (*Request_ExtendVote)(nil), (*Request_VerifyVoteExtension)(nil), (*Request_FinalizeBlock)(nil), + (*Request_CreateOracleResultTx)(nil), + (*Request_FetchOracleVotes)(nil), + (*Request_ValidateOracleVotes)(nil), } } @@ -1572,6 +1637,138 @@ func (m *RequestFinalizeBlock) GetProposerAddress() []byte { return nil } +type RequestCreateOracleResultTx struct { + Proposer []byte `protobuf:"bytes,1,opt,name=proposer,proto3" json:"proposer,omitempty"` + GossipedVotes []*oracle.GossipedVotes `protobuf:"bytes,2,rep,name=gossiped_votes,json=gossipedVotes,proto3" json:"gossiped_votes,omitempty"` +} + +func (m *RequestCreateOracleResultTx) Reset() { *m = RequestCreateOracleResultTx{} } +func (m *RequestCreateOracleResultTx) String() string { return proto.CompactTextString(m) } +func (*RequestCreateOracleResultTx) ProtoMessage() {} +func (*RequestCreateOracleResultTx) Descriptor() ([]byte, []int) { + return fileDescriptor_252557cfdd89a31a, []int{17} +} +func (m *RequestCreateOracleResultTx) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RequestCreateOracleResultTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RequestCreateOracleResultTx.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *RequestCreateOracleResultTx) XXX_Merge(src proto.Message) { + xxx_messageInfo_RequestCreateOracleResultTx.Merge(m, src) +} +func (m *RequestCreateOracleResultTx) XXX_Size() int { + return m.Size() +} +func (m *RequestCreateOracleResultTx) XXX_DiscardUnknown() { + xxx_messageInfo_RequestCreateOracleResultTx.DiscardUnknown(m) +} + +var xxx_messageInfo_RequestCreateOracleResultTx proto.InternalMessageInfo + +func (m *RequestCreateOracleResultTx) GetProposer() []byte { + if m != nil { + return m.Proposer + } + return nil +} + +func (m *RequestCreateOracleResultTx) GetGossipedVotes() []*oracle.GossipedVotes { + if m != nil { + return m.GossipedVotes + } + return nil +} + +type RequestFetchOracleVotes struct { +} + +func (m *RequestFetchOracleVotes) Reset() { *m = RequestFetchOracleVotes{} } +func (m *RequestFetchOracleVotes) String() string { return proto.CompactTextString(m) } +func (*RequestFetchOracleVotes) ProtoMessage() {} +func (*RequestFetchOracleVotes) Descriptor() ([]byte, []int) { + return fileDescriptor_252557cfdd89a31a, []int{18} +} +func (m *RequestFetchOracleVotes) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RequestFetchOracleVotes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RequestFetchOracleVotes.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *RequestFetchOracleVotes) XXX_Merge(src proto.Message) { + xxx_messageInfo_RequestFetchOracleVotes.Merge(m, src) +} +func (m *RequestFetchOracleVotes) XXX_Size() int { + return m.Size() +} +func (m *RequestFetchOracleVotes) XXX_DiscardUnknown() { + xxx_messageInfo_RequestFetchOracleVotes.DiscardUnknown(m) +} + +var xxx_messageInfo_RequestFetchOracleVotes proto.InternalMessageInfo + +type RequestValidateOracleVotes struct { + OracleTx []byte `protobuf:"bytes,1,opt,name=oracle_tx,json=oracleTx,proto3" json:"oracle_tx,omitempty"` +} + +func (m *RequestValidateOracleVotes) Reset() { *m = RequestValidateOracleVotes{} } +func (m *RequestValidateOracleVotes) String() string { return proto.CompactTextString(m) } +func (*RequestValidateOracleVotes) ProtoMessage() {} +func (*RequestValidateOracleVotes) Descriptor() ([]byte, []int) { + return fileDescriptor_252557cfdd89a31a, []int{19} +} +func (m *RequestValidateOracleVotes) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RequestValidateOracleVotes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RequestValidateOracleVotes.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *RequestValidateOracleVotes) XXX_Merge(src proto.Message) { + xxx_messageInfo_RequestValidateOracleVotes.Merge(m, src) +} +func (m *RequestValidateOracleVotes) XXX_Size() int { + return m.Size() +} +func (m *RequestValidateOracleVotes) XXX_DiscardUnknown() { + xxx_messageInfo_RequestValidateOracleVotes.DiscardUnknown(m) +} + +var xxx_messageInfo_RequestValidateOracleVotes proto.InternalMessageInfo + +func (m *RequestValidateOracleVotes) GetOracleTx() []byte { + if m != nil { + return m.OracleTx + } + return nil +} + type Response struct { // Types that are valid to be assigned to Value: // @@ -1592,6 +1789,9 @@ type Response struct { // *Response_ExtendVote // *Response_VerifyVoteExtension // *Response_FinalizeBlock + // *Response_CreateOracleResultTx + // *Response_FetchOracleVotes + // *Response_ValidateOracleVotes Value isResponse_Value `protobuf_oneof:"value"` } @@ -1599,7 +1799,7 @@ func (m *Response) Reset() { *m = Response{} } func (m *Response) String() string { return proto.CompactTextString(m) } func (*Response) ProtoMessage() {} func (*Response) Descriptor() ([]byte, []int) { - return fileDescriptor_252557cfdd89a31a, []int{17} + return fileDescriptor_252557cfdd89a31a, []int{20} } func (m *Response) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1685,24 +1885,36 @@ type Response_VerifyVoteExtension struct { type Response_FinalizeBlock struct { FinalizeBlock *ResponseFinalizeBlock `protobuf:"bytes,21,opt,name=finalize_block,json=finalizeBlock,proto3,oneof" json:"finalize_block,omitempty"` } - -func (*Response_Exception) isResponse_Value() {} -func (*Response_Echo) isResponse_Value() {} -func (*Response_Flush) isResponse_Value() {} -func (*Response_Info) isResponse_Value() {} -func (*Response_InitChain) isResponse_Value() {} -func (*Response_Query) isResponse_Value() {} -func (*Response_CheckTx) isResponse_Value() {} -func (*Response_Commit) isResponse_Value() {} -func (*Response_ListSnapshots) isResponse_Value() {} -func (*Response_OfferSnapshot) isResponse_Value() {} -func (*Response_LoadSnapshotChunk) isResponse_Value() {} -func (*Response_ApplySnapshotChunk) isResponse_Value() {} -func (*Response_PrepareProposal) isResponse_Value() {} -func (*Response_ProcessProposal) isResponse_Value() {} -func (*Response_ExtendVote) isResponse_Value() {} -func (*Response_VerifyVoteExtension) isResponse_Value() {} -func (*Response_FinalizeBlock) isResponse_Value() {} +type Response_CreateOracleResultTx struct { + CreateOracleResultTx *ResponseCreateOracleResultTx `protobuf:"bytes,22,opt,name=create_oracle_result_tx,json=createOracleResultTx,proto3,oneof" json:"create_oracle_result_tx,omitempty"` +} +type Response_FetchOracleVotes struct { + FetchOracleVotes *ResponseFetchOracleVotes `protobuf:"bytes,23,opt,name=fetch_oracle_votes,json=fetchOracleVotes,proto3,oneof" json:"fetch_oracle_votes,omitempty"` +} +type Response_ValidateOracleVotes struct { + ValidateOracleVotes *ResponseValidateOracleVotes `protobuf:"bytes,24,opt,name=validate_oracle_votes,json=validateOracleVotes,proto3,oneof" json:"validate_oracle_votes,omitempty"` +} + +func (*Response_Exception) isResponse_Value() {} +func (*Response_Echo) isResponse_Value() {} +func (*Response_Flush) isResponse_Value() {} +func (*Response_Info) isResponse_Value() {} +func (*Response_InitChain) isResponse_Value() {} +func (*Response_Query) isResponse_Value() {} +func (*Response_CheckTx) isResponse_Value() {} +func (*Response_Commit) isResponse_Value() {} +func (*Response_ListSnapshots) isResponse_Value() {} +func (*Response_OfferSnapshot) isResponse_Value() {} +func (*Response_LoadSnapshotChunk) isResponse_Value() {} +func (*Response_ApplySnapshotChunk) isResponse_Value() {} +func (*Response_PrepareProposal) isResponse_Value() {} +func (*Response_ProcessProposal) isResponse_Value() {} +func (*Response_ExtendVote) isResponse_Value() {} +func (*Response_VerifyVoteExtension) isResponse_Value() {} +func (*Response_FinalizeBlock) isResponse_Value() {} +func (*Response_CreateOracleResultTx) isResponse_Value() {} +func (*Response_FetchOracleVotes) isResponse_Value() {} +func (*Response_ValidateOracleVotes) isResponse_Value() {} func (m *Response) GetValue() isResponse_Value { if m != nil { @@ -1830,6 +2042,27 @@ func (m *Response) GetFinalizeBlock() *ResponseFinalizeBlock { return nil } +func (m *Response) GetCreateOracleResultTx() *ResponseCreateOracleResultTx { + if x, ok := m.GetValue().(*Response_CreateOracleResultTx); ok { + return x.CreateOracleResultTx + } + return nil +} + +func (m *Response) GetFetchOracleVotes() *ResponseFetchOracleVotes { + if x, ok := m.GetValue().(*Response_FetchOracleVotes); ok { + return x.FetchOracleVotes + } + return nil +} + +func (m *Response) GetValidateOracleVotes() *ResponseValidateOracleVotes { + if x, ok := m.GetValue().(*Response_ValidateOracleVotes); ok { + return x.ValidateOracleVotes + } + return nil +} + // XXX_OneofWrappers is for the internal use of the proto package. func (*Response) XXX_OneofWrappers() []interface{} { return []interface{}{ @@ -1850,6 +2083,9 @@ func (*Response) XXX_OneofWrappers() []interface{} { (*Response_ExtendVote)(nil), (*Response_VerifyVoteExtension)(nil), (*Response_FinalizeBlock)(nil), + (*Response_CreateOracleResultTx)(nil), + (*Response_FetchOracleVotes)(nil), + (*Response_ValidateOracleVotes)(nil), } } @@ -1862,7 +2098,7 @@ func (m *ResponseException) Reset() { *m = ResponseException{} } func (m *ResponseException) String() string { return proto.CompactTextString(m) } func (*ResponseException) ProtoMessage() {} func (*ResponseException) Descriptor() ([]byte, []int) { - return fileDescriptor_252557cfdd89a31a, []int{18} + return fileDescriptor_252557cfdd89a31a, []int{21} } func (m *ResponseException) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1906,7 +2142,7 @@ func (m *ResponseEcho) Reset() { *m = ResponseEcho{} } func (m *ResponseEcho) String() string { return proto.CompactTextString(m) } func (*ResponseEcho) ProtoMessage() {} func (*ResponseEcho) Descriptor() ([]byte, []int) { - return fileDescriptor_252557cfdd89a31a, []int{19} + return fileDescriptor_252557cfdd89a31a, []int{22} } func (m *ResponseEcho) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1949,7 +2185,7 @@ func (m *ResponseFlush) Reset() { *m = ResponseFlush{} } func (m *ResponseFlush) String() string { return proto.CompactTextString(m) } func (*ResponseFlush) ProtoMessage() {} func (*ResponseFlush) Descriptor() ([]byte, []int) { - return fileDescriptor_252557cfdd89a31a, []int{20} + return fileDescriptor_252557cfdd89a31a, []int{23} } func (m *ResponseFlush) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1990,7 +2226,7 @@ func (m *ResponseInfo) Reset() { *m = ResponseInfo{} } func (m *ResponseInfo) String() string { return proto.CompactTextString(m) } func (*ResponseInfo) ProtoMessage() {} func (*ResponseInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_252557cfdd89a31a, []int{21} + return fileDescriptor_252557cfdd89a31a, []int{24} } func (m *ResponseInfo) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2064,7 +2300,7 @@ func (m *ResponseInitChain) Reset() { *m = ResponseInitChain{} } func (m *ResponseInitChain) String() string { return proto.CompactTextString(m) } func (*ResponseInitChain) ProtoMessage() {} func (*ResponseInitChain) Descriptor() ([]byte, []int) { - return fileDescriptor_252557cfdd89a31a, []int{22} + return fileDescriptor_252557cfdd89a31a, []int{25} } func (m *ResponseInitChain) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2131,7 +2367,7 @@ func (m *ResponseQuery) Reset() { *m = ResponseQuery{} } func (m *ResponseQuery) String() string { return proto.CompactTextString(m) } func (*ResponseQuery) ProtoMessage() {} func (*ResponseQuery) Descriptor() ([]byte, []int) { - return fileDescriptor_252557cfdd89a31a, []int{23} + return fileDescriptor_252557cfdd89a31a, []int{26} } func (m *ResponseQuery) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2238,7 +2474,7 @@ func (m *ResponseCheckTx) Reset() { *m = ResponseCheckTx{} } func (m *ResponseCheckTx) String() string { return proto.CompactTextString(m) } func (*ResponseCheckTx) ProtoMessage() {} func (*ResponseCheckTx) Descriptor() ([]byte, []int) { - return fileDescriptor_252557cfdd89a31a, []int{24} + return fileDescriptor_252557cfdd89a31a, []int{27} } func (m *ResponseCheckTx) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2331,7 +2567,7 @@ func (m *ResponseCommit) Reset() { *m = ResponseCommit{} } func (m *ResponseCommit) String() string { return proto.CompactTextString(m) } func (*ResponseCommit) ProtoMessage() {} func (*ResponseCommit) Descriptor() ([]byte, []int) { - return fileDescriptor_252557cfdd89a31a, []int{25} + return fileDescriptor_252557cfdd89a31a, []int{28} } func (m *ResponseCommit) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2375,7 +2611,7 @@ func (m *ResponseListSnapshots) Reset() { *m = ResponseListSnapshots{} } func (m *ResponseListSnapshots) String() string { return proto.CompactTextString(m) } func (*ResponseListSnapshots) ProtoMessage() {} func (*ResponseListSnapshots) Descriptor() ([]byte, []int) { - return fileDescriptor_252557cfdd89a31a, []int{26} + return fileDescriptor_252557cfdd89a31a, []int{29} } func (m *ResponseListSnapshots) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2419,7 +2655,7 @@ func (m *ResponseOfferSnapshot) Reset() { *m = ResponseOfferSnapshot{} } func (m *ResponseOfferSnapshot) String() string { return proto.CompactTextString(m) } func (*ResponseOfferSnapshot) ProtoMessage() {} func (*ResponseOfferSnapshot) Descriptor() ([]byte, []int) { - return fileDescriptor_252557cfdd89a31a, []int{27} + return fileDescriptor_252557cfdd89a31a, []int{30} } func (m *ResponseOfferSnapshot) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2463,7 +2699,7 @@ func (m *ResponseLoadSnapshotChunk) Reset() { *m = ResponseLoadSnapshotC func (m *ResponseLoadSnapshotChunk) String() string { return proto.CompactTextString(m) } func (*ResponseLoadSnapshotChunk) ProtoMessage() {} func (*ResponseLoadSnapshotChunk) Descriptor() ([]byte, []int) { - return fileDescriptor_252557cfdd89a31a, []int{28} + return fileDescriptor_252557cfdd89a31a, []int{31} } func (m *ResponseLoadSnapshotChunk) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2509,7 +2745,7 @@ func (m *ResponseApplySnapshotChunk) Reset() { *m = ResponseApplySnapsho func (m *ResponseApplySnapshotChunk) String() string { return proto.CompactTextString(m) } func (*ResponseApplySnapshotChunk) ProtoMessage() {} func (*ResponseApplySnapshotChunk) Descriptor() ([]byte, []int) { - return fileDescriptor_252557cfdd89a31a, []int{29} + return fileDescriptor_252557cfdd89a31a, []int{32} } func (m *ResponseApplySnapshotChunk) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2567,7 +2803,7 @@ func (m *ResponsePrepareProposal) Reset() { *m = ResponsePrepareProposal func (m *ResponsePrepareProposal) String() string { return proto.CompactTextString(m) } func (*ResponsePrepareProposal) ProtoMessage() {} func (*ResponsePrepareProposal) Descriptor() ([]byte, []int) { - return fileDescriptor_252557cfdd89a31a, []int{30} + return fileDescriptor_252557cfdd89a31a, []int{33} } func (m *ResponsePrepareProposal) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2611,7 +2847,7 @@ func (m *ResponseProcessProposal) Reset() { *m = ResponseProcessProposal func (m *ResponseProcessProposal) String() string { return proto.CompactTextString(m) } func (*ResponseProcessProposal) ProtoMessage() {} func (*ResponseProcessProposal) Descriptor() ([]byte, []int) { - return fileDescriptor_252557cfdd89a31a, []int{31} + return fileDescriptor_252557cfdd89a31a, []int{34} } func (m *ResponseProcessProposal) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2655,7 +2891,7 @@ func (m *ResponseExtendVote) Reset() { *m = ResponseExtendVote{} } func (m *ResponseExtendVote) String() string { return proto.CompactTextString(m) } func (*ResponseExtendVote) ProtoMessage() {} func (*ResponseExtendVote) Descriptor() ([]byte, []int) { - return fileDescriptor_252557cfdd89a31a, []int{32} + return fileDescriptor_252557cfdd89a31a, []int{35} } func (m *ResponseExtendVote) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2699,7 +2935,7 @@ func (m *ResponseVerifyVoteExtension) Reset() { *m = ResponseVerifyVoteE func (m *ResponseVerifyVoteExtension) String() string { return proto.CompactTextString(m) } func (*ResponseVerifyVoteExtension) ProtoMessage() {} func (*ResponseVerifyVoteExtension) Descriptor() ([]byte, []int) { - return fileDescriptor_252557cfdd89a31a, []int{33} + return fileDescriptor_252557cfdd89a31a, []int{36} } func (m *ResponseVerifyVoteExtension) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2754,7 +2990,7 @@ func (m *ResponseFinalizeBlock) Reset() { *m = ResponseFinalizeBlock{} } func (m *ResponseFinalizeBlock) String() string { return proto.CompactTextString(m) } func (*ResponseFinalizeBlock) ProtoMessage() {} func (*ResponseFinalizeBlock) Descriptor() ([]byte, []int) { - return fileDescriptor_252557cfdd89a31a, []int{34} + return fileDescriptor_252557cfdd89a31a, []int{37} } func (m *ResponseFinalizeBlock) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2818,6 +3054,138 @@ func (m *ResponseFinalizeBlock) GetAppHash() []byte { return nil } +type ResponseCreateOracleResultTx struct { + EncodedTx []byte `protobuf:"bytes,1,opt,name=encoded_tx,json=encodedTx,proto3" json:"encoded_tx,omitempty"` +} + +func (m *ResponseCreateOracleResultTx) Reset() { *m = ResponseCreateOracleResultTx{} } +func (m *ResponseCreateOracleResultTx) String() string { return proto.CompactTextString(m) } +func (*ResponseCreateOracleResultTx) ProtoMessage() {} +func (*ResponseCreateOracleResultTx) Descriptor() ([]byte, []int) { + return fileDescriptor_252557cfdd89a31a, []int{38} +} +func (m *ResponseCreateOracleResultTx) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ResponseCreateOracleResultTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ResponseCreateOracleResultTx.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ResponseCreateOracleResultTx) XXX_Merge(src proto.Message) { + xxx_messageInfo_ResponseCreateOracleResultTx.Merge(m, src) +} +func (m *ResponseCreateOracleResultTx) XXX_Size() int { + return m.Size() +} +func (m *ResponseCreateOracleResultTx) XXX_DiscardUnknown() { + xxx_messageInfo_ResponseCreateOracleResultTx.DiscardUnknown(m) +} + +var xxx_messageInfo_ResponseCreateOracleResultTx proto.InternalMessageInfo + +func (m *ResponseCreateOracleResultTx) GetEncodedTx() []byte { + if m != nil { + return m.EncodedTx + } + return nil +} + +type ResponseFetchOracleVotes struct { + Vote *oracle.Vote `protobuf:"bytes,1,opt,name=vote,proto3" json:"vote,omitempty"` +} + +func (m *ResponseFetchOracleVotes) Reset() { *m = ResponseFetchOracleVotes{} } +func (m *ResponseFetchOracleVotes) String() string { return proto.CompactTextString(m) } +func (*ResponseFetchOracleVotes) ProtoMessage() {} +func (*ResponseFetchOracleVotes) Descriptor() ([]byte, []int) { + return fileDescriptor_252557cfdd89a31a, []int{39} +} +func (m *ResponseFetchOracleVotes) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ResponseFetchOracleVotes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ResponseFetchOracleVotes.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ResponseFetchOracleVotes) XXX_Merge(src proto.Message) { + xxx_messageInfo_ResponseFetchOracleVotes.Merge(m, src) +} +func (m *ResponseFetchOracleVotes) XXX_Size() int { + return m.Size() +} +func (m *ResponseFetchOracleVotes) XXX_DiscardUnknown() { + xxx_messageInfo_ResponseFetchOracleVotes.DiscardUnknown(m) +} + +var xxx_messageInfo_ResponseFetchOracleVotes proto.InternalMessageInfo + +func (m *ResponseFetchOracleVotes) GetVote() *oracle.Vote { + if m != nil { + return m.Vote + } + return nil +} + +type ResponseValidateOracleVotes struct { + Status ResponseValidateOracleVotes_Status `protobuf:"varint,1,opt,name=status,proto3,enum=tendermint.abci.ResponseValidateOracleVotes_Status" json:"status,omitempty"` +} + +func (m *ResponseValidateOracleVotes) Reset() { *m = ResponseValidateOracleVotes{} } +func (m *ResponseValidateOracleVotes) String() string { return proto.CompactTextString(m) } +func (*ResponseValidateOracleVotes) ProtoMessage() {} +func (*ResponseValidateOracleVotes) Descriptor() ([]byte, []int) { + return fileDescriptor_252557cfdd89a31a, []int{40} +} +func (m *ResponseValidateOracleVotes) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ResponseValidateOracleVotes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ResponseValidateOracleVotes.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ResponseValidateOracleVotes) XXX_Merge(src proto.Message) { + xxx_messageInfo_ResponseValidateOracleVotes.Merge(m, src) +} +func (m *ResponseValidateOracleVotes) XXX_Size() int { + return m.Size() +} +func (m *ResponseValidateOracleVotes) XXX_DiscardUnknown() { + xxx_messageInfo_ResponseValidateOracleVotes.DiscardUnknown(m) +} + +var xxx_messageInfo_ResponseValidateOracleVotes proto.InternalMessageInfo + +func (m *ResponseValidateOracleVotes) GetStatus() ResponseValidateOracleVotes_Status { + if m != nil { + return m.Status + } + return ResponseValidateOracleVotes_ABSENT +} + type CommitInfo struct { Round int32 `protobuf:"varint,1,opt,name=round,proto3" json:"round,omitempty"` Votes []VoteInfo `protobuf:"bytes,2,rep,name=votes,proto3" json:"votes"` @@ -2827,7 +3195,7 @@ func (m *CommitInfo) Reset() { *m = CommitInfo{} } func (m *CommitInfo) String() string { return proto.CompactTextString(m) } func (*CommitInfo) ProtoMessage() {} func (*CommitInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_252557cfdd89a31a, []int{35} + return fileDescriptor_252557cfdd89a31a, []int{41} } func (m *CommitInfo) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2885,7 +3253,7 @@ func (m *ExtendedCommitInfo) Reset() { *m = ExtendedCommitInfo{} } func (m *ExtendedCommitInfo) String() string { return proto.CompactTextString(m) } func (*ExtendedCommitInfo) ProtoMessage() {} func (*ExtendedCommitInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_252557cfdd89a31a, []int{36} + return fileDescriptor_252557cfdd89a31a, []int{42} } func (m *ExtendedCommitInfo) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2940,7 +3308,7 @@ func (m *Event) Reset() { *m = Event{} } func (m *Event) String() string { return proto.CompactTextString(m) } func (*Event) ProtoMessage() {} func (*Event) Descriptor() ([]byte, []int) { - return fileDescriptor_252557cfdd89a31a, []int{37} + return fileDescriptor_252557cfdd89a31a, []int{43} } func (m *Event) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2994,7 +3362,7 @@ func (m *EventAttribute) Reset() { *m = EventAttribute{} } func (m *EventAttribute) String() string { return proto.CompactTextString(m) } func (*EventAttribute) ProtoMessage() {} func (*EventAttribute) Descriptor() ([]byte, []int) { - return fileDescriptor_252557cfdd89a31a, []int{38} + return fileDescriptor_252557cfdd89a31a, []int{44} } func (m *EventAttribute) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3062,7 +3430,7 @@ func (m *ExecTxResult) Reset() { *m = ExecTxResult{} } func (m *ExecTxResult) String() string { return proto.CompactTextString(m) } func (*ExecTxResult) ProtoMessage() {} func (*ExecTxResult) Descriptor() ([]byte, []int) { - return fileDescriptor_252557cfdd89a31a, []int{39} + return fileDescriptor_252557cfdd89a31a, []int{45} } func (m *ExecTxResult) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3161,7 +3529,7 @@ func (m *TxResult) Reset() { *m = TxResult{} } func (m *TxResult) String() string { return proto.CompactTextString(m) } func (*TxResult) ProtoMessage() {} func (*TxResult) Descriptor() ([]byte, []int) { - return fileDescriptor_252557cfdd89a31a, []int{40} + return fileDescriptor_252557cfdd89a31a, []int{46} } func (m *TxResult) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3228,7 +3596,7 @@ func (m *Validator) Reset() { *m = Validator{} } func (m *Validator) String() string { return proto.CompactTextString(m) } func (*Validator) ProtoMessage() {} func (*Validator) Descriptor() ([]byte, []int) { - return fileDescriptor_252557cfdd89a31a, []int{41} + return fileDescriptor_252557cfdd89a31a, []int{47} } func (m *Validator) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3280,7 +3648,7 @@ func (m *ValidatorUpdate) Reset() { *m = ValidatorUpdate{} } func (m *ValidatorUpdate) String() string { return proto.CompactTextString(m) } func (*ValidatorUpdate) ProtoMessage() {} func (*ValidatorUpdate) Descriptor() ([]byte, []int) { - return fileDescriptor_252557cfdd89a31a, []int{42} + return fileDescriptor_252557cfdd89a31a, []int{48} } func (m *ValidatorUpdate) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3332,7 +3700,7 @@ func (m *VoteInfo) Reset() { *m = VoteInfo{} } func (m *VoteInfo) String() string { return proto.CompactTextString(m) } func (*VoteInfo) ProtoMessage() {} func (*VoteInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_252557cfdd89a31a, []int{43} + return fileDescriptor_252557cfdd89a31a, []int{49} } func (m *VoteInfo) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3390,7 +3758,7 @@ func (m *ExtendedVoteInfo) Reset() { *m = ExtendedVoteInfo{} } func (m *ExtendedVoteInfo) String() string { return proto.CompactTextString(m) } func (*ExtendedVoteInfo) ProtoMessage() {} func (*ExtendedVoteInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_252557cfdd89a31a, []int{44} + return fileDescriptor_252557cfdd89a31a, []int{50} } func (m *ExtendedVoteInfo) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3465,7 +3833,7 @@ func (m *Misbehavior) Reset() { *m = Misbehavior{} } func (m *Misbehavior) String() string { return proto.CompactTextString(m) } func (*Misbehavior) ProtoMessage() {} func (*Misbehavior) Descriptor() ([]byte, []int) { - return fileDescriptor_252557cfdd89a31a, []int{45} + return fileDescriptor_252557cfdd89a31a, []int{51} } func (m *Misbehavior) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3541,7 +3909,7 @@ func (m *Snapshot) Reset() { *m = Snapshot{} } func (m *Snapshot) String() string { return proto.CompactTextString(m) } func (*Snapshot) ProtoMessage() {} func (*Snapshot) Descriptor() ([]byte, []int) { - return fileDescriptor_252557cfdd89a31a, []int{46} + return fileDescriptor_252557cfdd89a31a, []int{52} } func (m *Snapshot) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3612,6 +3980,7 @@ func init() { proto.RegisterEnum("tendermint.abci.ResponseApplySnapshotChunk_Result", ResponseApplySnapshotChunk_Result_name, ResponseApplySnapshotChunk_Result_value) proto.RegisterEnum("tendermint.abci.ResponseProcessProposal_ProposalStatus", ResponseProcessProposal_ProposalStatus_name, ResponseProcessProposal_ProposalStatus_value) proto.RegisterEnum("tendermint.abci.ResponseVerifyVoteExtension_VerifyStatus", ResponseVerifyVoteExtension_VerifyStatus_name, ResponseVerifyVoteExtension_VerifyStatus_value) + proto.RegisterEnum("tendermint.abci.ResponseValidateOracleVotes_Status", ResponseValidateOracleVotes_Status_name, ResponseValidateOracleVotes_Status_value) proto.RegisterType((*Request)(nil), "tendermint.abci.Request") proto.RegisterType((*RequestEcho)(nil), "tendermint.abci.RequestEcho") proto.RegisterType((*RequestFlush)(nil), "tendermint.abci.RequestFlush") @@ -3629,6 +3998,9 @@ func init() { proto.RegisterType((*RequestExtendVote)(nil), "tendermint.abci.RequestExtendVote") proto.RegisterType((*RequestVerifyVoteExtension)(nil), "tendermint.abci.RequestVerifyVoteExtension") proto.RegisterType((*RequestFinalizeBlock)(nil), "tendermint.abci.RequestFinalizeBlock") + proto.RegisterType((*RequestCreateOracleResultTx)(nil), "tendermint.abci.RequestCreateOracleResultTx") + proto.RegisterType((*RequestFetchOracleVotes)(nil), "tendermint.abci.RequestFetchOracleVotes") + proto.RegisterType((*RequestValidateOracleVotes)(nil), "tendermint.abci.RequestValidateOracleVotes") proto.RegisterType((*Response)(nil), "tendermint.abci.Response") proto.RegisterType((*ResponseException)(nil), "tendermint.abci.ResponseException") proto.RegisterType((*ResponseEcho)(nil), "tendermint.abci.ResponseEcho") @@ -3647,6 +4019,9 @@ func init() { proto.RegisterType((*ResponseExtendVote)(nil), "tendermint.abci.ResponseExtendVote") proto.RegisterType((*ResponseVerifyVoteExtension)(nil), "tendermint.abci.ResponseVerifyVoteExtension") proto.RegisterType((*ResponseFinalizeBlock)(nil), "tendermint.abci.ResponseFinalizeBlock") + proto.RegisterType((*ResponseCreateOracleResultTx)(nil), "tendermint.abci.ResponseCreateOracleResultTx") + proto.RegisterType((*ResponseFetchOracleVotes)(nil), "tendermint.abci.ResponseFetchOracleVotes") + proto.RegisterType((*ResponseValidateOracleVotes)(nil), "tendermint.abci.ResponseValidateOracleVotes") proto.RegisterType((*CommitInfo)(nil), "tendermint.abci.CommitInfo") proto.RegisterType((*ExtendedCommitInfo)(nil), "tendermint.abci.ExtendedCommitInfo") proto.RegisterType((*Event)(nil), "tendermint.abci.Event") @@ -3664,205 +4039,226 @@ func init() { func init() { proto.RegisterFile("tendermint/abci/types.proto", fileDescriptor_252557cfdd89a31a) } var fileDescriptor_252557cfdd89a31a = []byte{ - // 3167 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x5a, 0xcb, 0x73, 0x23, 0xd5, - 0xd5, 0x57, 0xeb, 0xad, 0xa3, 0x87, 0xdb, 0xd7, 0x9e, 0x41, 0x23, 0x06, 0xdb, 0x34, 0x05, 0x0c, - 0x03, 0xd8, 0x7c, 0x9e, 0x6f, 0x78, 0xd4, 0xc0, 0x57, 0x25, 0x6b, 0x34, 0x9f, 0xec, 0x31, 0xb6, - 0x69, 0xcb, 0x43, 0x91, 0x07, 0x4d, 0x5b, 0xba, 0xb2, 0x9a, 0x91, 0xd4, 0x4d, 0xf7, 0x95, 0x91, - 0x59, 0xa5, 0x42, 0x52, 0x95, 0x62, 0x45, 0x55, 0xb2, 0x60, 0x11, 0x16, 0x59, 0x64, 0x93, 0xbf, - 0x20, 0xab, 0x64, 0x93, 0x05, 0x8b, 0x2c, 0x58, 0x66, 0x45, 0x52, 0xb0, 0x63, 0x9b, 0x45, 0xb6, - 0xa9, 0xfb, 0xe8, 0x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x09, 0xaf, 0xe6, - 0x72, 0x1e, 0x31, 0x46, 0x75, 0xa9, 0x15, 0x26, 0xa0, 0x7b, 0x00, 0x5e, 0x3e, 0x72, 0xca, 0xc9, - 0x8d, 0xc4, 0x8d, 0xfc, 0xf6, 0xc6, 0xc4, 0x86, 0x3f, 0x70, 0x59, 0x4e, 0xac, 0xb6, 0x4e, 0xf0, - 0x4e, 0x92, 0x7e, 0xae, 0x1a, 0x90, 0x44, 0xcf, 0xc0, 0x92, 0x6e, 0x59, 0x9a, 0x43, 0x74, 0x82, - 0xb5, 0xd3, 0x0b, 0x82, 0x1d, 0x16, 0xe7, 0x0b, 0x6a, 0x51, 0xb7, 0xac, 0x63, 0x4a, 0xdd, 0xa1, - 0x44, 0xf4, 0x34, 0x94, 0x68, 0x4c, 0x37, 0xf4, 0x9e, 0xd6, 0xc5, 0xc6, 0x59, 0x97, 0xb0, 0x78, - 0x9e, 0x50, 0x8b, 0x82, 0xda, 0x60, 0x44, 0xa5, 0xed, 0xed, 0x38, 0x8b, 0xe7, 0x08, 0x41, 0xb2, - 0xad, 0x13, 0x9d, 0x59, 0xb2, 0xa0, 0xb2, 0x67, 0x4a, 0xb3, 0x74, 0xd2, 0x15, 0xf6, 0x61, 0xcf, - 0xe8, 0x2a, 0xa4, 0x85, 0xda, 0x04, 0x53, 0x2b, 0x46, 0x68, 0x15, 0x52, 0x96, 0x6d, 0x9e, 0x63, - 0xb6, 0x75, 0x59, 0x95, 0x0f, 0x14, 0x15, 0x4a, 0xe1, 0xd8, 0x8f, 0x4a, 0x10, 0x27, 0x23, 0x31, - 0x4b, 0x9c, 0x8c, 0xd0, 0x4b, 0x90, 0xa4, 0x86, 0x64, 0x73, 0x94, 0xa6, 0x64, 0x3b, 0x21, 0xd7, - 0xbc, 0xb0, 0xb0, 0xca, 0x38, 0x95, 0x25, 0x28, 0x86, 0x72, 0x82, 0x72, 0x15, 0x56, 0xa7, 0x85, - 0x78, 0xa5, 0xeb, 0xd1, 0x43, 0xa1, 0x1a, 0xdd, 0x86, 0xac, 0x17, 0xe3, 0xb9, 0xe3, 0x5c, 0x9b, - 0x98, 0xd6, 0x65, 0x56, 0x3d, 0x56, 0xea, 0x31, 0x74, 0x03, 0xba, 0xba, 0xc8, 0xe8, 0x05, 0x35, - 0xa3, 0x5b, 0x56, 0x43, 0x77, 0xba, 0xca, 0x7b, 0x50, 0x8e, 0x8a, 0xdf, 0x01, 0x83, 0x49, 0xcc, - 0xed, 0x5d, 0x83, 0x5d, 0x85, 0x74, 0xc7, 0xb4, 0xfb, 0x3a, 0x61, 0xca, 0x8a, 0xaa, 0x18, 0x51, - 0x43, 0xf2, 0x58, 0x9e, 0x60, 0x64, 0x3e, 0x50, 0x34, 0xb8, 0x16, 0x19, 0xc3, 0xa9, 0x88, 0x31, - 0x68, 0x63, 0x6e, 0xd6, 0xa2, 0xca, 0x07, 0xbe, 0x22, 0xfe, 0xb1, 0x7c, 0x40, 0xa7, 0x75, 0xd8, - 0x5a, 0x99, 0xfe, 0x9c, 0x2a, 0x46, 0xca, 0x67, 0x09, 0xb8, 0x3a, 0x3d, 0x92, 0xa3, 0x0d, 0x28, - 0xf4, 0xf5, 0x91, 0x46, 0x46, 0xc2, 0xed, 0x24, 0xb6, 0xf1, 0xd0, 0xd7, 0x47, 0xcd, 0x11, 0xf7, - 0x39, 0x19, 0x12, 0x64, 0xe4, 0x94, 0xe3, 0x1b, 0x89, 0x1b, 0x05, 0x95, 0x3e, 0xa2, 0x13, 0x58, - 0xee, 0x99, 0x2d, 0xbd, 0xa7, 0xf5, 0x74, 0x87, 0x68, 0x22, 0xc5, 0xf3, 0x43, 0xf4, 0xd4, 0x84, - 0xb1, 0x79, 0x4c, 0xc6, 0x6d, 0xbe, 0x9f, 0x34, 0xe0, 0x08, 0xff, 0x5f, 0x62, 0x3a, 0xf6, 0x75, - 0x77, 0xab, 0xd1, 0x5d, 0xc8, 0xf7, 0x0d, 0xe7, 0x14, 0x77, 0xf5, 0x73, 0xc3, 0xb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 0xc8, 0x5d, 0xb9, 0x78, 0x1e, 0x9c, 0x5f, 0xf9, 0x59, 0xc2, 0x4b, 0x3c, - 0xa1, 0x02, 0x6e, 0xca, 0x69, 0x7d, 0x0b, 0x56, 0xda, 0xb8, 0x65, 0xb4, 0x1f, 0xf5, 0xb0, 0x2e, - 0x0b, 0xe9, 0xff, 0x9e, 0xd5, 0x49, 0x2f, 0xf9, 0x15, 0x40, 0x56, 0xc5, 0x8e, 0x45, 0xeb, 0x31, - 0xb4, 0x03, 0x39, 0x3c, 0x6a, 0x61, 0x8b, 0xb8, 0x25, 0xec, 0xf4, 0x16, 0x81, 0x73, 0xd7, 0x5d, - 0x4e, 0xda, 0x20, 0x7b, 0x62, 0xe8, 0x96, 0xc0, 0x00, 0xa2, 0xdb, 0x79, 0x21, 0x1e, 0x04, 0x01, - 0x5e, 0x76, 0x41, 0x80, 0x44, 0x64, 0x7f, 0xcb, 0xa5, 0xc6, 0x50, 0x80, 0x5b, 0x02, 0x05, 0x48, - 0xce, 0x98, 0x2c, 0x04, 0x03, 0xd4, 0x42, 0x30, 0x40, 0x7a, 0xc6, 0x32, 0x23, 0x70, 0x80, 0x97, - 0x5d, 0x1c, 0x20, 0x33, 0xe3, 0x8b, 0xc7, 0x80, 0x80, 0x37, 0x02, 0x40, 0x40, 0x8e, 0x89, 0x6e, - 0x44, 0x8a, 0x4e, 0x41, 0x02, 0x5e, 0xf3, 0x90, 0x80, 0x42, 0x24, 0x8a, 0x20, 0x84, 0xc7, 0xa1, - 0x80, 0xc3, 0x09, 0x28, 0x80, 0xb7, 0xee, 0xcf, 0x44, 0xaa, 0x98, 0x81, 0x05, 0x1c, 0x4e, 0x60, - 0x01, 0xa5, 0x19, 0x0a, 0x67, 0x80, 0x01, 0x3f, 0x9a, 0x0e, 0x06, 0x44, 0xb7, 0xeb, 0xe2, 0x33, - 0xe7, 0x43, 0x03, 0xb4, 0x08, 0x34, 0x40, 0x8e, 0xec, 0x5c, 0xb9, 0xfa, 0xb9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4, 0x07, - 0x34, 0xa5, 0x9f, 0x5d, 0xe0, 0x8e, 0x5a, 0x65, 0x11, 0x04, 0x1b, 0xb5, 0x61, 0x69, 0xbc, 0x49, - 0x9c, 0xf7, 0xce, 0x5a, 0x65, 0x6e, 0x34, 0x9b, 0xcf, 0x12, 0x6e, 0x2e, 0xe7, 0xbd, 0xc3, 0x56, - 0x99, 0x1b, 0xdc, 0x46, 0x27, 0x00, 0x81, 0xfe, 0x70, 0x8e, 0x3b, 0x6d, 0x95, 0x79, 0x60, 0x6e, - 0x64, 0xc1, 0xca, 0xb4, 0xc6, 0x71, 0x91, 0x2b, 0x6e, 0x95, 0x85, 0xd0, 0x6f, 0xea, 0xcf, 0xe1, - 0x16, 0x70, 0xbe, 0x2b, 0x6f, 0x95, 0x39, 0x61, 0xf0, 0x9d, 0xea, 0x17, 0x5f, 0xaf, 0x49, 0x5f, - 0x7e, 0xbd, 0x26, 0xfd, 0xed, 0xeb, 0x35, 0xe9, 0xd3, 0x6f, 0xd6, 0x62, 0x5f, 0x7e, 0xb3, 0x16, - 0xfb, 0xcb, 0x37, 0x6b, 0xb1, 0x1f, 0x3c, 0x7b, 0x66, 0x90, 0xee, 0xf0, 0x74, 0xb3, 0x65, 0xf6, - 0xb7, 0x5a, 0x66, 0x1f, 0x93, 0xd3, 0x0e, 0xf1, 0x1f, 0xfc, 0x9b, 0xcb, 0xa7, 0x69, 0x96, 0x41, - 0x6f, 0xfd, 0x33, 0x00, 0x00, 0xff, 0xff, 0x64, 0xd0, 0x90, 0x6e, 0xd9, 0x2c, 0x00, 0x00, + // 3495 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x5b, 0xcb, 0x8f, 0x1b, 0xc7, + 0xd1, 0xe7, 0xf0, 0xb5, 0x64, 0xf1, 0xb1, 0xb3, 0xbd, 0x2b, 0x89, 0xa2, 0xa4, 0xdd, 0xd5, 0x18, + 0xb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, 0x2f, 0x99, 0xc9, 0x8a, 0xb0, 0x97, 0xcc, 0x80, + 0x98, 0x93, 0x5e, 0x84, 0x9c, 0xef, 0xf0, 0x46, 0x25, 0x58, 0xea, 0x63, 0xcb, 0x52, 0x3b, 0x98, + 0x9e, 0xf5, 0x59, 0xd9, 0x69, 0x4a, 0x45, 0xc8, 0xfb, 0x0f, 0x6c, 0xe9, 0x73, 0xc1, 0x95, 0x24, + 0x67, 0x31, 0x91, 0x3c, 0xc1, 0x26, 0x75, 0x19, 0x2e, 0xc9, 0x9b, 0xe8, 0x39, 0x28, 0xd0, 0xe5, + 0x56, 0x9c, 0xdf, 0x49, 0x40, 0x48, 0xca, 0x79, 0x4a, 0x7c, 0xc4, 0x99, 0x36, 0x20, 0x67, 0x5c, + 0x37, 0x5c, 0x96, 0x04, 0x65, 0x01, 0xe3, 0xba, 0xe1, 0x30, 0x5c, 0x86, 0x3c, 0xb1, 0x81, 0xcb, + 0x91, 0xa4, 0x9d, 0xe4, 0x08, 0x8d, 0xb3, 0x48, 0x7f, 0x88, 0x83, 0x38, 0x7e, 0xc8, 0xa3, 0x37, + 0x20, 0x49, 0xc2, 0x21, 0x0f, 0x5d, 0xe5, 0x2d, 0x16, 0x2b, 0xb7, 0x9c, 0x58, 0xb9, 0xd5, 0x70, + 0x62, 0xe5, 0x4e, 0xe6, 0xab, 0x6f, 0x36, 0x62, 0x9f, 0xff, 0x69, 0x43, 0x90, 0xa9, 0x04, 0x3a, + 0x4f, 0x8e, 0x76, 0x55, 0x1b, 0x28, 0x5a, 0x8b, 0x0e, 0x39, 0x4b, 0xce, 0x6d, 0x55, 0x1b, 0xec, + 0xb6, 0xd0, 0x03, 0x10, 0x9b, 0xfa, 0xc0, 0xc2, 0x03, 0x6b, 0x68, 0x29, 0x2c, 0x5a, 0xf3, 0x80, + 0x15, 0x08, 0x3b, 0x2c, 0x9c, 0x56, 0x1d, 0xce, 0x43, 0xca, 0x28, 0x2f, 0x37, 0x83, 0x04, 0x74, +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54, 0x74, 0x33, 0x52, 0x34, + 0x04, 0x08, 0xba, 0xe5, 0x02, 0x41, 0xf9, 0x48, 0x10, 0x89, 0x0b, 0x8f, 0x23, 0x41, 0x07, 0x13, + 0x48, 0x10, 0x43, 0x6e, 0x5e, 0x88, 0x54, 0x31, 0x03, 0x0a, 0x3a, 0x98, 0x80, 0x82, 0x8a, 0x33, + 0x14, 0xce, 0xc0, 0x82, 0xfe, 0x2f, 0x1c, 0x0b, 0x8a, 0x46, 0x6b, 0xf8, 0x30, 0xe7, 0x03, 0x83, + 0x94, 0x08, 0x30, 0x48, 0x8c, 0xbc, 0x44, 0x33, 0xf5, 0x73, 0xa3, 0x41, 0x0f, 0x43, 0xd0, 0xa0, + 0x95, 0xc8, 0xeb, 0x3f, 0x53, 0x3e, 0x07, 0x1c, 0xf4, 0x30, 0x04, 0x0e, 0x42, 0x33, 0xd5, 0xce, + 0xc4, 0x83, 0xee, 0x06, 0xf1, 0xa0, 0xd5, 0x88, 0x84, 0xda, 0xdb, 0xed, 0x11, 0x80, 0xd0, 0x71, + 0x14, 0x20, 0xb4, 0x16, 0x89, 0xad, 0x30, 0x8d, 0x0b, 0x20, 0x42, 0x07, 0x13, 0x88, 0xd0, 0x99, + 0x19, 0x9e, 0x36, 0x03, 0x12, 0x6a, 0x47, 0x43, 0x42, 0x0c, 0xb0, 0x79, 0x25, 0x7a, 0x5f, 0x2d, + 0x82, 0x09, 0x3d, 0x0e, 0xc5, 0x84, 0xce, 0x45, 0x82, 0x9b, 0x7c, 0xf0, 0xf3, 0x80, 0x42, 0xc7, + 0x51, 0xa0, 0x50, 0x69, 0x96, 0xdd, 0x9f, 0x09, 0x15, 0x4a, 0x89, 0xe9, 0xbd, 0x64, 0x26, 0x23, + 0x66, 0x19, 0x1e, 0xb4, 0x97, 0xcc, 0xe4, 0xc4, 0xbc, 0xf4, 0x12, 0xc9, 0x61, 0xc7, 0xc2, 0x01, + 0xb9, 0x2d, 0x62, 0xd3, 0xd4, 0x4d, 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0x80, 0x04, 0x87, 0x96, 0x87, 0x28, 0x64, 0x39, 0xa5, 0x31, 0x92, 0xee, 0x41, + 0x29, 0x2a, 0x93, 0x45, 0xd7, 0x20, 0x49, 0xaf, 0x1b, 0x2c, 0xdb, 0x39, 0x17, 0x82, 0x81, 0x10, + 0x3e, 0x99, 0x32, 0x49, 0x3f, 0xf3, 0x3b, 0x67, 0x08, 0xb0, 0x71, 0x7f, 0xcc, 0x39, 0x6f, 0x2c, + 0x92, 0xf3, 0x6e, 0x8d, 0xb9, 0xe5, 0x65, 0x48, 0x73, 0x87, 0x24, 0x3e, 0xb8, 0x73, 0x54, 0xdb, + 0x6f, 0x88, 0x31, 0xe2, 0x9c, 0x87, 0x72, 0x8d, 0x36, 0x04, 0xe9, 0x31, 0x80, 0x07, 0x9b, 0x91, + 0x93, 0xd7, 0xd4, 0x87, 0x83, 0x16, 0xed, 0x3c, 0x25, 0xb3, 0x06, 0xba, 0x09, 0x29, 0x3f, 0xca, + 0x33, 0x19, 0xa2, 0x48, 0xe7, 0x3e, 0xd8, 0x8d, 0x71, 0x4b, 0x1a, 0xa0, 0xc9, 0xd2, 0x45, 0x44, + 0x17, 0x6f, 0x05, 0xbb, 0xb8, 0x1c, 0x59, 0x04, 0x09, 0xef, 0xea, 0x63, 0x48, 0xd1, 0x1d, 0x41, + 0x92, 0x11, 0x5a, 0x2f, 0xe3, 0x59, 0x34, 0xf9, 0x46, 0xff, 0x0f, 0xa0, 0xda, 0xb6, 0xa9, 0x1d, + 0x0f, 0xbd, 0x0e, 0x36, 0xc2, 0x77, 0x54, 0xc5, 0xe1, 0xdb, 0xb9, 0xc8, 0xb7, 0xd6, 0x9a, 0x27, + 0xea, 0xdb, 0x5e, 0x3e, 0x85, 0xd2, 0x3e, 0x14, 0x83, 0xb2, 0x4e, 0xde, 0xc7, 0xc6, 0x10, 0xcc, + 0xfb, 0x58, 0x1a, 0xcf, 0xf3, 0x3e, 0x37, 0x6b, 0x4c, 0xb0, 0xa2, 0x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d4, 0x82, 0xe5, 0xf1, 0xcb, 0xf3, + 0xbc, 0x2f, 0x5e, 0xcb, 0x73, 0x17, 0x43, 0x58, 0x2f, 0xc1, 0x4b, 0xf7, 0xbc, 0x2f, 0x60, 0xcb, + 0x73, 0xd7, 0x46, 0xd0, 0x43, 0x00, 0xdf, 0xbd, 0x79, 0x8e, 0x17, 0xb1, 0xe5, 0x79, 0xaa, 0x24, + 0xc8, 0x80, 0xd5, 0xb0, 0x0b, 0xf5, 0x22, 0x0f, 0x64, 0xcb, 0x0b, 0x15, 0x4f, 0x88, 0x3f, 0x07, + 0xaf, 0xc6, 0xf3, 0x3d, 0x98, 0x2d, 0xcf, 0x59, 0x45, 0x41, 0x16, 0xac, 0x85, 0x5e, 0x07, 0x17, + 0x7a, 0x3e, 0x5b, 0x5e, 0xac, 0xb2, 0x82, 0x3a, 0x20, 0x4e, 0x5c, 0x22, 0xe7, 0x7e, 0x4d, 0x5b, + 0x9e, 0xbf, 0xc6, 0x42, 0xd7, 0x2b, 0xe4, 0x8e, 0xb9, 0xc8, 0xe3, 0xda, 0xf2, 0x42, 0x45, 0x97, + 0x9d, 0xca, 0x57, 0xdf, 0xae, 0x0b, 0x5f, 0x7f, 0xbb, 0x2e, 0xfc, 0xf9, 0xdb, 0x75, 0xe1, 0xf3, + 0xa7, 0xeb, 0xb1, 0xaf, 0x9f, 0xae, 0xc7, 0xfe, 0xf8, 0x74, 0x3d, 0xf6, 0x3f, 0x2f, 0x76, 0x34, + 0xbb, 0x3b, 0x3c, 0xde, 0x6a, 0xea, 0xfd, 0xed, 0xa6, 0xde, 0xc7, 0xf6, 0x71, 0xdb, 0xf6, 0x3e, + 0xbc, 0xbf, 0x99, 0x1c, 0xa7, 0x69, 0x46, 0x72, 0xe3, 0xef, 0x01, 0x00, 0x00, 0xff, 0xff, 0x89, + 0xf5, 0xc0, 0xc9, 0x86, 0x32, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -3893,6 +4289,9 @@ type ABCIClient interface { ExtendVote(ctx context.Context, in *RequestExtendVote, opts ...grpc.CallOption) (*ResponseExtendVote, error) VerifyVoteExtension(ctx context.Context, in *RequestVerifyVoteExtension, opts ...grpc.CallOption) (*ResponseVerifyVoteExtension, error) FinalizeBlock(ctx context.Context, in *RequestFinalizeBlock, opts ...grpc.CallOption) (*ResponseFinalizeBlock, error) + CreateOracleResultTx(ctx context.Context, in *RequestCreateOracleResultTx, opts ...grpc.CallOption) (*ResponseCreateOracleResultTx, error) + FetchOracleVotes(ctx context.Context, in *RequestFetchOracleVotes, opts ...grpc.CallOption) (*ResponseFetchOracleVotes, error) + ValidateOracleVotes(ctx context.Context, in *RequestValidateOracleVotes, opts ...grpc.CallOption) (*ResponseValidateOracleVotes, error) } type aBCIClient struct { @@ -4047,8 +4446,35 @@ func (c *aBCIClient) FinalizeBlock(ctx context.Context, in *RequestFinalizeBlock return out, nil } -// ABCIServer is the server API for ABCI service. -type ABCIServer interface { +func (c *aBCIClient) CreateOracleResultTx(ctx context.Context, in *RequestCreateOracleResultTx, opts ...grpc.CallOption) (*ResponseCreateOracleResultTx, error) { + out := new(ResponseCreateOracleResultTx) + err := c.cc.Invoke(ctx, "/tendermint.abci.ABCI/CreateOracleResultTx", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *aBCIClient) FetchOracleVotes(ctx context.Context, in *RequestFetchOracleVotes, opts ...grpc.CallOption) (*ResponseFetchOracleVotes, error) { + out := new(ResponseFetchOracleVotes) + err := c.cc.Invoke(ctx, "/tendermint.abci.ABCI/FetchOracleVotes", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *aBCIClient) ValidateOracleVotes(ctx context.Context, in *RequestValidateOracleVotes, opts ...grpc.CallOption) (*ResponseValidateOracleVotes, error) { + out := new(ResponseValidateOracleVotes) + err := c.cc.Invoke(ctx, "/tendermint.abci.ABCI/ValidateOracleVotes", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// ABCIServer is the server API for ABCI service. +type ABCIServer interface { Echo(context.Context, *RequestEcho) (*ResponseEcho, error) Flush(context.Context, *RequestFlush) (*ResponseFlush, error) Info(context.Context, *RequestInfo) (*ResponseInfo, error) @@ -4065,6 +4491,9 @@ type ABCIServer interface { ExtendVote(context.Context, *RequestExtendVote) (*ResponseExtendVote, error) VerifyVoteExtension(context.Context, *RequestVerifyVoteExtension) (*ResponseVerifyVoteExtension, error) FinalizeBlock(context.Context, *RequestFinalizeBlock) (*ResponseFinalizeBlock, error) + CreateOracleResultTx(context.Context, *RequestCreateOracleResultTx) (*ResponseCreateOracleResultTx, error) + FetchOracleVotes(context.Context, *RequestFetchOracleVotes) (*ResponseFetchOracleVotes, error) + ValidateOracleVotes(context.Context, *RequestValidateOracleVotes) (*ResponseValidateOracleVotes, error) } // UnimplementedABCIServer can be embedded to have forward compatible implementations. @@ -4119,6 +4548,15 @@ func (*UnimplementedABCIServer) VerifyVoteExtension(ctx context.Context, req *Re func (*UnimplementedABCIServer) FinalizeBlock(ctx context.Context, req *RequestFinalizeBlock) (*ResponseFinalizeBlock, error) { return nil, status.Errorf(codes.Unimplemented, "method FinalizeBlock not implemented") } +func (*UnimplementedABCIServer) CreateOracleResultTx(ctx context.Context, req *RequestCreateOracleResultTx) (*ResponseCreateOracleResultTx, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateOracleResultTx not implemented") +} +func (*UnimplementedABCIServer) FetchOracleVotes(ctx context.Context, req *RequestFetchOracleVotes) (*ResponseFetchOracleVotes, error) { + return nil, status.Errorf(codes.Unimplemented, "method FetchOracleVotes not implemented") +} +func (*UnimplementedABCIServer) ValidateOracleVotes(ctx context.Context, req *RequestValidateOracleVotes) (*ResponseValidateOracleVotes, error) { + return nil, status.Errorf(codes.Unimplemented, "method ValidateOracleVotes not implemented") +} func RegisterABCIServer(s grpc1.Server, srv ABCIServer) { s.RegisterService(&_ABCI_serviceDesc, srv) @@ -4412,6 +4850,60 @@ func _ABCI_FinalizeBlock_Handler(srv interface{}, ctx context.Context, dec func( return interceptor(ctx, in, info, handler) } +func _ABCI_CreateOracleResultTx_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RequestCreateOracleResultTx) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ABCIServer).CreateOracleResultTx(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/tendermint.abci.ABCI/CreateOracleResultTx", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ABCIServer).CreateOracleResultTx(ctx, req.(*RequestCreateOracleResultTx)) + } + return interceptor(ctx, in, info, handler) +} + +func _ABCI_FetchOracleVotes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RequestFetchOracleVotes) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ABCIServer).FetchOracleVotes(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/tendermint.abci.ABCI/FetchOracleVotes", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ABCIServer).FetchOracleVotes(ctx, req.(*RequestFetchOracleVotes)) + } + return interceptor(ctx, in, info, handler) +} + +func _ABCI_ValidateOracleVotes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RequestValidateOracleVotes) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ABCIServer).ValidateOracleVotes(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/tendermint.abci.ABCI/ValidateOracleVotes", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ABCIServer).ValidateOracleVotes(ctx, req.(*RequestValidateOracleVotes)) + } + return interceptor(ctx, in, info, handler) +} + var _ABCI_serviceDesc = grpc.ServiceDesc{ ServiceName: "tendermint.abci.ABCI", HandlerType: (*ABCIServer)(nil), @@ -4480,6 +4972,18 @@ var _ABCI_serviceDesc = grpc.ServiceDesc{ MethodName: "FinalizeBlock", Handler: _ABCI_FinalizeBlock_Handler, }, + { + MethodName: "CreateOracleResultTx", + Handler: _ABCI_CreateOracleResultTx_Handler, + }, + { + MethodName: "FetchOracleVotes", + Handler: _ABCI_FetchOracleVotes_Handler, + }, + { + MethodName: "ValidateOracleVotes", + Handler: _ABCI_ValidateOracleVotes_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "tendermint/abci/types.proto", @@ -4863,6 +5367,75 @@ func (m *Request_FinalizeBlock) MarshalToSizedBuffer(dAtA []byte) (int, error) { } return len(dAtA) - i, nil } +func (m *Request_CreateOracleResultTx) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Request_CreateOracleResultTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.CreateOracleResultTx != nil { + { + size, err := m.CreateOracleResultTx.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xaa + } + return len(dAtA) - i, nil +} +func (m *Request_FetchOracleVotes) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Request_FetchOracleVotes) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.FetchOracleVotes != nil { + { + size, err := m.FetchOracleVotes.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xb2 + } + return len(dAtA) - i, nil +} +func (m *Request_ValidateOracleVotes) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Request_ValidateOracleVotes) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.ValidateOracleVotes != nil { + { + size, err := m.ValidateOracleVotes.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xba + } + return len(dAtA) - i, nil +} func (m *RequestEcho) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -5028,12 +5601,12 @@ func (m *RequestInitChain) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x12 } - n18, err18 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.Time, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.Time):]) - if err18 != nil { - return 0, err18 + n21, err21 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.Time, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.Time):]) + if err21 != nil { + return 0, err21 } - i -= n18 - i = encodeVarintTypes(dAtA, i, uint64(n18)) + i -= n21 + i = encodeVarintTypes(dAtA, i, uint64(n21)) i-- dAtA[i] = 0xa return len(dAtA) - i, nil @@ -5328,12 +5901,12 @@ func (m *RequestPrepareProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) i-- dAtA[i] = 0x3a } - n20, err20 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.Time, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.Time):]) - if err20 != nil { - return 0, err20 + n23, err23 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.Time, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.Time):]) + if err23 != nil { + return 0, err23 } - i -= n20 - i = encodeVarintTypes(dAtA, i, uint64(n20)) + i -= n23 + i = encodeVarintTypes(dAtA, i, uint64(n23)) i-- dAtA[i] = 0x32 if m.Height != 0 { @@ -5416,12 +5989,12 @@ func (m *RequestProcessProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) i-- dAtA[i] = 0x3a } - n22, err22 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.Time, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.Time):]) - if err22 != nil { - return 0, err22 + n25, err25 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.Time, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.Time):]) + if err25 != nil { + return 0, err25 } - i -= n22 - i = encodeVarintTypes(dAtA, i, uint64(n22)) + i -= n25 + i = encodeVarintTypes(dAtA, i, uint64(n25)) i-- dAtA[i] = 0x32 if m.Height != 0 { @@ -5539,12 +6112,12 @@ func (m *RequestExtendVote) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA[i] = 0x22 } } - n25, err25 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.Time, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.Time):]) - if err25 != nil { - return 0, err25 + n28, err28 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.Time, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.Time):]) + if err28 != nil { + return 0, err28 } - i -= n25 - i = encodeVarintTypes(dAtA, i, uint64(n25)) + i -= n28 + i = encodeVarintTypes(dAtA, i, uint64(n28)) i-- dAtA[i] = 0x1a if m.Height != 0 { @@ -5645,12 +6218,12 @@ func (m *RequestFinalizeBlock) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x3a } - n26, err26 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.Time, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.Time):]) - if err26 != nil { - return 0, err26 + n29, err29 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.Time, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.Time):]) + if err29 != nil { + return 0, err29 } - i -= n26 - i = encodeVarintTypes(dAtA, i, uint64(n26)) + i -= n29 + i = encodeVarintTypes(dAtA, i, uint64(n29)) i-- dAtA[i] = 0x32 if m.Height != 0 { @@ -5701,6 +6274,103 @@ func (m *RequestFinalizeBlock) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *RequestCreateOracleResultTx) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RequestCreateOracleResultTx) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RequestCreateOracleResultTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.GossipedVotes) > 0 { + for iNdEx := len(m.GossipedVotes) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.GossipedVotes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if len(m.Proposer) > 0 { + i -= len(m.Proposer) + copy(dAtA[i:], m.Proposer) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Proposer))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *RequestFetchOracleVotes) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RequestFetchOracleVotes) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RequestFetchOracleVotes) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *RequestValidateOracleVotes) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RequestValidateOracleVotes) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RequestValidateOracleVotes) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.OracleTx) > 0 { + i -= len(m.OracleTx) + copy(dAtA[i:], m.OracleTx) + i = encodeVarintTypes(dAtA, i, uint64(len(m.OracleTx))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func (m *Response) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -6102,57 +6772,126 @@ func (m *Response_FinalizeBlock) MarshalToSizedBuffer(dAtA []byte) (int, error) } return len(dAtA) - i, nil } -func (m *ResponseException) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ResponseException) MarshalTo(dAtA []byte) (int, error) { +func (m *Response_CreateOracleResultTx) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ResponseException) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *Response_CreateOracleResultTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Error) > 0 { - i -= len(m.Error) - copy(dAtA[i:], m.Error) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Error))) + if m.CreateOracleResultTx != nil { + { + size, err := m.CreateOracleResultTx.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } i-- - dAtA[i] = 0xa + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xb2 } return len(dAtA) - i, nil } - -func (m *ResponseEcho) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ResponseEcho) MarshalTo(dAtA []byte) (int, error) { +func (m *Response_FetchOracleVotes) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ResponseEcho) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *Response_FetchOracleVotes) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Message) > 0 { + if m.FetchOracleVotes != nil { + { + size, err := m.FetchOracleVotes.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xba + } + return len(dAtA) - i, nil +} +func (m *Response_ValidateOracleVotes) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Response_ValidateOracleVotes) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.ValidateOracleVotes != nil { + { + size, err := m.ValidateOracleVotes.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xc2 + } + return len(dAtA) - i, nil +} +func (m *ResponseException) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ResponseException) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ResponseException) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Error) > 0 { + i -= len(m.Error) + copy(dAtA[i:], m.Error) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Error))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ResponseEcho) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ResponseEcho) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ResponseEcho) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Message) > 0 { i -= len(m.Message) copy(dAtA[i:], m.Message) i = encodeVarintTypes(dAtA, i, uint64(len(m.Message))) @@ -6613,20 +7352,20 @@ func (m *ResponseApplySnapshotChunk) MarshalToSizedBuffer(dAtA []byte) (int, err } } if len(m.RefetchChunks) > 0 { - dAtA48 := make([]byte, len(m.RefetchChunks)*10) - var j47 int + dAtA54 := make([]byte, len(m.RefetchChunks)*10) + var j53 int for _, num := range m.RefetchChunks { for num >= 1<<7 { - dAtA48[j47] = uint8(uint64(num)&0x7f | 0x80) + dAtA54[j53] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 - j47++ + j53++ } - dAtA48[j47] = uint8(num) - j47++ + dAtA54[j53] = uint8(num) + j53++ } - i -= j47 - copy(dAtA[i:], dAtA48[:j47]) - i = encodeVarintTypes(dAtA, i, uint64(j47)) + i -= j53 + copy(dAtA[i:], dAtA54[:j53]) + i = encodeVarintTypes(dAtA, i, uint64(j53)) i-- dAtA[i] = 0x12 } @@ -6840,6 +7579,99 @@ func (m *ResponseFinalizeBlock) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *ResponseCreateOracleResultTx) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ResponseCreateOracleResultTx) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ResponseCreateOracleResultTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.EncodedTx) > 0 { + i -= len(m.EncodedTx) + copy(dAtA[i:], m.EncodedTx) + i = encodeVarintTypes(dAtA, i, uint64(len(m.EncodedTx))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ResponseFetchOracleVotes) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ResponseFetchOracleVotes) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ResponseFetchOracleVotes) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Vote != nil { + { + size, err := m.Vote.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ResponseValidateOracleVotes) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ResponseValidateOracleVotes) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ResponseValidateOracleVotes) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Status != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.Status)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + func (m *CommitInfo) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -7333,12 +8165,12 @@ func (m *Misbehavior) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x28 } - n54, err54 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.Time, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.Time):]) - if err54 != nil { - return 0, err54 + n61, err61 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.Time, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.Time):]) + if err61 != nil { + return 0, err61 } - i -= n54 - i = encodeVarintTypes(dAtA, i, uint64(n54)) + i -= n61 + i = encodeVarintTypes(dAtA, i, uint64(n61)) i-- dAtA[i] = 0x22 if m.Height != 0 { @@ -7631,6 +8463,42 @@ func (m *Request_FinalizeBlock) Size() (n int) { } return n } +func (m *Request_CreateOracleResultTx) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.CreateOracleResultTx != nil { + l = m.CreateOracleResultTx.Size() + n += 2 + l + sovTypes(uint64(l)) + } + return n +} +func (m *Request_FetchOracleVotes) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.FetchOracleVotes != nil { + l = m.FetchOracleVotes.Size() + n += 2 + l + sovTypes(uint64(l)) + } + return n +} +func (m *Request_ValidateOracleVotes) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.ValidateOracleVotes != nil { + l = m.ValidateOracleVotes.Size() + n += 2 + l + sovTypes(uint64(l)) + } + return n +} func (m *RequestEcho) Size() (n int) { if m == nil { return 0 @@ -8003,6 +8871,47 @@ func (m *RequestFinalizeBlock) Size() (n int) { return n } +func (m *RequestCreateOracleResultTx) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Proposer) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + if len(m.GossipedVotes) > 0 { + for _, e := range m.GossipedVotes { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + return n +} + +func (m *RequestFetchOracleVotes) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *RequestValidateOracleVotes) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.OracleTx) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + return n +} + func (m *Response) Size() (n int) { if m == nil { return 0 @@ -8219,6 +9128,42 @@ func (m *Response_FinalizeBlock) Size() (n int) { } return n } +func (m *Response_CreateOracleResultTx) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.CreateOracleResultTx != nil { + l = m.CreateOracleResultTx.Size() + n += 2 + l + sovTypes(uint64(l)) + } + return n +} +func (m *Response_FetchOracleVotes) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.FetchOracleVotes != nil { + l = m.FetchOracleVotes.Size() + n += 2 + l + sovTypes(uint64(l)) + } + return n +} +func (m *Response_ValidateOracleVotes) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.ValidateOracleVotes != nil { + l = m.ValidateOracleVotes.Size() + n += 2 + l + sovTypes(uint64(l)) + } + return n +} func (m *ResponseException) Size() (n int) { if m == nil { return 0 @@ -8550,18 +9495,56 @@ func (m *ResponseFinalizeBlock) Size() (n int) { return n } -func (m *CommitInfo) Size() (n int) { +func (m *ResponseCreateOracleResultTx) Size() (n int) { if m == nil { return 0 } var l int _ = l - if m.Round != 0 { - n += 1 + sovTypes(uint64(m.Round)) + l = len(m.EncodedTx) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) } - if len(m.Votes) > 0 { - for _, e := range m.Votes { - l = e.Size() + return n +} + +func (m *ResponseFetchOracleVotes) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Vote != nil { + l = m.Vote.Size() + n += 1 + l + sovTypes(uint64(l)) + } + return n +} + +func (m *ResponseValidateOracleVotes) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Status != 0 { + n += 1 + sovTypes(uint64(m.Status)) + } + return n +} + +func (m *CommitInfo) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Round != 0 { + n += 1 + sovTypes(uint64(m.Round)) + } + if len(m.Votes) > 0 { + for _, e := range m.Votes { + l = e.Size() n += 1 + l + sovTypes(uint64(l)) } } @@ -9395,6 +10378,111 @@ func (m *Request) Unmarshal(dAtA []byte) error { } m.Value = &Request_FinalizeBlock{v} iNdEx = postIndex + case 21: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CreateOracleResultTx", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &RequestCreateOracleResultTx{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Value = &Request_CreateOracleResultTx{v} + iNdEx = postIndex + case 22: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FetchOracleVotes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &RequestFetchOracleVotes{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Value = &Request_FetchOracleVotes{v} + iNdEx = postIndex + case 23: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ValidateOracleVotes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &RequestValidateOracleVotes{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Value = &Request_ValidateOracleVotes{v} + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTypes(dAtA[iNdEx:]) @@ -12026,6 +13114,258 @@ func (m *RequestFinalizeBlock) Unmarshal(dAtA []byte) error { } return nil } +func (m *RequestCreateOracleResultTx) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RequestCreateOracleResultTx: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RequestCreateOracleResultTx: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Proposer", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Proposer = append(m.Proposer[:0], dAtA[iNdEx:postIndex]...) + if m.Proposer == nil { + m.Proposer = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GossipedVotes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.GossipedVotes = append(m.GossipedVotes, &oracle.GossipedVotes{}) + if err := m.GossipedVotes[len(m.GossipedVotes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RequestFetchOracleVotes) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RequestFetchOracleVotes: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RequestFetchOracleVotes: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RequestValidateOracleVotes) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RequestValidateOracleVotes: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RequestValidateOracleVotes: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OracleTx", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OracleTx = append(m.OracleTx[:0], dAtA[iNdEx:postIndex]...) + if m.OracleTx == nil { + m.OracleTx = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *Response) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -12442,7 +13782,112 @@ func (m *Response) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 16: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ApplySnapshotChunk", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ApplySnapshotChunk", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &ResponseApplySnapshotChunk{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Value = &Response_ApplySnapshotChunk{v} + iNdEx = postIndex + case 17: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PrepareProposal", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &ResponsePrepareProposal{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Value = &Response_PrepareProposal{v} + iNdEx = postIndex + case 18: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ProcessProposal", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &ResponseProcessProposal{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Value = &Response_ProcessProposal{v} + iNdEx = postIndex + case 19: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ExtendVote", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -12469,15 +13914,15 @@ func (m *Response) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - v := &ResponseApplySnapshotChunk{} + v := &ResponseExtendVote{} if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } - m.Value = &Response_ApplySnapshotChunk{v} + m.Value = &Response_ExtendVote{v} iNdEx = postIndex - case 17: + case 20: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PrepareProposal", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field VerifyVoteExtension", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -12504,15 +13949,15 @@ func (m *Response) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - v := &ResponsePrepareProposal{} + v := &ResponseVerifyVoteExtension{} if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } - m.Value = &Response_PrepareProposal{v} + m.Value = &Response_VerifyVoteExtension{v} iNdEx = postIndex - case 18: + case 21: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProcessProposal", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field FinalizeBlock", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -12539,15 +13984,15 @@ func (m *Response) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - v := &ResponseProcessProposal{} + v := &ResponseFinalizeBlock{} if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } - m.Value = &Response_ProcessProposal{v} + m.Value = &Response_FinalizeBlock{v} iNdEx = postIndex - case 19: + case 22: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ExtendVote", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field CreateOracleResultTx", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -12574,15 +14019,15 @@ func (m *Response) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - v := &ResponseExtendVote{} + v := &ResponseCreateOracleResultTx{} if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } - m.Value = &Response_ExtendVote{v} + m.Value = &Response_CreateOracleResultTx{v} iNdEx = postIndex - case 20: + case 23: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field VerifyVoteExtension", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field FetchOracleVotes", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -12609,15 +14054,15 @@ func (m *Response) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - v := &ResponseVerifyVoteExtension{} + v := &ResponseFetchOracleVotes{} if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } - m.Value = &Response_VerifyVoteExtension{v} + m.Value = &Response_FetchOracleVotes{v} iNdEx = postIndex - case 21: + case 24: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FinalizeBlock", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ValidateOracleVotes", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -12644,11 +14089,11 @@ func (m *Response) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - v := &ResponseFinalizeBlock{} + v := &ResponseValidateOracleVotes{} if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } - m.Value = &Response_FinalizeBlock{v} + m.Value = &Response_ValidateOracleVotes{v} iNdEx = postIndex default: iNdEx = preIndex @@ -14812,6 +16257,245 @@ func (m *ResponseFinalizeBlock) Unmarshal(dAtA []byte) error { } return nil } +func (m *ResponseCreateOracleResultTx) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ResponseCreateOracleResultTx: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ResponseCreateOracleResultTx: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field EncodedTx", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.EncodedTx = append(m.EncodedTx[:0], dAtA[iNdEx:postIndex]...) + if m.EncodedTx == nil { + m.EncodedTx = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ResponseFetchOracleVotes) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ResponseFetchOracleVotes: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ResponseFetchOracleVotes: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Vote", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Vote == nil { + m.Vote = &oracle.Vote{} + } + if err := m.Vote.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ResponseValidateOracleVotes) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ResponseValidateOracleVotes: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ResponseValidateOracleVotes: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + m.Status = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Status |= ResponseValidateOracleVotes_Status(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *CommitInfo) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/blocksync/reactor_test.go b/blocksync/reactor_test.go index cd6e640ab75..543be4a8b1f 100644 --- a/blocksync/reactor_test.go +++ b/blocksync/reactor_test.go @@ -25,6 +25,8 @@ import ( "github.com/cometbft/cometbft/store" "github.com/cometbft/cometbft/types" cmttime "github.com/cometbft/cometbft/types/time" + + oracletypes "github.com/cometbft/cometbft/oracle/service/types" ) var config *cfg.Config @@ -108,8 +110,9 @@ func newReactor( stateStore = sm.NewStore(db, sm.StoreOptions{ DiscardABCIResponses: false, }) + oracleInfo := oracletypes.OracleInfo{} blockExec := sm.NewBlockExecutor(stateStore, log.TestingLogger(), proxyApp.Consensus(), - mp, sm.EmptyEvidencePool{}, blockStore) + mp, &oracleInfo, sm.EmptyEvidencePool{}, blockStore) if err = stateStore.Save(state); err != nil { panic(err) } diff --git a/config/config.go b/config/config.go index d0d8e79cd45..08fcaa2e72e 100644 --- a/config/config.go +++ b/config/config.go @@ -75,6 +75,7 @@ type Config struct { RPC *RPCConfig `mapstructure:"rpc"` P2P *P2PConfig `mapstructure:"p2p"` Mempool *MempoolConfig `mapstructure:"mempool"` + Oracle *OracleConfig `mapstructure:"oraclesvc"` StateSync *StateSyncConfig `mapstructure:"statesync"` BlockSync *BlockSyncConfig `mapstructure:"blocksync"` Consensus *ConsensusConfig `mapstructure:"consensus"` @@ -90,6 +91,7 @@ func DefaultConfig() *Config { RPC: DefaultRPCConfig(), P2P: DefaultP2PConfig(), Mempool: DefaultMempoolConfig(), + Oracle: DefaultOracleConfig(), StateSync: DefaultStateSyncConfig(), BlockSync: DefaultBlockSyncConfig(), Consensus: DefaultConsensusConfig(), @@ -106,6 +108,7 @@ func TestConfig() *Config { RPC: TestRPCConfig(), P2P: TestP2PConfig(), Mempool: TestMempoolConfig(), + Oracle: TestOracleConfig(), StateSync: TestStateSyncConfig(), BlockSync: TestBlockSyncConfig(), Consensus: TestConsensusConfig(), @@ -140,6 +143,9 @@ func (cfg *Config) ValidateBasic() error { if err := cfg.Mempool.ValidateBasic(); err != nil { return fmt.Errorf("error in [mempool] section: %w", err) } + if err := cfg.Oracle.ValidateBasic(); err != nil { + return fmt.Errorf("error in [oracle] section: %w", err) + } if err := cfg.StateSync.ValidateBasic(); err != nil { return fmt.Errorf("error in [statesync] section: %w", err) } @@ -830,6 +836,67 @@ func (cfg *MempoolConfig) ValidateBasic() error { return nil } +//----------------------------------------------------------------------------- +// OracleConfig + +// OracleConfig defines the configuration for the CometBFT oracle service +type OracleConfig struct { + // MaxOracleGossipBlocksDelayed determines how long we should keep the gossip votes in terms of block height + MaxOracleGossipBlocksDelayed int `mapstructure:"max_oracle_gossip_blocks_delayed"` + // MaxOracleGossipAge determines how long we should keep the gossip votes in terms of seconds + MaxOracleGossipAge int `mapstructure:"max_oracle_gossip_age"` + // Interval determines how long we should wait before batch signing votes + SignInterval time.Duration `mapstructure:"sign_interval"` + // Interval determines how long we should wait between gossiping of votes + GossipInterval time.Duration `mapstructure:"gossip_interval"` + // Interval determines how long we should wait between trying to prune + PruneInterval time.Duration `mapstructure:"prune_interval"` + // Max allowable size for votes that can be gossiped from peer to peer + MaxGossipMsgSize int `mapstructure:"max_gossip_msg_size"` +} + +// DefaultOracleConfig returns a default configuration for the CometBFT oracle service +func DefaultOracleConfig() *OracleConfig { + return &OracleConfig{ + MaxOracleGossipBlocksDelayed: 3, // keep all gossipVotes from at most 3 blocks behind + MaxOracleGossipAge: 20, // keep all gossipVotes from at most 20s ago + SignInterval: 100 * time.Millisecond, // 0.1s + GossipInterval: 100 * time.Millisecond, // 0.1s + PruneInterval: 500 * time.Millisecond, // 0.5s + MaxGossipMsgSize: 65536, + } +} + +// TestOracleConfig returns a configuration for testing the CometBFT mempool +func TestOracleConfig() *OracleConfig { + cfg := DefaultOracleConfig() + cfg.MaxGossipMsgSize = 1000 + return cfg +} + +// ValidateBasic performs basic validation and returns an error if any check fails. +func (cfg *OracleConfig) ValidateBasic() error { + if cfg.MaxOracleGossipBlocksDelayed <= 0 { + return errors.New("max_oracle_gossip_blocks_delayed must be positive") + } + if cfg.MaxOracleGossipAge <= 0 { + return errors.New("max_oracle_gossip_age must be positive") + } + if cfg.SignInterval <= 0 { + return errors.New("sign_interval must be positive") + } + if cfg.GossipInterval <= 0 { + return errors.New("gossip_interval must be positive") + } + if cfg.PruneInterval <= 0 { + return errors.New("prune_interval must be positive") + } + if cfg.MaxGossipMsgSize <= 0 { + return errors.New("max_gossip_msg_size must be positive") + } + return nil +} + //----------------------------------------------------------------------------- // StateSyncConfig diff --git a/config/toml.go b/config/toml.go index 76ef3d06c25..306996d5cff 100644 --- a/config/toml.go +++ b/config/toml.go @@ -404,6 +404,29 @@ max_batch_bytes = {{ .Mempool.MaxBatchBytes }} experimental_max_gossip_connections_to_persistent_peers = {{ .Mempool.ExperimentalMaxGossipConnectionsToPersistentPeers }} experimental_max_gossip_connections_to_non_persistent_peers = {{ .Mempool.ExperimentalMaxGossipConnectionsToNonPersistentPeers }} +####################################################### +### Oracle Configuration Option ### +####################################################### +[oraclesvc] + +# MaxOracleGossipBlocksDelayed determines how long we should keep the gossip votes in terms of block height +max_oracle_gossip_blocks_delayed = "{{ .Oracle.MaxOracleGossipBlocksDelayed }}" + +# MaxOracleGossipAge determines how long we should keep the gossip votes in terms of seconds +max_oracle_gossip_age = "{{ .Oracle.MaxOracleGossipAge }}" + +# Interval determines how long we should wait before batch signing votes +sign_interval = "{{ .Oracle.SignInterval }}" + +# Interval determines how long we should wait between gossiping of votes +gossip_interval = "{{ .Oracle.GossipInterval }}" + +# Interval determines how long we should wait between trying to prune +prune_interval = "{{ .Oracle.PruneInterval }}" + +# Max allowable size for votes that can be gossiped from peer to peer +max_gossip_msg_size = {{ .Oracle.MaxGossipMsgSize }} + ####################################################### ### State Sync Configuration Options ### ####################################################### diff --git a/consensus/byzantine_test.go b/consensus/byzantine_test.go index bb72e7932a9..eb13ed37a56 100644 --- a/consensus/byzantine_test.go +++ b/consensus/byzantine_test.go @@ -29,6 +29,8 @@ import ( sm "github.com/cometbft/cometbft/state" "github.com/cometbft/cometbft/store" "github.com/cometbft/cometbft/types" + + oracletypes "github.com/cometbft/cometbft/oracle/service/types" ) //---------------------------------------------- @@ -89,8 +91,10 @@ func TestByzantinePrevoteEquivocation(t *testing.T) { require.NoError(t, err) evpool.SetLogger(logger.With("module", "evidence")) + oracleInfo := oracletypes.OracleInfo{} + // Make State - blockExec := sm.NewBlockExecutor(stateStore, log.TestingLogger(), proxyAppConnCon, mempool, evpool, blockStore) + blockExec := sm.NewBlockExecutor(stateStore, log.TestingLogger(), proxyAppConnCon, mempool, &oracleInfo, evpool, blockStore) cs := NewState(thisConfig.Consensus, state, blockExec, blockStore, mempool, evpool) cs.SetLogger(cs.Logger) // set private validator diff --git a/consensus/common_test.go b/consensus/common_test.go index 95effc131dd..8060c46f71e 100644 --- a/consensus/common_test.go +++ b/consensus/common_test.go @@ -38,6 +38,8 @@ import ( "github.com/cometbft/cometbft/store" "github.com/cometbft/cometbft/types" cmttime "github.com/cometbft/cometbft/types/time" + + oracletypes "github.com/cometbft/cometbft/oracle/service/types" ) const ( @@ -431,7 +433,8 @@ func newStateWithConfigAndBlockStore( panic(err) } - blockExec := sm.NewBlockExecutor(stateStore, log.TestingLogger(), proxyAppConnCon, mempool, evpool, blockStore) + oracleInfo := oracletypes.OracleInfo{} + blockExec := sm.NewBlockExecutor(stateStore, log.TestingLogger(), proxyAppConnCon, mempool, &oracleInfo, evpool, blockStore) cs := NewState(thisConfig.Consensus, state, blockExec, blockStore, mempool, evpool) cs.SetLogger(log.TestingLogger().With("module", "consensus")) cs.SetPrivValidator(pv) diff --git a/consensus/reactor_test.go b/consensus/reactor_test.go index aed400188ac..abd1d5199a1 100644 --- a/consensus/reactor_test.go +++ b/consensus/reactor_test.go @@ -37,6 +37,8 @@ import ( statemocks "github.com/cometbft/cometbft/state/mocks" "github.com/cometbft/cometbft/store" "github.com/cometbft/cometbft/types" + + oracletypes "github.com/cometbft/cometbft/oracle/service/types" ) //---------------------------------------------- @@ -188,7 +190,8 @@ func TestReactorWithEvidence(t *testing.T) { evpool2 := sm.EmptyEvidencePool{} // Make State - blockExec := sm.NewBlockExecutor(stateStore, log.TestingLogger(), proxyAppConnCon, mempool, evpool, blockStore) + oracleInfo := oracletypes.OracleInfo{} + blockExec := sm.NewBlockExecutor(stateStore, log.TestingLogger(), proxyAppConnCon, mempool, &oracleInfo, evpool, blockStore) cs := NewState(thisConfig.Consensus, state, blockExec, blockStore, mempool, evpool2) cs.SetLogger(log.TestingLogger().With("module", "consensus")) cs.SetPrivValidator(pv) diff --git a/consensus/replay.go b/consensus/replay.go index b8e457fa518..c210458cf4c 100644 --- a/consensus/replay.go +++ b/consensus/replay.go @@ -15,6 +15,8 @@ import ( "github.com/cometbft/cometbft/proxy" sm "github.com/cometbft/cometbft/state" "github.com/cometbft/cometbft/types" + + oracletypes "github.com/cometbft/cometbft/oracle/service/types" ) var crc32c = crc32.MakeTable(crc32.Castagnoli) @@ -527,7 +529,8 @@ func (h *Handshaker) replayBlock(state sm.State, height int64, proxyApp proxy.Ap // Use stubs for both mempool and evidence pool since no transactions nor // evidence are needed here - block already exists. - blockExec := sm.NewBlockExecutor(h.stateStore, h.logger, proxyApp, emptyMempool{}, sm.EmptyEvidencePool{}, h.store) + oracleInfo := oracletypes.OracleInfo{} + blockExec := sm.NewBlockExecutor(h.stateStore, h.logger, proxyApp, emptyMempool{}, &oracleInfo, sm.EmptyEvidencePool{}, h.store) blockExec.SetEventBus(h.eventBus) var err error diff --git a/consensus/replay_file.go b/consensus/replay_file.go index 269dcc0fd82..58077bca930 100644 --- a/consensus/replay_file.go +++ b/consensus/replay_file.go @@ -19,6 +19,8 @@ import ( sm "github.com/cometbft/cometbft/state" "github.com/cometbft/cometbft/store" "github.com/cometbft/cometbft/types" + + oracletypes "github.com/cometbft/cometbft/oracle/service/types" ) const ( @@ -329,7 +331,8 @@ func newConsensusStateForReplay(config cfg.BaseConfig, csConfig *cfg.ConsensusCo } mempool, evpool := emptyMempool{}, sm.EmptyEvidencePool{} - blockExec := sm.NewBlockExecutor(stateStore, log.TestingLogger(), proxyApp.Consensus(), mempool, evpool, blockStore) + oracleInfo := oracletypes.OracleInfo{} + blockExec := sm.NewBlockExecutor(stateStore, log.TestingLogger(), proxyApp.Consensus(), mempool, &oracleInfo, evpool, blockStore) consensusState := NewState(csConfig, state.Copy(), blockExec, blockStore, mempool, evpool) diff --git a/consensus/replay_test.go b/consensus/replay_test.go index bcf74387f36..021ff87c775 100644 --- a/consensus/replay_test.go +++ b/consensus/replay_test.go @@ -34,6 +34,8 @@ import ( sm "github.com/cometbft/cometbft/state" smmocks "github.com/cometbft/cometbft/state/mocks" "github.com/cometbft/cometbft/types" + + oracletypes "github.com/cometbft/cometbft/oracle/service/types" ) func TestMain(m *testing.M) { @@ -767,7 +769,8 @@ func testHandshakeReplay(t *testing.T, config *cfg.Config, nBlocks int, mode uin func applyBlock(t *testing.T, stateStore sm.Store, mempool mempool.Mempool, evpool sm.EvidencePool, st sm.State, blk *types.Block, proxyApp proxy.AppConns, bs sm.BlockStore) sm.State { testPartSize := types.BlockPartSizeBytes - blockExec := sm.NewBlockExecutor(stateStore, log.TestingLogger(), proxyApp.Consensus(), mempool, evpool, bs) + oracleInfo := oracletypes.OracleInfo{} + blockExec := sm.NewBlockExecutor(stateStore, log.TestingLogger(), proxyApp.Consensus(), mempool, &oracleInfo, evpool, bs) bps, err := blk.MakePartSet(testPartSize) require.NoError(t, err) diff --git a/consensus/wal_generator.go b/consensus/wal_generator.go index c44e9f68ad0..38d99081fdc 100644 --- a/consensus/wal_generator.go +++ b/consensus/wal_generator.go @@ -21,6 +21,8 @@ import ( sm "github.com/cometbft/cometbft/state" "github.com/cometbft/cometbft/store" "github.com/cometbft/cometbft/types" + + oracletypes "github.com/cometbft/cometbft/oracle/service/types" ) // WALGenerateNBlocks generates a consensus WAL. It does this by spinning up a @@ -83,7 +85,8 @@ func WALGenerateNBlocks(t *testing.T, wr io.Writer, numBlocks int, config *cfg.C }) mempool := emptyMempool{} evpool := sm.EmptyEvidencePool{} - blockExec := sm.NewBlockExecutor(stateStore, log.TestingLogger(), proxyApp.Consensus(), mempool, evpool, blockStore) + oracleInfo := oracletypes.OracleInfo{} + blockExec := sm.NewBlockExecutor(stateStore, log.TestingLogger(), proxyApp.Consensus(), mempool, &oracleInfo, evpool, blockStore) consensusState := NewState(config.Consensus, state.Copy(), blockExec, blockStore, mempool, evpool) consensusState.SetLogger(logger) consensusState.SetEventBus(eventBus) diff --git a/docker-compose.yml b/docker-compose.yml index ee582871976..f6c37165abc 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -63,4 +63,4 @@ networks: ipam: driver: default config: - - subnet: 192.167.10.0/16 + - subnet: 192.167.0.0/16 diff --git a/go.sum b/go.sum index 015b09364fc..b6eeec19b31 100644 --- a/go.sum +++ b/go.sum @@ -1347,4 +1347,4 @@ mvdan.cc/unparam v0.0.0-20221223090309-7455f1af531d h1:3rvTIIM22r9pvXk+q3swxUQAQ mvdan.cc/unparam v0.0.0-20221223090309-7455f1af531d/go.mod h1:IeHQjmn6TOD+e4Z3RFiZMMsLVL+A96Nvptar8Fj71is= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= -rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= +rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= \ No newline at end of file diff --git a/node/node.go b/node/node.go index 6fe6426e252..102a6acbcc1 100644 --- a/node/node.go +++ b/node/node.go @@ -39,6 +39,8 @@ import ( cmttime "github.com/cometbft/cometbft/types/time" "github.com/cometbft/cometbft/version" + "github.com/cometbft/cometbft/oracle" + _ "net/http/pprof" //nolint: gosec ) @@ -67,6 +69,7 @@ type Node struct { bcReactor p2p.Reactor // for block-syncing mempoolReactor p2p.Reactor // for gossipping transactions mempool mempl.Mempool + oracleReactor oracle.Reactor stateSync bool // whether the node should state sync on startup stateSyncReactor *statesync.Reactor // for hosting and restoring state sync snapshots stateSyncProvider statesync.StateProvider // provides state data for bootstrapping a node @@ -373,12 +376,17 @@ func NewNodeWithContext(ctx context.Context, return nil, err } + // Make OracleReactor + oracleReactor := oracle.NewReactor(config.Oracle, pubKey, privValidator, proxyApp.Consensus()) + oracleInfo := oracleReactor.OracleInfo + // make block executor for consensus and blocksync reactors to execute blocks blockExec := sm.NewBlockExecutor( stateStore, logger.With("module", "state"), proxyApp.Consensus(), mempool, + oracleInfo, evidencePool, blockStore, sm.BlockExecutorWithMetrics(smMetrics), @@ -402,6 +410,8 @@ func NewNodeWithContext(ctx context.Context, privValidator, csMetrics, stateSync || blockSync, eventBus, consensusLogger, offlineStateSyncHeight, ) + oracleReactor.ConsensusState = consensusState + err = stateStore.SetOfflineStateSyncHeight(0) if err != nil { panic(fmt.Sprintf("failed to reset the offline state sync height %s", err)) @@ -427,7 +437,7 @@ func NewNodeWithContext(ctx context.Context, p2pLogger := logger.With("module", "p2p") sw := createSwitch( - config, transport, p2pMetrics, peerFilters, mempoolReactor, bcReactor, + config, transport, p2pMetrics, peerFilters, mempoolReactor, oracleReactor, bcReactor, stateSyncReactor, consensusReactor, evidenceReactor, nodeInfo, nodeKey, p2pLogger, ) @@ -482,6 +492,7 @@ func NewNodeWithContext(ctx context.Context, bcReactor: bcReactor, mempoolReactor: mempoolReactor, mempool: mempool, + oracleReactor: *oracleReactor, consensusState: consensusState, consensusReactor: consensusReactor, stateSyncReactor: stateSyncReactor, @@ -938,6 +949,7 @@ func makeNodeInfo( bc.BlocksyncChannel, cs.StateChannel, cs.DataChannel, cs.VoteChannel, cs.VoteSetBitsChannel, mempl.MempoolChannel, + oracle.OracleChannel, evidence.EvidenceChannel, statesync.SnapshotChannel, statesync.ChunkChannel, }, diff --git a/node/node_test.go b/node/node_test.go index 01d5f0f8fcc..80c1f5e8a89 100644 --- a/node/node_test.go +++ b/node/node_test.go @@ -32,6 +32,8 @@ import ( "github.com/cometbft/cometbft/store" "github.com/cometbft/cometbft/types" cmttime "github.com/cometbft/cometbft/types/time" + + oracletypes "github.com/cometbft/cometbft/oracle/service/types" ) func TestNodeStartStop(t *testing.T) { @@ -313,11 +315,14 @@ func TestCreateProposalBlock(t *testing.T) { assert.NoError(t, err) } + oracleInfo := oracletypes.OracleInfo{} + blockExec := sm.NewBlockExecutor( stateStore, logger, proxyApp.Consensus(), mempool, + &oracleInfo, evidencePool, blockStore, ) @@ -390,11 +395,14 @@ func TestMaxProposalBlockSize(t *testing.T) { err = mempool.CheckTx(tx, nil, mempl.TxInfo{}) assert.NoError(t, err) + oracleInfo := oracletypes.OracleInfo{} + blockExec := sm.NewBlockExecutor( stateStore, logger, proxyApp.Consensus(), mempool, + &oracleInfo, sm.EmptyEvidencePool{}, blockStore, ) diff --git a/node/setup.go b/node/setup.go index 6d2e9c295b4..d7d28d6d085 100644 --- a/node/setup.go +++ b/node/setup.go @@ -408,6 +408,7 @@ func createSwitch(config *cfg.Config, p2pMetrics *p2p.Metrics, peerFilters []p2p.PeerFilterFunc, mempoolReactor p2p.Reactor, + oracleReactor p2p.Reactor, bcReactor p2p.Reactor, stateSyncReactor *statesync.Reactor, consensusReactor *cs.Reactor, @@ -423,6 +424,7 @@ func createSwitch(config *cfg.Config, p2p.SwitchPeerFilters(peerFilters...), ) sw.SetLogger(p2pLogger) + sw.AddReactor("ORACLE", oracleReactor) if config.Mempool.Type != cfg.MempoolTypeNop { sw.AddReactor("MEMPOOL", mempoolReactor) } diff --git a/oracle/ids.go b/oracle/ids.go new file mode 100644 index 00000000000..69437907d66 --- /dev/null +++ b/oracle/ids.go @@ -0,0 +1,71 @@ +package oracle + +import ( + "fmt" + + cmtsync "github.com/cometbft/cometbft/libs/sync" + "github.com/cometbft/cometbft/p2p" +) + +type oracleIDs struct { + mtx cmtsync.RWMutex + peerMap map[p2p.ID]uint16 + nextID uint16 // assumes that a node will never have over 65536 active peers + activeIDs map[uint16]struct{} // used to check if a given peerID key is used, the value doesn't matter +} + +// Reserve searches for the next unused ID and assigns it to the +// peer. +func (ids *oracleIDs) ReserveForPeer(peer p2p.Peer) { + ids.mtx.Lock() + defer ids.mtx.Unlock() + + curID := ids.nextPeerID() + ids.peerMap[peer.ID()] = curID + ids.activeIDs[curID] = struct{}{} +} + +// nextPeerID returns the next unused peer ID to use. +// This assumes that ids's mutex is already locked. +func (ids *oracleIDs) nextPeerID() uint16 { + if len(ids.activeIDs) == MaxActiveIDs { + panic(fmt.Sprintf("node has maximum %d active IDs and wanted to get one more", MaxActiveIDs)) + } + + _, idExists := ids.activeIDs[ids.nextID] + for idExists { + ids.nextID++ + _, idExists = ids.activeIDs[ids.nextID] + } + curID := ids.nextID + ids.nextID++ + return curID +} + +// Reclaim returns the ID reserved for the peer back to unused pool. +func (ids *oracleIDs) Reclaim(peer p2p.Peer) { + ids.mtx.Lock() + defer ids.mtx.Unlock() + + removedID, ok := ids.peerMap[peer.ID()] + if ok { + delete(ids.activeIDs, removedID) + delete(ids.peerMap, peer.ID()) + } +} + +// GetForPeer returns an ID reserved for the peer. +func (ids *oracleIDs) GetForPeer(peer p2p.Peer) uint16 { + ids.mtx.RLock() + defer ids.mtx.RUnlock() + + return ids.peerMap[peer.ID()] +} + +func newOracleIDs() *oracleIDs { + return &oracleIDs{ + peerMap: make(map[p2p.ID]uint16), + activeIDs: map[uint16]struct{}{0: {}}, + nextID: 1, // reserve unknownPeerID(0) for oracleReactor.BroadcastTx + } +} diff --git a/oracle/reactor.go b/oracle/reactor.go new file mode 100644 index 00000000000..fa4ac14dee9 --- /dev/null +++ b/oracle/reactor.go @@ -0,0 +1,246 @@ +package oracle + +import ( + "encoding/hex" + "fmt" + "math" + "time" + + "github.com/cometbft/cometbft/config" + "github.com/cometbft/cometbft/proxy" + + "github.com/cometbft/cometbft/crypto" + + cs "github.com/cometbft/cometbft/consensus" + "github.com/cometbft/cometbft/libs/log" + "github.com/cometbft/cometbft/oracle/service/runner" + oracletypes "github.com/cometbft/cometbft/oracle/service/types" + "github.com/cometbft/cometbft/p2p" + oracleproto "github.com/cometbft/cometbft/proto/tendermint/oracle" + "github.com/cometbft/cometbft/types" + "github.com/sirupsen/logrus" +) + +const ( + OracleChannel = byte(0x42) + + // PeerCatchupSleepIntervalMS defines how much time to sleep if a peer is behind + PeerCatchupSleepIntervalMS = 100 + + MaxActiveIDs = math.MaxUint16 +) + +// Reactor handles mempool tx broadcasting amongst peers. +// It maintains a map from peer ID to counter, to prevent gossiping txs to the +// peers you received it from. +type Reactor struct { + p2p.BaseReactor + OracleInfo *oracletypes.OracleInfo + ids *oracleIDs + ConsensusState *cs.State +} + +// NewReactor returns a new Reactor with the given config and mempool. +func NewReactor(config *config.OracleConfig, pubKey crypto.PubKey, privValidator types.PrivValidator, proxyApp proxy.AppConnConsensus) *Reactor { + gossipVoteBuffer := &oracletypes.GossipVoteBuffer{ + Buffer: make(map[string]*oracleproto.GossipedVotes), + } + unsignedVoteBuffer := &oracletypes.UnsignedVoteBuffer{ + Buffer: []*oracleproto.Vote{}, + } + + oracleInfo := &oracletypes.OracleInfo{ + Config: config, + UnsignedVoteBuffer: unsignedVoteBuffer, + GossipVoteBuffer: gossipVoteBuffer, + SignVotesChan: make(chan *oracleproto.Vote, 1024), + PubKey: pubKey, + PrivValidator: privValidator, + ProxyApp: proxyApp, + BlockTimestamps: []int64{}, + } + + oracleR := &Reactor{ + OracleInfo: oracleInfo, + ids: newOracleIDs(), + } + oracleR.BaseReactor = *p2p.NewBaseReactor("Oracle", oracleR) + + return oracleR +} + +// InitPeer implements Reactor by creating a state for the peer. +func (oracleR *Reactor) InitPeer(peer p2p.Peer) p2p.Peer { + oracleR.ids.ReserveForPeer(peer) + return peer +} + +// SetLogger sets the Logger on the reactor and the underlying mempool. +func (oracleR *Reactor) SetLogger(l log.Logger) { + oracleR.Logger = l + oracleR.BaseService.SetLogger(l) +} + +// OnStart implements p2p.BaseReactor. +func (oracleR *Reactor) OnStart() error { + go func() { + runner.Run(oracleR.OracleInfo, oracleR.ConsensusState) + }() + return nil +} + +// GetChannels implements Reactor by returning the list of channels for this +// reactor. +func (oracleR *Reactor) GetChannels() []*p2p.ChannelDescriptor { + // only gossip votes with a max size of x, where x = Config.MaxGossipMsgSize + messageCap := oracleR.OracleInfo.Config.MaxGossipMsgSize + + return []*p2p.ChannelDescriptor{ + { + ID: OracleChannel, + Priority: 5, + RecvMessageCapacity: messageCap, + MessageType: &oracleproto.GossipedVotes{}, + }, + } +} + +// AddPeer implements Reactor. +// It starts a broadcast routine ensuring all txs are forwarded to the given peer. +func (oracleR *Reactor) AddPeer(peer p2p.Peer) { + go func() { + oracleR.broadcastVoteRoutine(peer) + }() +} + +// RemovePeer implements Reactor. +func (oracleR *Reactor) RemovePeer(peer p2p.Peer, _ interface{}) { + oracleR.ids.Reclaim(peer) + // broadcast routine checks if peer is gone and returns +} + +// // Receive implements Reactor. +func (oracleR *Reactor) Receive(e p2p.Envelope) { + oracleR.Logger.Debug("Receive", "src", e.Src, "chId", e.ChannelID, "msg", e.Message) + switch msg := e.Message.(type) { + case *oracleproto.GossipedVotes: + // verify sig of incoming gossip vote, throw if verification fails + _, val := oracleR.ConsensusState.Validators.GetByAddress(msg.Validator) + if val == nil { + logrus.Debugf("validator: %v not found in validator set, skipping gossip", hex.EncodeToString(msg.Validator)) + return + } + pubKey := val.PubKey + + // skip if its own buffer + if oracleR.OracleInfo.PubKey.Equals(pubKey) { + return + } + + if success := pubKey.VerifySignature(types.OracleVoteSignBytes(msg), msg.Signature); !success { + logrus.Errorf("failed signature verification for validator: %v, skipping gossip", val.Address) + return + } + + preLockTime := time.Now().UnixMilli() + oracleR.OracleInfo.GossipVoteBuffer.UpdateMtx.Lock() + currentGossipVote, ok := oracleR.OracleInfo.GossipVoteBuffer.Buffer[pubKey.Address().String()] + + if !ok { + // first gossipVote entry from this validator + oracleR.OracleInfo.GossipVoteBuffer.Buffer[pubKey.Address().String()] = msg + } else { + // existing gossipVote entry from this validator + previousTimestamp := currentGossipVote.SignedTimestamp + newTimestamp := msg.SignedTimestamp + // only replace if the gossipVote received has a later timestamp than our current one + if newTimestamp > previousTimestamp { + oracleR.OracleInfo.GossipVoteBuffer.Buffer[pubKey.Address().String()] = msg + } + } + oracleR.OracleInfo.GossipVoteBuffer.UpdateMtx.Unlock() + postLockTime := time.Now().UnixMilli() + diff := postLockTime - preLockTime + if diff > 100 { + logrus.Warnf("WARNING!!! Receiving gossip lock took %v milliseconds", diff) + } + default: + logrus.Warn("unknown message type", "src", e.Src, "chId", e.ChannelID, "msg", e.Message) + oracleR.Switch.StopPeerForError(e.Src, fmt.Errorf("oracle cannot handle message of type: %T", e.Message)) + return + } + + // broadcasting happens from go routines per peer +} + +// PeerState describes the state of a peer. +type PeerState interface { + GetHeight() int64 +} + +// // Send new oracle votes to peer. +func (oracleR *Reactor) broadcastVoteRoutine(peer p2p.Peer) { + // gossip votes every x milliseconds, where x = Config.GossipInterval + interval := oracleR.OracleInfo.Config.GossipInterval + + for { + // In case of both next.NextWaitChan() and peer.Quit() are variable at the same time + if !oracleR.IsRunning() || !peer.IsRunning() { + return + } + select { + case <-peer.Quit(): + return + case <-oracleR.Quit(): + return + default: + } + + // Make sure the peer is up to date. + _, ok := peer.Get(types.PeerStateKey).(PeerState) + if !ok { + // Peer does not have a state yet. We set it in the consensus reactor, but + // when we add peer in Switch, the order we call reactors#AddPeer is + // different every time due to us using a map. Sometimes other reactors + // will be initialized before the consensus reactor. We should wait a few + // milliseconds and retry. + time.Sleep(PeerCatchupSleepIntervalMS * time.Millisecond) + continue + } + + // only gossip votes that are younger than the latestAllowableTimestamp, which is the max(earliest block timestamp collected, current time - maxOracleGossipAge) + latestAllowableTimestamp := time.Now().Unix() - int64(oracleR.OracleInfo.Config.MaxOracleGossipAge) + if len(oracleR.OracleInfo.BlockTimestamps) == oracleR.OracleInfo.Config.MaxOracleGossipBlocksDelayed && oracleR.OracleInfo.BlockTimestamps[0] > latestAllowableTimestamp { + latestAllowableTimestamp = oracleR.OracleInfo.BlockTimestamps[0] + } + + preLockTime := time.Now().UnixMilli() + oracleR.OracleInfo.GossipVoteBuffer.UpdateMtx.RLock() + votes := []*oracleproto.GossipedVotes{} + for _, gossipVote := range oracleR.OracleInfo.GossipVoteBuffer.Buffer { + // stop sending gossip votes that have passed the maxGossipVoteAge + if gossipVote.SignedTimestamp < latestAllowableTimestamp { + continue + } + + votes = append(votes, gossipVote) + } + oracleR.OracleInfo.GossipVoteBuffer.UpdateMtx.RUnlock() + postLockTime := time.Now().UnixMilli() + diff := postLockTime - preLockTime + if diff > 100 { + logrus.Warnf("WARNING!!! Sending gossip lock took %v milliseconds", diff) + } + + for _, vote := range votes { + success := peer.Send(p2p.Envelope{ + ChannelID: OracleChannel, + Message: vote, + }) + if !success { + break + } + } + time.Sleep(interval) + } +} diff --git a/oracle/service/runner/runner.go b/oracle/service/runner/runner.go new file mode 100644 index 00000000000..fdf551b2698 --- /dev/null +++ b/oracle/service/runner/runner.go @@ -0,0 +1,200 @@ +package runner + +import ( + "context" + "fmt" + "sort" + + "time" + + log "github.com/sirupsen/logrus" + + "github.com/cometbft/cometbft/oracle/service/types" + + abcitypes "github.com/cometbft/cometbft/abci/types" + cs "github.com/cometbft/cometbft/consensus" + oracleproto "github.com/cometbft/cometbft/proto/tendermint/oracle" +) + +func RunProcessSignVoteQueue(oracleInfo *types.OracleInfo, consensusState *cs.State) { + // sign votes every x milliseconds, where x = Config.SignInterval + interval := oracleInfo.Config.SignInterval + + go func(oracleInfo *types.OracleInfo) { + for { + select { + case <-oracleInfo.StopChannel: + return + default: + time.Sleep(interval) + ProcessSignVoteQueue(oracleInfo, consensusState) + } + } + }(oracleInfo) +} + +func ProcessSignVoteQueue(oracleInfo *types.OracleInfo, consensusState *cs.State) { + votes := []*oracleproto.Vote{} + + for { + select { + case newVote := <-oracleInfo.SignVotesChan: + votes = append(votes, newVote) + continue + default: + } + break + } + + if len(votes) == 0 { + return + } + + // batch sign the new votes, along with existing votes in gossipVoteBuffer, if any + // append new batch into unsignedVotesBuffer, need to mutex lock as it will clash with concurrent pruning + oracleInfo.UnsignedVoteBuffer.UpdateMtx.Lock() + oracleInfo.UnsignedVoteBuffer.Buffer = append(oracleInfo.UnsignedVoteBuffer.Buffer, votes...) + + unsignedVotes := []*oracleproto.Vote{} + unsignedVotes = append(unsignedVotes, oracleInfo.UnsignedVoteBuffer.Buffer...) + + oracleInfo.UnsignedVoteBuffer.UpdateMtx.Unlock() + + // sort the votes so that we can rebuild it in a deterministic order, when uncompressing + SortOracleVotes(unsignedVotes) + + // batch sign the entire unsignedVoteBuffer and add to gossipBuffer + newGossipVote := &oracleproto.GossipedVotes{ + Validator: oracleInfo.PubKey.Address(), + SignedTimestamp: time.Now().Unix(), + Votes: unsignedVotes, + } + + // signing of vote should append the signature field of gossipVote + if err := oracleInfo.PrivValidator.SignOracleVote("", newGossipVote); err != nil { + log.Errorf("processSignVoteQueue: error signing oracle votes") + return + } + + // need to mutex lock as it will clash with concurrent gossip + preLockTime := time.Now().UnixMilli() + oracleInfo.GossipVoteBuffer.UpdateMtx.Lock() + address := oracleInfo.PubKey.Address().String() + oracleInfo.GossipVoteBuffer.Buffer[address] = newGossipVote + oracleInfo.GossipVoteBuffer.UpdateMtx.Unlock() + postLockTime := time.Now().UnixMilli() + diff := postLockTime - preLockTime + if diff > 100 { + log.Warnf("WARNING!!! Updating gossip lock took %v milliseconds", diff) + } +} + +func PruneVoteBuffers(oracleInfo *types.OracleInfo, consensusState *cs.State) { + go func(oracleInfo *types.OracleInfo) { + // only keep votes that are less than x blocks old, where x = Config.MaxOracleGossipBlocksDelayed + maxOracleGossipBlocksDelayed := oracleInfo.Config.MaxOracleGossipBlocksDelayed + // only keep votes that are less than x seconds old, where x = Config.MaxOracleGossipAge + maxOracleGossipAge := oracleInfo.Config.MaxOracleGossipAge + // run pruner every x milliseconds, where x = Config.PruneInterval + pruneInterval := oracleInfo.Config.PruneInterval + + ticker := time.Tick(pruneInterval) + for range ticker { + lastBlockTime := consensusState.GetState().LastBlockTime.Unix() + currTimestampsLen := len(oracleInfo.BlockTimestamps) + + if currTimestampsLen == 0 { + oracleInfo.BlockTimestamps = append(oracleInfo.BlockTimestamps, lastBlockTime) + continue + } + + if oracleInfo.BlockTimestamps[currTimestampsLen-1] != lastBlockTime { + oracleInfo.BlockTimestamps = append(oracleInfo.BlockTimestamps, lastBlockTime) + } + + // only keep last x number of block timestamps, where x = maxOracleGossipBlocksDelayed + if len(oracleInfo.BlockTimestamps) > maxOracleGossipBlocksDelayed { + oracleInfo.BlockTimestamps = oracleInfo.BlockTimestamps[1:] + } + + latestAllowableTimestamp := time.Now().Unix() - int64(maxOracleGossipAge) + // prune votes that are older than the latestAllowableTimestamp, which is the max(earliest block timestamp collected, current time - maxOracleGossipAge) + if len(oracleInfo.BlockTimestamps) == maxOracleGossipBlocksDelayed && oracleInfo.BlockTimestamps[0] > latestAllowableTimestamp { + latestAllowableTimestamp = oracleInfo.BlockTimestamps[0] + } + + oracleInfo.UnsignedVoteBuffer.UpdateMtx.Lock() + newVotes := []*oracleproto.Vote{} + unsignedVoteBuffer := oracleInfo.UnsignedVoteBuffer.Buffer + visitedVoteMap := make(map[string]struct{}) + for _, vote := range unsignedVoteBuffer { + // check for dup votes + key := fmt.Sprintf("%v:%v", vote.Timestamp, vote.OracleId) + _, exists := visitedVoteMap[key] + if exists { + continue + } + + visitedVoteMap[key] = struct{}{} + + if vote.Timestamp >= latestAllowableTimestamp { + newVotes = append(newVotes, vote) + } + } + oracleInfo.UnsignedVoteBuffer.Buffer = newVotes + oracleInfo.UnsignedVoteBuffer.UpdateMtx.Unlock() + + preLockTime := time.Now().UnixMilli() + oracleInfo.GossipVoteBuffer.UpdateMtx.Lock() + gossipBuffer := oracleInfo.GossipVoteBuffer.Buffer + + // prune gossipedVotes that are older than the latestAllowableTimestamp, which is the max(earliest block timestamp collected, current time - maxOracleGossipAge) + for valAddr, gossipVote := range gossipBuffer { + if gossipVote.SignedTimestamp < latestAllowableTimestamp { + delete(gossipBuffer, valAddr) + } + } + oracleInfo.GossipVoteBuffer.Buffer = gossipBuffer + oracleInfo.GossipVoteBuffer.UpdateMtx.Unlock() + postLockTime := time.Now().UnixMilli() + diff := postLockTime - preLockTime + if diff > 100 { + log.Warnf("WARNING!!! Pruning gossip lock took %v milliseconds", diff) + } + } + }(oracleInfo) +} + +// Run run oracles +func Run(oracleInfo *types.OracleInfo, consensusState *cs.State) { + RunProcessSignVoteQueue(oracleInfo, consensusState) + PruneVoteBuffers(oracleInfo, consensusState) + // start to take votes from app + for { + res, err := oracleInfo.ProxyApp.FetchOracleVotes(context.Background(), &abcitypes.RequestFetchOracleVotes{}) + if err != nil { + log.Errorf("app not ready: %v, retrying...", err) + time.Sleep(1 * time.Second) + continue + } + + if res.Vote == nil { + continue + } + + oracleInfo.SignVotesChan <- res.Vote + } +} + +func SortOracleVotes(votes []*oracleproto.Vote) { + sort.SliceStable(votes, + func(i, j int) bool { + if votes[i].Timestamp != votes[j].Timestamp { + return votes[i].Timestamp < votes[j].Timestamp + } + if votes[i].OracleId != votes[j].OracleId { + return votes[i].OracleId < votes[j].OracleId + } + return votes[i].Data < votes[j].Data + }) +} diff --git a/oracle/service/types/info.go b/oracle/service/types/info.go new file mode 100644 index 00000000000..3bfed9b532f --- /dev/null +++ b/oracle/service/types/info.go @@ -0,0 +1,32 @@ +package types + +import ( + "github.com/cometbft/cometbft/config" + "github.com/cometbft/cometbft/crypto" + cmtsync "github.com/cometbft/cometbft/libs/sync" + oracleproto "github.com/cometbft/cometbft/proto/tendermint/oracle" + "github.com/cometbft/cometbft/proxy" + "github.com/cometbft/cometbft/types" +) + +// App struct for app +type OracleInfo struct { + Config *config.OracleConfig + UnsignedVoteBuffer *UnsignedVoteBuffer + GossipVoteBuffer *GossipVoteBuffer + SignVotesChan chan *oracleproto.Vote + PubKey crypto.PubKey + PrivValidator types.PrivValidator + StopChannel chan int + ProxyApp proxy.AppConnConsensus + BlockTimestamps []int64 +} +type GossipVoteBuffer struct { + Buffer map[string]*oracleproto.GossipedVotes + UpdateMtx cmtsync.RWMutex +} + +type UnsignedVoteBuffer struct { + Buffer []*oracleproto.Vote + UpdateMtx cmtsync.RWMutex +} diff --git a/privval/file.go b/privval/file.go index a092e38b087..287e13d9e5e 100644 --- a/privval/file.go +++ b/privval/file.go @@ -16,6 +16,7 @@ import ( cmtos "github.com/cometbft/cometbft/libs/os" "github.com/cometbft/cometbft/libs/protoio" "github.com/cometbft/cometbft/libs/tempfile" + oracleproto "github.com/cometbft/cometbft/proto/tendermint/oracle" cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" "github.com/cometbft/cometbft/types" cmttime "github.com/cometbft/cometbft/types/time" @@ -275,6 +276,15 @@ func (pv *FilePV) SignProposal(chainID string, proposal *cmtproto.Proposal) erro return nil } +// SignOracleVote signs a canonical representation of the vote, along with the +// chainID. Implements PrivValidator. +func (pv *FilePV) SignOracleVote(chainID string, vote *oracleproto.GossipedVotes) error { + if err := pv.signOracleVote(vote); err != nil { + return fmt.Errorf("error signing vote: %v", err) + } + return nil +} + // Save persists the FilePV to disk. func (pv *FilePV) Save() { pv.Key.Save() @@ -299,6 +309,17 @@ func (pv *FilePV) String() string { ) } +func (pv *FilePV) signOracleVote(vote *oracleproto.GossipedVotes) error { + signBytes := types.OracleVoteSignBytes(vote) + sig, err := pv.Key.PrivKey.Sign(signBytes) + if err != nil { + return err + } + vote.Signature = sig + + return nil +} + //------------------------------------------------------------------------------------ // signVote checks if the vote is good to sign and sets the vote signature. diff --git a/privval/retry_signer_client.go b/privval/retry_signer_client.go index 271e146474c..74151c7d4e2 100644 --- a/privval/retry_signer_client.go +++ b/privval/retry_signer_client.go @@ -5,6 +5,7 @@ import ( "time" "github.com/cometbft/cometbft/crypto" + oracleproto "github.com/cometbft/cometbft/proto/tendermint/oracle" cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" "github.com/cometbft/cometbft/types" ) @@ -79,6 +80,22 @@ func (sc *RetrySignerClient) SignVote(chainID string, vote *cmtproto.Vote) error return fmt.Errorf("exhausted all attempts to sign vote: %w", err) } +func (sc *RetrySignerClient) SignOracleVote(chainID string, vote *oracleproto.GossipedVotes) error { + var err error + for i := 0; i < sc.retries || sc.retries == 0; i++ { + err = sc.next.SignOracleVote(chainID, vote) + if err == nil { + return nil + } + // If remote signer errors, we don't retry. + if _, ok := err.(*RemoteSignerError); ok { + return err + } + time.Sleep(sc.timeout) + } + return fmt.Errorf("exhausted all attempts to sign vote: %w", err) +} + func (sc *RetrySignerClient) SignProposal(chainID string, proposal *cmtproto.Proposal) error { var err error for i := 0; i < sc.retries || sc.retries == 0; i++ { diff --git a/privval/signer_client.go b/privval/signer_client.go index 8ebb99fc408..5c5f3dbf4ac 100644 --- a/privval/signer_client.go +++ b/privval/signer_client.go @@ -6,6 +6,7 @@ import ( "github.com/cometbft/cometbft/crypto" cryptoenc "github.com/cometbft/cometbft/crypto/encoding" + oracleproto "github.com/cometbft/cometbft/proto/tendermint/oracle" privvalproto "github.com/cometbft/cometbft/proto/tendermint/privval" cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" "github.com/cometbft/cometbft/types" @@ -110,6 +111,26 @@ func (sc *SignerClient) SignVote(chainID string, vote *cmtproto.Vote) error { return nil } +// SignVote requests a remote signer to sign a vote +func (sc *SignerClient) SignOracleVote(chainID string, vote *oracleproto.GossipedVotes) error { + response, err := sc.endpoint.SendRequest(mustWrapMsg(&privvalproto.SignOracleVoteRequest{Vote: vote, ChainId: chainID})) + if err != nil { + return err + } + + resp := response.GetSignedOracleVoteResponse() + if resp == nil { + return ErrUnexpectedResponse + } + if resp.Error != nil { + return &RemoteSignerError{Code: int(resp.Error.Code), Description: resp.Error.Description} + } + + *vote = resp.Vote + + return nil +} + // SignProposal requests a remote signer to sign a proposal func (sc *SignerClient) SignProposal(chainID string, proposal *cmtproto.Proposal) error { response, err := sc.endpoint.SendRequest(mustWrapMsg( diff --git a/proto/buf.lock b/proto/buf.lock index 51b78ffe35a..4dcc512cc89 100644 --- a/proto/buf.lock +++ b/proto/buf.lock @@ -5,4 +5,4 @@ deps: owner: cosmos repository: gogo-proto commit: 5e5b9fdd01804356895f8f79a6f1ddc1 - digest: shake256:0b85da49e2e5f9ebc4806eae058e2f56096ff3b1c59d1fb7c190413dd15f45dd456f0b69ced9059341c80795d2b6c943de15b120a9e0308b499e43e4b5fc2952 + digest: shake256:0b85da49e2e5f9ebc4806eae058e2f56096ff3b1c59d1fb7c190413dd15f45dd456f0b69ced9059341c80795d2b6c943de15b120a9e0308b499e43e4b5fc2952 \ No newline at end of file diff --git a/proto/buf.yaml b/proto/buf.yaml index a646c2030a7..6a1383686ee 100644 --- a/proto/buf.yaml +++ b/proto/buf.yaml @@ -9,4 +9,4 @@ lint: use: - BASIC - FILE_LOWER_SNAKE_CASE - - UNARY_RPC + - UNARY_RPC \ No newline at end of file diff --git a/proto/tendermint/abci/types.proto b/proto/tendermint/abci/types.proto index 89bafb6cd54..de84f213506 100644 --- a/proto/tendermint/abci/types.proto +++ b/proto/tendermint/abci/types.proto @@ -11,6 +11,7 @@ import "tendermint/types/params.proto"; import "tendermint/types/validator.proto"; import "google/protobuf/timestamp.proto"; import "gogoproto/gogo.proto"; +import "tendermint/oracle/types.proto"; // NOTE: When using custom types, mind the warnings. // https://github.com/cosmos/gogoproto/blob/master/custom_types.md#warnings-and-issues @@ -34,6 +35,9 @@ service ABCI { rpc ExtendVote(RequestExtendVote) returns (ResponseExtendVote); rpc VerifyVoteExtension(RequestVerifyVoteExtension) returns (ResponseVerifyVoteExtension); rpc FinalizeBlock(RequestFinalizeBlock) returns (ResponseFinalizeBlock); + rpc CreateOracleResultTx(RequestCreateOracleResultTx) returns (ResponseCreateOracleResultTx); + rpc FetchOracleVotes(RequestFetchOracleVotes) returns (ResponseFetchOracleVotes); + rpc ValidateOracleVotes(RequestValidateOracleVotes) returns (ResponseValidateOracleVotes); } //---------------------------------------- @@ -57,6 +61,9 @@ message Request { RequestExtendVote extend_vote = 18; RequestVerifyVoteExtension verify_vote_extension = 19; RequestFinalizeBlock finalize_block = 20; + RequestCreateOracleResultTx create_oracle_result_tx = 21; + RequestFetchOracleVotes fetch_oracle_votes = 22; + RequestValidateOracleVotes validate_oracle_votes = 23; } reserved 4, 7, 9, 10; // SetOption, BeginBlock, DeliverTx, EndBlock } @@ -173,7 +180,7 @@ message RequestExtendVote { // Verify the vote extension message RequestVerifyVoteExtension { // the hash of the block that this received vote corresponds to - bytes hash = 1; + bytes hash = 1; // the validator that signed the vote extension bytes validator_address = 2; int64 height = 3; @@ -193,6 +200,17 @@ message RequestFinalizeBlock { bytes proposer_address = 8; } +message RequestCreateOracleResultTx { + bytes proposer = 1; + repeated tendermint.oracle.GossipedVotes gossiped_votes = 2; +} + +message RequestFetchOracleVotes {} + +message RequestValidateOracleVotes { + bytes oracle_tx = 1; +} + //---------------------------------------- // Response types @@ -215,6 +233,9 @@ message Response { ResponseExtendVote extend_vote = 19; ResponseVerifyVoteExtension verify_vote_extension = 20; ResponseFinalizeBlock finalize_block = 21; + ResponseCreateOracleResultTx create_oracle_result_tx = 22; + ResponseFetchOracleVotes fetch_oracle_votes = 23; + ResponseValidateOracleVotes validate_oracle_votes = 24; } reserved 5, 8, 10, 11; // SetOption, BeginBlock, DeliverTx, EndBlock } @@ -345,7 +366,7 @@ message ResponseVerifyVoteExtension { // Incorrectly implementing this thus has liveness implications as it may affect // CometBFT's ability to receive 2/3+ valid votes to finalize the block. // Honest nodes should never be rejected. - REJECT = 2; + REJECT = 2; } } @@ -365,6 +386,23 @@ message ResponseFinalizeBlock { bytes app_hash = 5; } +message ResponseCreateOracleResultTx { + bytes encoded_tx = 1; +} + +message ResponseFetchOracleVotes { + tendermint.oracle.Vote vote = 1; +} + +message ResponseValidateOracleVotes { + Status status = 1; + + enum Status { + ABSENT = 0; + PRESENT = 1; + } +} + //---------------------------------------- // Misc. @@ -442,10 +480,10 @@ message ValidatorUpdate { } message VoteInfo { - Validator validator = 1 [(gogoproto.nullable) = false]; + Validator validator = 1 [(gogoproto.nullable) = false]; tendermint.types.BlockIDFlag block_id_flag = 3; - reserved 2; // signed_last_block + reserved 2; // signed_last_block } message ExtendedVoteInfo { @@ -458,7 +496,7 @@ message ExtendedVoteInfo { // block_id_flag indicates whether the validator voted for a block, nil, or did not vote at all tendermint.types.BlockIDFlag block_id_flag = 5; - reserved 2; // signed_last_block + reserved 2; // signed_last_block } enum MisbehaviorType { diff --git a/proto/tendermint/oracle/types.pb.go b/proto/tendermint/oracle/types.pb.go new file mode 100644 index 00000000000..9932768d2ab --- /dev/null +++ b/proto/tendermint/oracle/types.pb.go @@ -0,0 +1,1051 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: tendermint/oracle/types.proto + +package oracle + +import ( + fmt "fmt" + proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +type Vote struct { + Validator string `protobuf:"bytes,1,opt,name=validator,proto3" json:"validator,omitempty"` + OracleId string `protobuf:"bytes,2,opt,name=oracle_id,json=oracleId,proto3" json:"oracle_id,omitempty"` + Timestamp int64 `protobuf:"varint,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + Data string `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"` +} + +func (m *Vote) Reset() { *m = Vote{} } +func (m *Vote) String() string { return proto.CompactTextString(m) } +func (*Vote) ProtoMessage() {} +func (*Vote) Descriptor() ([]byte, []int) { + return fileDescriptor_ed9227d272ed5d90, []int{0} +} +func (m *Vote) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Vote) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Vote.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Vote) XXX_Merge(src proto.Message) { + xxx_messageInfo_Vote.Merge(m, src) +} +func (m *Vote) XXX_Size() int { + return m.Size() +} +func (m *Vote) XXX_DiscardUnknown() { + xxx_messageInfo_Vote.DiscardUnknown(m) +} + +var xxx_messageInfo_Vote proto.InternalMessageInfo + +func (m *Vote) GetValidator() string { + if m != nil { + return m.Validator + } + return "" +} + +func (m *Vote) GetOracleId() string { + if m != nil { + return m.OracleId + } + return "" +} + +func (m *Vote) GetTimestamp() int64 { + if m != nil { + return m.Timestamp + } + return 0 +} + +func (m *Vote) GetData() string { + if m != nil { + return m.Data + } + return "" +} + +type GossipedVotes struct { + Validator []byte `protobuf:"bytes,1,opt,name=validator,proto3" json:"validator,omitempty"` + Votes []*Vote `protobuf:"bytes,2,rep,name=votes,proto3" json:"votes,omitempty"` + SignedTimestamp int64 `protobuf:"varint,3,opt,name=signed_timestamp,json=signedTimestamp,proto3" json:"signed_timestamp,omitempty"` + Signature []byte `protobuf:"bytes,4,opt,name=signature,proto3" json:"signature,omitempty"` +} + +func (m *GossipedVotes) Reset() { *m = GossipedVotes{} } +func (m *GossipedVotes) String() string { return proto.CompactTextString(m) } +func (*GossipedVotes) ProtoMessage() {} +func (*GossipedVotes) Descriptor() ([]byte, []int) { + return fileDescriptor_ed9227d272ed5d90, []int{1} +} +func (m *GossipedVotes) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GossipedVotes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GossipedVotes.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *GossipedVotes) XXX_Merge(src proto.Message) { + xxx_messageInfo_GossipedVotes.Merge(m, src) +} +func (m *GossipedVotes) XXX_Size() int { + return m.Size() +} +func (m *GossipedVotes) XXX_DiscardUnknown() { + xxx_messageInfo_GossipedVotes.DiscardUnknown(m) +} + +var xxx_messageInfo_GossipedVotes proto.InternalMessageInfo + +func (m *GossipedVotes) GetValidator() []byte { + if m != nil { + return m.Validator + } + return nil +} + +func (m *GossipedVotes) GetVotes() []*Vote { + if m != nil { + return m.Votes + } + return nil +} + +func (m *GossipedVotes) GetSignedTimestamp() int64 { + if m != nil { + return m.SignedTimestamp + } + return 0 +} + +func (m *GossipedVotes) GetSignature() []byte { + if m != nil { + return m.Signature + } + return nil +} + +type CanonicalGossipedVotes struct { + Validator []byte `protobuf:"bytes,1,opt,name=validator,proto3" json:"validator,omitempty"` + Votes []*Vote `protobuf:"bytes,2,rep,name=votes,proto3" json:"votes,omitempty"` + SignedTimestamp int64 `protobuf:"varint,3,opt,name=signed_timestamp,json=signedTimestamp,proto3" json:"signed_timestamp,omitempty"` +} + +func (m *CanonicalGossipedVotes) Reset() { *m = CanonicalGossipedVotes{} } +func (m *CanonicalGossipedVotes) String() string { return proto.CompactTextString(m) } +func (*CanonicalGossipedVotes) ProtoMessage() {} +func (*CanonicalGossipedVotes) Descriptor() ([]byte, []int) { + return fileDescriptor_ed9227d272ed5d90, []int{2} +} +func (m *CanonicalGossipedVotes) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CanonicalGossipedVotes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CanonicalGossipedVotes.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *CanonicalGossipedVotes) XXX_Merge(src proto.Message) { + xxx_messageInfo_CanonicalGossipedVotes.Merge(m, src) +} +func (m *CanonicalGossipedVotes) XXX_Size() int { + return m.Size() +} +func (m *CanonicalGossipedVotes) XXX_DiscardUnknown() { + xxx_messageInfo_CanonicalGossipedVotes.DiscardUnknown(m) +} + +var xxx_messageInfo_CanonicalGossipedVotes proto.InternalMessageInfo + +func (m *CanonicalGossipedVotes) GetValidator() []byte { + if m != nil { + return m.Validator + } + return nil +} + +func (m *CanonicalGossipedVotes) GetVotes() []*Vote { + if m != nil { + return m.Votes + } + return nil +} + +func (m *CanonicalGossipedVotes) GetSignedTimestamp() int64 { + if m != nil { + return m.SignedTimestamp + } + return 0 +} + +func init() { + proto.RegisterType((*Vote)(nil), "tendermint.oracle.Vote") + proto.RegisterType((*GossipedVotes)(nil), "tendermint.oracle.GossipedVotes") + proto.RegisterType((*CanonicalGossipedVotes)(nil), "tendermint.oracle.CanonicalGossipedVotes") +} + +func init() { proto.RegisterFile("tendermint/oracle/types.proto", fileDescriptor_ed9227d272ed5d90) } + +var fileDescriptor_ed9227d272ed5d90 = []byte{ + // 300 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x92, 0x41, 0x4a, 0xc4, 0x30, + 0x14, 0x86, 0x9b, 0x69, 0x15, 0x1b, 0x47, 0xd4, 0x2c, 0xb4, 0xe0, 0x18, 0x4a, 0x57, 0x75, 0x61, + 0x0b, 0xea, 0x09, 0x74, 0x21, 0x6e, 0x5c, 0x14, 0x71, 0xe1, 0x66, 0x48, 0x9b, 0x38, 0x06, 0xda, + 0xa6, 0x34, 0x6f, 0x06, 0xbc, 0xc5, 0x5c, 0xc2, 0xbb, 0xb8, 0x9c, 0xa5, 0x4b, 0x69, 0x2f, 0x22, + 0x4d, 0xc1, 0x8a, 0xbd, 0xc0, 0xec, 0x1e, 0xdf, 0xff, 0xbf, 0xfc, 0x7f, 0xe0, 0xe1, 0x73, 0x10, + 0x25, 0x17, 0x75, 0x21, 0x4b, 0x88, 0x55, 0xcd, 0xb2, 0x5c, 0xc4, 0xf0, 0x5e, 0x09, 0x1d, 0x55, + 0xb5, 0x02, 0x45, 0x8e, 0x07, 0x39, 0xea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, 0x7f, 0x02, + 0x00, 0x00, 0xff, 0xff, 0xc4, 0x33, 0x57, 0xc2, 0x3a, 0x02, 0x00, 0x00, +} + +func (m *Vote) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Vote) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Vote) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Data) > 0 { + i -= len(m.Data) + copy(dAtA[i:], m.Data) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Data))) + i-- + dAtA[i] = 0x22 + } + if m.Timestamp != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.Timestamp)) + i-- + dAtA[i] = 0x18 + } + if len(m.OracleId) > 0 { + i -= len(m.OracleId) + copy(dAtA[i:], m.OracleId) + i = encodeVarintTypes(dAtA, i, uint64(len(m.OracleId))) + i-- + dAtA[i] = 0x12 + } + if len(m.Validator) > 0 { + i -= len(m.Validator) + copy(dAtA[i:], m.Validator) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Validator))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *GossipedVotes) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GossipedVotes) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GossipedVotes) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Signature) > 0 { + i -= len(m.Signature) + copy(dAtA[i:], m.Signature) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Signature))) + i-- + dAtA[i] = 0x22 + } + if m.SignedTimestamp != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.SignedTimestamp)) + i-- + dAtA[i] = 0x18 + } + if len(m.Votes) > 0 { + for iNdEx := len(m.Votes) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Votes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if len(m.Validator) > 0 { + i -= len(m.Validator) + copy(dAtA[i:], m.Validator) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Validator))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *CanonicalGossipedVotes) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *CanonicalGossipedVotes) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CanonicalGossipedVotes) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.SignedTimestamp != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.SignedTimestamp)) + i-- + dAtA[i] = 0x18 + } + if len(m.Votes) > 0 { + for iNdEx := len(m.Votes) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Votes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if len(m.Validator) > 0 { + i -= len(m.Validator) + copy(dAtA[i:], m.Validator) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Validator))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintTypes(dAtA []byte, offset int, v uint64) int { + offset -= sovTypes(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Vote) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Validator) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.OracleId) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + if m.Timestamp != 0 { + n += 1 + sovTypes(uint64(m.Timestamp)) + } + l = len(m.Data) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + return n +} + +func (m *GossipedVotes) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Validator) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + if len(m.Votes) > 0 { + for _, e := range m.Votes { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + if m.SignedTimestamp != 0 { + n += 1 + sovTypes(uint64(m.SignedTimestamp)) + } + l = len(m.Signature) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + return n +} + +func (m *CanonicalGossipedVotes) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Validator) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + if len(m.Votes) > 0 { + for _, e := range m.Votes { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + if m.SignedTimestamp != 0 { + n += 1 + sovTypes(uint64(m.SignedTimestamp)) + } + return n +} + +func sovTypes(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozTypes(x uint64) (n int) { + return sovTypes(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Vote) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Vote: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Vote: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Validator", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Validator = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OracleId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OracleId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) + } + m.Timestamp = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Timestamp |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Data = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GossipedVotes) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GossipedVotes: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GossipedVotes: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Validator", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Validator = append(m.Validator[:0], dAtA[iNdEx:postIndex]...) + if m.Validator == nil { + m.Validator = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Votes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Votes = append(m.Votes, &Vote{}) + if err := m.Votes[len(m.Votes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SignedTimestamp", wireType) + } + m.SignedTimestamp = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SignedTimestamp |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) + if m.Signature == nil { + m.Signature = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CanonicalGossipedVotes) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: CanonicalGossipedVotes: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CanonicalGossipedVotes: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Validator", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Validator = append(m.Validator[:0], dAtA[iNdEx:postIndex]...) + if m.Validator == nil { + m.Validator = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Votes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Votes = append(m.Votes, &Vote{}) + if err := m.Votes[len(m.Votes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SignedTimestamp", wireType) + } + m.SignedTimestamp = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SignedTimestamp |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipTypes(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTypes + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTypes + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTypes + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthTypes + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupTypes + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthTypes + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthTypes = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowTypes = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group") +) diff --git a/proto/tendermint/oracle/types.proto b/proto/tendermint/oracle/types.proto new file mode 100644 index 00000000000..ac73cf30bed --- /dev/null +++ b/proto/tendermint/oracle/types.proto @@ -0,0 +1,24 @@ +syntax = "proto3"; +package tendermint.oracle; + +option go_package = "github.com/cometbft/cometbft/proto/tendermint/oracle"; + +message Vote { + string validator = 1; + string oracle_id = 2; + int64 timestamp = 3; + string data = 4; +} + +message GossipedVotes { + bytes validator = 1; + repeated Vote votes = 2; + int64 signed_timestamp = 3; + bytes signature = 4; +} + +message CanonicalGossipedVotes { + bytes validator = 1; + repeated Vote votes = 2; + int64 signed_timestamp = 3; +} diff --git a/proto/tendermint/privval/types.pb.go b/proto/tendermint/privval/types.pb.go index cafa0e9278c..133c9defc17 100644 --- a/proto/tendermint/privval/types.pb.go +++ b/proto/tendermint/privval/types.pb.go @@ -6,6 +6,7 @@ package privval import ( fmt "fmt" crypto "github.com/cometbft/cometbft/proto/tendermint/crypto" + oracle "github.com/cometbft/cometbft/proto/tendermint/oracle" types "github.com/cometbft/cometbft/proto/tendermint/types" _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/cosmos/gogoproto/proto" @@ -424,6 +425,112 @@ func (m *SignedProposalResponse) GetError() *RemoteSignerError { return nil } +// SignOracleVoteRequest is a request to sign a vote +type SignOracleVoteRequest struct { + Vote *oracle.GossipedVotes `protobuf:"bytes,1,opt,name=vote,proto3" json:"vote,omitempty"` + ChainId string `protobuf:"bytes,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` +} + +func (m *SignOracleVoteRequest) Reset() { *m = SignOracleVoteRequest{} } +func (m *SignOracleVoteRequest) String() string { return proto.CompactTextString(m) } +func (*SignOracleVoteRequest) ProtoMessage() {} +func (*SignOracleVoteRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_cb4e437a5328cf9c, []int{7} +} +func (m *SignOracleVoteRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SignOracleVoteRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SignOracleVoteRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *SignOracleVoteRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_SignOracleVoteRequest.Merge(m, src) +} +func (m *SignOracleVoteRequest) XXX_Size() int { + return m.Size() +} +func (m *SignOracleVoteRequest) XXX_DiscardUnknown() { + xxx_messageInfo_SignOracleVoteRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_SignOracleVoteRequest proto.InternalMessageInfo + +func (m *SignOracleVoteRequest) GetVote() *oracle.GossipedVotes { + if m != nil { + return m.Vote + } + return nil +} + +func (m *SignOracleVoteRequest) GetChainId() string { + if m != nil { + return m.ChainId + } + return "" +} + +// SignedOracleVoteResponse is a response containing a signed vote or an error +type SignedOracleVoteResponse struct { + Vote oracle.GossipedVotes `protobuf:"bytes,1,opt,name=vote,proto3" json:"vote"` + Error *RemoteSignerError `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` +} + +func (m *SignedOracleVoteResponse) Reset() { *m = SignedOracleVoteResponse{} } +func (m *SignedOracleVoteResponse) String() string { return proto.CompactTextString(m) } +func (*SignedOracleVoteResponse) ProtoMessage() {} +func (*SignedOracleVoteResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_cb4e437a5328cf9c, []int{8} +} +func (m *SignedOracleVoteResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SignedOracleVoteResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SignedOracleVoteResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *SignedOracleVoteResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_SignedOracleVoteResponse.Merge(m, src) +} +func (m *SignedOracleVoteResponse) XXX_Size() int { + return m.Size() +} +func (m *SignedOracleVoteResponse) XXX_DiscardUnknown() { + xxx_messageInfo_SignedOracleVoteResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_SignedOracleVoteResponse proto.InternalMessageInfo + +func (m *SignedOracleVoteResponse) GetVote() oracle.GossipedVotes { + if m != nil { + return m.Vote + } + return oracle.GossipedVotes{} +} + +func (m *SignedOracleVoteResponse) GetError() *RemoteSignerError { + if m != nil { + return m.Error + } + return nil +} + // PingRequest is a request to confirm that the connection is alive. type PingRequest struct { } @@ -432,7 +539,7 @@ func (m *PingRequest) Reset() { *m = PingRequest{} } func (m *PingRequest) String() string { return proto.CompactTextString(m) } func (*PingRequest) ProtoMessage() {} func (*PingRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_cb4e437a5328cf9c, []int{7} + return fileDescriptor_cb4e437a5328cf9c, []int{9} } func (m *PingRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -469,7 +576,7 @@ func (m *PingResponse) Reset() { *m = PingResponse{} } func (m *PingResponse) String() string { return proto.CompactTextString(m) } func (*PingResponse) ProtoMessage() {} func (*PingResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_cb4e437a5328cf9c, []int{8} + return fileDescriptor_cb4e437a5328cf9c, []int{10} } func (m *PingResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -508,6 +615,8 @@ type Message struct { // *Message_SignedProposalResponse // *Message_PingRequest // *Message_PingResponse + // *Message_SignOracleVoteRequest + // *Message_SignedOracleVoteResponse Sum isMessage_Sum `protobuf_oneof:"sum"` } @@ -515,7 +624,7 @@ func (m *Message) Reset() { *m = Message{} } func (m *Message) String() string { return proto.CompactTextString(m) } func (*Message) ProtoMessage() {} func (*Message) Descriptor() ([]byte, []int) { - return fileDescriptor_cb4e437a5328cf9c, []int{9} + return fileDescriptor_cb4e437a5328cf9c, []int{11} } func (m *Message) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -574,15 +683,23 @@ type Message_PingRequest struct { type Message_PingResponse struct { PingResponse *PingResponse `protobuf:"bytes,8,opt,name=ping_response,json=pingResponse,proto3,oneof" json:"ping_response,omitempty"` } +type Message_SignOracleVoteRequest struct { + SignOracleVoteRequest *SignOracleVoteRequest `protobuf:"bytes,9,opt,name=sign_oracle_vote_request,json=signOracleVoteRequest,proto3,oneof" json:"sign_oracle_vote_request,omitempty"` +} +type Message_SignedOracleVoteResponse struct { + SignedOracleVoteResponse *SignedOracleVoteResponse `protobuf:"bytes,10,opt,name=signed_oracle_vote_response,json=signedOracleVoteResponse,proto3,oneof" json:"signed_oracle_vote_response,omitempty"` +} -func (*Message_PubKeyRequest) isMessage_Sum() {} -func (*Message_PubKeyResponse) isMessage_Sum() {} -func (*Message_SignVoteRequest) isMessage_Sum() {} -func (*Message_SignedVoteResponse) isMessage_Sum() {} -func (*Message_SignProposalRequest) isMessage_Sum() {} -func (*Message_SignedProposalResponse) isMessage_Sum() {} -func (*Message_PingRequest) isMessage_Sum() {} -func (*Message_PingResponse) isMessage_Sum() {} +func (*Message_PubKeyRequest) isMessage_Sum() {} +func (*Message_PubKeyResponse) isMessage_Sum() {} +func (*Message_SignVoteRequest) isMessage_Sum() {} +func (*Message_SignedVoteResponse) isMessage_Sum() {} +func (*Message_SignProposalRequest) isMessage_Sum() {} +func (*Message_SignedProposalResponse) isMessage_Sum() {} +func (*Message_PingRequest) isMessage_Sum() {} +func (*Message_PingResponse) isMessage_Sum() {} +func (*Message_SignOracleVoteRequest) isMessage_Sum() {} +func (*Message_SignedOracleVoteResponse) isMessage_Sum() {} func (m *Message) GetSum() isMessage_Sum { if m != nil { @@ -647,6 +764,20 @@ func (m *Message) GetPingResponse() *PingResponse { return nil } +func (m *Message) GetSignOracleVoteRequest() *SignOracleVoteRequest { + if x, ok := m.GetSum().(*Message_SignOracleVoteRequest); ok { + return x.SignOracleVoteRequest + } + return nil +} + +func (m *Message) GetSignedOracleVoteResponse() *SignedOracleVoteResponse { + if x, ok := m.GetSum().(*Message_SignedOracleVoteResponse); ok { + return x.SignedOracleVoteResponse + } + return nil +} + // XXX_OneofWrappers is for the internal use of the proto package. func (*Message) XXX_OneofWrappers() []interface{} { return []interface{}{ @@ -658,6 +789,8 @@ func (*Message) XXX_OneofWrappers() []interface{} { (*Message_SignedProposalResponse)(nil), (*Message_PingRequest)(nil), (*Message_PingResponse)(nil), + (*Message_SignOracleVoteRequest)(nil), + (*Message_SignedOracleVoteResponse)(nil), } } @@ -670,6 +803,8 @@ func init() { proto.RegisterType((*SignedVoteResponse)(nil), "tendermint.privval.SignedVoteResponse") proto.RegisterType((*SignProposalRequest)(nil), "tendermint.privval.SignProposalRequest") proto.RegisterType((*SignedProposalResponse)(nil), "tendermint.privval.SignedProposalResponse") + proto.RegisterType((*SignOracleVoteRequest)(nil), "tendermint.privval.SignOracleVoteRequest") + proto.RegisterType((*SignedOracleVoteResponse)(nil), "tendermint.privval.SignedOracleVoteResponse") proto.RegisterType((*PingRequest)(nil), "tendermint.privval.PingRequest") proto.RegisterType((*PingResponse)(nil), "tendermint.privval.PingResponse") proto.RegisterType((*Message)(nil), "tendermint.privval.Message") @@ -678,55 +813,61 @@ func init() { func init() { proto.RegisterFile("tendermint/privval/types.proto", fileDescriptor_cb4e437a5328cf9c) } var fileDescriptor_cb4e437a5328cf9c = []byte{ - // 756 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x55, 0x4d, 0x4f, 0xe3, 0x46, - 0x18, 0xb6, 0x21, 0x1f, 0xf0, 0x86, 0x84, 0x30, 0x50, 0x1a, 0x22, 0x6a, 0xd2, 0x54, 0x6d, 0x51, - 0x0e, 0x49, 0x45, 0xd5, 0x5e, 0xe8, 0xa5, 0x80, 0xd5, 0x44, 0x11, 0x76, 0x3a, 0x09, 0x05, 0x21, - 0x55, 0x56, 0x3e, 0x06, 0x63, 0x41, 0x3c, 0x5e, 0x8f, 0x83, 0x94, 0xf3, 0xde, 0xf6, 0xb4, 0xd2, - 0xfe, 0x89, 0x3d, 0xef, 0xaf, 0xe0, 0xc8, 0x71, 0x4f, 0xab, 0x15, 0xfc, 0x91, 0x55, 0xc6, 0x13, - 0xdb, 0xf9, 0x42, 0xbb, 0xe2, 0x36, 0xf3, 0xbe, 0xef, 0x3c, 0x1f, 0x33, 0x8f, 0x65, 0x50, 0x3c, - 0x62, 0xf7, 0x88, 0xdb, 0xb7, 0x6c, 0xaf, 0xe2, 0xb8, 0xd6, 0xdd, 0x5d, 0xfb, 0xb6, 0xe2, 0x0d, - 0x1d, 0xc2, 0xca, 0x8e, 0x4b, 0x3d, 0x8a, 0x50, 0xd8,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, 0x76, 0x19, 0x7d, 0x0f, - 0x9b, 0xa2, 0x8d, 0xd5, 0xbf, 0x4f, 0x82, 0x46, 0x2c, 0x82, 0x78, 0x8e, 0x6b, 0x2d, 0x35, 0xe8, - 0xc4, 0x8f, 0xf4, 0xfb, 0x47, 0x45, 0x7e, 0x78, 0x54, 0xe4, 0xcf, 0x8f, 0x8a, 0xfc, 0xf6, 0x49, - 0x91, 0x1e, 0x9e, 0x14, 0xe9, 0xe3, 0x93, 0x22, 0x5d, 0xfe, 0x61, 0x5a, 0xde, 0xf5, 0xa0, 0x53, - 0xee, 0xd2, 0x7e, 0xa5, 0x4b, 0xfb, 0xc4, 0xeb, 0x5c, 0x79, 0xe1, 0xc2, 0xff, 0x57, 0xcd, 0xfe, - 0x25, 0x3b, 0x09, 0xde, 0xf9, 0xfd, 0x4b, 0x00, 0x00, 0x00, 0xff, 0xff, 0xda, 0x9f, 0x99, 0x3e, - 0x42, 0x07, 0x00, 0x00, + // 862 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0x4d, 0x6f, 0xdb, 0x46, + 0x10, 0x25, 0x6d, 0xc9, 0xb2, 0x47, 0xfe, 0x50, 0xd6, 0x8e, 0xab, 0xb8, 0x09, 0xe3, 0xaa, 0x68, + 0x9b, 0x1a, 0x05, 0x55, 0xa4, 0x1f, 0x87, 0xa6, 0x97, 0xda, 0x26, 0x42, 0xc1, 0x08, 0xa9, 0xae, + 0x95, 0x26, 0x08, 0x50, 0x10, 0x12, 0xb5, 0xa1, 0x89, 0x58, 0xdc, 0x2d, 0x97, 0x32, 0xa0, 0x73, + 0x0f, 0x05, 0x7a, 0x2a, 0x90, 0x3f, 0xd1, 0x9f, 0x92, 0x63, 0x8e, 0x3d, 0x15, 0x85, 0xfd, 0x47, + 0x0a, 0xed, 0xae, 0xf8, 0x61, 0x4a, 0x69, 0x83, 0xe4, 0xc6, 0x9d, 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, 0xdf, 0x04, 0x61, 0x72, 0x36, 0x1e, 0x98, 0x3e, 0x1d, 0xb5, 0x7d, 0x3a, + 0x22, 0xc9, 0xe0, 0x79, 0x92, 0x3d, 0xc8, 0x1f, 0x90, 0xf2, 0x9f, 0xd1, 0x60, 0x45, 0x64, 0xbe, + 0xfa, 0x37, 0x00, 0x00, 0xff, 0xff, 0x84, 0xfc, 0x98, 0x3d, 0x36, 0x09, 0x00, 0x00, } func (m *RemoteSignerError) Marshal() (dAtA []byte, err error) { @@ -1013,6 +1154,93 @@ func (m *SignedProposalResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) return len(dAtA) - i, nil } +func (m *SignOracleVoteRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SignOracleVoteRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SignOracleVoteRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.ChainId) > 0 { + i -= len(m.ChainId) + copy(dAtA[i:], m.ChainId) + i = encodeVarintTypes(dAtA, i, uint64(len(m.ChainId))) + i-- + dAtA[i] = 0x12 + } + if m.Vote != nil { + { + size, err := m.Vote.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *SignedOracleVoteResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SignedOracleVoteResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SignedOracleVoteResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Error != nil { + { + size, err := m.Error.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + { + size, err := m.Vote.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + func (m *PingRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -1259,6 +1487,48 @@ func (m *Message_PingResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { } return len(dAtA) - i, nil } +func (m *Message_SignOracleVoteRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Message_SignOracleVoteRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.SignOracleVoteRequest != nil { + { + size, err := m.SignOracleVoteRequest.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x4a + } + return len(dAtA) - i, nil +} +func (m *Message_SignedOracleVoteResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Message_SignedOracleVoteResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.SignedOracleVoteResponse != nil { + { + size, err := m.SignedOracleVoteResponse.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x52 + } + return len(dAtA) - i, nil +} func encodeVarintTypes(dAtA []byte, offset int, v uint64) int { offset -= sovTypes(v) base := offset @@ -1378,6 +1648,38 @@ func (m *SignedProposalResponse) Size() (n int) { return n } +func (m *SignOracleVoteRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Vote != nil { + l = m.Vote.Size() + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.ChainId) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + return n +} + +func (m *SignedOracleVoteResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Vote.Size() + n += 1 + l + sovTypes(uint64(l)) + if m.Error != nil { + l = m.Error.Size() + n += 1 + l + sovTypes(uint64(l)) + } + return n +} + func (m *PingRequest) Size() (n int) { if m == nil { return 0 @@ -1504,6 +1806,30 @@ func (m *Message_PingResponse) Size() (n int) { } return n } +func (m *Message_SignOracleVoteRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.SignOracleVoteRequest != nil { + l = m.SignOracleVoteRequest.Size() + n += 1 + l + sovTypes(uint64(l)) + } + return n +} +func (m *Message_SignedOracleVoteResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.SignedOracleVoteResponse != nil { + l = m.SignedOracleVoteResponse.Size() + n += 1 + l + sovTypes(uint64(l)) + } + return n +} func sovTypes(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 @@ -2287,7 +2613,7 @@ func (m *SignedProposalResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *PingRequest) Unmarshal(dAtA []byte) error { +func (m *SignOracleVoteRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2310,20 +2636,257 @@ func (m *PingRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: PingRequest: wiretype end group for non-group") + return fmt.Errorf("proto: SignOracleVoteRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: PingRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: SignOracleVoteRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipTypes(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTypes + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Vote", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Vote == nil { + m.Vote = &oracle.GossipedVotes{} + } + if err := m.Vote.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ChainId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ChainId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SignedOracleVoteResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SignedOracleVoteResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SignedOracleVoteResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Vote", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Vote.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Error == nil { + m.Error = &RemoteSignerError{} + } + if err := m.Error.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PingRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PingRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PingRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -2696,6 +3259,76 @@ func (m *Message) Unmarshal(dAtA []byte) error { } m.Sum = &Message_PingResponse{v} iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SignOracleVoteRequest", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &SignOracleVoteRequest{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Sum = &Message_SignOracleVoteRequest{v} + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SignedOracleVoteResponse", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &SignedOracleVoteResponse{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Sum = &Message_SignedOracleVoteResponse{v} + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTypes(dAtA[iNdEx:]) diff --git a/proto/tendermint/privval/types.proto b/proto/tendermint/privval/types.proto index 13190ca42fa..2ac38a702d7 100644 --- a/proto/tendermint/privval/types.proto +++ b/proto/tendermint/privval/types.proto @@ -3,6 +3,7 @@ package tendermint.privval; import "tendermint/crypto/keys.proto"; import "tendermint/types/types.proto"; +import "tendermint/oracle/types.proto"; import "gogoproto/gogo.proto"; option go_package = "github.com/cometbft/cometbft/proto/tendermint/privval"; @@ -56,6 +57,18 @@ message SignedProposalResponse { RemoteSignerError error = 2; } +// SignOracleVoteRequest is a request to sign a vote +message SignOracleVoteRequest { + tendermint.oracle.GossipedVotes vote = 1; + string chain_id = 2; +} + +// SignedOracleVoteResponse is a response containing a signed vote or an error +message SignedOracleVoteResponse { + tendermint.oracle.GossipedVotes vote = 1 [(gogoproto.nullable) = false]; + RemoteSignerError error = 2; +} + // PingRequest is a request to confirm that the connection is alive. message PingRequest {} @@ -72,5 +85,7 @@ message Message { SignedProposalResponse signed_proposal_response = 6; PingRequest ping_request = 7; PingResponse ping_response = 8; + SignOracleVoteRequest sign_oracle_vote_request = 9; + SignedOracleVoteResponse signed_oracle_vote_response = 10; } } diff --git a/proto/tendermint/types/validator.proto b/proto/tendermint/types/validator.proto index 7b55956fcdd..a47e677a2fc 100644 --- a/proto/tendermint/types/validator.proto +++ b/proto/tendermint/types/validator.proto @@ -17,7 +17,6 @@ enum BlockIDFlag { BLOCK_ID_FLAG_NIL = 3 [(gogoproto.enumvalue_customname) = "BlockIDFlagNil"]; // voted for nil } - message ValidatorSet { repeated Validator validators = 1; Validator proposer = 2; diff --git a/proxy/app_conn.go b/proxy/app_conn.go index 064f32891ff..6d411b91c29 100644 --- a/proxy/app_conn.go +++ b/proxy/app_conn.go @@ -24,6 +24,9 @@ type AppConnConsensus interface { VerifyVoteExtension(context.Context, *types.RequestVerifyVoteExtension) (*types.ResponseVerifyVoteExtension, error) FinalizeBlock(context.Context, *types.RequestFinalizeBlock) (*types.ResponseFinalizeBlock, error) Commit(context.Context) (*types.ResponseCommit, error) + CreateOracleResultTx(context.Context, *types.RequestCreateOracleResultTx) (*types.ResponseCreateOracleResultTx, error) + FetchOracleVotes(context.Context, *types.RequestFetchOracleVotes) (*types.ResponseFetchOracleVotes, error) + ValidateOracleVotes(context.Context, *types.RequestValidateOracleVotes) (*types.ResponseValidateOracleVotes, error) } type AppConnMempool interface { @@ -109,6 +112,21 @@ func (app *appConnConsensus) Commit(ctx context.Context) (*types.ResponseCommit, return app.appConn.Commit(ctx, &types.RequestCommit{}) } +func (app *appConnConsensus) CreateOracleResultTx(ctx context.Context, req *types.RequestCreateOracleResultTx) (*types.ResponseCreateOracleResultTx, error) { + defer addTimeSample(app.metrics.MethodTimingSeconds.With("method", "commit", "type", "sync"))() + return app.appConn.CreateOracleResultTx(ctx, req) +} + +func (app *appConnConsensus) FetchOracleVotes(ctx context.Context, req *types.RequestFetchOracleVotes) (*types.ResponseFetchOracleVotes, error) { + defer addTimeSample(app.metrics.MethodTimingSeconds.With("method", "commit", "type", "sync"))() + return app.appConn.FetchOracleVotes(ctx, req) +} + +func (app *appConnConsensus) ValidateOracleVotes(ctx context.Context, req *types.RequestValidateOracleVotes) (*types.ResponseValidateOracleVotes, error) { + defer addTimeSample(app.metrics.MethodTimingSeconds.With("method", "commit", "type", "sync"))() + return app.appConn.ValidateOracleVotes(ctx, req) +} + //------------------------------------------------ // Implements AppConnMempool (subset of abcicli.Client) diff --git a/proxy/mocks/app_conn_consensus.go b/proxy/mocks/app_conn_consensus.go index 7dee0b1c5ce..5b4e653e0ec 100644 --- a/proxy/mocks/app_conn_consensus.go +++ b/proxy/mocks/app_conn_consensus.go @@ -133,6 +133,32 @@ func (_m *AppConnConsensus) InitChain(_a0 context.Context, _a1 *types.RequestIni return r0, r1 } +// FetchOracleVotes provides a mock function with given fields: _a0, _a1 +func (_m *AppConnConsensus) FetchOracleVotes(_a0 context.Context, _a1 *types.RequestFetchOracleVotes) (*types.ResponseFetchOracleVotes, error) { + ret := _m.Called(_a0, _a1) + + var r0 *types.ResponseFetchOracleVotes + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *types.RequestFetchOracleVotes) (*types.ResponseFetchOracleVotes, error)); ok { + return rf(_a0, _a1) + } + if rf, ok := ret.Get(0).(func(context.Context, *types.RequestFetchOracleVotes) *types.ResponseFetchOracleVotes); ok { + r0 = rf(_a0, _a1) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*types.ResponseFetchOracleVotes) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, *types.RequestFetchOracleVotes) error); ok { + r1 = rf(_a0, _a1) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + // PrepareProposal provides a mock function with given fields: _a0, _a1 func (_m *AppConnConsensus) PrepareProposal(_a0 context.Context, _a1 *types.RequestPrepareProposal) (*types.ResponsePrepareProposal, error) { ret := _m.Called(_a0, _a1) @@ -185,6 +211,58 @@ func (_m *AppConnConsensus) ProcessProposal(_a0 context.Context, _a1 *types.Requ return r0, r1 } +// CreateOracleResultTx provides a mock function with given fields: _a0, _a1 +func (_m *AppConnConsensus) CreateOracleResultTx(_a0 context.Context, _a1 *types.RequestCreateOracleResultTx) (*types.ResponseCreateOracleResultTx, error) { + ret := _m.Called(_a0, _a1) + + var r0 *types.ResponseCreateOracleResultTx + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *types.RequestCreateOracleResultTx) (*types.ResponseCreateOracleResultTx, error)); ok { + return rf(_a0, _a1) + } + if rf, ok := ret.Get(0).(func(context.Context, *types.RequestCreateOracleResultTx) *types.ResponseCreateOracleResultTx); ok { + r0 = rf(_a0, _a1) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*types.ResponseCreateOracleResultTx) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, *types.RequestCreateOracleResultTx) error); ok { + r1 = rf(_a0, _a1) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// ValidateOracleVotes provides a mock function with given fields: _a0, _a1 +func (_m *AppConnConsensus) ValidateOracleVotes(_a0 context.Context, _a1 *types.RequestValidateOracleVotes) (*types.ResponseValidateOracleVotes, error) { + ret := _m.Called(_a0, _a1) + + var r0 *types.ResponseValidateOracleVotes + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *types.RequestValidateOracleVotes) (*types.ResponseValidateOracleVotes, error)); ok { + return rf(_a0, _a1) + } + if rf, ok := ret.Get(0).(func(context.Context, *types.RequestValidateOracleVotes) *types.ResponseValidateOracleVotes); ok { + r0 = rf(_a0, _a1) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*types.ResponseValidateOracleVotes) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, *types.RequestValidateOracleVotes) error); ok { + r1 = rf(_a0, _a1) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + // VerifyVoteExtension provides a mock function with given fields: _a0, _a1 func (_m *AppConnConsensus) VerifyVoteExtension(_a0 context.Context, _a1 *types.RequestVerifyVoteExtension) (*types.ResponseVerifyVoteExtension, error) { ret := _m.Called(_a0, _a1) diff --git a/scripts/protocgen.sh b/scripts/protocgen.sh new file mode 100644 index 00000000000..e5d969d50a2 --- /dev/null +++ b/scripts/protocgen.sh @@ -0,0 +1,22 @@ +echo "Formatting protobuf files" +find ./ -name "*.proto" -exec clang-format -i {} \; + +set -e + +echo "Generating gogo proto code" +cd proto +proto_dirs=$(find ./Switcheo/carbon -path -prune -o -name '*.proto' -print0 | xargs -0 -n1 dirname | sort | uniq) +for dir in $proto_dirs; do + for file in $(find "${dir}" -maxdepth 1 -name '*.proto'); do + # Check if the go_package in the file is pointing to carbon + if grep -q "option go_package.*cometbft" "$file"; then + buf generate --template buf.gen.gogo.yaml "$file" + fi + done +done + +cd .. + +# move proto files to the right places +cp -r github.com/cometbft/cometbft/* ./ +rm -rf github.com diff --git a/state/execution.go b/state/execution.go index e8e6b26b850..846a9d3a6d6 100644 --- a/state/execution.go +++ b/state/execution.go @@ -14,6 +14,10 @@ import ( cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" "github.com/cometbft/cometbft/proxy" "github.com/cometbft/cometbft/types" + "github.com/sirupsen/logrus" + + oracletypes "github.com/cometbft/cometbft/oracle/service/types" + oracleproto "github.com/cometbft/cometbft/proto/tendermint/oracle" ) //----------------------------------------------------------------------------- @@ -37,8 +41,9 @@ type BlockExecutor struct { // manage the mempool lock during commit // and update both with block results after commit. - mempool mempool.Mempool - evpool EvidencePool + mempool mempool.Mempool + oracleInfo *oracletypes.OracleInfo + evpool EvidencePool logger log.Logger @@ -60,6 +65,7 @@ func NewBlockExecutor( logger log.Logger, proxyApp proxy.AppConnConsensus, mempool mempool.Mempool, + oracleInfo *oracletypes.OracleInfo, evpool EvidencePool, blockStore BlockStore, options ...BlockExecutorOption, @@ -69,6 +75,7 @@ func NewBlockExecutor( proxyApp: proxyApp, eventBus: types.NopEventBus{}, mempool: mempool, + oracleInfo: oracleInfo, evpool: evpool, logger: logger, metrics: NopMetrics(), @@ -126,11 +133,12 @@ func (blockExec *BlockExecutor) CreateProposalBlock( txs := blockExec.mempool.ReapMaxBytesMaxGas(maxReapBytes, maxGas) commit := lastExtCommit.ToCommit() block := state.MakeBlock(height, txs, commit, evidence, proposerAddr) + txSlice := block.Txs.ToSliceOfBytes() rpp, err := blockExec.proxyApp.PrepareProposal( ctx, &abci.RequestPrepareProposal{ MaxTxBytes: maxDataBytes, - Txs: block.Txs.ToSliceOfBytes(), + Txs: txSlice, LocalLastCommit: buildExtendedCommitInfoFromStore(lastExtCommit, blockExec.store, state.InitialHeight, state.ConsensusParams.ABCI), Misbehavior: block.Evidence.Evidence.ToABCI(), Height: block.Height, @@ -156,6 +164,42 @@ func (blockExec *BlockExecutor) CreateProposalBlock( return nil, err } + // inject oracleTx containing gossipedVotes from vals, this is ran after PrepareProposal, so that CreateOracleResultTx + // hook will use the updated context from prepareProposalState + + // check if oracle's gossipVoteMap has any results + preLockTime := time.Now().UnixMilli() + blockExec.oracleInfo.GossipVoteBuffer.UpdateMtx.RLock() + oracleVotesBuffer := blockExec.oracleInfo.GossipVoteBuffer.Buffer + votes := []*oracleproto.GossipedVotes{} + for _, vote := range oracleVotesBuffer { + votes = append(votes, vote) + } + blockExec.oracleInfo.GossipVoteBuffer.UpdateMtx.RUnlock() + postLockTime := time.Now().UnixMilli() + diff := postLockTime - preLockTime + if diff > 100 { + logrus.Warnf("WARNING!!! Injecting oracle tx gossip lock took %v milliseconds", diff) + } + + var createOracleResultTxBz []byte + if len(votes) > 0 { + resp, err := blockExec.proxyApp.CreateOracleResultTx(ctx, &abci.RequestCreateOracleResultTx{ + Proposer: proposerAddr, + GossipedVotes: votes, + }) + if err != nil { + blockExec.logger.Error("error in proxyAppConn.CreateOracleResultTx", "err", err) + } else { + createOracleResultTxBz = resp.EncodedTx + } + } + + if len(createOracleResultTxBz) > 0 { + CreateOracleResultTx := types.Tx(createOracleResultTxBz) + txl = append([]types.Tx{CreateOracleResultTx}, txl...) + } + return state.MakeBlock(height, txl, commit, evidence, proposerAddr), nil } diff --git a/state/execution_test.go b/state/execution_test.go index cbc39f1fe23..09de813f34f 100644 --- a/state/execution_test.go +++ b/state/execution_test.go @@ -32,6 +32,8 @@ import ( "github.com/cometbft/cometbft/types" cmttime "github.com/cometbft/cometbft/types/time" "github.com/cometbft/cometbft/version" + + oracletypes "github.com/cometbft/cometbft/oracle/service/types" ) var ( @@ -64,8 +66,11 @@ func TestApplyBlock(t *testing.T) { mock.Anything, mock.Anything, mock.Anything).Return(nil) + + oracleInfo := oracletypes.OracleInfo{} + blockExec := sm.NewBlockExecutor(stateStore, log.TestingLogger(), proxyApp.Consensus(), - mp, sm.EmptyEvidencePool{}, blockStore) + mp, &oracleInfo, sm.EmptyEvidencePool{}, blockStore) block := makeBlock(state, 1, new(types.Commit)) bps, err := block.MakePartSet(testPartSize) @@ -130,7 +135,8 @@ func TestFinalizeBlockDecidedLastCommit(t *testing.T) { eventBus := types.NewEventBus() require.NoError(t, eventBus.Start()) - blockExec := sm.NewBlockExecutor(stateStore, log.NewNopLogger(), proxyApp.Consensus(), mp, evpool, blockStore) + oracleInfo := oracletypes.OracleInfo{} + blockExec := sm.NewBlockExecutor(stateStore, log.NewNopLogger(), proxyApp.Consensus(), mp, &oracleInfo, evpool, blockStore) state, _, lastCommit, err := makeAndCommitGoodBlock(state, 1, new(types.Commit), state.NextValidators.Validators[0].Address, blockExec, privVals, nil) require.NoError(t, err) @@ -343,8 +349,9 @@ func TestFinalizeBlockMisbehavior(t *testing.T) { blockStore := store.NewBlockStore(dbm.NewMemDB()) + oracleInfo := oracletypes.OracleInfo{} blockExec := sm.NewBlockExecutor(stateStore, log.TestingLogger(), proxyApp.Consensus(), - mp, evpool, blockStore) + mp, &oracleInfo, evpool, blockStore) block := makeBlock(state, 1, new(types.Commit)) block.Evidence = types.EvidenceData{Evidence: ev} @@ -384,11 +391,14 @@ func TestProcessProposal(t *testing.T) { err = eventBus.Start() require.NoError(t, err) + oracleInfo := oracletypes.OracleInfo{} + blockExec := sm.NewBlockExecutor( stateStore, logger, proxyApp.Consensus(), new(mpmocks.Mempool), + &oracleInfo, sm.EmptyEvidencePool{}, blockStore, ) @@ -600,12 +610,15 @@ func TestFinalizeBlockValidatorUpdates(t *testing.T) { mock.Anything).Return(nil) mp.On("ReapMaxBytesMaxGas", mock.Anything, mock.Anything).Return(types.Txs{}) + oracleInfo := oracletypes.OracleInfo{} + blockStore := store.NewBlockStore(dbm.NewMemDB()) blockExec := sm.NewBlockExecutor( stateStore, log.TestingLogger(), proxyApp.Consensus(), mp, + &oracleInfo, sm.EmptyEvidencePool{}, blockStore, ) @@ -676,12 +689,16 @@ func TestFinalizeBlockValidatorUpdatesResultingInEmptySet(t *testing.T) { stateStore := sm.NewStore(stateDB, sm.StoreOptions{ DiscardABCIResponses: false, }) + + oracleInfo := oracletypes.OracleInfo{} + blockStore := store.NewBlockStore(dbm.NewMemDB()) blockExec := sm.NewBlockExecutor( stateStore, log.TestingLogger(), proxyApp.Consensus(), new(mpmocks.Mempool), + &oracleInfo, sm.EmptyEvidencePool{}, blockStore, ) @@ -732,12 +749,15 @@ func TestEmptyPrepareProposal(t *testing.T) { mock.Anything).Return(nil) mp.On("ReapMaxBytesMaxGas", mock.Anything, mock.Anything).Return(types.Txs{}) + oracleInfo := oracletypes.OracleInfo{} + blockStore := store.NewBlockStore(dbm.NewMemDB()) blockExec := sm.NewBlockExecutor( stateStore, log.TestingLogger(), proxyApp.Consensus(), mp, + &oracleInfo, sm.EmptyEvidencePool{}, blockStore, ) @@ -777,12 +797,15 @@ func TestPrepareProposalTxsAllIncluded(t *testing.T) { require.NoError(t, err) defer proxyApp.Stop() //nolint:errcheck // ignore for tests + oracleInfo := oracletypes.OracleInfo{} + blockStore := store.NewBlockStore(dbm.NewMemDB()) blockExec := sm.NewBlockExecutor( stateStore, log.TestingLogger(), proxyApp.Consensus(), mp, + &oracleInfo, evpool, blockStore, ) @@ -832,12 +855,15 @@ func TestPrepareProposalReorderTxs(t *testing.T) { require.NoError(t, err) defer proxyApp.Stop() //nolint:errcheck // ignore for tests + oracleInfo := oracletypes.OracleInfo{} + blockStore := store.NewBlockStore(dbm.NewMemDB()) blockExec := sm.NewBlockExecutor( stateStore, log.TestingLogger(), proxyApp.Consensus(), mp, + &oracleInfo, evpool, blockStore, ) @@ -888,12 +914,15 @@ func TestPrepareProposalErrorOnTooManyTxs(t *testing.T) { require.NoError(t, err) defer proxyApp.Stop() //nolint:errcheck // ignore for tests + oracleInfo := oracletypes.OracleInfo{} + blockStore := store.NewBlockStore(dbm.NewMemDB()) blockExec := sm.NewBlockExecutor( stateStore, log.NewNopLogger(), proxyApp.Consensus(), mp, + &oracleInfo, evpool, blockStore, ) @@ -945,12 +974,14 @@ func TestPrepareProposalCountSerializationOverhead(t *testing.T) { require.NoError(t, err) defer proxyApp.Stop() //nolint:errcheck // ignore for tests + oracleInfo := oracletypes.OracleInfo{} blockStore := store.NewBlockStore(dbm.NewMemDB()) blockExec := sm.NewBlockExecutor( stateStore, log.NewNopLogger(), proxyApp.Consensus(), mp, + &oracleInfo, evpool, blockStore, ) @@ -996,12 +1027,15 @@ func TestPrepareProposalErrorOnPrepareProposalError(t *testing.T) { require.NoError(t, err) defer proxyApp.Stop() //nolint:errcheck // ignore for tests + oracleInfo := oracletypes.OracleInfo{} + blockStore := store.NewBlockStore(dbm.NewMemDB()) blockExec := sm.NewBlockExecutor( stateStore, log.NewNopLogger(), proxyApp.Consensus(), mp, + &oracleInfo, evpool, blockStore, ) @@ -1085,12 +1119,15 @@ func TestCreateProposalAbsentVoteExtensions(t *testing.T) { mock.Anything).Return(nil) mp.On("ReapMaxBytesMaxGas", mock.Anything, mock.Anything).Return(types.Txs{}) + oracleInfo := oracletypes.OracleInfo{} + blockStore := store.NewBlockStore(dbm.NewMemDB()) blockExec := sm.NewBlockExecutor( stateStore, log.NewNopLogger(), proxyApp.Consensus(), mp, + &oracleInfo, sm.EmptyEvidencePool{}, blockStore, ) diff --git a/state/validation_test.go b/state/validation_test.go index b4efcd75989..fc165632829 100644 --- a/state/validation_test.go +++ b/state/validation_test.go @@ -22,6 +22,8 @@ import ( "github.com/cometbft/cometbft/store" "github.com/cometbft/cometbft/types" cmttime "github.com/cometbft/cometbft/types/time" + + oracletypes "github.com/cometbft/cometbft/oracle/service/types" ) const validationTestsStopHeight int64 = 10 @@ -49,11 +51,14 @@ func TestValidateBlockHeader(t *testing.T) { blockStore := store.NewBlockStore(dbm.NewMemDB()) + oracleInfo := oracletypes.OracleInfo{} + blockExec := sm.NewBlockExecutor( stateStore, log.TestingLogger(), proxyApp.Consensus(), mp, + &oracleInfo, sm.EmptyEvidencePool{}, blockStore, ) @@ -144,6 +149,7 @@ func TestValidateBlockCommit(t *testing.T) { mock.Anything, mock.Anything).Return(nil) + oracleInfo := oracletypes.OracleInfo{} blockStore := store.NewBlockStore(dbm.NewMemDB()) blockExec := sm.NewBlockExecutor( @@ -151,6 +157,7 @@ func TestValidateBlockCommit(t *testing.T) { log.TestingLogger(), proxyApp.Consensus(), mp, + &oracleInfo, sm.EmptyEvidencePool{}, blockStore, ) @@ -296,6 +303,7 @@ func TestValidateBlockEvidence(t *testing.T) { mock.Anything, mock.Anything).Return(nil) state.ConsensusParams.Evidence.MaxBytes = 1000 + oracleInfo := oracletypes.OracleInfo{} blockStore := store.NewBlockStore(dbm.NewMemDB()) blockExec := sm.NewBlockExecutor( @@ -303,6 +311,7 @@ func TestValidateBlockEvidence(t *testing.T) { log.TestingLogger(), proxyApp.Consensus(), mp, + &oracleInfo, evpool, blockStore, ) diff --git a/types/oracle.go b/types/oracle.go new file mode 100644 index 00000000000..c917140e9af --- /dev/null +++ b/types/oracle.go @@ -0,0 +1,24 @@ +package types + +import ( + "github.com/cometbft/cometbft/libs/protoio" + oracleproto "github.com/cometbft/cometbft/proto/tendermint/oracle" +) + +func OracleVoteSignBytes(vote *oracleproto.GossipedVotes) []byte { + pb := CanonicalizeOracleVote(vote) + bz, err := protoio.MarshalDelimited(&pb) + if err != nil { + panic(err) + } + + return bz +} + +func CanonicalizeOracleVote(vote *oracleproto.GossipedVotes) oracleproto.CanonicalGossipedVotes { + return oracleproto.CanonicalGossipedVotes{ + Validator: vote.Validator, + Votes: vote.Votes, + SignedTimestamp: vote.SignedTimestamp, + } +} diff --git a/types/priv_validator.go b/types/priv_validator.go index 340794d00c5..45da4d6a337 100644 --- a/types/priv_validator.go +++ b/types/priv_validator.go @@ -7,6 +7,7 @@ import ( "github.com/cometbft/cometbft/crypto" "github.com/cometbft/cometbft/crypto/ed25519" + oracleproto "github.com/cometbft/cometbft/proto/tendermint/oracle" cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" ) @@ -17,6 +18,7 @@ type PrivValidator interface { SignVote(chainID string, vote *cmtproto.Vote) error SignProposal(chainID string, proposal *cmtproto.Proposal) error + SignOracleVote(chainID string, oracleVote *oracleproto.GossipedVotes) error } type PrivValidatorsByAddress []PrivValidator @@ -98,6 +100,18 @@ func (pv MockPV) SignVote(chainID string, vote *cmtproto.Vote) error { return nil } +// Implements PrivValidator. +func (pv MockPV) SignOracleVote(chainID string, vote *oracleproto.GossipedVotes) error { + signBytes := OracleVoteSignBytes(vote) + sig, err := pv.PrivKey.Sign(signBytes) + if err != nil { + return err + } + vote.Signature = sig + + return nil +} + // Implements PrivValidator. func (pv MockPV) SignProposal(chainID string, proposal *cmtproto.Proposal) error { useChainID := chainID