From 78a2715f0c00b4c8aca78dee6651360574bbbdaa Mon Sep 17 00:00:00 2001 From: Jules de Smit Date: Fri, 5 Feb 2021 16:08:11 +0100 Subject: [PATCH] Move GetSyncProgress back to the Chain service Fixes #135 --- autogen/go/node/node.mock.go | 87 ++++++++-------- autogen/go/node/node.pb.go | 156 +++++++++++----------------- autogen/go/rusk/bid.mock.go | 6 +- autogen/go/rusk/blindbid.mock.go | 2 +- autogen/go/rusk/echo.mock.go | 2 +- autogen/go/rusk/rusk.mock.go | 2 +- autogen/go/rusk/stake.mock.go | 4 +- autogen/go/rusk/transaction.mock.go | 4 +- autogen/go/rusk/transfer.mock.go | 4 +- node/node.proto | 3 - 10 files changed, 114 insertions(+), 156 deletions(-) diff --git a/autogen/go/node/node.mock.go b/autogen/go/node/node.mock.go index 4a9a937..cfa4545 100644 --- a/autogen/go/node/node.mock.go +++ b/autogen/go/node/node.mock.go @@ -20,14 +20,14 @@ type AuthMock struct{} func (m *AuthMock) CreateSession(ctx context.Context, req *SessionRequest) (*Session, error) { res := &Session{ - AccessToken: "ut", + AccessToken: "nam", } return res, nil } func (m *AuthMock) DropSession(ctx context.Context, req *EmptyRequest) (*GenericResponse, error) { res := &GenericResponse{ - Response: "ipsum", + Response: "doloribus", } return res, nil } @@ -37,7 +37,7 @@ type WalletMock struct{} func (m *WalletMock) ClearWalletDatabase(ctx context.Context, req *EmptyRequest) (*GenericResponse, error) { res := &GenericResponse{ - Response: "nulla", + Response: "tempore", } return res, nil } @@ -59,51 +59,51 @@ func (m *WalletMock) GetTxHistory(ctx context.Context, req *EmptyRequest) (*TxHi Records: []*TxRecord{ &TxRecord{ Direction: 0, - Timestamp: 672, + Timestamp: 77, Type: 5, Obfuscated: true, }, &TxRecord{ Direction: 0, - Timestamp: 528, - Type: 6, + Timestamp: 751, + Type: 4, Obfuscated: true, }, &TxRecord{ Direction: 1, - Timestamp: 572, + Timestamp: 326, Type: 5, Obfuscated: true, }, &TxRecord{ - Direction: 1, - Timestamp: 626, - Type: 0, + Direction: 0, + Timestamp: 681, + Type: 1, Obfuscated: false, }, &TxRecord{ - Direction: 0, - Timestamp: 270, - Type: 0, + Direction: 1, + Timestamp: 917, + Type: 7, Obfuscated: true, }, &TxRecord{ - Direction: 1, - Timestamp: 846, - Type: 0, + Direction: 0, + Timestamp: 285, + Type: 4, Obfuscated: true, }, &TxRecord{ - Direction: 1, - Timestamp: 541, - Type: 3, + Direction: 0, + Timestamp: 769, + Type: 0, Obfuscated: true, }, &TxRecord{ - Direction: 1, - Timestamp: 933, - Type: 7, - Obfuscated: true, + Direction: 0, + Timestamp: 79, + Type: 5, + Obfuscated: false, }, }, } @@ -122,36 +122,36 @@ func (m *MempoolMock) SelectTx(ctx context.Context, req *SelectRequest) (*Select &SelectResponse{ Result: []*Tx{ &Tx{ - Type: 0, - Id: "89c41b4c-b262-40cd-ae62-87d3032e1e39", + Type: 6, + Id: "a9ba4708-1194-45c6-a545-aabf65e589bf", }, &Tx{ - Type: 0, - Id: "a45f325d-54c3-4f1e-9c5f-ce71ac096012", + Type: 2, + Id: "87bb5ba9-1130-49fe-b008-ffd723396ab6", }, &Tx{ - Type: 3, - Id: "ed668413-8c0a-44aa-830d-a116161ec5f3", + Type: 1, + Id: "0ecab49e-c348-4bf8-ac72-20e99d511eec", }, &Tx{ - Type: 6, - Id: "bb5ecfd1-622d-42ce-8a5c-eb413a2c850a", + Type: 7, + Id: "8da1fca1-18bb-4524-8f08-17ca1c68f153", }, &Tx{ Type: 2, - Id: "22c555ee-eba2-4ca7-bcae-5584554433bb", + Id: "a9a7b97e-ddf5-4d5e-bcae-db7bca6945e2", }, &Tx{ - Type: 0, - Id: "511ebc24-b3e1-44f7-b0cf-02d2f435929b", + Type: 1, + Id: "cba36ddf-d8df-4dac-912b-7a191e4fbe38", }, &Tx{ Type: 3, - Id: "59d8add7-889d-483b-a661-f13d09c543a3", + Id: "78b05b24-a08c-4937-a720-c7e8fbef8f6e", }, &Tx{ - Type: 6, - Id: "033f6257-9a7a-4f3d-9c24-f4a206b70f14", + Type: 3, + Id: "237f3dd7-afbd-4f49-948d-4ffdc2c1e3d4", }, }, } @@ -163,17 +163,14 @@ type ChainMock struct{} func (m *ChainMock) RebuildChain(ctx context.Context, req *EmptyRequest) (*GenericResponse, error) { res := &GenericResponse{ - Response: "cumque", + Response: "suscipit", } return res, nil } - -type SynchronizerMock struct{} - -func (m *SynchronizerMock) GetSyncProgress(ctx context.Context, req *EmptyRequest) (*SyncProgressResponse, error) { +func (m *ChainMock) GetSyncProgress(ctx context.Context, req *EmptyRequest) (*SyncProgressResponse, error) { res := &SyncProgressResponse{ - Progress: 932.4377, + Progress: 319.3741, } return res, nil } @@ -206,7 +203,7 @@ type ProvisionerMock struct{} func (m *ProvisionerMock) AutomateStakes(ctx context.Context, req *EmptyRequest) (*GenericResponse, error) { res := &GenericResponse{ - Response: "nisi", + Response: "ullam", } return res, nil } @@ -216,7 +213,7 @@ type BlockGeneratorMock struct{} func (m *BlockGeneratorMock) AutomateBids(ctx context.Context, req *EmptyRequest) (*GenericResponse, error) { res := &GenericResponse{ - Response: "voluptate", + Response: "et", } return res, nil } diff --git a/autogen/go/node/node.pb.go b/autogen/go/node/node.pb.go index 4c53cb6..6c63edd 100644 --- a/autogen/go/node/node.pb.go +++ b/autogen/go/node/node.pb.go @@ -100,40 +100,40 @@ func init() { func init() { proto.RegisterFile("node.proto", fileDescriptor_0c843d59d2d938e7) } var fileDescriptor_0c843d59d2d938e7 = []byte{ - // 526 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x54, 0x5d, 0x6f, 0x12, 0x41, - 0x14, 0x2d, 0xda, 0x56, 0xbc, 0x5d, 0xd0, 0x4c, 0x4b, 0xd4, 0x7d, 0x32, 0x3c, 0x35, 0x26, 0x85, - 0x04, 0x4d, 0xfd, 0x68, 0x6a, 0xc2, 0x2e, 0x8a, 0x0f, 0x6d, 0xd2, 0x00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, 0x7a, 0x23, 0xfd, 0x2b, 0xb8, 0xef, 0x89, 0x90, 0x3d, 0xce, - 0x47, 0x21, 0xc2, 0x8d, 0x54, 0x6f, 0x60, 0x6f, 0x68, 0xf9, 0x7c, 0x75, 0xef, 0x52, 0xb0, 0x89, - 0xb2, 0x73, 0x01, 0x07, 0x57, 0x9a, 0xbe, 0x8b, 0xe4, 0xdd, 0xa1, 0x66, 0xe7, 0x50, 0xef, 0xc6, - 0x96, 0xa2, 0xe4, 0x09, 0x27, 0x1e, 0x66, 0xbb, 0x49, 0x5d, 0x42, 0xdd, 0x93, 0x14, 0xcc, 0xd3, - 0x0a, 0x4f, 0xce, 0xf5, 0x0c, 0x9c, 0xc2, 0xd0, 0x13, 0xe1, 0x76, 0x76, 0xde, 0x8b, 0xaf, 0xc7, - 0x53, 0x61, 0x67, 0xf1, 0xb8, 0x15, 0x50, 0xd4, 0x0e, 0x63, 0x33, 0x3f, 0x49, 0x7f, 0x57, 0xe3, - 0x78, 0xd2, 0xe6, 0xb1, 0xa5, 0x29, 0xaa, 0xf6, 0x94, 0xda, 0x89, 0x7a, 0xbc, 0x9f, 0x56, 0x5e, - 0xfe, 0x09, 0x00, 0x00, 0xff, 0xff, 0x8d, 0x4d, 0x81, 0xea, 0xf9, 0x04, 0x00, 0x00, + // 521 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x94, 0x4d, 0x6f, 0x13, 0x3d, + 0x10, 0xc7, 0x9b, 0xe7, 0x69, 0x4b, 0x98, 0x6e, 0x02, 0x72, 0x1b, 0x01, 0x7b, 0x42, 0x39, 0x55, + 0x48, 0x4d, 0xa4, 0x80, 0xca, 0x4b, 0x55, 0xa4, 0xec, 0x16, 0xc2, 0xa1, 0x95, 0xaa, 0x24, 0x08, + 0x89, 0x9b, 0xb3, 0x3b, 0x49, 0xac, 0x78, 0xed, 0x60, 0xcf, 0x42, 0xc3, 0x99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0xd8, 0x84, 0xec, 0x5d, 0xc2, 0xc1, 0xb5, 0xd1, + 0x9f, 0x45, 0xf2, 0xd0, 0xd0, 0xb0, 0x73, 0x68, 0xf6, 0x63, 0xd2, 0x51, 0xf2, 0x66, 0x93, 0x1e, + 0x76, 0xbb, 0xc7, 0x77, 0x05, 0x4d, 0x4f, 0xea, 0x60, 0x91, 0x66, 0x78, 0x72, 0xae, 0x67, 0xe0, + 0x14, 0x0d, 0x3d, 0x11, 0x6e, 0xd7, 0xce, 0x7b, 0xf2, 0xf1, 0x78, 0x26, 0x68, 0x1e, 0x4f, 0x3a, + 0x81, 0x8e, 0xba, 0x61, 0x6c, 0x17, 0x27, 0xe9, 0xff, 0x69, 0x12, 0x4f, 0xbb, 0x3c, 0x26, 0x3d, + 0x43, 0xd5, 0x9d, 0xe9, 0x6e, 0x42, 0x4f, 0xf6, 0xd3, 0xcc, 0xd3, 0x5f, 0x01, 0x00, 0x00, 0xff, + 0xff, 0x99, 0x8f, 0xf3, 0x96, 0xea, 0x04, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -545,6 +545,7 @@ var _Mempool_serviceDesc = grpc.ServiceDesc{ // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. type ChainClient interface { RebuildChain(ctx context.Context, in *EmptyRequest, opts ...grpc.CallOption) (*GenericResponse, error) + GetSyncProgress(ctx context.Context, in *EmptyRequest, opts ...grpc.CallOption) (*SyncProgressResponse, error) } type chainClient struct { @@ -564,9 +565,19 @@ func (c *chainClient) RebuildChain(ctx context.Context, in *EmptyRequest, opts . return out, nil } +func (c *chainClient) GetSyncProgress(ctx context.Context, in *EmptyRequest, opts ...grpc.CallOption) (*SyncProgressResponse, error) { + out := new(SyncProgressResponse) + err := c.cc.Invoke(ctx, "/node.Chain/GetSyncProgress", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // ChainServer is the server API for Chain service. type ChainServer interface { RebuildChain(context.Context, *EmptyRequest) (*GenericResponse, error) + GetSyncProgress(context.Context, *EmptyRequest) (*SyncProgressResponse, error) } // UnimplementedChainServer can be embedded to have forward compatible implementations. @@ -576,6 +587,9 @@ type UnimplementedChainServer struct { func (*UnimplementedChainServer) RebuildChain(ctx context.Context, req *EmptyRequest) (*GenericResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method RebuildChain not implemented") } +func (*UnimplementedChainServer) GetSyncProgress(ctx context.Context, req *EmptyRequest) (*SyncProgressResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetSyncProgress not implemented") +} func RegisterChainServer(s *grpc.Server, srv ChainServer) { s.RegisterService(&_Chain_serviceDesc, srv) @@ -599,85 +613,35 @@ func _Chain_RebuildChain_Handler(srv interface{}, ctx context.Context, dec func( return interceptor(ctx, in, info, handler) } -var _Chain_serviceDesc = grpc.ServiceDesc{ - ServiceName: "node.Chain", - HandlerType: (*ChainServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "RebuildChain", - Handler: _Chain_RebuildChain_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "node.proto", -} - -// SynchronizerClient is the client API for Synchronizer service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type SynchronizerClient interface { - GetSyncProgress(ctx context.Context, in *EmptyRequest, opts ...grpc.CallOption) (*SyncProgressResponse, error) -} - -type synchronizerClient struct { - cc *grpc.ClientConn -} - -func NewSynchronizerClient(cc *grpc.ClientConn) SynchronizerClient { - return &synchronizerClient{cc} -} - -func (c *synchronizerClient) GetSyncProgress(ctx context.Context, in *EmptyRequest, opts ...grpc.CallOption) (*SyncProgressResponse, error) { - out := new(SyncProgressResponse) - err := c.cc.Invoke(ctx, "/node.Synchronizer/GetSyncProgress", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// SynchronizerServer is the server API for Synchronizer service. -type SynchronizerServer interface { - GetSyncProgress(context.Context, *EmptyRequest) (*SyncProgressResponse, error) -} - -// UnimplementedSynchronizerServer can be embedded to have forward compatible implementations. -type UnimplementedSynchronizerServer struct { -} - -func (*UnimplementedSynchronizerServer) GetSyncProgress(ctx context.Context, req *EmptyRequest) (*SyncProgressResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetSyncProgress not implemented") -} - -func RegisterSynchronizerServer(s *grpc.Server, srv SynchronizerServer) { - s.RegisterService(&_Synchronizer_serviceDesc, srv) -} - -func _Synchronizer_GetSyncProgress_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _Chain_GetSyncProgress_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(EmptyRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(SynchronizerServer).GetSyncProgress(ctx, in) + return srv.(ChainServer).GetSyncProgress(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/node.Synchronizer/GetSyncProgress", + FullMethod: "/node.Chain/GetSyncProgress", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SynchronizerServer).GetSyncProgress(ctx, req.(*EmptyRequest)) + return srv.(ChainServer).GetSyncProgress(ctx, req.(*EmptyRequest)) } return interceptor(ctx, in, info, handler) } -var _Synchronizer_serviceDesc = grpc.ServiceDesc{ - ServiceName: "node.Synchronizer", - HandlerType: (*SynchronizerServer)(nil), +var _Chain_serviceDesc = grpc.ServiceDesc{ + ServiceName: "node.Chain", + HandlerType: (*ChainServer)(nil), Methods: []grpc.MethodDesc{ + { + MethodName: "RebuildChain", + Handler: _Chain_RebuildChain_Handler, + }, { MethodName: "GetSyncProgress", - Handler: _Synchronizer_GetSyncProgress_Handler, + Handler: _Chain_GetSyncProgress_Handler, }, }, Streams: []grpc.StreamDesc{}, diff --git a/autogen/go/rusk/bid.mock.go b/autogen/go/rusk/bid.mock.go index eb39b0f..4aa3204 100644 --- a/autogen/go/rusk/bid.mock.go +++ b/autogen/go/rusk/bid.mock.go @@ -20,10 +20,10 @@ type BidServiceMock struct{} func (m *BidServiceMock) NewBid(ctx context.Context, req *BidTransactionRequest) (*BidTransaction, error) { res := &BidTransaction{ - BidTreeStorageIndex: 418, + BidTreeStorageIndex: 121, Tx: &Transaction{ - Version: 990, - Type: 938, + Version: 547, + Type: 143, }, } return res, nil diff --git a/autogen/go/rusk/blindbid.mock.go b/autogen/go/rusk/blindbid.mock.go index a9564cd..5c690e1 100644 --- a/autogen/go/rusk/blindbid.mock.go +++ b/autogen/go/rusk/blindbid.mock.go @@ -25,7 +25,7 @@ func (m *BlindBidServiceMock) GenerateScore(ctx context.Context, req *GenerateSc func (m *BlindBidServiceMock) VerifyScore(ctx context.Context, req *VerifyScoreRequest) (*VerifyScoreResponse, error) { res := &VerifyScoreResponse{ - Success: false, + Success: true, } return res, nil } diff --git a/autogen/go/rusk/echo.mock.go b/autogen/go/rusk/echo.mock.go index 2f40a80..48f40b1 100644 --- a/autogen/go/rusk/echo.mock.go +++ b/autogen/go/rusk/echo.mock.go @@ -20,7 +20,7 @@ type EchoerMock struct{} func (m *EchoerMock) Echo(ctx context.Context, req *EchoRequest) (*EchoResponse, error) { res := &EchoResponse{ - Message: "vero", + Message: "nisi", } return res, nil } diff --git a/autogen/go/rusk/rusk.mock.go b/autogen/go/rusk/rusk.mock.go index 64d2687..062badc 100644 --- a/autogen/go/rusk/rusk.mock.go +++ b/autogen/go/rusk/rusk.mock.go @@ -26,7 +26,7 @@ func (m *StateMock) ExecuteStateTransition(ctx context.Context, req *ExecuteStat res := &ExecuteStateTransitionResponse{ Success: true, - ErrorMessage: "minus", + ErrorMessage: "quis", } return res, nil } diff --git a/autogen/go/rusk/stake.mock.go b/autogen/go/rusk/stake.mock.go index 1487f26..9411f66 100644 --- a/autogen/go/rusk/stake.mock.go +++ b/autogen/go/rusk/stake.mock.go @@ -20,8 +20,8 @@ type StakeServiceMock struct{} func (m *StakeServiceMock) NewStake(ctx context.Context, req *StakeTransactionRequest) (*Transaction, error) { res := &Transaction{ - Version: 990, - Type: 616, + Version: 19, + Type: 844, } return res, nil } diff --git a/autogen/go/rusk/transaction.mock.go b/autogen/go/rusk/transaction.mock.go index a7c8cf8..d7c0ad7 100644 --- a/autogen/go/rusk/transaction.mock.go +++ b/autogen/go/rusk/transaction.mock.go @@ -20,8 +20,8 @@ type TransactionServiceMock struct{} func (m *TransactionServiceMock) NewTransaction(ctx context.Context, req *TransactionRequest) (*Transaction, error) { res := &Transaction{ - Version: 494, - Type: 377, + Version: 970, + Type: 245, } return res, nil } diff --git a/autogen/go/rusk/transfer.mock.go b/autogen/go/rusk/transfer.mock.go index 97925fb..3518b73 100644 --- a/autogen/go/rusk/transfer.mock.go +++ b/autogen/go/rusk/transfer.mock.go @@ -20,8 +20,8 @@ type TransferMock struct{} func (m *TransferMock) NewTransfer(ctx context.Context, req *TransferTransactionRequest) (*Transaction, error) { res := &Transaction{ - Version: 247, - Type: 831, + Version: 255, + Type: 469, } return res, nil } diff --git a/node/node.proto b/node/node.proto index 2912201..11dff63 100644 --- a/node/node.proto +++ b/node/node.proto @@ -31,9 +31,6 @@ service Mempool { service Chain { rpc RebuildChain(EmptyRequest) returns (GenericResponse) {}; -} - -service Synchronizer { rpc GetSyncProgress(EmptyRequest) returns (SyncProgressResponse) {}; }