From 8b5c0413136d21c45ab392c1f4d141a9966310a1 Mon Sep 17 00:00:00 2001 From: Sergey Date: Thu, 11 Jan 2024 21:07:31 +0100 Subject: [PATCH 001/140] Add IdentityRepo client method to coordinator client --- .../coordinatorclient/coordinatorclient.go | 67 ++++++++++++++++--- 1 file changed, 59 insertions(+), 8 deletions(-) diff --git a/coordinator/coordinatorclient/coordinatorclient.go b/coordinator/coordinatorclient/coordinatorclient.go index b975e9cc..ea67c891 100644 --- a/coordinator/coordinatorclient/coordinatorclient.go +++ b/coordinator/coordinatorclient/coordinatorclient.go @@ -9,6 +9,7 @@ import ( "github.com/anyproto/any-sync/app" "github.com/anyproto/any-sync/coordinator/coordinatorproto" + "github.com/anyproto/any-sync/identityrepo/identityrepoproto" "github.com/anyproto/any-sync/net/peer" "github.com/anyproto/any-sync/net/pool" "github.com/anyproto/any-sync/net/rpc/rpcerr" @@ -38,6 +39,9 @@ type CoordinatorClient interface { FileLimitCheck(ctx context.Context, spaceId string, identity []byte) (response *coordinatorproto.FileLimitCheckResponse, err error) NetworkConfiguration(ctx context.Context, currentId string) (*coordinatorproto.NetworkConfigurationResponse, error) DeletionLog(ctx context.Context, lastRecordId string, limit int) (records []*coordinatorproto.DeletionLogRecord, err error) + + IdentityRepoPut(ctx context.Context, identity string, data []*identityrepoproto.Data) (err error) + IdentityRepoGet(ctx context.Context, identities []string, kinds []string) (res []*identityrepoproto.DataWithIdentity, err error) app.Component } @@ -225,19 +229,66 @@ func (c *coordinatorClient) NetworkConfiguration(ctx context.Context, currentId return } +func (c *coordinatorClient) IdentityRepoPut(ctx context.Context, identity string, data []*identityrepoproto.Data) (err error) { + err = c.doIdentityRepoClient(ctx, func(cl identityrepoproto.DRPCIdentityRepoClient) error { + _, err := cl.DataPut(ctx, &identityrepoproto.DataPutRequest{ + Identity: identity, + Data: data, + }) + if err != nil { + return rpcerr.Unwrap(err) + } + return nil + }) + return +} + +func (c *coordinatorClient) IdentityRepoGet(ctx context.Context, identities, kinds []string) (res []*identityrepoproto.DataWithIdentity, err error) { + err = c.doIdentityRepoClient(ctx, func(cl identityrepoproto.DRPCIdentityRepoClient) error { + resp, err := cl.DataPull(ctx, &identityrepoproto.DataPullRequest{ + Identities: identities, + Kinds: kinds, + }) + if err != nil { + return rpcerr.Unwrap(err) + } + res = resp.GetData() + return nil + }) + return +} + func (c *coordinatorClient) doClient(ctx context.Context, f func(cl coordinatorproto.DRPCCoordinatorClient) error) error { - p, err := c.pool.GetOneOf(ctx, c.nodeConf.CoordinatorPeers()) + p, err := c.getPeer(ctx) if err != nil { return err } - pubKey, err := peer.CtxPubKey(p.Context()) - if err != nil { - return ErrPubKeyMissing - } - if pubKey.Network() != c.nodeConf.Configuration().NetworkId { - return ErrNetworkMismatched - } return p.DoDrpc(ctx, func(conn drpc.Conn) error { return f(coordinatorproto.NewDRPCCoordinatorClient(conn)) }) } + +func (c *coordinatorClient) doIdentityRepoClient(ctx context.Context, f func(cl identityrepoproto.DRPCIdentityRepoClient) error) error { + p, err := c.getPeer(ctx) + if err != nil { + return err + } + return p.DoDrpc(ctx, func(conn drpc.Conn) error { + return f(identityrepoproto.NewDRPCIdentityRepoClient(conn)) + }) +} + +func (c *coordinatorClient) getPeer(ctx context.Context) (peer.Peer, error) { + p, err := c.pool.GetOneOf(ctx, c.nodeConf.CoordinatorPeers()) + if err != nil { + return nil, err + } + pubKey, err := peer.CtxPubKey(p.Context()) + if err != nil { + return nil, ErrPubKeyMissing + } + if pubKey.Network() != c.nodeConf.Configuration().NetworkId { + return nil, ErrNetworkMismatched + } + return p, nil +} From 7ce3fbbf87106eadffca13ae113198801f16cab4 Mon Sep 17 00:00:00 2001 From: Sergey Date: Fri, 12 Jan 2024 15:15:27 +0100 Subject: [PATCH 002/140] Generate new coordinator client mock --- .../mock_coordinatorclient.go | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/coordinator/coordinatorclient/mock_coordinatorclient/mock_coordinatorclient.go b/coordinator/coordinatorclient/mock_coordinatorclient/mock_coordinatorclient.go index e59a5e35..dc02bb17 100644 --- a/coordinator/coordinatorclient/mock_coordinatorclient/mock_coordinatorclient.go +++ b/coordinator/coordinatorclient/mock_coordinatorclient/mock_coordinatorclient.go @@ -5,6 +5,7 @@ // // mockgen -destination mock_coordinatorclient/mock_coordinatorclient.go github.com/anyproto/any-sync/coordinator/coordinatorclient CoordinatorClient // + // Package mock_coordinatorclient is a generated GoMock package. package mock_coordinatorclient @@ -15,6 +16,7 @@ import ( app "github.com/anyproto/any-sync/app" coordinatorclient "github.com/anyproto/any-sync/coordinator/coordinatorclient" coordinatorproto "github.com/anyproto/any-sync/coordinator/coordinatorproto" + identityrepoproto "github.com/anyproto/any-sync/identityrepo/identityrepoproto" gomock "go.uber.org/mock/gomock" ) @@ -100,6 +102,35 @@ func (mr *MockCoordinatorClientMockRecorder) FileLimitCheck(arg0, arg1, arg2 any return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FileLimitCheck", reflect.TypeOf((*MockCoordinatorClient)(nil).FileLimitCheck), arg0, arg1, arg2) } +// IdentityRepoGet mocks base method. +func (m *MockCoordinatorClient) IdentityRepoGet(arg0 context.Context, arg1, arg2 []string) ([]*identityrepoproto.DataWithIdentity, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "IdentityRepoGet", arg0, arg1, arg2) + ret0, _ := ret[0].([]*identityrepoproto.DataWithIdentity) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// IdentityRepoGet indicates an expected call of IdentityRepoGet. +func (mr *MockCoordinatorClientMockRecorder) IdentityRepoGet(arg0, arg1, arg2 any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IdentityRepoGet", reflect.TypeOf((*MockCoordinatorClient)(nil).IdentityRepoGet), arg0, arg1, arg2) +} + +// IdentityRepoPut mocks base method. +func (m *MockCoordinatorClient) IdentityRepoPut(arg0 context.Context, arg1 string, arg2 []*identityrepoproto.Data) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "IdentityRepoPut", arg0, arg1, arg2) + ret0, _ := ret[0].(error) + return ret0 +} + +// IdentityRepoPut indicates an expected call of IdentityRepoPut. +func (mr *MockCoordinatorClientMockRecorder) IdentityRepoPut(arg0, arg1, arg2 any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IdentityRepoPut", reflect.TypeOf((*MockCoordinatorClient)(nil).IdentityRepoPut), arg0, arg1, arg2) +} + // Init mocks base method. func (m *MockCoordinatorClient) Init(arg0 *app.App) error { m.ctrl.T.Helper() From 4659755553faac3d9884c99dd9b4dfb78624d479 Mon Sep 17 00:00:00 2001 From: Anton Akentev Date: Tue, 23 Jan 2024 10:45:25 +0000 Subject: [PATCH 003/140] Update protos: nameservice/paymentservice --- .../nameserviceproto/nameservice.pb.go | 145 ++- .../nameserviceproto/protos/nameservice.proto | 25 +- .../mock/mock_paymentserviceclient.go | 28 - .../paymentserviceproto/paymentservice.pb.go | 880 ++++++++++++++++-- .../paymentservice_drpc.pb.go | 42 +- .../protos/.paymentservice.proto.swp | Bin 0 -> 12288 bytes .../protos/paymentservice.proto | 80 +- 7 files changed, 993 insertions(+), 207 deletions(-) create mode 100644 paymentservice/paymentserviceproto/protos/.paymentservice.proto.swp diff --git a/nameservice/nameserviceproto/nameservice.pb.go b/nameservice/nameserviceproto/nameservice.pb.go index 5e2a81cc..6e095710 100644 --- a/nameservice/nameserviceproto/nameservice.pb.go +++ b/nameservice/nameserviceproto/nameservice.pb.go @@ -68,8 +68,9 @@ func (m *NameAvailableRequest) GetFullName() string { } type NameByAddressRequest struct { - // An Ethereum address that owns that name - OwnerEthAddress string `protobuf:"bytes,1,opt,name=ownerEthAddress,proto3" json:"ownerEthAddress,omitempty"` + // EOA -> SCW -> name + // A SCW Ethereum address that owns that name + OwnerScwEthAddress string `protobuf:"bytes,1,opt,name=ownerScwEthAddress,proto3" json:"ownerScwEthAddress,omitempty"` } func (m *NameByAddressRequest) Reset() { *m = NameByAddressRequest{} } @@ -105,27 +106,30 @@ func (m *NameByAddressRequest) XXX_DiscardUnknown() { var xxx_messageInfo_NameByAddressRequest proto.InternalMessageInfo -func (m *NameByAddressRequest) GetOwnerEthAddress() string { +func (m *NameByAddressRequest) GetOwnerScwEthAddress() string { if m != nil { - return m.OwnerEthAddress + return m.OwnerScwEthAddress } return "" } type NameAvailableResponse struct { Available bool `protobuf:"varint,1,opt,name=available,proto3" json:"available,omitempty"` - // An Ethereum address that owns that name + // EOA -> SCW -> name // This field is non-empty only if name is "already registered" - OwnerEthAddress string `protobuf:"bytes,2,opt,name=ownerEthAddress,proto3" json:"ownerEthAddress,omitempty"` + OwnerScwEthAddress string `protobuf:"bytes,2,opt,name=ownerScwEthAddress,proto3" json:"ownerScwEthAddress,omitempty"` + // This field is non-empty only if name is "already registered" + // TODO: + OwnerEthAddress string `protobuf:"bytes,3,opt,name=ownerEthAddress,proto3" json:"ownerEthAddress,omitempty"` // A content hash attached to this name // This field is non-empty only if name is "already registered" - OwnerAnyAddress string `protobuf:"bytes,3,opt,name=ownerAnyAddress,proto3" json:"ownerAnyAddress,omitempty"` + OwnerAnyAddress string `protobuf:"bytes,4,opt,name=ownerAnyAddress,proto3" json:"ownerAnyAddress,omitempty"` // A SpaceID attached to this name // This field is non-empty only if name is "already registered" - SpaceId string `protobuf:"bytes,4,opt,name=spaceId,proto3" json:"spaceId,omitempty"` - // doestn't work with marashalling/unmarshalling + SpaceId string `protobuf:"bytes,5,opt,name=spaceId,proto3" json:"spaceId,omitempty"` + // doesn't work with marashalling/unmarshalling // google.protobuf.Timestamp nameExpires = 5 [(gogoproto.stdtime) = true]; - NameExpires int64 `protobuf:"varint,5,opt,name=nameExpires,proto3" json:"nameExpires,omitempty"` + NameExpires int64 `protobuf:"varint,6,opt,name=nameExpires,proto3" json:"nameExpires,omitempty"` } func (m *NameAvailableResponse) Reset() { *m = NameAvailableResponse{} } @@ -168,6 +172,13 @@ func (m *NameAvailableResponse) GetAvailable() bool { return false } +func (m *NameAvailableResponse) GetOwnerScwEthAddress() string { + if m != nil { + return m.OwnerScwEthAddress + } + return "" +} + func (m *NameAvailableResponse) GetOwnerEthAddress() string { if m != nil { return m.OwnerEthAddress @@ -260,28 +271,29 @@ func init() { } var fileDescriptor_06bca2ea4304f305 = []byte{ - // 330 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x52, 0x31, 0x6f, 0xf2, 0x30, - 0x10, 0x8d, 0x3f, 0xe0, 0x2b, 0x5c, 0x07, 0x2a, 0x0b, 0xaa, 0x08, 0x21, 0x0b, 0x79, 0x62, 0x02, - 0x89, 0xaa, 0x9d, 0x1b, 0x2a, 0x54, 0xb1, 0x74, 0xc8, 0xd8, 0xcd, 0x90, 0x43, 0x45, 0x0a, 0x4e, - 0x1a, 0x07, 0x5a, 0xfe, 0x05, 0x7f, 0xaa, 0x52, 0x47, 0xc6, 0x8e, 0x15, 0xfc, 0x91, 0x0a, 0xc7, - 0x81, 0x90, 0x46, 0x5d, 0x12, 0xdf, 0xf3, 0xbd, 0xbb, 0x77, 0xef, 0x0c, 0xb7, 0x52, 0x2c, 0x50, - 0x61, 0xb4, 0x9a, 0x4f, 0xb1, 0x9f, 0x39, 0x87, 0x51, 0x10, 0x07, 0x7d, 0xfd, 0x55, 0x59, 0xbc, - 0xa7, 0x21, 0x3e, 0x80, 0xc6, 0x93, 0x58, 0xa0, 0xb3, 0x12, 0x73, 0x5f, 0x4c, 0x7c, 0x74, 0xf1, - 0x75, 0x89, 0x2a, 0xa6, 0x2d, 0xa8, 0xce, 0x96, 0xbe, 0x7f, 0xb8, 0xb3, 0x49, 0x87, 0x74, 0x6b, - 0xee, 0x31, 0xe6, 0xf7, 0x09, 0x67, 0xb8, 0x76, 0x3c, 0x2f, 0x42, 0xa5, 0x52, 0x4e, 0x17, 0xea, - 0xc1, 0x9b, 0xc4, 0x68, 0x14, 0xbf, 0x98, 0x1b, 0x43, 0xcd, 0xc3, 0xfc, 0x83, 0x40, 0x33, 0xd7, - 0x56, 0x85, 0x81, 0x54, 0x48, 0xdb, 0x50, 0x13, 0x29, 0xa8, 0xd9, 0x55, 0xf7, 0x04, 0x14, 0x75, - 0xf8, 0x57, 0xd8, 0xe1, 0x98, 0xe9, 0xc8, 0x54, 0xa5, 0x5d, 0xca, 0x64, 0x9e, 0x60, 0x6a, 0xc3, - 0x85, 0x0a, 0xc5, 0x14, 0xc7, 0x9e, 0x5d, 0xd6, 0x19, 0x69, 0x48, 0x3b, 0x70, 0x79, 0x30, 0x6c, - 0xf4, 0x1e, 0xce, 0x23, 0x54, 0x76, 0xa5, 0x43, 0xba, 0x25, 0x37, 0x0b, 0x71, 0x27, 0x19, 0x23, - 0xe3, 0x84, 0x19, 0xa3, 0x01, 0x95, 0x59, 0xb0, 0x94, 0x9e, 0x19, 0x21, 0x09, 0x28, 0x85, 0xf2, - 0x81, 0x6d, 0x34, 0xeb, 0xf3, 0x60, 0x43, 0xa0, 0xe2, 0xc8, 0xb5, 0x54, 0x74, 0x08, 0xf5, 0xb1, - 0x3a, 0x73, 0x85, 0x36, 0x7b, 0x45, 0xcb, 0x69, 0x5d, 0xf7, 0x0a, 0xcd, 0xe3, 0x16, 0x7d, 0x80, - 0xab, 0x47, 0x8c, 0xcf, 0x34, 0x99, 0x22, 0xf9, 0x6d, 0x99, 0x22, 0xbf, 0xa4, 0x73, 0x6b, 0x78, - 0xf7, 0xb9, 0x63, 0x64, 0xbb, 0x63, 0xe4, 0x7b, 0xc7, 0xc8, 0x66, 0xcf, 0xac, 0xed, 0x9e, 0x59, - 0x5f, 0x7b, 0x66, 0x3d, 0xb7, 0xff, 0x7a, 0x64, 0x93, 0xff, 0xfa, 0x77, 0xf3, 0x13, 0x00, 0x00, - 0xff, 0xff, 0xe0, 0x5b, 0xc6, 0xb3, 0x8b, 0x02, 0x00, 0x00, + // 343 bytes of a gzipped FileDescri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 0xda, 0x82, 0x8a, 0x44, 0x35, 0x72, 0x4e, 0x92, 0x4f, 0xe1, + 0x3d, 0xd3, 0xe5, 0xa9, 0x36, 0x33, 0xaf, 0x31, 0x0f, 0x30, 0x35, 0xe1, 0x52, 0x44, 0x6c, 0x88, + 0x7d, 0xdf, 0x2c, 0x48, 0x46, 0x1a, 0xd2, 0x26, 0x5c, 0x6d, 0x6d, 0xee, 0x7d, 0x44, 0xe3, 0x18, + 0x85, 0x59, 0x6c, 0x92, 0x56, 0xce, 0xd3, 0x21, 0xdb, 0xdd, 0xc9, 0xd6, 0xfc, 0x53, 0xb2, 0xab, + 0x50, 0x18, 0x85, 0x53, 0xee, 0x2b, 0xc9, 0xbb, 0x80, 0x52, 0xc8, 0x6f, 0xab, 0x95, 0x40, 0x79, + 0xee, 0x2c, 0x09, 0x14, 0x5c, 0xbe, 0xe0, 0x82, 0x76, 0xa1, 0xd2, 0x17, 0x47, 0x2e, 0xd2, 0x9a, + 0x93, 0xb5, 0xd2, 0xfa, 0x8d, 0x93, 0x69, 0xb6, 0x6d, 0xd0, 0x07, 0xb8, 0x7e, 0xc2, 0xe4, 0xe8, + 0x4e, 0xaa, 0xc9, 0xe9, 0x8e, 0x55, 0x93, 0x3f, 0x57, 0xb7, 0x8d, 0xee, 0xfd, 0xe7, 0xda, 0x22, + 0xab, 0xb5, 0x45, 0xbe, 0xd7, 0x16, 0x59, 0x6e, 0x2c, 0x63, 0xb5, 0xb1, 0x8c, 0xaf, 0x8d, 0x65, + 0xbc, 0x36, 0xfe, 0x7b, 0x9a, 0x83, 0xa2, 0xfc, 0xdd, 0xfe, 0x06, 0x00, 0x00, 0xff, 0xff, 0xed, + 0x14, 0xb9, 0xb1, 0xc1, 0x02, 0x00, 0x00, } func (m *NameAvailableRequest) Marshal() (dAtA []byte, err error) { @@ -334,10 +346,10 @@ func (m *NameByAddressRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if len(m.OwnerEthAddress) > 0 { - i -= len(m.OwnerEthAddress) - copy(dAtA[i:], m.OwnerEthAddress) - i = encodeVarintNameservice(dAtA, i, uint64(len(m.OwnerEthAddress))) + if len(m.OwnerScwEthAddress) > 0 { + i -= len(m.OwnerScwEthAddress) + copy(dAtA[i:], m.OwnerScwEthAddress) + i = encodeVarintNameservice(dAtA, i, uint64(len(m.OwnerScwEthAddress))) i-- dAtA[i] = 0xa } @@ -367,27 +379,34 @@ func (m *NameAvailableResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { if m.NameExpires != 0 { i = encodeVarintNameservice(dAtA, i, uint64(m.NameExpires)) i-- - dAtA[i] = 0x28 + dAtA[i] = 0x30 } if len(m.SpaceId) > 0 { i -= len(m.SpaceId) copy(dAtA[i:], m.SpaceId) i = encodeVarintNameservice(dAtA, i, uint64(len(m.SpaceId))) i-- - dAtA[i] = 0x22 + dAtA[i] = 0x2a } if len(m.OwnerAnyAddress) > 0 { i -= len(m.OwnerAnyAddress) copy(dAtA[i:], m.OwnerAnyAddress) i = encodeVarintNameservice(dAtA, i, uint64(len(m.OwnerAnyAddress))) i-- - dAtA[i] = 0x1a + dAtA[i] = 0x22 } if len(m.OwnerEthAddress) > 0 { i -= len(m.OwnerEthAddress) copy(dAtA[i:], m.OwnerEthAddress) i = encodeVarintNameservice(dAtA, i, uint64(len(m.OwnerEthAddress))) i-- + dAtA[i] = 0x1a + } + if len(m.OwnerScwEthAddress) > 0 { + i -= len(m.OwnerScwEthAddress) + copy(dAtA[i:], m.OwnerScwEthAddress) + i = encodeVarintNameservice(dAtA, i, uint64(len(m.OwnerScwEthAddress))) + i-- dAtA[i] = 0x12 } if m.Available { @@ -473,7 +492,7 @@ func (m *NameByAddressRequest) Size() (n int) { } var l int _ = l - l = len(m.OwnerEthAddress) + l = len(m.OwnerScwEthAddress) if l > 0 { n += 1 + l + sovNameservice(uint64(l)) } @@ -489,6 +508,10 @@ func (m *NameAvailableResponse) Size() (n int) { if m.Available { n += 2 } + l = len(m.OwnerScwEthAddress) + if l > 0 { + n += 1 + l + sovNameservice(uint64(l)) + } l = len(m.OwnerEthAddress) if l > 0 { n += 1 + l + sovNameservice(uint64(l)) @@ -642,7 +665,7 @@ func (m *NameByAddressRequest) Unmarshal(dAtA []byte) error { switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OwnerEthAddress", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field OwnerScwEthAddress", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -670,7 +693,7 @@ func (m *NameByAddressRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.OwnerEthAddress = string(dAtA[iNdEx:postIndex]) + m.OwnerScwEthAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -743,6 +766,38 @@ func (m *NameAvailableResponse) Unmarshal(dAtA []byte) error { } m.Available = bool(v != 0) case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OwnerScwEthAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowNameservice + } + 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 ErrInvalidLengthNameservice + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthNameservice + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OwnerScwEthAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field OwnerEthAddress", wireType) } @@ -774,7 +829,7 @@ func (m *NameAvailableResponse) Unmarshal(dAtA []byte) error { } m.OwnerEthAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 3: + case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field OwnerAnyAddress", wireType) } @@ -806,7 +861,7 @@ func (m *NameAvailableResponse) Unmarshal(dAtA []byte) error { } m.OwnerAnyAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 4: + case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field SpaceId", wireType) } @@ -838,7 +893,7 @@ func (m *NameAvailableResponse) Unmarshal(dAtA []byte) error { } m.SpaceId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 5: + case 6: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field NameExpires", wireType) } diff --git a/nameservice/nameserviceproto/protos/nameservice.proto b/nameservice/nameserviceproto/protos/nameservice.proto index 778e46e4..6782c813 100644 --- a/nameservice/nameserviceproto/protos/nameservice.proto +++ b/nameservice/nameserviceproto/protos/nameservice.proto @@ -9,28 +9,33 @@ message NameAvailableRequest { } message NameByAddressRequest { - // An Ethereum address that owns that name - string ownerEthAddress = 1; + // EOA -> SCW -> name + // A SCW Ethereum address that owns that name + string ownerScwEthAddress = 1; } message NameAvailableResponse { bool available = 1; - // An Ethereum address that owns that name + // EOA -> SCW -> name // This field is non-empty only if name is "already registered" - string ownerEthAddress = 2; + string ownerScwEthAddress = 2; + + // This field is non-empty only if name is "already registered" + // TODO: + string ownerEthAddress = 3; // A content hash attached to this name // This field is non-empty only if name is "already registered" - string ownerAnyAddress = 3; + string ownerAnyAddress = 4; // A SpaceID attached to this name // This field is non-empty only if name is "already registered" - string spaceId = 4; + string spaceId = 5; - // doestn't work with marashalling/unmarshalling + // doesn't work with marashalling/unmarshalling //google.protobuf.Timestamp nameExpires = 5 [(gogoproto.stdtime) = true]; - int64 nameExpires = 5; + int64 nameExpires = 6; } message NameByAddressResponse { @@ -40,7 +45,9 @@ message NameByAddressResponse { } service Anyns { - // Check if name is free or get the attached information if not + // Lookup: name -> address rpc IsNameAvailable(NameAvailableRequest) returns (NameAvailableResponse) {} + + // Reverse lookup: address -> name rpc GetNameByAddress(NameByAddressRequest) returns (NameByAddressResponse) {} } diff --git a/paymentservice/paymentserviceclient/mock/mock_paymentserviceclient.go b/paymentservice/paymentserviceclient/mock/mock_paymentserviceclient.go index 97dbf63a..fbebff4d 100644 --- a/paymentservice/paymentserviceclient/mock/mock_paymentserviceclient.go +++ b/paymentservice/paymentserviceclient/mock/mock_paymentserviceclient.go @@ -55,20 +55,6 @@ func (mr *MockAnyPpClientServiceMockRecorder) BuySubscription(ctx, in any) *gomo return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BuySubscription", reflect.TypeOf((*MockAnyPpClientService)(nil).BuySubscription), ctx, in) } -// Close mocks base method. -func (m *MockAnyPpClientService) Close(ctx context.Context) error { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Close", ctx) - ret0, _ := ret[0].(error) - return ret0 -} - -// Close indicates an expected call of Close. -func (mr *MockAnyPpClientServiceMockRecorder) Close(ctx any) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockAnyPpClientService)(nil).Close), ctx) -} - // GetSubscriptionStatus mocks base method. func (m *MockAnyPpClientService) GetSubscriptionStatus(ctx context.Context, in *paymentserviceproto.GetSubscriptionRequestSigned) (*paymentserviceproto.GetSubscriptionResponse, error) { m.ctrl.T.Helper() @@ -111,17 +97,3 @@ func (mr *MockAnyPpClientServiceMockRecorder) Name() *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockAnyPpClientService)(nil).Name)) } - -// Run mocks base method. -func (m *MockAnyPpClientService) Run(ctx context.Context) error { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Run", ctx) - ret0, _ := ret[0].(error) - return ret0 -} - -// Run indicates an expected call of Run. -func (mr *MockAnyPpClientServiceMockRecorder) Run(ctx any) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Run", reflect.TypeOf((*MockAnyPpClientService)(nil).Run), ctx) -} diff --git a/paymentservice/paymentserviceproto/paymentservice.pb.go b/paymentservice/paymentserviceproto/paymentservice.pb.go index d9ecf61c..047a6104 100644 --- a/paymentservice/paymentserviceproto/paymentservice.pb.go +++ b/paymentservice/paymentserviceproto/paymentservice.pb.go @@ -25,24 +25,24 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type SubscriptionTier int32 const ( - SubscriptionTier_Tier_Unknown SubscriptionTier = 0 - SubscriptionTier_Tier_Friend SubscriptionTier = 1 - SubscriptionTier_Tier_Supporter1Year SubscriptionTier = 2 - SubscriptionTier_Tier_Patron1Year SubscriptionTier = 3 + SubscriptionTier_TierUnknown SubscriptionTier = 0 + SubscriptionTier_TierFriend SubscriptionTier = 1 + SubscriptionTier_TierSupporter1Year SubscriptionTier = 2 + SubscriptionTier_TierPatron1Year SubscriptionTier = 3 ) var SubscriptionTier_name = map[int32]string{ - 0: "Tier_Unknown", - 1: "Tier_Friend", - 2: "Tier_Supporter1Year", - 3: "Tier_Patron1Year", + 0: "TierUnknown", + 1: "TierFriend", + 2: "TierSupporter1Year", + 3: "TierPatron1Year", } var SubscriptionTier_value = map[string]int32{ - "Tier_Unknown": 0, - "Tier_Friend": 1, - "Tier_Supporter1Year": 2, - "Tier_Patron1Year": 3, + "TierUnknown": 0, + "TierFriend": 1, + "TierSupporter1Year": 2, + "TierPatron1Year": 3, } func (x SubscriptionTier) String() string { @@ -56,27 +56,24 @@ func (SubscriptionTier) EnumDescriptor() ([]byte, []int) { type SubscriptionStatus int32 const ( - SubscriptionStatus_Status_Unknown SubscriptionStatus = 0 - SubscriptionStatus_Status_Pending SubscriptionStatus = 1 - SubscriptionStatus_Status_Active SubscriptionStatus = 2 - SubscriptionStatus_Status_Expired SubscriptionStatus = 3 - SubscriptionStatus_Status_Canceled SubscriptionStatus = 4 + SubscriptionStatus_StatusUnknown SubscriptionStatus = 0 + // payment is still pending + // this will be the status until the payment is confirmed or N is elapsed and no payment is received + // in the last case the subscription will switch to Status_Unknown or Status_Active + SubscriptionStatus_StatusPending SubscriptionStatus = 1 + SubscriptionStatus_StatusActive SubscriptionStatus = 2 ) var SubscriptionStatus_name = map[int32]string{ - 0: "Status_Unknown", - 1: "Status_Pending", - 2: "Status_Active", - 3: "Status_Expired", - 4: "Status_Canceled", + 0: "StatusUnknown", + 1: "StatusPending", + 2: "StatusActive", } var SubscriptionStatus_value = map[string]int32{ - "Status_Unknown": 0, - "Status_Pending": 1, - "Status_Active": 2, - "Status_Expired": 3, - "Status_Canceled": 4, + "StatusUnknown": 0, + "StatusPending": 1, + "StatusActive": 2, } func (x SubscriptionStatus) String() string { @@ -90,24 +87,24 @@ func (SubscriptionStatus) EnumDescriptor() ([]byte, []int) { type PaymentMethod int32 const ( - PaymentMethod_Method_Card PaymentMethod = 0 - PaymentMethod_Method_Crypto PaymentMethod = 1 - PaymentMethod_Method_ApplePay PaymentMethod = 2 - PaymentMethod_Method_GooglePay PaymentMethod = 3 + PaymentMethod_MethodCard PaymentMethod = 0 + PaymentMethod_MethodCrypto PaymentMethod = 1 + PaymentMethod_MethodApplePay PaymentMethod = 2 + PaymentMethod_MethodGooglePay PaymentMethod = 3 ) var PaymentMethod_name = map[int32]string{ - 0: "Method_Card", - 1: "Method_Crypto", - 2: "Method_ApplePay", - 3: "Method_GooglePay", + 0: "MethodCard", + 1: "MethodCrypto", + 2: "MethodApplePay", + 3: "MethodGooglePay", } var PaymentMethod_value = map[string]int32{ - "Method_Card": 0, - "Method_Crypto": 1, - "Method_ApplePay": 2, - "Method_GooglePay": 3, + "MethodCard": 0, + "MethodCrypto": 1, + "MethodApplePay": 2, + "MethodGooglePay": 3, } func (x PaymentMethod) String() string { @@ -232,6 +229,9 @@ type GetSubscriptionResponse struct { NextTier SubscriptionTier `protobuf:"varint,6,opt,name=nextTier,proto3,enum=SubscriptionTier" json:"nextTier,omitempty"` NextTierEnds uint64 `protobuf:"varint,7,opt,name=nextTierEnds,proto3" json:"nextTierEnds,omitempty"` PaymentMethod PaymentMethod `protobuf:"varint,8,opt,name=paymentMethod,proto3,enum=PaymentMethod" json:"paymentMethod,omitempty"` + // if name was requested - it will be here + // seeBuySubscriptionRequest.requestedAnyName field + RequestedAnyName string `protobuf:"bytes,9,opt,name=requestedAnyName,proto3" json:"requestedAnyName,omitempty"` } func (m *GetSubscriptionResponse) Reset() { *m = GetSubscriptionResponse{} } @@ -271,14 +271,14 @@ func (m *GetSubscriptionResponse) GetTier() SubscriptionTier { if m != nil { return m.Tier } - return SubscriptionTier_Tier_Unknown + return SubscriptionTier_TierUnknown } func (m *GetSubscriptionResponse) GetStatus() SubscriptionStatus { if m != nil { return m.Status } - return SubscriptionStatus_Status_Unknown + return SubscriptionStatus_StatusUnknown } func (m *GetSubscriptionResponse) GetDateStarted() uint64 { @@ -306,7 +306,7 @@ func (m *GetSubscriptionResponse) GetNextTier() SubscriptionTier { if m != nil { return m.NextTier } - return SubscriptionTier_Tier_Unknown + return SubscriptionTier_TierUnknown } func (m *GetSubscriptionResponse) GetNextTierEnds() uint64 { @@ -320,22 +320,31 @@ func (m *GetSubscriptionResponse) GetPaymentMethod() PaymentMethod { if m != nil { return m.PaymentMethod } - return PaymentMethod_Method_Card + return PaymentMethod_MethodCard +} + +func (m *GetSubscriptionResponse) GetRequestedAnyName() string { + if m != nil { + return m.RequestedAnyName + } + return "" } // 2 type BuySubscriptionRequest struct { // in the following format: "12D3KooWA8EXV3KjBxEU5EnsPfneLx84vMWAtTBQBeyooN82KSuS" - OwnerAnyID string `protobuf:"bytes,1,opt,name=ownerAnyID,proto3" json:"ownerAnyID,omitempty"` - // this is the owner's ETH main EOA (External Owned Account) address - // - // not AccountAbstraction's SCW (Smart Contract Wallet) address! - // + OwnerAnyId string `protobuf:"bytes,1,opt,name=ownerAnyId,proto3" json:"ownerAnyId,omitempty"` + // this is the owner's ETH main EOA (Externally Owned Account) address + // not AccountAbstraction's SCW (Smart Contract Wallet) address! + // this is required to reserve a name for the owner (later that is done by user) // in the following format: "0x7a250d5630b4cf539739df2c5dacb4c659f2488d" - // this is required to reserve a name for the owner OwnerEthAddress string `protobuf:"bytes,2,opt,name=ownerEthAddress,proto3" json:"ownerEthAddress,omitempty"` RequestedTier SubscriptionTier `protobuf:"varint,3,opt,name=requestedTier,proto3,enum=SubscriptionTier" json:"requestedTier,omitempty"` PaymentMethod PaymentMethod `protobuf:"varint,4,opt,name=paymentMethod,proto3,enum=PaymentMethod" json:"paymentMethod,omitempty"` + // this is just to store the requested name in the DB + // and then you will be able to retrieve it via GetSubscriptionRequest + // PP won't register the name in NS! + RequestedAnyName string `protobuf:"bytes,5,opt,name=requestedAnyName,proto3" json:"requestedAnyName,omitempty"` } func (m *BuySubscriptionRequest) Reset() { *m = BuySubscriptionRequest{} } @@ -371,9 +380,9 @@ func (m *BuySubscriptionRequest) XXX_DiscardUnknown() { var xxx_messageInfo_BuySubscriptionRequest proto.InternalMessageInfo -func (m *BuySubscriptionRequest) GetOwnerAnyID() string { +func (m *BuySubscriptionRequest) GetOwnerAnyId() string { if m != nil { - return m.OwnerAnyID + return m.OwnerAnyId } return "" } @@ -389,14 +398,21 @@ func (m *BuySubscriptionRequest) GetRequestedTier() SubscriptionTier { if m != nil { return m.RequestedTier } - return SubscriptionTier_Tier_Unknown + return SubscriptionTier_TierUnknown } func (m *BuySubscriptionRequest) GetPaymentMethod() PaymentMethod { if m != nil { return m.PaymentMethod } - return PaymentMethod_Method_Card + return PaymentMethod_MethodCard +} + +func (m *BuySubscriptionRequest) GetRequestedAnyName() string { + if m != nil { + return m.RequestedAnyName + } + return "" } type BuySubscriptionRequestSigned struct { @@ -499,6 +515,151 @@ func (m *BuySubscriptionResponse) GetPaymentUrl() string { return "" } +type GetSubscriptionPortalLinkRequest struct { + // in the following format: "12D3KooWA8EXV3KjBxEU5EnsPfneLx84vMWAtTBQBeyooN82KSuS" + OwnerAnyId string `protobuf:"bytes,1,opt,name=ownerAnyId,proto3" json:"ownerAnyId,omitempty"` +} + +func (m *GetSubscriptionPortalLinkRequest) Reset() { *m = GetSubscriptionPortalLinkRequest{} } +func (m *GetSubscriptionPortalLinkRequest) String() string { return proto.CompactTextString(m) } +func (*GetSubscriptionPortalLinkRequest) ProtoMessage() {} +func (*GetSubscriptionPortalLinkRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_4feb29dcc5ba50f6, []int{6} +} +func (m *GetSubscriptionPortalLinkRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GetSubscriptionPortalLinkRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GetSubscriptionPortalLinkRequest.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 *GetSubscriptionPortalLinkRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetSubscriptionPortalLinkRequest.Merge(m, src) +} +func (m *GetSubscriptionPortalLinkRequest) XXX_Size() int { + return m.Size() +} +func (m *GetSubscriptionPortalLinkRequest) XXX_DiscardUnknown() { + xxx_messageInfo_GetSubscriptionPortalLinkRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_GetSubscriptionPortalLinkRequest proto.InternalMessageInfo + +func (m *GetSubscriptionPortalLinkRequest) GetOwnerAnyId() string { + if m != nil { + return m.OwnerAnyId + } + return "" +} + +type GetSubscriptionPortalLinkRequestSigned struct { + // GetSubscriptionPortalLinkRequest + Payload []byte `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"` + // this is payload signed with payload.ownerAnyID + Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` +} + +func (m *GetSubscriptionPortalLinkRequestSigned) Reset() { + *m = GetSubscriptionPortalLinkRequestSigned{} +} +func (m *GetSubscriptionPortalLinkRequestSigned) String() string { return proto.CompactTextString(m) } +func (*GetSubscriptionPortalLinkRequestSigned) ProtoMessage() {} +func (*GetSubscriptionPortalLinkRequestSigned) Descriptor() ([]byte, []int) { + return fileDescriptor_4feb29dcc5ba50f6, []int{7} +} +func (m *GetSubscriptionPortalLinkRequestSigned) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GetSubscriptionPortalLinkRequestSigned) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GetSubscriptionPortalLinkRequestSigned.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 *GetSubscriptionPortalLinkRequestSigned) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetSubscriptionPortalLinkRequestSigned.Merge(m, src) +} +func (m *GetSubscriptionPortalLinkRequestSigned) XXX_Size() int { + return m.Size() +} +func (m *GetSubscriptionPortalLinkRequestSigned) XXX_DiscardUnknown() { + xxx_messageInfo_GetSubscriptionPortalLinkRequestSigned.DiscardUnknown(m) +} + +var xxx_messageInfo_GetSubscriptionPortalLinkRequestSigned proto.InternalMessageInfo + +func (m *GetSubscriptionPortalLinkRequestSigned) GetPayload() []byte { + if m != nil { + return m.Payload + } + return nil +} + +func (m *GetSubscriptionPortalLinkRequestSigned) GetSignature() []byte { + if m != nil { + return m.Signature + } + return nil +} + +type GetSubscriptionPortalLinkResponse struct { + PortalUrl string `protobuf:"bytes,1,opt,name=portalUrl,proto3" json:"portalUrl,omitempty"` +} + +func (m *GetSubscriptionPortalLinkResponse) Reset() { *m = GetSubscriptionPortalLinkResponse{} } +func (m *GetSubscriptionPortalLinkResponse) String() string { return proto.CompactTextString(m) } +func (*GetSubscriptionPortalLinkResponse) ProtoMessage() {} +func (*GetSubscriptionPortalLinkResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_4feb29dcc5ba50f6, []int{8} +} +func (m *GetSubscriptionPortalLinkResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GetSubscriptionPortalLinkResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GetSubscriptionPortalLinkResponse.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 *GetSubscriptionPortalLinkResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetSubscriptionPortalLinkResponse.Merge(m, src) +} +func (m *GetSubscriptionPortalLinkResponse) XXX_Size() int { + return m.Size() +} +func (m *GetSubscriptionPortalLinkResponse) XXX_DiscardUnknown() { + xxx_messageInfo_GetSubscriptionPortalLinkResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_GetSubscriptionPortalLinkResponse proto.InternalMessageInfo + +func (m *GetSubscriptionPortalLinkResponse) GetPortalUrl() string { + if m != nil { + return m.PortalUrl + } + return "" +} + func init() { proto.RegisterEnum("SubscriptionTier", SubscriptionTier_name, SubscriptionTier_value) proto.RegisterEnum("SubscriptionStatus", SubscriptionStatus_name, SubscriptionStatus_value) @@ -509,6 +670,9 @@ func init() { proto.RegisterType((*BuySubscriptionRequest)(nil), "BuySubscriptionRequest") proto.RegisterType((*BuySubscriptionRequestSigned)(nil), "BuySubscriptionRequestSigned") proto.RegisterType((*BuySubscriptionResponse)(nil), "BuySubscriptionResponse") + proto.RegisterType((*GetSubscriptionPortalLinkRequest)(nil), "GetSubscriptionPortalLinkRequest") + proto.RegisterType((*GetSubscriptionPortalLinkRequestSigned)(nil), "GetSubscriptionPortalLinkRequestSigned") + proto.RegisterType((*GetSubscriptionPortalLinkResponse)(nil), "GetSubscriptionPortalLinkResponse") } func init() { @@ -516,48 +680,52 @@ func init() { } var fileDescriptor_4feb29dcc5ba50f6 = []byte{ - // 647 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x94, 0x51, 0x4b, 0x1b, 0x4b, - 0x14, 0xc7, 0x77, 0x93, 0x5c, 0x8d, 0x47, 0x93, 0xac, 0xa3, 0x57, 0x17, 0xd1, 0x25, 0x2c, 0x5c, - 0x08, 0x5e, 0xee, 0xca, 0xb5, 0x85, 0xb6, 0x50, 0x0a, 0xd1, 0x5a, 0x29, 0xb4, 0x10, 0x36, 0x55, - 0x68, 0x1f, 0x2a, 0x6b, 0xe6, 0x10, 0x97, 0xa6, 0x33, 0xdb, 0x99, 0x59, 0x75, 0xbf, 0x45, 0x3f, - 0x4e, 0x3f, 0x42, 0x1f, 0xed, 0x4b, 0xe9, 0x63, 0xd1, 0x2f, 0x52, 0x76, 0x76, 0xa3, 0x9b, 0xc4, - 0xd8, 0xd2, 0xbe, 0xec, 0xce, 0xf9, 0x9d, 0x33, 0xff, 0x99, 0xff, 0xcc, 0x61, 0xe0, 0x49, 0x14, - 0x24, 0xef, 0x91, 0x29, 0x89, 0xe2, 0x34, 0xec, 0xe1, 0xd6, 0x68, 0x18, 0x09, 0xae, 0xf8, 0x96, - 0xfe, 0xca, 0xb1, 0x94, 0xa7, 0xa9, 0xfb, 0x10, 0x56, 0xf6, 0x51, 0x75, 0xe3, 0x63, 0xd9, 0x13, - 0x61, 0xa4, 0x42, 0xce, 0x7c, 0xfc, 0x10, 0xa3, 0x54, 0xc4, 0x01, 0xe0, 0x67, 0x0c, 0x45, 0x9b, - 0x25, 0xcf, 0x9f, 0xda, 0x66, 0xd3, 0x6c, 0xcd, 0xf9, 0x05, 0xe2, 0x1e, 0xc2, 0xfa, 0xed, 0x33, - 0xbb, 0x61, 0x9f, 0x21, 0x25, 0x36, 0xcc, 0x46, 0x41, 0x32, 0xe0, 0x01, 0xd5, 0x93, 0x17, 0xfc, - 0x61, 0x48, 0xd6, 0x61, 0x4e, 0x86, 0x7d, 0x16, 0xa8, 0x58, 0xa0, 0x5d, 0xd2, 0xb9, 0x1b, 0xe0, - 0x7e, 0x2d, 0xc1, 0xea, 0x84, 0xb0, 0x8c, 0x38, 0x93, 0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x04, 0xab, 0x13, 0xba, 0x79, 0x0f, 0x3a, 0x00, 0xf9, 0x1e, 0x0e, 0xc4, 0x60, 0x78, 0x56, 0x37, - 0x64, 0x93, 0x82, 0x35, 0xee, 0x95, 0x58, 0xb0, 0x90, 0xfe, 0x8f, 0x0e, 0xd8, 0x3b, 0xc6, 0xcf, - 0x98, 0x65, 0x90, 0x06, 0xcc, 0x6b, 0xf2, 0x4c, 0x84, 0xc8, 0xa8, 0x65, 0x92, 0x55, 0x58, 0xd2, - 0xa0, 0x1b, 0x47, 0x11, 0x17, 0x0a, 0xc5, 0xff, 0xaf, 0x31, 0x10, 0x56, 0x89, 0x2c, 0x83, 0xa5, - 0x13, 0x9d, 0x40, 0x09, 0xce, 0x32, 0x5a, 0xde, 0x3c, 0x07, 0x32, 0xd9, 0xd3, 0x84, 0x40, 0x3d, - 0x1b, 0x15, 0x56, 0xba, 0x61, 0x1d, 0x64, 0x34, 0x64, 0x7d, 0xcb, 0x24, 0x8b, 0x50, 0xcb, 0x59, - 0xbb, 0xa7, 0xc2, 0x53, 0xb4, 0x4a, 0x85, 0xb2, 0xbd, 0xf3, 0x28, 0x14, 0x48, 0xad, 0x32, 0x59, - 0x82, 0x46, 0xce, 0x76, 0x03, 0xd6, 0xc3, 0x01, 0x52, 0xab, 0xb2, 0xf9, 0x16, 0x6a, 0x23, 0x57, - 0x92, 0x5a, 0xc9, 0x46, 0x47, 0xbb, 0x81, 0xa0, 0x96, 0x91, 0xaa, 0x0f, 0x81, 0x48, 0x22, 0xc5, - 0x2d, 0x33, 0x55, 0xca, 0x51, 0x3b, 0x8a, 0x06, 0xd8, 0x09, 0x92, 0xcc, 0x59, 0x0e, 0xf7, 0x39, - 0xef, 0x67, 0xb4, 0xbc, 0xfd, 0xc9, 0x84, 0xe5, 0x36, 0x4b, 0xf2, 0x35, 0x3a, 0x82, 0xf7, 0x50, - 0xca, 0x90, 0xf5, 0x89, 0x0f, 0x7f, 0x8f, 0xbd, 0x0b, 0xb9, 0xeb, 0x0d, 0xef, 0xae, 0x87, 0x68, - 0xcd, 0xf6, 0xa6, 0x3c, 0x27, 0xae, 0x41, 0x5e, 0x40, 0x63, 0xec, 0x9e, 0xc9, 0x86, 0x77, 0x57, - 0x47, 0xad, 0xd9, 0xde, 0x94, 0xc6, 0x70, 0x8d, 0x9d, 0xc7, 0x9f, 0x2f, 0x1d, 0xf3, 0xe2, 0xd2, - 0x31, 0xbf, 0x5f, 0x3a, 0xe6, 0xc7, 0x2b, 0xc7, 0xb8, 0xb8, 0x72, 0x8c, 0x6f, 0x57, 0x8e, 0xf1, - 0xc6, 0xfd, 0xf9, 0x33, 0x7d, 0x3c, 0xa3, 0x7f, 0xf7, 0x7e, 0x04, 0x00, 0x00, 0xff, 0xff, 0xda, - 0x2c, 0x8d, 0x51, 0xd3, 0x05, 0x00, 0x00, + // 707 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x95, 0x5f, 0x4f, 0xd3, 0x5e, + 0x18, 0xc7, 0xdb, 0x6d, 0xc0, 0xf6, 0xc0, 0xb6, 0x72, 0xf8, 0xfd, 0xa0, 0x2e, 0xa3, 0x99, 0x4d, + 0xd4, 0x65, 0xc6, 0x12, 0xd1, 0x44, 0x4d, 0x8c, 0x49, 0x51, 0x24, 0x26, 0x68, 0x96, 0x4e, 0x48, + 0xe4, 0x8a, 0xb2, 0x9e, 0x8c, 0xca, 0x38, 0xa7, 0x9e, 0x73, 0x0a, 0xf6, 0xd6, 0x57, 0xe0, 0x8b, + 0xf0, 0xc5, 0x78, 0xc9, 0xa5, 0x97, 0x06, 0x5e, 0x87, 0x89, 0xe9, 0x69, 0xd9, 0x5f, 0xc6, 0x88, + 0xdc, 0xac, 0x7d, 0x3e, 0xe7, 0x39, 0xcf, 0x9f, 0xf3, 0x7c, 0x7b, 0x06, 0xaf, 0x02, 0x37, 0x3a, + 0xc6, 0x44, 0x70, 0xcc, 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 0x89, 0x4a, 0x40, 0x0f, 0xac, 0x9b, 0xe9, 0xb0, 0x62, 0x5a, + 0x53, 0xe5, 0x64, 0x2a, 0x1b, 0x2f, 0x7f, 0x9e, 0x1b, 0xea, 0xd9, 0xb9, 0xa1, 0xfe, 0x3e, 0x37, + 0xd4, 0xef, 0x17, 0x86, 0x72, 0x76, 0x61, 0x28, 0xbf, 0x2e, 0x0c, 0x65, 0xcf, 0x9c, 0xfe, 0xff, + 0x78, 0x30, 0x2b, 0x1f, 0x4f, 0xfe, 0x06, 0x00, 0x00, 0xff, 0xff, 0x5d, 0xde, 0x71, 0x1b, 0x4c, + 0x07, 0x00, 0x00, } func (m *GetSubscriptionRequest) Marshal() (dAtA []byte, err error) { @@ -647,6 +815,13 @@ func (m *GetSubscriptionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) _ = i var l int _ = l + if len(m.RequestedAnyName) > 0 { + i -= len(m.RequestedAnyName) + copy(dAtA[i:], m.RequestedAnyName) + i = encodeVarintPaymentservice(dAtA, i, uint64(len(m.RequestedAnyName))) + i-- + dAtA[i] = 0x4a + } if m.PaymentMethod != 0 { i = encodeVarintPaymentservice(dAtA, i, uint64(m.PaymentMethod)) i-- @@ -715,6 +890,13 @@ func (m *BuySubscriptionRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) _ = i var l int _ = l + if len(m.RequestedAnyName) > 0 { + i -= len(m.RequestedAnyName) + copy(dAtA[i:], m.RequestedAnyName) + i = encodeVarintPaymentservice(dAtA, i, uint64(len(m.RequestedAnyName))) + i-- + dAtA[i] = 0x2a + } if m.PaymentMethod != 0 { i = encodeVarintPaymentservice(dAtA, i, uint64(m.PaymentMethod)) i-- @@ -732,10 +914,10 @@ func (m *BuySubscriptionRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) i-- dAtA[i] = 0x12 } - if len(m.OwnerAnyID) > 0 { - i -= len(m.OwnerAnyID) - copy(dAtA[i:], m.OwnerAnyID) - i = encodeVarintPaymentservice(dAtA, i, uint64(len(m.OwnerAnyID))) + if len(m.OwnerAnyId) > 0 { + i -= len(m.OwnerAnyId) + copy(dAtA[i:], m.OwnerAnyId) + i = encodeVarintPaymentservice(dAtA, i, uint64(len(m.OwnerAnyId))) i-- dAtA[i] = 0xa } @@ -809,6 +991,103 @@ func (m *BuySubscriptionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) return len(dAtA) - i, nil } +func (m *GetSubscriptionPortalLinkRequest) 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 *GetSubscriptionPortalLinkRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetSubscriptionPortalLinkRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.OwnerAnyId) > 0 { + i -= len(m.OwnerAnyId) + copy(dAtA[i:], m.OwnerAnyId) + i = encodeVarintPaymentservice(dAtA, i, uint64(len(m.OwnerAnyId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *GetSubscriptionPortalLinkRequestSigned) 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 *GetSubscriptionPortalLinkRequestSigned) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetSubscriptionPortalLinkRequestSigned) 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 = encodeVarintPaymentservice(dAtA, i, uint64(len(m.Signature))) + i-- + dAtA[i] = 0x12 + } + if len(m.Payload) > 0 { + i -= len(m.Payload) + copy(dAtA[i:], m.Payload) + i = encodeVarintPaymentservice(dAtA, i, uint64(len(m.Payload))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *GetSubscriptionPortalLinkResponse) 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 *GetSubscriptionPortalLinkResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetSubscriptionPortalLinkResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.PortalUrl) > 0 { + i -= len(m.PortalUrl) + copy(dAtA[i:], m.PortalUrl) + i = encodeVarintPaymentservice(dAtA, i, uint64(len(m.PortalUrl))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func encodeVarintPaymentservice(dAtA []byte, offset int, v uint64) int { offset -= sovPaymentservice(v) base := offset @@ -880,6 +1159,10 @@ func (m *GetSubscriptionResponse) Size() (n int) { if m.PaymentMethod != 0 { n += 1 + sovPaymentservice(uint64(m.PaymentMethod)) } + l = len(m.RequestedAnyName) + if l > 0 { + n += 1 + l + sovPaymentservice(uint64(l)) + } return n } @@ -889,7 +1172,7 @@ func (m *BuySubscriptionRequest) Size() (n int) { } var l int _ = l - l = len(m.OwnerAnyID) + l = len(m.OwnerAnyId) if l > 0 { n += 1 + l + sovPaymentservice(uint64(l)) } @@ -903,6 +1186,10 @@ func (m *BuySubscriptionRequest) Size() (n int) { if m.PaymentMethod != 0 { n += 1 + sovPaymentservice(uint64(m.PaymentMethod)) } + l = len(m.RequestedAnyName) + if l > 0 { + n += 1 + l + sovPaymentservice(uint64(l)) + } return n } @@ -936,6 +1223,49 @@ func (m *BuySubscriptionResponse) Size() (n int) { return n } +func (m *GetSubscriptionPortalLinkRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.OwnerAnyId) + if l > 0 { + n += 1 + l + sovPaymentservice(uint64(l)) + } + return n +} + +func (m *GetSubscriptionPortalLinkRequestSigned) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Payload) + if l > 0 { + n += 1 + l + sovPaymentservice(uint64(l)) + } + l = len(m.Signature) + if l > 0 { + n += 1 + l + sovPaymentservice(uint64(l)) + } + return n +} + +func (m *GetSubscriptionPortalLinkResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.PortalUrl) + if l > 0 { + n += 1 + l + sovPaymentservice(uint64(l)) + } + return n +} + func sovPaymentservice(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -1324,6 +1654,38 @@ func (m *GetSubscriptionResponse) Unmarshal(dAtA []byte) error { break } } + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RequestedAnyName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPaymentservice + } + 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 ErrInvalidLengthPaymentservice + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPaymentservice + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RequestedAnyName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipPaymentservice(dAtA[iNdEx:]) @@ -1376,7 +1738,7 @@ func (m *BuySubscriptionRequest) Unmarshal(dAtA []byte) error { switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OwnerAnyID", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field OwnerAnyId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -1404,7 +1766,7 @@ func (m *BuySubscriptionRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.OwnerAnyID = string(dAtA[iNdEx:postIndex]) + m.OwnerAnyId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { @@ -1476,6 +1838,38 @@ func (m *BuySubscriptionRequest) Unmarshal(dAtA []byte) error { break } } + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RequestedAnyName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPaymentservice + } + 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 ErrInvalidLengthPaymentservice + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPaymentservice + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RequestedAnyName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipPaymentservice(dAtA[iNdEx:]) @@ -1697,6 +2091,288 @@ func (m *BuySubscriptionResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *GetSubscriptionPortalLinkRequest) 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 ErrIntOverflowPaymentservice + } + 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: GetSubscriptionPortalLinkRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetSubscriptionPortalLinkRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OwnerAnyId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPaymentservice + } + 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 ErrInvalidLengthPaymentservice + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPaymentservice + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OwnerAnyId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipPaymentservice(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthPaymentservice + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetSubscriptionPortalLinkRequestSigned) 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 ErrIntOverflowPaymentservice + } + 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: GetSubscriptionPortalLinkRequestSigned: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetSubscriptionPortalLinkRequestSigned: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPaymentservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthPaymentservice + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthPaymentservice + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Payload = append(m.Payload[:0], dAtA[iNdEx:postIndex]...) + if m.Payload == nil { + m.Payload = []byte{} + } + iNdEx = postIndex + case 2: + 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 ErrIntOverflowPaymentservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthPaymentservice + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthPaymentservice + } + 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 := skipPaymentservice(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthPaymentservice + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetSubscriptionPortalLinkResponse) 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 ErrIntOverflowPaymentservice + } + 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: GetSubscriptionPortalLinkResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetSubscriptionPortalLinkResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PortalUrl", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPaymentservice + } + 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 ErrInvalidLengthPaymentservice + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPaymentservice + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PortalUrl = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipPaymentservice(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthPaymentservice + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipPaymentservice(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/paymentservice/paymentserviceproto/paymentservice_drpc.pb.go b/paymentservice/paymentserviceproto/paymentservice_drpc.pb.go index f4105fb3..bef30a6a 100644 --- a/paymentservice/paymentserviceproto/paymentservice_drpc.pb.go +++ b/paymentservice/paymentserviceproto/paymentservice_drpc.pb.go @@ -42,6 +42,7 @@ type DRPCAnyPaymentProcessingClient interface { GetSubscriptionStatus(ctx context.Context, in *GetSubscriptionRequestSigned) (*GetSubscriptionResponse, error) BuySubscription(ctx context.Context, in *BuySubscriptionRequestSigned) (*BuySubscriptionResponse, error) + GetSubscriptionPortalLink(ctx context.Context, in *GetSubscriptionPortalLinkRequestSigned) (*GetSubscriptionPortalLinkResponse, error) } type drpcAnyPaymentProcessingClient struct { @@ -72,9 +73,19 @@ func (c *drpcAnyPaymentProcessingClient) BuySubscription(ctx context.Context, in return out, nil } +func (c *drpcAnyPaymentProcessingClient) GetSubscriptionPortalLink(ctx context.Context, in *GetSubscriptionPortalLinkRequestSigned) (*GetSubscriptionPortalLinkResponse, error) { + out := new(GetSubscriptionPortalLinkResponse) + err := c.cc.Invoke(ctx, "/AnyPaymentProcessing/GetSubscriptionPortalLink", drpcEncoding_File_paymentservice_paymentserviceproto_protos_paymentservice_proto{}, in, out) + if err != nil { + return nil, err + } + return out, nil +} + type DRPCAnyPaymentProcessingServer interface { GetSubscriptionStatus(context.Context, *GetSubscriptionRequestSigned) (*GetSubscriptionResponse, error) BuySubscription(context.Context, *BuySubscriptionRequestSigned) (*BuySubscriptionResponse, error) + GetSubscriptionPortalLink(context.Context, *GetSubscriptionPortalLinkRequestSigned) (*GetSubscriptionPortalLinkResponse, error) } type DRPCAnyPaymentProcessingUnimplementedServer struct{} @@ -87,9 +98,13 @@ func (s *DRPCAnyPaymentProcessingUnimplementedServer) BuySubscription(context.Co return nil, drpcerr.WithCode(errors.New("Unimplemented"), drpcerr.Unimplemented) } +func (s *DRPCAnyPaymentProcessingUnimplementedServer) GetSubscriptionPortalLink(context.Context, *GetSubscriptionPortalLinkRequestSigned) (*GetSubscriptionPortalLinkResponse, error) { + return nil, drpcerr.WithCode(errors.New("Unimplemented"), drpcerr.Unimplemented) +} + type DRPCAnyPaymentProcessingDescription struct{} -func (DRPCAnyPaymentProcessingDescription) NumMethods() int { return 2 } +func (DRPCAnyPaymentProcessingDescription) NumMethods() int { return 3 } func (DRPCAnyPaymentProcessingDescription) Method(n int) (string, drpc.Encoding, drpc.Receiver, interface{}, bool) { switch n { @@ -111,6 +126,15 @@ func (DRPCAnyPaymentProcessingDescription) Method(n int) (string, drpc.Encoding, in1.(*BuySubscriptionRequestSigned), ) }, DRPCAnyPaymentProcessingServer.BuySubscription, true + case 2: + return "/AnyPaymentProcessing/GetSubscriptionPortalLink", drpcEncoding_File_paymentservice_paymentserviceproto_protos_paymentservice_proto{}, + func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) { + return srv.(DRPCAnyPaymentProcessingServer). + GetSubscriptionPortalLink( + ctx, + in1.(*GetSubscriptionPortalLinkRequestSigned), + ) + }, DRPCAnyPaymentProcessingServer.GetSubscriptionPortalLink, true default: return "", nil, nil, nil, false } @@ -151,3 +175,19 @@ func (x *drpcAnyPaymentProcessing_BuySubscriptionStream) SendAndClose(m *BuySubs } return x.CloseSend() } + +type DRPCAnyPaymentProcessing_GetSubscriptionPortalLinkStream interface { + drpc.Stream + SendAndClose(*GetSubscriptionPortalLinkResponse) error +} + +type drpcAnyPaymentProcessing_GetSubscriptionPortalLinkStream struct { + drpc.Stream +} + +func (x *drpcAnyPaymentProcessing_GetSubscriptionPortalLinkStream) SendAndClose(m *GetSubscriptionPortalLinkResponse) error { + if err := x.MsgSend(m, drpcEncoding_File_paymentservice_paymentserviceproto_protos_paymentservice_proto{}); err != nil { + return err + } + return x.CloseSend() +} diff --git a/paymentservice/paymentserviceproto/protos/.paymentservice.proto.swp b/paymentservice/paymentserviceproto/protos/.paymentservice.proto.swp new file mode 100644 index 0000000000000000000000000000000000000000..8096755cbda200881188005aad860090fa642c61 GIT binary patch literal 12288 zcmeI2O>87b6~`-CAR!?TB@ze;#M_C)+9LMYGai4foG@OS&1z$NvSY`I5VC5zYdjtI zbT!@8wugx1kVRbK0sfO>TUt zt^IkntE;PC{p)@7>{e&y@hcm&I9(I?xmSp}-`-GvdHLMApDYMrbTl|nk>OkK_S1~e zGo9Ly-m2CIQ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4dG-M!xCwiTb&I_g9GSEFNp;RMUno(>JXr+5 z$lIF>xfF%p>v0XqM=HV?CFG`Atve%75L`v9a@3^GEl(l}?+JXUn}g8PQ8!5XhzAU| z$t^0BF~0|Mxki2%>6<7|VQqPe8@b^kId<#2Y0ZVDC)$lhg)_czBTi9!Eol-R%|59l zhl-6*+uqLNSR-ze;+EYrd+T#}ae%E>R!nZ&-hE!~!n0PZL7zvZii>=AlpT>@wci;y z@?A2hT;!tR5(P9VG6C Date: Wed, 24 Jan 2024 21:36:36 +0000 Subject: [PATCH 004/140] Split GetDataNameRegister and GetDataNameRegisterForSpace; Test tiers --- .../nameserviceproto/nameservice.pb.go | 1 - .../nameserviceproto/nameservice_aa.pb.go | 384 +++++++++++++++--- .../nameservice_aa_drpc.pb.go | 42 +- .../nameserviceproto/protos/nameservice.proto | 1 - .../protos/nameservice_aa.proto | 25 ++ .../mock/mock_paymentserviceclient.go | 15 + .../paymentserviceclient.go | 11 + .../paymentserviceproto/paymentservice.pb.go | 123 +++--- .../protos/.paymentservice.proto.swp | Bin 12288 -> 0 bytes .../protos/paymentservice.proto | 17 +- 10 files changed, 502 insertions(+), 117 deletions(-) delete mode 100644 paymentservice/paymentserviceproto/protos/.paymentservice.proto.swp diff --git a/nameservice/nameserviceproto/nameservice.pb.go b/nameservice/nameserviceproto/nameservice.pb.go index 6e095710..28b6a4e5 100644 --- a/nameservice/nameserviceproto/nameservice.pb.go +++ b/nameservice/nameserviceproto/nameservice.pb.go @@ -119,7 +119,6 @@ type NameAvailableResponse struct { // This field is non-empty only if name is "already registered" OwnerScwEthAddress string `protobuf:"bytes,2,opt,name=ownerScwEthAddress,proto3" json:"ownerScwEthAddress,omitempty"` // This field is non-empty only if name is "already registered" - // TODO: OwnerEthAddress string `protobuf:"bytes,3,opt,name=ownerEthAddress,proto3" json:"ownerEthAddress,omitempty"` // A content hash attached to this name // This field is non-empty only if name is "already registered" diff --git a/nameservice/nameserviceproto/nameservice_aa.pb.go b/nameservice/nameserviceproto/nameservice_aa.pb.go index 7909dc16..8d0a21b6 100644 --- a/nameservice/nameserviceproto/nameservice_aa.pb.go +++ b/nameservice/nameserviceproto/nameservice_aa.pb.go @@ -608,11 +608,10 @@ func (m *CreateUserOperationRequestSigned) GetSignature() []byte { type NameRegisterRequest struct { FullName string `protobuf:"bytes,1,opt,name=fullName,proto3" json:"fullName,omitempty"` // A content hash attached to this name + // This should not be empty! OwnerAnyAddress string `protobuf:"bytes,2,opt,name=ownerAnyAddress,proto3" json:"ownerAnyAddress,omitempty"` // An Ethereum address that owns that name OwnerEthAddress string `protobuf:"bytes,3,opt,name=ownerEthAddress,proto3" json:"ownerEthAddress,omitempty"` - // A SpaceID attached to this name - SpaceId string `protobuf:"bytes,4,opt,name=spaceId,proto3" json:"spaceId,omitempty"` } func (m *NameRegisterRequest) Reset() { *m = NameRegisterRequest{} } @@ -669,7 +668,72 @@ func (m *NameRegisterRequest) GetOwnerEthAddress() string { return "" } -func (m *NameRegisterRequest) GetSpaceId() string { +type NameRegisterForSpaceRequest struct { + FullName string `protobuf:"bytes,1,opt,name=fullName,proto3" json:"fullName,omitempty"` + // A content hash attached to this name + // This should not be empty! + OwnerAnyAddress string `protobuf:"bytes,2,opt,name=ownerAnyAddress,proto3" json:"ownerAnyAddress,omitempty"` + // An Ethereum address that owns that name + OwnerEthAddress string `protobuf:"bytes,3,opt,name=ownerEthAddress,proto3" json:"ownerEthAddress,omitempty"` + // A SpaceID attached to this name + SpaceId string `protobuf:"bytes,4,opt,name=spaceId,proto3" json:"spaceId,omitempty"` +} + +func (m *NameRegisterForSpaceRequest) Reset() { *m = NameRegisterForSpaceRequest{} } +func (m *NameRegisterForSpaceRequest) String() string { return proto.CompactTextString(m) } +func (*NameRegisterForSpaceRequest) ProtoMessage() {} +func (*NameRegisterForSpaceRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_c9d3f9b8b141e804, []int{10} +} +func (m *NameRegisterForSpaceRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NameRegisterForSpaceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NameRegisterForSpaceRequest.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 *NameRegisterForSpaceRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_NameRegisterForSpaceRequest.Merge(m, src) +} +func (m *NameRegisterForSpaceRequest) XXX_Size() int { + return m.Size() +} +func (m *NameRegisterForSpaceRequest) XXX_DiscardUnknown() { + xxx_messageInfo_NameRegisterForSpaceRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_NameRegisterForSpaceRequest proto.InternalMessageInfo + +func (m *NameRegisterForSpaceRequest) GetFullName() string { + if m != nil { + return m.FullName + } + return "" +} + +func (m *NameRegisterForSpaceRequest) GetOwnerAnyAddress() string { + if m != nil { + return m.OwnerAnyAddress + } + return "" +} + +func (m *NameRegisterForSpaceRequest) GetOwnerEthAddress() string { + if m != nil { + return m.OwnerEthAddress + } + return "" +} + +func (m *NameRegisterForSpaceRequest) GetSpaceId() string { if m != nil { return m.SpaceId } @@ -684,7 +748,7 @@ func (m *GetOperationStatusRequest) Reset() { *m = GetOperationStatusReq func (m *GetOperationStatusRequest) String() string { return proto.CompactTextString(m) } func (*GetOperationStatusRequest) ProtoMessage() {} func (*GetOperationStatusRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_c9d3f9b8b141e804, []int{10} + return fileDescriptor_c9d3f9b8b141e804, []int{11} } func (m *GetOperationStatusRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -729,7 +793,7 @@ func (m *OperationResponse) Reset() { *m = OperationResponse{} } func (m *OperationResponse) String() string { return proto.CompactTextString(m) } func (*OperationResponse) ProtoMessage() {} func (*OperationResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_c9d3f9b8b141e804, []int{11} + return fileDescriptor_c9d3f9b8b141e804, []int{12} } func (m *OperationResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -784,6 +848,7 @@ func init() { proto.RegisterType((*CreateUserOperationRequest)(nil), "CreateUserOperationRequest") proto.RegisterType((*CreateUserOperationRequestSigned)(nil), "CreateUserOperationRequestSigned") proto.RegisterType((*NameRegisterRequest)(nil), "NameRegisterRequest") + proto.RegisterType((*NameRegisterForSpaceRequest)(nil), "NameRegisterForSpaceRequest") proto.RegisterType((*GetOperationStatusRequest)(nil), "GetOperationStatusRequest") proto.RegisterType((*OperationResponse)(nil), "OperationResponse") } @@ -793,54 +858,56 @@ func init() { } var fileDescriptor_c9d3f9b8b141e804 = []byte{ - // 747 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x56, 0x5d, 0x4f, 0x13, 0x4d, - 0x14, 0xee, 0xd2, 0xf2, 0xd1, 0x43, 0xdf, 0x52, 0xa6, 0xc0, 0xdb, 0xb7, 0xf0, 0xae, 0x65, 0x35, - 0xa6, 0xf1, 0x62, 0x31, 0x98, 0x28, 0x37, 0x26, 0xae, 0x05, 0x2a, 0xc1, 0x00, 0x59, 0x24, 0x26, - 0x10, 0x63, 0x86, 0xee, 0xa1, 0x36, 0xb6, 0x33, 0x75, 0x67, 0x2a, 0xf6, 0x5f, 0x98, 0xf8, 0x03, - 0xbc, 0xf0, 0xcf, 0x78, 0xc9, 0xa5, 0xf1, 0xca, 0xc0, 0x1f, 0x31, 0x3b, 0x6c, 0x97, 0xdd, 0xb2, - 0x6d, 0x51, 0x6e, 0x60, 0xcf, 0xb3, 0x67, 0xce, 0x79, 0x9e, 0xe7, 0xec, 0x9c, 0x14, 0xd6, 0x18, - 0x6d, 0xa1, 0x40, 0xf7, 0x63, 0xa3, 0x86, 0x2b, 0xa1, 0xe7, 0xb6, 0xcb, 0x25, 0x5f, 0x51, 0x7f, - 0x45, 0x18, 0x7f, 0x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0xb7, - 0x1c, 0xdf, 0xc1, 0x5e, 0x68, 0x3c, 0x85, 0xff, 0xaa, 0x28, 0x03, 0xd9, 0xfb, 0x92, 0xca, 0x4e, - 0x70, 0xa1, 0x4a, 0x30, 0x1d, 0x7c, 0xef, 0x5b, 0x8e, 0xcf, 0x34, 0x0c, 0x19, 0x0c, 0x66, 0x43, - 0x96, 0xf9, 0x9f, 0xd4, 0xc8, 0x63, 0xe4, 0x09, 0x64, 0x79, 0xb8, 0xe5, 0xa5, 0x75, 0xd9, 0xd5, - 0x19, 0x33, 0xc2, 0x04, 0xed, 0xbe, 0xb4, 0x07, 0x47, 0x90, 0x8d, 0x66, 0x90, 0x69, 0x98, 0x3c, - 0x60, 0xef, 0x19, 0x3f, 0x65, 0xb9, 0x84, 0x17, 0xec, 0x21, 0x73, 0x1a, 0xac, 0x9e, 0xd3, 0xc8, - 0x3c, 0xcc, 0xfa, 0xc1, 0xae, 0xbb, 0xc3, 0xe5, 0x26, 0xef, 0x30, 0x27, 0x37, 0x46, 0xfe, 0x81, - 0x74, 0x85, 0xb7, 0xda, 0x4d, 0x94, 0xe8, 0xe4, 0x92, 0x24, 0x0d, 0xe3, 0x1b, 0xae, 0xcb, 0xdd, - 0x5c, 0x6a, 0xf5, 0x67, 0x12, 0xfe, 0xb5, 0x58, 0x97, 0x09, 0xff, 0xae, 0x59, 0xc7, 0xc2, 0xdb, - 0xd3, 0x5e, 0x2f, 0xf2, 0x0c, 0x32, 0x61, 0x9f, 0x48, 0xd1, 0x1c, 0x68, 0x5b, 0x91, 0x98, 0xd7, - 0x3c, 0x31, 0x12, 0x64, 0x0f, 0xe6, 0xe2, 0x96, 0x23, 0x31, 0xcc, 0x91, 0x3b, 0x73, 0x40, 0xc5, - 0x57, 0xb0, 0x10, 0xbf, 0x7b, 0xc8, 0x3d, 0xf3, 0x06, 0x4b, 0x69, 0x40, 0xd5, 0x35, 0xc8, 0x46, - 0x57, 0x0e, 0x59, 0x30, 0x63, 0x77, 0x50, 0x31, 0x63, 0x86, 0x40, 0x23, 0x41, 0xb6, 0x21, 0x1f, - 0xb3, 0x69, 0xc8, 0x9c, 0x19, 0x73, 0x05, 0x8a, 0x4b, 0xe6, 0x90, 0xad, 0x64, 0x24, 0xc8, 0x0e, - 0xe4, 0x63, 0xae, 0x25, 0x59, 0x36, 0x47, 0x5d, 0xd6, 0x78, 0x59, 0xcf, 0x1f, 0x7f, 0x3f, 0xd7, - 0xb5, 0xb3, 0x73, 0x5d, 0xfb, 0x75, 0xae, 0x6b, 0x9f, 0x2f, 0xf4, 0xc4, 0xd9, 0x85, 0x9e, 0xf8, - 0x71, 0xa1, 0x27, 0x0e, 0x97, 0x86, 0xfd, 0xfc, 0x38, 0x9e, 0x50, 0xff, 0x1e, 0xfd, 0x0e, 0x00, - 0x00, 0xff, 0xff, 0xb6, 0xa8, 0xb9, 0x6c, 0xa5, 0x08, 0x00, 0x00, + // 781 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x56, 0xcd, 0x4e, 0xe3, 0x56, + 0x14, 0x8e, 0x89, 0xf9, 0xc9, 0x21, 0x0d, 0xe1, 0x06, 0x68, 0x1a, 0x52, 0x37, 0xb8, 0x55, 0x15, + 0x75, 0x61, 0x2a, 0x2a, 0xb5, 0x6c, 0x2a, 0xd5, 0x0d, 0x24, 0x45, 0x54, 0x80, 0x9c, 0xa2, 0x4a, + 0xa0, 0xaa, 0xba, 0xc4, 0x87, 0x34, 0x6a, 0x72, 0x6f, 0x7a, 0x7d, 0x53, 0x9a, 0x07, 0xe8, 0x7e, + 0xa4, 0x79, 0x84, 0x59, 0xcc, 0x23, 0xcc, 0x2b, 0xcc, 0x92, 0xe5, 0x2c, 0x47, 0xf0, 0x22, 0x23, + 0x5f, 0x1c, 0x63, 0x07, 0x27, 0x61, 0x86, 0xc5, 0x6c, 0x12, 0xdf, 0xcf, 0xc7, 0xe7, 0x7c, 0x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0x9a, 0x28, 0x5b, 0x89, 0x58, 0x0f, 0x34, 0x31, 0x53, 0xe4, 0x04, 0xd6, 0x92, 0xcc, 0x9a, 0x98, + 0xd6, 0x4c, 0x0f, 0x9f, 0x90, 0xf1, 0x37, 0xd8, 0x48, 0xf6, 0x42, 0xf2, 0x95, 0xf5, 0x08, 0x93, + 0x9c, 0x90, 0x75, 0x17, 0x72, 0x71, 0x0b, 0x24, 0x1b, 0x56, 0xa2, 0x27, 0x96, 0xb2, 0x56, 0x04, + 0x34, 0x53, 0xe4, 0x10, 0x0a, 0x09, 0xce, 0x47, 0xd6, 0xac, 0x84, 0x95, 0x2c, 0x95, 0xad, 0x29, + 0x2e, 0x69, 0xa6, 0xc8, 0x79, 0xa2, 0x8d, 0x8e, 0x16, 0x89, 0x94, 0xad, 0x29, 0xfb, 0x35, 0x33, + 0xf9, 0x11, 0x14, 0x12, 0x3c, 0x88, 0x6c, 0x59, 0xb3, 0x9c, 0x29, 0x59, 0xb3, 0x9f, 0xbf, 0x7f, + 0x7d, 0x63, 0x68, 0xd7, 0x37, 0x86, 0xf6, 0xf6, 0xc6, 0xd0, 0x9e, 0xdd, 0x1a, 0xa9, 0xeb, 0x5b, + 0x23, 0xf5, 0xe6, 0xd6, 0x48, 0x9d, 0x95, 0xa7, 0xfd, 0xd7, 0xba, 0x58, 0x50, 0x5f, 0xdf, 0xbd, + 0x0b, 0x00, 0x00, 0xff, 0xff, 0xb1, 0xf4, 0xc0, 0x1d, 0x92, 0x09, 0x00, 0x00, } func (m *UserAccount) Marshal() (dAtA []byte, err error) { @@ -1236,6 +1303,50 @@ func (m *NameRegisterRequest) MarshalTo(dAtA []byte) (int, error) { } func (m *NameRegisterRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.OwnerEthAddress) > 0 { + i -= len(m.OwnerEthAddress) + copy(dAtA[i:], m.OwnerEthAddress) + i = encodeVarintNameserviceAa(dAtA, i, uint64(len(m.OwnerEthAddress))) + i-- + dAtA[i] = 0x1a + } + if len(m.OwnerAnyAddress) > 0 { + i -= len(m.OwnerAnyAddress) + copy(dAtA[i:], m.OwnerAnyAddress) + i = encodeVarintNameserviceAa(dAtA, i, uint64(len(m.OwnerAnyAddress))) + i-- + dAtA[i] = 0x12 + } + if len(m.FullName) > 0 { + i -= len(m.FullName) + copy(dAtA[i:], m.FullName) + i = encodeVarintNameserviceAa(dAtA, i, uint64(len(m.FullName))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *NameRegisterForSpaceRequest) 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 *NameRegisterForSpaceRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *NameRegisterForSpaceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1524,6 +1635,27 @@ func (m *CreateUserOperationRequestSigned) Size() (n int) { } func (m *NameRegisterRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.FullName) + if l > 0 { + n += 1 + l + sovNameserviceAa(uint64(l)) + } + l = len(m.OwnerAnyAddress) + if l > 0 { + n += 1 + l + sovNameserviceAa(uint64(l)) + } + l = len(m.OwnerEthAddress) + if l > 0 { + n += 1 + l + sovNameserviceAa(uint64(l)) + } + return n +} + +func (m *NameRegisterForSpaceRequest) Size() (n int) { if m == nil { return 0 } @@ -2820,6 +2952,152 @@ func (m *NameRegisterRequest) Unmarshal(dAtA []byte) error { return fmt.Errorf("proto: NameRegisterRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FullName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowNameserviceAa + } + 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 ErrInvalidLengthNameserviceAa + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthNameserviceAa + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FullName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OwnerAnyAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowNameserviceAa + } + 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 ErrInvalidLengthNameserviceAa + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthNameserviceAa + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OwnerAnyAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OwnerEthAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowNameserviceAa + } + 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 ErrInvalidLengthNameserviceAa + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthNameserviceAa + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OwnerEthAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipNameserviceAa(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthNameserviceAa + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NameRegisterForSpaceRequest) 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 ErrIntOverflowNameserviceAa + } + 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: NameRegisterForSpaceRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NameRegisterForSpaceRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field FullName", wireType) diff --git a/nameservice/nameserviceproto/nameservice_aa_drpc.pb.go b/nameservice/nameserviceproto/nameservice_aa_drpc.pb.go index afc93af8..3505e1fa 100644 --- a/nameservice/nameserviceproto/nameservice_aa_drpc.pb.go +++ b/nameservice/nameserviceproto/nameservice_aa_drpc.pb.go @@ -45,6 +45,7 @@ type DRPCAnynsAccountAbstractionClient interface { AdminFundGasOperations(ctx context.Context, in *AdminFundGasOperationsRequestSigned) (*OperationResponse, error) GetUserAccount(ctx context.Context, in *GetUserAccountRequest) (*UserAccount, error) GetDataNameRegister(ctx context.Context, in *NameRegisterRequest) (*GetDataNameRegisterResponse, error) + GetDataNameRegisterForSpace(ctx context.Context, in *NameRegisterForSpaceRequest) (*GetDataNameRegisterResponse, error) CreateUserOperation(ctx context.Context, in *CreateUserOperationRequestSigned) (*OperationResponse, error) } @@ -103,6 +104,15 @@ func (c *drpcAnynsAccountAbstractionClient) GetDataNameRegister(ctx context.Cont return out, nil } +func (c *drpcAnynsAccountAbstractionClient) GetDataNameRegisterForSpace(ctx context.Context, in *NameRegisterForSpaceRequest) (*GetDataNameRegisterResponse, error) { + out := new(GetDataNameRegisterResponse) + err := c.cc.Invoke(ctx, "/AnynsAccountAbstraction/GetDataNameRegisterForSpace", drpcEncoding_File_nameservice_nameserviceproto_protos_nameservice_aa_proto{}, in, out) + if err != nil { + return nil, err + } + return out, nil +} + func (c *drpcAnynsAccountAbstractionClient) CreateUserOperation(ctx context.Context, in *CreateUserOperationRequestSigned) (*OperationResponse, error) { out := new(OperationResponse) err := c.cc.Invoke(ctx, "/AnynsAccountAbstraction/CreateUserOperation", drpcEncoding_File_nameservice_nameserviceproto_protos_nameservice_aa_proto{}, in, out) @@ -118,6 +128,7 @@ type DRPCAnynsAccountAbstractionServer interface { AdminFundGasOperations(context.Context, *AdminFundGasOperationsRequestSigned) (*OperationResponse, error) GetUserAccount(context.Context, *GetUserAccountRequest) (*UserAccount, error) GetDataNameRegister(context.Context, *NameRegisterRequest) (*GetDataNameRegisterResponse, error) + GetDataNameRegisterForSpace(context.Context, *NameRegisterForSpaceRequest) (*GetDataNameRegisterResponse, error) CreateUserOperation(context.Context, *CreateUserOperationRequestSigned) (*OperationResponse, error) } @@ -143,13 +154,17 @@ func (s *DRPCAnynsAccountAbstractionUnimplementedServer) GetDataNameRegister(con return nil, drpcerr.WithCode(errors.New("Unimplemented"), drpcerr.Unimplemented) } +func (s *DRPCAnynsAccountAbstractionUnimplementedServer) GetDataNameRegisterForSpace(context.Context, *NameRegisterForSpaceRequest) (*GetDataNameRegisterResponse, error) { + return nil, drpcerr.WithCode(errors.New("Unimplemented"), drpcerr.Unimplemented) +} + func (s *DRPCAnynsAccountAbstractionUnimplementedServer) CreateUserOperation(context.Context, *CreateUserOperationRequestSigned) (*OperationResponse, error) { return nil, drpcerr.WithCode(errors.New("Unimplemented"), drpcerr.Unimplemented) } type DRPCAnynsAccountAbstractionDescription struct{} -func (DRPCAnynsAccountAbstractionDescription) NumMethods() int { return 6 } +func (DRPCAnynsAccountAbstractionDescription) NumMethods() int { return 7 } func (DRPCAnynsAccountAbstractionDescription) Method(n int) (string, drpc.Encoding, drpc.Receiver, interface{}, bool) { switch n { @@ -199,6 +214,15 @@ func (DRPCAnynsAccountAbstractionDescription) Method(n int) (string, drpc.Encodi ) }, DRPCAnynsAccountAbstractionServer.GetDataNameRegister, true case 5: + return "/AnynsAccountAbstraction/GetDataNameRegisterForSpace", drpcEncoding_File_nameservice_nameserviceproto_protos_nameservice_aa_proto{}, + func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) { + return srv.(DRPCAnynsAccountAbstractionServer). + GetDataNameRegisterForSpace( + ctx, + in1.(*NameRegisterForSpaceRequest), + ) + }, DRPCAnynsAccountAbstractionServer.GetDataNameRegisterForSpace, true + case 6: return "/AnynsAccountAbstraction/CreateUserOperation", drpcEncoding_File_nameservice_nameserviceproto_protos_nameservice_aa_proto{}, func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) { return srv.(DRPCAnynsAccountAbstractionServer). @@ -296,6 +320,22 @@ func (x *drpcAnynsAccountAbstraction_GetDataNameRegisterStream) SendAndClose(m * return x.CloseSend() } +type DRPCAnynsAccountAbstraction_GetDataNameRegisterForSpaceStream interface { + drpc.Stream + SendAndClose(*GetDataNameRegisterResponse) error +} + +type drpcAnynsAccountAbstraction_GetDataNameRegisterForSpaceStream struct { + drpc.Stream +} + +func (x *drpcAnynsAccountAbstraction_GetDataNameRegisterForSpaceStream) SendAndClose(m *GetDataNameRegisterResponse) error { + if err := x.MsgSend(m, drpcEncoding_File_nameservice_nameserviceproto_protos_nameservice_aa_proto{}); err != nil { + return err + } + return x.CloseSend() +} + type DRPCAnynsAccountAbstraction_CreateUserOperationStream interface { drpc.Stream SendAndClose(*OperationResponse) error diff --git a/nameservice/nameserviceproto/protos/nameservice.proto b/nameservice/nameserviceproto/protos/nameservice.proto index 6782c813..75596ac0 100644 --- a/nameservice/nameserviceproto/protos/nameservice.proto +++ b/nameservice/nameserviceproto/protos/nameservice.proto @@ -22,7 +22,6 @@ message NameAvailableResponse { string ownerScwEthAddress = 2; // This field is non-empty only if name is "already registered" - // TODO: string ownerEthAddress = 3; // A content hash attached to this name diff --git a/nameservice/nameserviceproto/protos/nameservice_aa.proto b/nameservice/nameserviceproto/protos/nameservice_aa.proto index 29ae7692..6ecc2ca9 100644 --- a/nameservice/nameserviceproto/protos/nameservice_aa.proto +++ b/nameservice/nameserviceproto/protos/nameservice_aa.proto @@ -98,6 +98,26 @@ message NameRegisterRequest { string fullName = 1; // A content hash attached to this name + // This should not be empty! + string ownerAnyAddress = 2; + + // An Ethereum address that owns that name + string ownerEthAddress = 3; + + // Example: + // 1 - register alice.any -> ANYID123123 + // 2 - register xxxx.any -> ANYID123123 + // reverse resolve ANYID123123 will return xxxx.any + // + // TODO: currently by default "true" + // bool updateReverseResolver = 4; +} + +message NameRegisterForSpaceRequest { + string fullName = 1; + + // A content hash attached to this name + // This should not be empty! string ownerAnyAddress = 2; // An Ethereum address that owns that name @@ -153,7 +173,12 @@ service AnynsAccountAbstraction { // 2. sign it with your Ethereum private key // 3. send it using CreateUserOperation // 4. check operation status using GetOperation + // + // Register new name for my Any identity rpc GetDataNameRegister(NameRegisterRequest) returns (GetDataNameRegisterResponse) {} + + // Register new name and attach Space ID to it + rpc GetDataNameRegisterForSpace(NameRegisterForSpaceRequest) returns (GetDataNameRegisterResponse) {} // TODO //rpc GetDataNameUpdate(NameUpdateRequest) returns (GetDataNameRegisterResponse) {} diff --git a/paymentservice/paymentserviceclient/mock/mock_paymentserviceclient.go b/paymentservice/paymentserviceclient/mock/mock_paymentserviceclient.go index fbebff4d..1f7f2466 100644 --- a/paymentservice/paymentserviceclient/mock/mock_paymentserviceclient.go +++ b/paymentservice/paymentserviceclient/mock/mock_paymentserviceclient.go @@ -55,6 +55,21 @@ func (mr *MockAnyPpClientServiceMockRecorder) BuySubscription(ctx, in any) *gomo return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BuySubscription", reflect.TypeOf((*MockAnyPpClientService)(nil).BuySubscription), ctx, in) } +// GetSubscriptionPortalLink mocks base method. +func (m *MockAnyPpClientService) GetSubscriptionPortalLink(ctx context.Context, in *paymentserviceproto.GetSubscriptionPortalLinkRequestSigned) (*paymentserviceproto.GetSubscriptionPortalLinkResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetSubscriptionPortalLink", ctx, in) + ret0, _ := ret[0].(*paymentserviceproto.GetSubscriptionPortalLinkResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetSubscriptionPortalLink indicates an expected call of GetSubscriptionPortalLink. +func (mr *MockAnyPpClientServiceMockRecorder) GetSubscriptionPortalLink(ctx, in any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSubscriptionPortalLink", reflect.TypeOf((*MockAnyPpClientService)(nil).GetSubscriptionPortalLink), ctx, in) +} + // GetSubscriptionStatus mocks base method. func (m *MockAnyPpClientService) GetSubscriptionStatus(ctx context.Context, in *paymentserviceproto.GetSubscriptionRequestSigned) (*paymentserviceproto.GetSubscriptionResponse, error) { m.ctrl.T.Helper() diff --git a/paymentservice/paymentserviceclient/paymentserviceclient.go b/paymentservice/paymentserviceclient/paymentserviceclient.go index 49140e0c..cc59b8f0 100644 --- a/paymentservice/paymentserviceclient/paymentserviceclient.go +++ b/paymentservice/paymentserviceclient/paymentserviceclient.go @@ -20,6 +20,7 @@ const CName = "any-pp.drpcclient" type AnyPpClientService interface { GetSubscriptionStatus(ctx context.Context, in *pp.GetSubscriptionRequestSigned) (out *pp.GetSubscriptionResponse, err error) BuySubscription(ctx context.Context, in *pp.BuySubscriptionRequestSigned) (out *pp.BuySubscriptionResponse, err error) + GetSubscriptionPortalLink(ctx context.Context, in *pp.GetSubscriptionPortalLinkRequestSigned) (out *pp.GetSubscriptionPortalLinkResponse, err error) app.Component } @@ -80,3 +81,13 @@ func (s *service) BuySubscription(ctx context.Context, in *pp.BuySubscriptionReq }) return } + +func (s *service) GetSubscriptionPortalLink(ctx context.Context, in *pp.GetSubscriptionPortalLinkRequestSigned) (out *pp.GetSubscriptionPortalLinkResponse, err error) { + err = s.doClient(ctx, func(cl pp.DRPCAnyPaymentProcessingClient) error { + if out, err = cl.GetSubscriptionPortalLink(ctx, in); err != nil { + return rpcerr.Unwrap(err) + } + return nil + }) + return +} diff --git a/paymentservice/paymentserviceproto/paymentservice.pb.go b/paymentservice/paymentserviceproto/paymentservice.pb.go index 047a6104..10d4a8fc 100644 --- a/paymentservice/paymentserviceproto/paymentservice.pb.go +++ b/paymentservice/paymentserviceproto/paymentservice.pb.go @@ -25,24 +25,34 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type SubscriptionTier int32 const ( - SubscriptionTier_TierUnknown SubscriptionTier = 0 - SubscriptionTier_TierFriend SubscriptionTier = 1 - SubscriptionTier_TierSupporter1Year SubscriptionTier = 2 - SubscriptionTier_TierPatron1Year SubscriptionTier = 3 + SubscriptionTier_TierUnknown SubscriptionTier = 0 + // "free" tier + SubscriptionTier_TierFriend SubscriptionTier = 1 + // these can be used just for testing in debug mode + // it will still create an active subscription, but with NO features + SubscriptionTier_TierSupporter1WeekTEST SubscriptionTier = 2 + SubscriptionTier_TierPatron1WeekTEST SubscriptionTier = 3 + // these are the real tiers: + SubscriptionTier_TierSupporter1Year SubscriptionTier = 4 + SubscriptionTier_TierPatron1Year SubscriptionTier = 5 ) var SubscriptionTier_name = map[int32]string{ 0: "TierUnknown", 1: "TierFriend", - 2: "TierSupporter1Year", - 3: "TierPatron1Year", + 2: "TierSupporter1WeekTEST", + 3: "TierPatron1WeekTEST", + 4: "TierSupporter1Year", + 5: "TierPatron1Year", } var SubscriptionTier_value = map[string]int32{ - "TierUnknown": 0, - "TierFriend": 1, - "TierSupporter1Year": 2, - "TierPatron1Year": 3, + "TierUnknown": 0, + "TierFriend": 1, + "TierSupporter1WeekTEST": 2, + "TierPatron1WeekTEST": 3, + "TierSupporter1Year": 4, + "TierPatron1Year": 5, } func (x SubscriptionTier) String() string { @@ -680,52 +690,53 @@ func init() { } var fileDescriptor_4feb29dcc5ba50f6 = []byte{ - // 707 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x95, 0x5f, 0x4f, 0xd3, 0x5e, - 0x18, 0xc7, 0xdb, 0x6d, 0xc0, 0xf6, 0xc0, 0xb6, 0x72, 0xf8, 0xfd, 0xa0, 0x2e, 0xa3, 0x99, 0x4d, - 0xd4, 0x65, 0xc6, 0x12, 0xd1, 0x44, 0x4d, 0x8c, 0x49, 0x51, 0x24, 0x26, 0x68, 0x96, 0x4e, 0x48, - 0xe4, 0x8a, 0xb2, 0x9e, 0x8c, 0xca, 0x38, 0xa7, 0x9e, 0x73, 0x0a, 0xf6, 0xd6, 0x57, 0xe0, 0x8b, - 0xf0, 0xc5, 0x78, 0xc9, 0xa5, 0x97, 0x06, 0x5e, 0x87, 0x89, 0xe9, 0x69, 0xd9, 0x5f, 0xc6, 0x88, - 0xdc, 0xac, 0x7d, 0x3e, 0xe7, 0x39, 0xcf, 0x9f, 0xf3, 0x7c, 0x7b, 0x06, 0xaf, 0x02, 0x37, 0x3a, - 0xc6, 0x44, 0x70, 0xcc, 0x4e, 0xfc, 0x36, 0x5e, 0x1b, 0x36, 0x03, 0x46, 0x05, 0x5d, 0x93, 0xbf, - 0x7c, 0x64, 0xc9, 0x92, 0xd4, 0x7c, 0x0e, 0xcb, 0x5b, 0x58, 0xb4, 0xc2, 0x03, 0xde, 0x66, 0x7e, - 0x20, 0x7c, 0x4a, 0x1c, 0xfc, 0x25, 0xc4, 0x5c, 0x20, 0x03, 0x80, 0x9e, 0x12, 0xcc, 0x6c, 0x12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x30, 0x2b, 0x1f, 0x4f, 0xfe, 0x06, 0x00, 0x00, 0xff, 0xff, 0x5d, 0xde, 0x71, 0x1b, 0x4c, - 0x07, 0x00, 0x00, + // 733 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x95, 0xcd, 0x6e, 0xd3, 0x4e, + 0x10, 0xc0, 0xed, 0x24, 0x6d, 0x93, 0x69, 0x93, 0xb8, 0xdb, 0xff, 0x3f, 0x35, 0x51, 0x6a, 0x05, + 0x4b, 0x40, 0x14, 0x84, 0x2b, 0x0a, 0x12, 0x20, 0x21, 0x24, 0x17, 0x4a, 0x85, 0x54, 0x50, 0xe4, + 0xb4, 0x45, 0xf4, 0x84, 0x1b, 0x8f, 0x52, 0xd3, 0x74, 0x6d, 0xd6, 0x9b, 0x16, 0x5f, 0x79, 0x02, + 0x2e, 0xbc, 0x01, 0x0f, 0xc3, 0xb1, 0x47, 0x8e, 0xa8, 0x7d, 0x0e, 0x24, 0xe4, 0xb5, 0x9b, 0xcf, + 0xa6, 0xa9, 0xe8, 0x25, 0xde, 0xf9, 0xcd, 0xc7, 0xce, 0xec, 0xcc, 0x6e, 0xe0, 0x85, 0x6f, 0x87, + 0x47, 0x48, 0x79, 0x80, 0xec, 0xd8, 0x6d, 0xe1, 0xea, 0xb0, 0xe8, 0x33, 0x8f, 0x7b, 0xab, 0xe2, + 0x37, 0x18, 0x51, 0x19, 0x82, 0xea, 0x4f, 0xa1, 0xb4, 0x89, 0xbc, 0xd9, 0xdd, 0x0f, 0x5a, 0xcc, + 0xf5, 0xb9, 0xeb, 0x51, 0x0b, 0x3f, 0x77, 0x31, 0xe0, 0x44, 0x03, 0xf0, 0x4e, 0x28, 0x32, 0x93, + 0x86, 0x6f, 0x5e, 0xa9, 0x72, 0x55, 0xae, 0xe5, 0xac, 0x01, 0xa2, 0xef, 0x42, 0xe5, 0x72, 0xcf, + 0xa6, 0xdb,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0xf6, 0xf4, 0xe9, 0xff, 0xaa, 0xfb, 0xb3, 0xe2, 0xf3, 0xe8, 0x6f, + 0x00, 0x00, 0x00, 0xff, 0xff, 0x22, 0x5f, 0xac, 0xd7, 0x82, 0x07, 0x00, 0x00, } func (m *GetSubscriptionRequest) Marshal() (dAtA []byte, err error) { diff --git a/paymentservice/paymentserviceproto/protos/.paymentservice.proto.swp b/paymentservice/paymentserviceproto/protos/.paymentservice.proto.swp deleted file mode 100644 index 8096755cbda200881188005aad860090fa642c61..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 12288 zcmeI2O>87b6~`-CAR!?TB@ze;#M_C)+9LMYGai4foG@OS&1z$NvSY`I5VC5zYdjtI zbT!@8wugx1kVRbK0sfO>TUt zt^IkntE;PC{p)@7>{e&y@hcm&I9(I?xmSp}-`-GvdHLMApDYMrbTl|nk>OkK_S1~e zGo9Ly-m2CIQ>{c#huV|j_%qKG16E};FoRg}=Ttg~ylN~5eaw`q1CbC>1CbC>1CbC>1Cb zC>8jBRlvlziD$96+w%o}DgV4}>@&YCKS~8k1xf`<1xf`<1xf`<1xf`<1xf`<1xf`< z1^x#WkiHP#huuHqe*nP${}uGV0W`sb z;4|PK?-$|?@K^8}_%-+j2tgY>23lYi{ONr{yb8V!o&!Db2)F<$;C}G@Iot!!fKLGd zZeYK8&wo(-!w;JOYk$5hh?3Z&)ojqtI;ocgu?ciEF?M}TeKAw1X$Sj}@+T=#CQG7} zPIpUVoL5nk^fV7#tWK1_C=>?K!KAxA&>49$0%16A1NF1e1aYXy1bvl~ zI#dw_UGlOd!GV_Ha6w9u#$}>Cm8Qz40p_#AyE$q!MNPjS@GKGenoLg`(h+r3PljF6 zU6PdHe2nWpi|#wPvb}j=nI2GAC+IY~fUyD4v4>}P7@CljLMRE16v4U#;sptGa}(?~ zuWer0yu3VWqc=(0TWed(=*vo_BU|Af>J%Nact4T8A}E(Yn8Io~Nu6u}8&5y_q|3;QLFAU%#dx`2Q zNb0G*z+aiI)#qH#BNm~n+zu7~)NxACl{Eo(OXa>A_sDC?Sz8#>85sEG$zHEeEjPvV zu;UXZoMjNh2A&vfRzZlk`mP+#)9HLu}I4=wYJrEYC*anY~1q1M5UDA=gLA%JJ%1n}U%Q;VOkV5UDv3Pua`w{9( z*t@>fq>1%o?0Fhbzc zV?9b+-AFxpyf}BbvD-A;tBLJ( z(e$Z@x`7IPCmITk_5UO361a^Vlm>Wr;rU4T>b?DP(K=ifL}q>t8TZ(*Bd$k2d)oq= zc*5d@(Ln@#U_!X#tv5?(TJQ)rX0BWE0{vwULf!XO4@&>9b|20-g zpnX=YqjiWunwinpY|+cpQLa?60EmFdCK_o*#YvFHa0kK6ZyBz1^8EW+?}y4AUF~Gu z>1}>O|CHWKM~w#+vS3L*2T8V?R%H)rXu?nJD#^UW4s)?X1iT^^QB}Eqo(8~ zv}lwGJIu^Qp`xrmR!Z`B3+DrSO{7?4dG-M!xCwiTb&I_g9GSEFNp;RMUno(>JXr+5 z$lIF>xfF%p>v0XqM=HV?CFG`Atve%75L`v9a@3^GEl(l}?+JXUn}g8PQ8!5XhzAU| z$t^0BF~0|Mxki2%>6<7|VQqPe8@b^kId<#2Y0ZVDC)$lhg)_czBTi9!Eol-R%|59l zhl-6*+uqLNSR-ze;+EYrd+T#}ae%E>R!nZ&-hE!~!n0PZL7zvZii>=AlpT>@wci;y z@?A2hT;!tR5(P9VG6C Date: Thu, 1 Feb 2024 19:13:17 +0000 Subject: [PATCH 005/140] Add error handling for ns/pp clients --- nameservice/nameserviceclient/nameserviceclient.go | 6 ++++++ .../paymentserviceclient/paymentserviceclient.go | 10 ++++++++++ 2 files changed, 16 insertions(+) diff --git a/nameservice/nameserviceclient/nameserviceclient.go b/nameservice/nameserviceclient/nameserviceclient.go index 0641405b..84ec7d96 100644 --- a/nameservice/nameserviceclient/nameserviceclient.go +++ b/nameservice/nameserviceclient/nameserviceclient.go @@ -2,6 +2,7 @@ package nameserviceclient import ( "context" + "errors" "github.com/anyproto/any-sync/app" "github.com/anyproto/any-sync/app/logger" @@ -60,6 +61,11 @@ func New() AnyNsClientService { } func (s *service) doClient(ctx context.Context, fn func(cl nsp.DRPCAnynsClient) error) error { + if len(s.nodeconf.NamingNodePeers()) == 0 { + log.Error("no namingNode peers configured") + return errors.New("no namingNode peers configured") + } + // it will try to connect to the Naming Node // please enable "namingNode" type of node in the config (in the network.nodes array) peer, err := s.pool.Get(ctx, s.nodeconf.NamingNodePeers()[0]) diff --git a/paymentservice/paymentserviceclient/paymentserviceclient.go b/paymentservice/paymentserviceclient/paymentserviceclient.go index cc59b8f0..2d67a956 100644 --- a/paymentservice/paymentserviceclient/paymentserviceclient.go +++ b/paymentservice/paymentserviceclient/paymentserviceclient.go @@ -2,8 +2,10 @@ package paymentserviceclient import ( "context" + "errors" "github.com/anyproto/any-sync/app" + "github.com/anyproto/any-sync/app/logger" "github.com/anyproto/any-sync/net/pool" "github.com/anyproto/any-sync/net/rpc/rpcerr" "github.com/anyproto/any-sync/nodeconf" @@ -13,6 +15,8 @@ import ( const CName = "any-pp.drpcclient" +var log = logger.NewNamed(CName) + /* * This client component can be used to access the Any Payment Processing node * from other components. @@ -45,6 +49,12 @@ func New() AnyPpClientService { } func (s *service) doClient(ctx context.Context, fn func(cl pp.DRPCAnyPaymentProcessingClient) error) error { + if len(s.nodeconf.PaymentProcessingNodePeers()) == 0 { + log.Error("no payment processing peers configured") + + return errors.New("no paymentProcessingNode peers configured") + } + // it will try to connect to the Payment Node // please use "paymentProcessingNode" type of node in the config (in the network.nodes array) peer, err := s.pool.Get(ctx, s.nodeconf.PaymentProcessingNodePeers()[0]) From c2216639dd395a5f506fc81224856c0f79e912b7 Mon Sep 17 00:00:00 2001 From: Anton Akentev Date: Fri, 2 Feb 2024 15:47:32 +0000 Subject: [PATCH 006/140] Add comments to ns,pp proto files --- .../nameserviceproto/nameservice_aa.pb.go | 8 ++++++- .../protos/nameservice_aa.proto | 6 +++++ .../paymentserviceproto/paymentservice.pb.go | 11 ++++++---- .../protos/paymentservice.proto | 22 +++++++++---------- 4 files changed, 31 insertions(+), 16 deletions(-) diff --git a/nameservice/nameserviceproto/nameservice_aa.pb.go b/nameservice/nameserviceproto/nameservice_aa.pb.go index 8d0a21b6..e382e8e3 100644 --- a/nameservice/nameserviceproto/nameservice_aa.pb.go +++ b/nameservice/nameserviceproto/nameservice_aa.pb.go @@ -470,7 +470,9 @@ type CreateUserOperationRequest struct { SignedData []byte `protobuf:"bytes,2,opt,name=signedData,proto3" json:"signedData,omitempty"` Context []byte `protobuf:"bytes,3,opt,name=context,proto3" json:"context,omitempty"` OwnerEthAddress string `protobuf:"bytes,4,opt,name=ownerEthAddress,proto3" json:"ownerEthAddress,omitempty"` - OwnerAnyID string `protobuf:"bytes,5,opt,name=ownerAnyID,proto3" json:"ownerAnyID,omitempty"` + // in the following format: "A5k2d9sFZw84yisTxRnz2bPRd1YPfVfhxqymZ6yESprFTG65" + // you can get it with Account().SignKey.GetPublic().Account() + OwnerAnyID string `protobuf:"bytes,5,opt,name=ownerAnyID,proto3" json:"ownerAnyID,omitempty"` // all operations currently are towards single name, please specify it // we can use it for caching, etc purps. FullName string `protobuf:"bytes,6,opt,name=fullName,proto3" json:"fullName,omitempty"` @@ -609,6 +611,8 @@ type NameRegisterRequest struct { FullName string `protobuf:"bytes,1,opt,name=fullName,proto3" json:"fullName,omitempty"` // A content hash attached to this name // This should not be empty! + // in the following format: "A5k2d9sFZw84yisTxRnz2bPRd1YPfVfhxqymZ6yESprFTG65" + // you can get it with Account().SignKey.GetPublic().Account() OwnerAnyAddress string `protobuf:"bytes,2,opt,name=ownerAnyAddress,proto3" json:"ownerAnyAddress,omitempty"` // An Ethereum address that owns that name OwnerEthAddress string `protobuf:"bytes,3,opt,name=ownerEthAddress,proto3" json:"ownerEthAddress,omitempty"` @@ -672,6 +676,8 @@ type NameRegisterForSpaceRequest struct { FullName string `protobuf:"bytes,1,opt,name=fullName,proto3" json:"fullName,omitempty"` // A content hash attached to this name // This should not be empty! + // in the following format: "A5k2d9sFZw84yisTxRnz2bPRd1YPfVfhxqymZ6yESprFTG65" + // you can get it with Account().SignKey.GetPublic().Account() OwnerAnyAddress string `protobuf:"bytes,2,opt,name=ownerAnyAddress,proto3" json:"ownerAnyAddress,omitempty"` // An Ethereum address that owns that name OwnerEthAddress string `protobuf:"bytes,3,opt,name=ownerEthAddress,proto3" json:"ownerEthAddress,omitempty"` diff --git a/nameservice/nameserviceproto/protos/nameservice_aa.proto b/nameservice/nameserviceproto/protos/nameservice_aa.proto index 6ecc2ca9..93664a0a 100644 --- a/nameservice/nameserviceproto/protos/nameservice_aa.proto +++ b/nameservice/nameserviceproto/protos/nameservice_aa.proto @@ -79,6 +79,8 @@ message CreateUserOperationRequest { string ownerEthAddress = 4; + // in the following format: "A5k2d9sFZw84yisTxRnz2bPRd1YPfVfhxqymZ6yESprFTG65" + // you can get it with Account().SignKey.GetPublic().Account() string ownerAnyID = 5; // all operations currently are towards single name, please specify it @@ -99,6 +101,8 @@ message NameRegisterRequest { // A content hash attached to this name // This should not be empty! + // in the following format: "A5k2d9sFZw84yisTxRnz2bPRd1YPfVfhxqymZ6yESprFTG65" + // you can get it with Account().SignKey.GetPublic().Account() string ownerAnyAddress = 2; // An Ethereum address that owns that name @@ -118,6 +122,8 @@ message NameRegisterForSpaceRequest { // A content hash attached to this name // This should not be empty! + // in the following format: "A5k2d9sFZw84yisTxRnz2bPRd1YPfVfhxqymZ6yESprFTG65" + // you can get it with Account().SignKey.GetPublic().Account() string ownerAnyAddress = 2; // An Ethereum address that owns that name diff --git a/paymentservice/paymentserviceproto/paymentservice.pb.go b/paymentservice/paymentserviceproto/paymentservice.pb.go index 10d4a8fc..cf1ca4ff 100644 --- a/paymentservice/paymentserviceproto/paymentservice.pb.go +++ b/paymentservice/paymentserviceproto/paymentservice.pb.go @@ -127,7 +127,8 @@ func (PaymentMethod) EnumDescriptor() ([]byte, []int) { // 1 type GetSubscriptionRequest struct { - // in the following format: "12D3KooWA8EXV3KjBxEU5EnsPfneLx84vMWAtTBQBeyooN82KSuS" + // in the following format: "A5k2d9sFZw84yisTxRnz2bPRd1YPfVfhxqymZ6yESprFTG65" + // you can get it with Account().SignKey.GetPublic().Account() OwnerAnyID string `protobuf:"bytes,1,opt,name=ownerAnyID,proto3" json:"ownerAnyID,omitempty"` } @@ -342,9 +343,10 @@ func (m *GetSubscriptionResponse) GetRequestedAnyName() string { // 2 type BuySubscriptionRequest struct { - // in the following format: "12D3KooWA8EXV3KjBxEU5EnsPfneLx84vMWAtTBQBeyooN82KSuS" + // in the following format: "A5k2d9sFZw84yisTxRnz2bPRd1YPfVfhxqymZ6yESprFTG65" + // you can get it with Account().SignKey.GetPublic().Account() OwnerAnyId string `protobuf:"bytes,1,opt,name=ownerAnyId,proto3" json:"ownerAnyId,omitempty"` - // this is the owner's ETH main EOA (Externally Owned Account) address + // this is the owner's main EOA (Externally Owned Account) address // not AccountAbstraction's SCW (Smart Contract Wallet) address! // this is required to reserve a name for the owner (later that is done by user) // in the following format: "0x7a250d5630b4cf539739df2c5dacb4c659f2488d" @@ -526,7 +528,8 @@ func (m *BuySubscriptionResponse) GetPaymentUrl() string { } type GetSubscriptionPortalLinkRequest struct { - // in the following format: "12D3KooWA8EXV3KjBxEU5EnsPfneLx84vMWAtTBQBeyooN82KSuS" + // in the following format: "A5k2d9sFZw84yisTxRnz2bPRd1YPfVfhxqymZ6yESprFTG65" + // you can get it with Account().SignKey.GetPublic().Account() OwnerAnyId string `protobuf:"bytes,1,opt,name=ownerAnyId,proto3" json:"ownerAnyId,omitempty"` } diff --git a/paymentservice/paymentserviceproto/protos/paymentservice.proto b/paymentservice/paymentserviceproto/protos/paymentservice.proto index 8c37ee89..bc5af5da 100644 --- a/paymentservice/paymentserviceproto/protos/paymentservice.proto +++ b/paymentservice/paymentserviceproto/protos/paymentservice.proto @@ -40,7 +40,8 @@ enum PaymentMethod { // 1 message GetSubscriptionRequest { - // in the following format: "12D3KooWA8EXV3KjBxEU5EnsPfneLx84vMWAtTBQBeyooN82KSuS" + // in the following format: "A5k2d9sFZw84yisTxRnz2bPRd1YPfVfhxqymZ6yESprFTG65" + // you can get it with Account().SignKey.GetPublic().Account() string ownerAnyID = 1; } @@ -77,10 +78,11 @@ message GetSubscriptionResponse { // 2 message BuySubscriptionRequest { - // in the following format: "12D3KooWA8EXV3KjBxEU5EnsPfneLx84vMWAtTBQBeyooN82KSuS" + // in the following format: "A5k2d9sFZw84yisTxRnz2bPRd1YPfVfhxqymZ6yESprFTG65" + // you can get it with Account().SignKey.GetPublic().Account() string ownerAnyId = 1; - // this is the owner's ETH main EOA (Externally Owned Account) address + // this is the owner's main EOA (Externally Owned Account) address // not AccountAbstraction's SCW (Smart Contract Wallet) address! // this is required to reserve a name for the owner (later that is done by user) // in the following format: "0x7a250d5630b4cf539739df2c5dacb4c659f2488d" @@ -111,7 +113,8 @@ message BuySubscriptionResponse { } message GetSubscriptionPortalLinkRequest { - // in the following format: "12D3KooWA8EXV3KjBxEU5EnsPfneLx84vMWAtTBQBeyooN82KSuS" + // in the following format: "A5k2d9sFZw84yisTxRnz2bPRd1YPfVfhxqymZ6yESprFTG65" + // you can get it with Account().SignKey.GetPublic().Account() string ownerAnyId = 1; } @@ -133,13 +136,10 @@ message GetSubscriptionPortalLinkResponse { service AnyPaymentProcessing { rpc GetSubscriptionStatus(GetSubscriptionRequestSigned) returns (GetSubscriptionResponse) {} - // Will save a new BillingID to DB, and return a payment link - // You can: - // a) buy a subscription - // b) TODO: upgrade your tier - // - // you can call BuySubscription multiple times even if current payment is not processed yet - // (to get new payment link) + // Will save a new BillingID to DB, and return a payment link. + // You can call BuySubscription multiple times even if current payment is not processed yet + // (to get new payment link). + // If user has already an active subscription, then this will return an error. rpc BuySubscription(BuySubscriptionRequestSigned) returns (BuySubscriptionResponse) {} // Will generate a link to the portal where user can: From 1026e993ecd7e0ec71e31b26bc5ccd15d02bd647 Mon Sep 17 00:00:00 2001 From: Anton Akentev Date: Mon, 5 Feb 2024 17:06:24 +0000 Subject: [PATCH 007/140] Update tier names --- .../paymentserviceproto/paymentservice.pb.go | 125 +++++++++--------- .../protos/paymentservice.proto | 10 +- 2 files changed, 68 insertions(+), 67 deletions(-) diff --git a/paymentservice/paymentserviceproto/paymentservice.pb.go b/paymentservice/paymentserviceproto/paymentservice.pb.go index cf1ca4ff..4746d9df 100644 --- a/paymentservice/paymentserviceproto/paymentservice.pb.go +++ b/paymentservice/paymentserviceproto/paymentservice.pb.go @@ -27,32 +27,32 @@ type SubscriptionTier int32 const ( SubscriptionTier_TierUnknown SubscriptionTier = 0 // "free" tier - SubscriptionTier_TierFriend SubscriptionTier = 1 + SubscriptionTier_TierExplorer SubscriptionTier = 1 // these can be used just for testing in debug mode // it will still create an active subscription, but with NO features - SubscriptionTier_TierSupporter1WeekTEST SubscriptionTier = 2 - SubscriptionTier_TierPatron1WeekTEST SubscriptionTier = 3 + SubscriptionTier_TierBuilder1WeekTEST SubscriptionTier = 2 + SubscriptionTier_TierCoCreator1WeekTEST SubscriptionTier = 3 // these are the real tiers: - SubscriptionTier_TierSupporter1Year SubscriptionTier = 4 - SubscriptionTier_TierPatron1Year SubscriptionTier = 5 + SubscriptionTier_TierBuilder1Year SubscriptionTier = 4 + SubscriptionTier_TierCoCreator1Year SubscriptionTier = 5 ) var SubscriptionTier_name = map[int32]string{ 0: "TierUnknown", - 1: "TierFriend", - 2: "TierSupporter1WeekTEST", - 3: "TierPatron1WeekTEST", - 4: "TierSupporter1Year", - 5: "TierPatron1Year", + 1: "TierExplorer", + 2: "TierBuilder1WeekTEST", + 3: "TierCoCreator1WeekTEST", + 4: "TierBuilder1Year", + 5: "TierCoCreator1Year", } var SubscriptionTier_value = map[string]int32{ "TierUnknown": 0, - "TierFriend": 1, - "TierSupporter1WeekTEST": 2, - "TierPatron1WeekTEST": 3, - "TierSupporter1Year": 4, - "TierPatron1Year": 5, + "TierExplorer": 1, + "TierBuilder1WeekTEST": 2, + "TierCoCreator1WeekTEST": 3, + "TierBuilder1Year": 4, + "TierCoCreator1Year": 5, } func (x SubscriptionTier) String() string { @@ -693,53 +693,54 @@ func init() { } var fileDescriptor_4feb29dcc5ba50f6 = []byte{ - // 733 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x95, 0xcd, 0x6e, 0xd3, 0x4e, - 0x10, 0xc0, 0xed, 0x24, 0x6d, 0x93, 0x69, 0x93, 0xb8, 0xdb, 0xff, 0x3f, 0x35, 0x51, 0x6a, 0x05, - 0x4b, 0x40, 0x14, 0x84, 0x2b, 0x0a, 0x12, 0x20, 0x21, 0x24, 0x17, 0x4a, 0x85, 0x54, 0x50, 0xe4, - 0xb4, 0x45, 0xf4, 0x84, 0x1b, 0x8f, 0x52, 0xd3, 0x74, 0x6d, 0xd6, 0x9b, 0x16, 0x5f, 0x79, 0x02, - 0x2e, 0xbc, 0x01, 0x0f, 0xc3, 0xb1, 0x47, 0x8e, 0xa8, 0x7d, 0x0e, 0x24, 0xe4, 0xb5, 0x9b, 0xcf, - 0xa6, 0xa9, 0xe8, 0x25, 0xde, 0xf9, 0xcd, 0xc7, 0xce, 0xec, 0xcc, 0x6e, 0xe0, 0x85, 0x6f, 0x87, - 0x47, 0x48, 0x79, 0x80, 0xec, 0xd8, 0x6d, 0xe1, 0xea, 0xb0, 0xe8, 0x33, 0x8f, 0x7b, 0xab, 0xe2, - 0x37, 0x18, 0x51, 0x19, 0x82, 0xea, 0x4f, 0xa1, 0xb4, 0x89, 0xbc, 0xd9, 0xdd, 0x0f, 0x5a, 0xcc, - 0xf5, 0xb9, 0xeb, 0x51, 0x0b, 0x3f, 0x77, 0x31, 0xe0, 0x44, 0x03, 0xf0, 0x4e, 0x28, 0x32, 0x93, - 0x86, 0x6f, 0x5e, 0xa9, 0x72, 0x55, 0xae, 0xe5, 0xac, 0x01, 0xa2, 0xef, 0x42, 0xe5, 0x72, 0xcf, - 0xa6, 0xdb, 0xa6, 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xf4, 0xe9, 0xff, 0xaa, 0xfb, 0xb3, 0xe2, 0xf3, 0xe8, 0x6f, - 0x00, 0x00, 0x00, 0xff, 0xff, 0x22, 0x5f, 0xac, 0xd7, 0x82, 0x07, 0x00, 0x00, + // 738 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x95, 0xcf, 0x4f, 0xdb, 0x48, + 0x14, 0xc7, 0xe3, 0x24, 0x40, 0xf2, 0x20, 0x89, 0x19, 0xd8, 0xe0, 0x8d, 0x82, 0x95, 0xb5, 0xb4, + 0xbb, 0x51, 0x56, 0x6b, 0xb4, 0x6c, 0xa5, 0xb6, 0x52, 0x55, 0xc9, 0xa1, 0x08, 0x55, 0xa2, 0x55, + 0xe4, 0x00, 0x55, 0x39, 0xd5, 0xc4, 0x4f, 0xc1, 0x25, 0xcc, 0xb8, 0xe3, 0x09, 0xe0, 0x6b, 0xff, + 0x82, 0x5e, 0x7b, 0xef, 0x1f, 0xd3, 0x23, 0xc7, 0x1e, 0x2b, 0xf8, 0x3b, 0x2a, 0x55, 0x19, 0x9b, + 0xfc, 0x24, 0x04, 0x95, 0x4b, 0x3c, 0xef, 0xf3, 0xde, 0xbc, 0x99, 0x37, 0xef, 0x3b, 0x13, 0x78, + 0xee, 0x3b, 0xe1, 0x29, 0x52, 0x11, 0x20, 0x3f, 0xf3, 0x5a, 0xb8, 0x31, 0x6a, 0xfa, 0x9c, 0x09, + 0xb6, 0x21, 0x7f, 0x83, 0x31, 0x97, 0x29, 0xa9, 0xf1, 0x04, 0x8a, 0x3b, 0x28, 0x9a, 0xdd, 0xa3, + 0xa0, 0xc5, 0x3d, 0x5f, 0x78, 0x8c, 0xda, 0xf8, 0xa1, 0x8b, 0x81, 0x20, 0x3a, 0x00, 0x3b, 0xa7, + 0xc8, 0x2d, 0x1a, 0xbe, 0x7c, 0xa1, 0x29, 0x15, 0xa5, 0x9a, 0xb5, 0x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7e, 0xa5, 0x2b, 0x9f, + 0xae, 0xf5, 0xc4, 0xe5, 0xb5, 0x9e, 0xf8, 0x76, 0xad, 0x27, 0x0e, 0x8d, 0xd9, 0xff, 0xac, 0x47, + 0xf3, 0xf2, 0xf3, 0xff, 0xcf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x04, 0x54, 0x62, 0x82, 0x86, 0x07, + 0x00, 0x00, } func (m *GetSubscriptionRequest) Marshal() (dAtA []byte, err error) { diff --git a/paymentservice/paymentserviceproto/protos/paymentservice.proto b/paymentservice/paymentserviceproto/protos/paymentservice.proto index bc5af5da..809a285e 100644 --- a/paymentservice/paymentserviceproto/protos/paymentservice.proto +++ b/paymentservice/paymentserviceproto/protos/paymentservice.proto @@ -8,16 +8,16 @@ enum SubscriptionTier { TierUnknown = 0; // "free" tier - TierFriend = 1; + TierExplorer = 1; // these can be used just for testing in debug mode // it will still create an active subscription, but with NO features - TierSupporter1WeekTEST = 2; - TierPatron1WeekTEST = 3; + TierBuilder1WeekTEST = 2; + TierCoCreator1WeekTEST = 3; // these are the real tiers: - TierSupporter1Year = 4; - TierPatron1Year = 5; + TierBuilder1Year = 4; + TierCoCreator1Year = 5; } enum SubscriptionStatus { From c8860ff4e364adfc3ff634b2882670944492bdc5 Mon Sep 17 00:00:00 2001 From: Anton Akentev Date: Wed, 7 Feb 2024 19:33:43 +0000 Subject: [PATCH 008/140] Email verification methods --- .../mock/mock_paymentserviceclient.go | 30 + .../paymentserviceclient.go | 22 + .../paymentserviceproto/paymentservice.pb.go | 1434 ++++++++++++++++- .../paymentservice_drpc.pb.go | 82 +- .../protos/paymentservice.proto | 64 +- 5 files changed, 1581 insertions(+), 51 deletions(-) diff --git a/paymentservice/paymentserviceclient/mock/mock_paymentserviceclient.go b/paymentservice/paymentserviceclient/mock/mock_paymentserviceclient.go index 1f7f2466..3f807dea 100644 --- a/paymentservice/paymentserviceclient/mock/mock_paymentserviceclient.go +++ b/paymentservice/paymentserviceclient/mock/mock_paymentserviceclient.go @@ -85,6 +85,21 @@ func (mr *MockAnyPpClientServiceMockRecorder) GetSubscriptionStatus(ctx, in any) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSubscriptionStatus", reflect.TypeOf((*MockAnyPpClientService)(nil).GetSubscriptionStatus), ctx, in) } +// GetVerificationEmail mocks base method. +func (m *MockAnyPpClientService) GetVerificationEmail(ctx context.Context, in *paymentserviceproto.GetVerificationEmailRequestSigned) (*paymentserviceproto.GetVerificationEmailResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetVerificationEmail", ctx, in) + ret0, _ := ret[0].(*paymentserviceproto.GetVerificationEmailResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetVerificationEmail indicates an expected call of GetVerificationEmail. +func (mr *MockAnyPpClientServiceMockRecorder) GetVerificationEmail(ctx, in any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetVerificationEmail", reflect.TypeOf((*MockAnyPpClientService)(nil).GetVerificationEmail), ctx, in) +} + // Init mocks base method. func (m *MockAnyPpClientService) Init(a *app.App) error { m.ctrl.T.Helper() @@ -112,3 +127,18 @@ func (mr *MockAnyPpClientServiceMockRecorder) Name() *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockAnyPpClientService)(nil).Name)) } + +// VerifyEmail mocks base method. +func (m *MockAnyPpClientService) VerifyEmail(ctx context.Context, in *paymentserviceproto.VerifyEmailRequestSigned) (*paymentserviceproto.VerifyEmailResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "VerifyEmail", ctx, in) + ret0, _ := ret[0].(*paymentserviceproto.VerifyEmailResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// VerifyEmail indicates an expected call of VerifyEmail. +func (mr *MockAnyPpClientServiceMockRecorder) VerifyEmail(ctx, in any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "VerifyEmail", reflect.TypeOf((*MockAnyPpClientService)(nil).VerifyEmail), ctx, in) +} diff --git a/paymentservice/paymentserviceclient/paymentserviceclient.go b/paymentservice/paymentserviceclient/paymentserviceclient.go index 2d67a956..374867f5 100644 --- a/paymentservice/paymentserviceclient/paymentserviceclient.go +++ b/paymentservice/paymentserviceclient/paymentserviceclient.go @@ -25,6 +25,8 @@ type AnyPpClientService interface { GetSubscriptionStatus(ctx context.Context, in *pp.GetSubscriptionRequestSigned) (out *pp.GetSubscriptionResponse, err error) BuySubscription(ctx context.Context, in *pp.BuySubscriptionRequestSigned) (out *pp.BuySubscriptionResponse, err error) GetSubscriptionPortalLink(ctx context.Context, in *pp.GetSubscriptionPortalLinkRequestSigned) (out *pp.GetSubscriptionPortalLinkResponse, err error) + GetVerificationEmail(ctx context.Context, in *pp.GetVerificationEmailRequestSigned) (out *pp.GetVerificationEmailResponse, err error) + VerifyEmail(ctx context.Context, in *pp.VerifyEmailRequestSigned) (out *pp.VerifyEmailResponse, err error) app.Component } @@ -101,3 +103,23 @@ func (s *service) GetSubscriptionPortalLink(ctx context.Context, in *pp.GetSubsc }) return } + +func (s *service) GetVerificationEmail(ctx context.Context, in *pp.GetVerificationEmailRequestSigned) (out *pp.GetVerificationEmailResponse, err error) { + err = s.doClient(ctx, func(cl pp.DRPCAnyPaymentProcessingClient) error { + if out, err = cl.GetVerificationEmail(ctx, in); err != nil { + return rpcerr.Unwrap(err) + } + return nil + }) + return +} + +func (s *service) VerifyEmail(ctx context.Context, in *pp.VerifyEmailRequestSigned) (out *pp.VerifyEmailResponse, err error) { + err = s.doClient(ctx, func(cl pp.DRPCAnyPaymentProcessingClient) error { + if out, err = cl.VerifyEmail(ctx, in); err != nil { + return rpcerr.Unwrap(err) + } + return nil + }) + return +} diff --git a/paymentservice/paymentserviceproto/paymentservice.pb.go b/paymentservice/paymentserviceproto/paymentservice.pb.go index 4746d9df..9045adf0 100644 --- a/paymentservice/paymentserviceproto/paymentservice.pb.go +++ b/paymentservice/paymentserviceproto/paymentservice.pb.go @@ -243,6 +243,9 @@ type GetSubscriptionResponse struct { // if name was requested - it will be here // seeBuySubscriptionRequest.requestedAnyName field RequestedAnyName string `protobuf:"bytes,9,opt,name=requestedAnyName,proto3" json:"requestedAnyName,omitempty"` + // if user verified her email OR provided it while buying a subscription + // it will be here + UserEmail string `protobuf:"bytes,10,opt,name=userEmail,proto3" json:"userEmail,omitempty"` } func (m *GetSubscriptionResponse) Reset() { *m = GetSubscriptionResponse{} } @@ -341,6 +344,13 @@ func (m *GetSubscriptionResponse) GetRequestedAnyName() string { return "" } +func (m *GetSubscriptionResponse) GetUserEmail() string { + if m != nil { + return m.UserEmail + } + return "" +} + // 2 type BuySubscriptionRequest struct { // in the following format: "A5k2d9sFZw84yisTxRnz2bPRd1YPfVfhxqymZ6yESprFTG65" @@ -673,6 +683,322 @@ func (m *GetSubscriptionPortalLinkResponse) GetPortalUrl() string { return "" } +type GetVerificationEmailRequest struct { + // in the following format: "A5k2d9sFZw84yisTxRnz2bPRd1YPfVfhxqymZ6yESprFTG65" + // you can get it with Account().SignKey.GetPublic().Account() + OwnerAnyId string `protobuf:"bytes,1,opt,name=ownerAnyId,proto3" json:"ownerAnyId,omitempty"` + Email string `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"` + SubscribeToNewsletter bool `protobuf:"varint,3,opt,name=subscribeToNewsletter,proto3" json:"subscribeToNewsletter,omitempty"` +} + +func (m *GetVerificationEmailRequest) Reset() { *m = GetVerificationEmailRequest{} } +func (m *GetVerificationEmailRequest) String() string { return proto.CompactTextString(m) } +func (*GetVerificationEmailRequest) ProtoMessage() {} +func (*GetVerificationEmailRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_4feb29dcc5ba50f6, []int{9} +} +func (m *GetVerificationEmailRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GetVerificationEmailRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GetVerificationEmailRequest.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 *GetVerificationEmailRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetVerificationEmailRequest.Merge(m, src) +} +func (m *GetVerificationEmailRequest) XXX_Size() int { + return m.Size() +} +func (m *GetVerificationEmailRequest) XXX_DiscardUnknown() { + xxx_messageInfo_GetVerificationEmailRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_GetVerificationEmailRequest proto.InternalMessageInfo + +func (m *GetVerificationEmailRequest) GetOwnerAnyId() string { + if m != nil { + return m.OwnerAnyId + } + return "" +} + +func (m *GetVerificationEmailRequest) GetEmail() string { + if m != nil { + return m.Email + } + return "" +} + +func (m *GetVerificationEmailRequest) GetSubscribeToNewsletter() bool { + if m != nil { + return m.SubscribeToNewsletter + } + return false +} + +type GetVerificationEmailResponse struct { +} + +func (m *GetVerificationEmailResponse) Reset() { *m = GetVerificationEmailResponse{} } +func (m *GetVerificationEmailResponse) String() string { return proto.CompactTextString(m) } +func (*GetVerificationEmailResponse) ProtoMessage() {} +func (*GetVerificationEmailResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_4feb29dcc5ba50f6, []int{10} +} +func (m *GetVerificationEmailResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GetVerificationEmailResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GetVerificationEmailResponse.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 *GetVerificationEmailResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetVerificationEmailResponse.Merge(m, src) +} +func (m *GetVerificationEmailResponse) XXX_Size() int { + return m.Size() +} +func (m *GetVerificationEmailResponse) XXX_DiscardUnknown() { + xxx_messageInfo_GetVerificationEmailResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_GetVerificationEmailResponse proto.InternalMessageInfo + +type GetVerificationEmailRequestSigned struct { + // GetVerificationEmailRequest + Payload []byte `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"` + // this is payload signed with payload.ownerAnyID + Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` +} + +func (m *GetVerificationEmailRequestSigned) Reset() { *m = GetVerificationEmailRequestSigned{} } +func (m *GetVerificationEmailRequestSigned) String() string { return proto.CompactTextString(m) } +func (*GetVerificationEmailRequestSigned) ProtoMessage() {} +func (*GetVerificationEmailRequestSigned) Descriptor() ([]byte, []int) { + return fileDescriptor_4feb29dcc5ba50f6, []int{11} +} +func (m *GetVerificationEmailRequestSigned) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GetVerificationEmailRequestSigned) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GetVerificationEmailRequestSigned.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 *GetVerificationEmailRequestSigned) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetVerificationEmailRequestSigned.Merge(m, src) +} +func (m *GetVerificationEmailRequestSigned) XXX_Size() int { + return m.Size() +} +func (m *GetVerificationEmailRequestSigned) XXX_DiscardUnknown() { + xxx_messageInfo_GetVerificationEmailRequestSigned.DiscardUnknown(m) +} + +var xxx_messageInfo_GetVerificationEmailRequestSigned proto.InternalMessageInfo + +func (m *GetVerificationEmailRequestSigned) GetPayload() []byte { + if m != nil { + return m.Payload + } + return nil +} + +func (m *GetVerificationEmailRequestSigned) GetSignature() []byte { + if m != nil { + return m.Signature + } + return nil +} + +type VerifyEmailRequest struct { + // in the following format: "A5k2d9sFZw84yisTxRnz2bPRd1YPfVfhxqymZ6yESprFTG65" + // you can get it with Account().SignKey.GetPublic().Account() + OwnerAnyId string `protobuf:"bytes,1,opt,name=ownerAnyId,proto3" json:"ownerAnyId,omitempty"` + // this is the owner's main EOA (Externally Owned Account) address + // not AccountAbstraction's SCW (Smart Contract Wallet) address! + // this is required to reserve a name for the owner (later that is done by user) + // in the following format: "0x7a250d5630b4cf539739df2c5dacb4c659f2488d" + OwnerEthAddress string `protobuf:"bytes,2,opt,name=ownerEthAddress,proto3" json:"ownerEthAddress,omitempty"` + Code string `protobuf:"bytes,3,opt,name=code,proto3" json:"code,omitempty"` +} + +func (m *VerifyEmailRequest) Reset() { *m = VerifyEmailRequest{} } +func (m *VerifyEmailRequest) String() string { return proto.CompactTextString(m) } +func (*VerifyEmailRequest) ProtoMessage() {} +func (*VerifyEmailRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_4feb29dcc5ba50f6, []int{12} +} +func (m *VerifyEmailRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *VerifyEmailRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_VerifyEmailRequest.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 *VerifyEmailRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_VerifyEmailRequest.Merge(m, src) +} +func (m *VerifyEmailRequest) XXX_Size() int { + return m.Size() +} +func (m *VerifyEmailRequest) XXX_DiscardUnknown() { + xxx_messageInfo_VerifyEmailRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_VerifyEmailRequest proto.InternalMessageInfo + +func (m *VerifyEmailRequest) GetOwnerAnyId() string { + if m != nil { + return m.OwnerAnyId + } + return "" +} + +func (m *VerifyEmailRequest) GetOwnerEthAddress() string { + if m != nil { + return m.OwnerEthAddress + } + return "" +} + +func (m *VerifyEmailRequest) GetCode() string { + if m != nil { + return m.Code + } + return "" +} + +type VerifyEmailResponse struct { + Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` +} + +func (m *VerifyEmailResponse) Reset() { *m = VerifyEmailResponse{} } +func (m *VerifyEmailResponse) String() string { return proto.CompactTextString(m) } +func (*VerifyEmailResponse) ProtoMessage() {} +func (*VerifyEmailResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_4feb29dcc5ba50f6, []int{13} +} +func (m *VerifyEmailResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *VerifyEmailResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_VerifyEmailResponse.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 *VerifyEmailResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_VerifyEmailResponse.Merge(m, src) +} +func (m *VerifyEmailResponse) XXX_Size() int { + return m.Size() +} +func (m *VerifyEmailResponse) XXX_DiscardUnknown() { + xxx_messageInfo_VerifyEmailResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_VerifyEmailResponse proto.InternalMessageInfo + +func (m *VerifyEmailResponse) GetSuccess() bool { + if m != nil { + return m.Success + } + return false +} + +type VerifyEmailRequestSigned struct { + // VerifyEmailRequest + Payload []byte `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"` + // this is payload signed with payload.ownerAnyID + Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` +} + +func (m *VerifyEmailRequestSigned) Reset() { *m = VerifyEmailRequestSigned{} } +func (m *VerifyEmailRequestSigned) String() string { return proto.CompactTextString(m) } +func (*VerifyEmailRequestSigned) ProtoMessage() {} +func (*VerifyEmailRequestSigned) Descriptor() ([]byte, []int) { + return fileDescriptor_4feb29dcc5ba50f6, []int{14} +} +func (m *VerifyEmailRequestSigned) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *VerifyEmailRequestSigned) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_VerifyEmailRequestSigned.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 *VerifyEmailRequestSigned) XXX_Merge(src proto.Message) { + xxx_messageInfo_VerifyEmailRequestSigned.Merge(m, src) +} +func (m *VerifyEmailRequestSigned) XXX_Size() int { + return m.Size() +} +func (m *VerifyEmailRequestSigned) XXX_DiscardUnknown() { + xxx_messageInfo_VerifyEmailRequestSigned.DiscardUnknown(m) +} + +var xxx_messageInfo_VerifyEmailRequestSigned proto.InternalMessageInfo + +func (m *VerifyEmailRequestSigned) GetPayload() []byte { + if m != nil { + return m.Payload + } + return nil +} + +func (m *VerifyEmailRequestSigned) GetSignature() []byte { + if m != nil { + return m.Signature + } + return nil +} + func init() { proto.RegisterEnum("SubscriptionTier", SubscriptionTier_name, SubscriptionTier_value) proto.RegisterEnum("SubscriptionStatus", SubscriptionStatus_name, SubscriptionStatus_value) @@ -686,6 +1012,12 @@ func init() { proto.RegisterType((*GetSubscriptionPortalLinkRequest)(nil), "GetSubscriptionPortalLinkRequest") proto.RegisterType((*GetSubscriptionPortalLinkRequestSigned)(nil), "GetSubscriptionPortalLinkRequestSigned") proto.RegisterType((*GetSubscriptionPortalLinkResponse)(nil), "GetSubscriptionPortalLinkResponse") + proto.RegisterType((*GetVerificationEmailRequest)(nil), "GetVerificationEmailRequest") + proto.RegisterType((*GetVerificationEmailResponse)(nil), "GetVerificationEmailResponse") + proto.RegisterType((*GetVerificationEmailRequestSigned)(nil), "GetVerificationEmailRequestSigned") + proto.RegisterType((*VerifyEmailRequest)(nil), "VerifyEmailRequest") + proto.RegisterType((*VerifyEmailResponse)(nil), "VerifyEmailResponse") + proto.RegisterType((*VerifyEmailRequestSigned)(nil), "VerifyEmailRequestSigned") } func init() { @@ -693,54 +1025,64 @@ func init() { } var fileDescriptor_4feb29dcc5ba50f6 = []byte{ - // 738 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x95, 0xcf, 0x4f, 0xdb, 0x48, - 0x14, 0xc7, 0xe3, 0x24, 0x40, 0xf2, 0x20, 0x89, 0x19, 0xd8, 0xe0, 0x8d, 0x82, 0x95, 0xb5, 0xb4, - 0xbb, 0x51, 0x56, 0x6b, 0xb4, 0x6c, 0xa5, 0xb6, 0x52, 0x55, 0xc9, 0xa1, 0x08, 0x55, 0xa2, 0x55, - 0xe4, 0x00, 0x55, 0x39, 0xd5, 0xc4, 0x4f, 0xc1, 0x25, 0xcc, 0xb8, 0xe3, 0x09, 0xe0, 0x6b, 0xff, - 0x82, 0x5e, 0x7b, 0xef, 0x1f, 0xd3, 0x23, 0xc7, 0x1e, 0x2b, 0xf8, 0x3b, 0x2a, 0x55, 0x19, 0x9b, - 0xfc, 0x24, 0x04, 0x95, 0x4b, 0x3c, 0xef, 0xf3, 0xde, 0xbc, 0x99, 0x37, 0xef, 0x3b, 0x13, 0x78, - 0xee, 0x3b, 0xe1, 0x29, 0x52, 0x11, 0x20, 0x3f, 0xf3, 0x5a, 0xb8, 0x31, 0x6a, 0xfa, 0x9c, 0x09, - 0xb6, 0x21, 0x7f, 0x83, 0x31, 0x97, 0x29, 0xa9, 0xf1, 0x04, 0x8a, 0x3b, 0x28, 0x9a, 0xdd, 0xa3, - 0xa0, 0xc5, 0x3d, 0x5f, 0x78, 0x8c, 0xda, 0xf8, 0xa1, 0x8b, 0x81, 0x20, 0x3a, 0x00, 0x3b, 0xa7, - 0xc8, 0x2d, 0x1a, 0xbe, 0x7c, 0xa1, 0x29, 0x15, 0xa5, 0x9a, 0xb5, 0x87, 0x88, 0x71, 0x00, 0xe5, - 0xdb, 0x67, 0x36, 0xbd, 0x36, 0x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9e, 0xf8, 0x76, 0xad, 0x27, 0x0e, 0x8d, 0xd9, 0xff, 0xac, 0x47, - 0xf3, 0xf2, 0xf3, 0xff, 0xcf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x04, 0x54, 0x62, 0x82, 0x86, 0x07, - 0x00, 0x00, + // 901 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x56, 0xcd, 0x6f, 0xe3, 0x44, + 0x14, 0xb7, 0x9b, 0xf4, 0x23, 0xaf, 0x6d, 0xea, 0x7d, 0xcd, 0x76, 0xbd, 0xa1, 0xb5, 0xc2, 0x48, + 0x40, 0x55, 0x84, 0x2b, 0xca, 0x4a, 0x80, 0x84, 0x10, 0x69, 0xa9, 0x2a, 0xa4, 0xb2, 0x8a, 0x9c, + 0xee, 0x22, 0x76, 0x2f, 0xb8, 0xf1, 0x23, 0x6b, 0x9a, 0xce, 0x98, 0xf1, 0x78, 0xbb, 0xfe, 0x13, + 0xb8, 0x71, 0xe5, 0xc6, 0xff, 0xc2, 0x85, 0xe3, 0x1e, 0x39, 0xa2, 0xf6, 0xef, 0x40, 0x42, 0x1e, + 0xbb, 0xcd, 0x77, 0x5a, 0xe8, 0x25, 0x9e, 0xf7, 0x7b, 0x1f, 0xf3, 0xbe, 0x27, 0xf0, 0x65, 0xe4, + 0xa7, 0xe7, 0xc4, 0x55, 0x4c, 0xf2, 0x75, 0xd8, 0xa1, 0xdd, 0x61, 0x32, 0x92, 0x42, 0x89, 0x5d, + 0xfd, 0x1b, 0x8f, 0xb0, 0x5c, 0x8d, 0xb2, 0xcf, 0x60, 0xe3, 0x88, 0x54, 0x3b, 0x39, 0x8d, 0x3b, + 0x32, 0x8c, 0x54, 0x28, 0xb8, 0x47, 0x3f, 0x27, 0x14, 0x2b, 0x74, 0x00, 0xc4, 0x05, 0x27, 0xd9, + 0xe4, 0xe9, 0x37, 0x5f, 0xdb, 0x66, 0x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 0x17, 0xec, 0xf6, + 0x3f, 0x86, 0xa7, 0x0b, 0xfa, 0xf3, 0xc9, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x0f, 0x6f, 0xc2, + 0xe1, 0x45, 0x0a, 0x00, 0x00, } func (m *GetSubscriptionRequest) Marshal() (dAtA []byte, err error) { @@ -830,6 +1172,13 @@ func (m *GetSubscriptionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) _ = i var l int _ = l + if len(m.UserEmail) > 0 { + i -= len(m.UserEmail) + copy(dAtA[i:], m.UserEmail) + i = encodeVarintPaymentservice(dAtA, i, uint64(len(m.UserEmail))) + i-- + dAtA[i] = 0x52 + } if len(m.RequestedAnyName) > 0 { i -= len(m.RequestedAnyName) copy(dAtA[i:], m.RequestedAnyName) @@ -1103,6 +1452,227 @@ func (m *GetSubscriptionPortalLinkResponse) MarshalToSizedBuffer(dAtA []byte) (i return len(dAtA) - i, nil } +func (m *GetVerificationEmailRequest) 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 *GetVerificationEmailRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetVerificationEmailRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.SubscribeToNewsletter { + i-- + if m.SubscribeToNewsletter { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x18 + } + if len(m.Email) > 0 { + i -= len(m.Email) + copy(dAtA[i:], m.Email) + i = encodeVarintPaymentservice(dAtA, i, uint64(len(m.Email))) + i-- + dAtA[i] = 0x12 + } + if len(m.OwnerAnyId) > 0 { + i -= len(m.OwnerAnyId) + copy(dAtA[i:], m.OwnerAnyId) + i = encodeVarintPaymentservice(dAtA, i, uint64(len(m.OwnerAnyId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *GetVerificationEmailResponse) 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 *GetVerificationEmailResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetVerificationEmailResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *GetVerificationEmailRequestSigned) 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 *GetVerificationEmailRequestSigned) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetVerificationEmailRequestSigned) 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 = encodeVarintPaymentservice(dAtA, i, uint64(len(m.Signature))) + i-- + dAtA[i] = 0x12 + } + if len(m.Payload) > 0 { + i -= len(m.Payload) + copy(dAtA[i:], m.Payload) + i = encodeVarintPaymentservice(dAtA, i, uint64(len(m.Payload))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *VerifyEmailRequest) 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 *VerifyEmailRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *VerifyEmailRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Code) > 0 { + i -= len(m.Code) + copy(dAtA[i:], m.Code) + i = encodeVarintPaymentservice(dAtA, i, uint64(len(m.Code))) + i-- + dAtA[i] = 0x1a + } + if len(m.OwnerEthAddress) > 0 { + i -= len(m.OwnerEthAddress) + copy(dAtA[i:], m.OwnerEthAddress) + i = encodeVarintPaymentservice(dAtA, i, uint64(len(m.OwnerEthAddress))) + i-- + dAtA[i] = 0x12 + } + if len(m.OwnerAnyId) > 0 { + i -= len(m.OwnerAnyId) + copy(dAtA[i:], m.OwnerAnyId) + i = encodeVarintPaymentservice(dAtA, i, uint64(len(m.OwnerAnyId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *VerifyEmailResponse) 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 *VerifyEmailResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *VerifyEmailResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Success { + i-- + if m.Success { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *VerifyEmailRequestSigned) 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 *VerifyEmailRequestSigned) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *VerifyEmailRequestSigned) 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 = encodeVarintPaymentservice(dAtA, i, uint64(len(m.Signature))) + i-- + dAtA[i] = 0x12 + } + if len(m.Payload) > 0 { + i -= len(m.Payload) + copy(dAtA[i:], m.Payload) + i = encodeVarintPaymentservice(dAtA, i, uint64(len(m.Payload))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func encodeVarintPaymentservice(dAtA []byte, offset int, v uint64) int { offset -= sovPaymentservice(v) base := offset @@ -1178,6 +1748,10 @@ func (m *GetSubscriptionResponse) Size() (n int) { if l > 0 { n += 1 + l + sovPaymentservice(uint64(l)) } + l = len(m.UserEmail) + if l > 0 { + n += 1 + l + sovPaymentservice(uint64(l)) + } return n } @@ -1281,6 +1855,102 @@ func (m *GetSubscriptionPortalLinkResponse) Size() (n int) { return n } +func (m *GetVerificationEmailRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.OwnerAnyId) + if l > 0 { + n += 1 + l + sovPaymentservice(uint64(l)) + } + l = len(m.Email) + if l > 0 { + n += 1 + l + sovPaymentservice(uint64(l)) + } + if m.SubscribeToNewsletter { + n += 2 + } + return n +} + +func (m *GetVerificationEmailResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *GetVerificationEmailRequestSigned) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Payload) + if l > 0 { + n += 1 + l + sovPaymentservice(uint64(l)) + } + l = len(m.Signature) + if l > 0 { + n += 1 + l + sovPaymentservice(uint64(l)) + } + return n +} + +func (m *VerifyEmailRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.OwnerAnyId) + if l > 0 { + n += 1 + l + sovPaymentservice(uint64(l)) + } + l = len(m.OwnerEthAddress) + if l > 0 { + n += 1 + l + sovPaymentservice(uint64(l)) + } + l = len(m.Code) + if l > 0 { + n += 1 + l + sovPaymentservice(uint64(l)) + } + return n +} + +func (m *VerifyEmailResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Success { + n += 2 + } + return n +} + +func (m *VerifyEmailRequestSigned) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Payload) + if l > 0 { + n += 1 + l + sovPaymentservice(uint64(l)) + } + l = len(m.Signature) + if l > 0 { + n += 1 + l + sovPaymentservice(uint64(l)) + } + return n +} + func sovPaymentservice(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -1701,6 +2371,38 @@ func (m *GetSubscriptionResponse) Unmarshal(dAtA []byte) error { } m.RequestedAnyName = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UserEmail", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPaymentservice + } + 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 ErrInvalidLengthPaymentservice + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPaymentservice + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.UserEmail = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipPaymentservice(dAtA[iNdEx:]) @@ -2388,6 +3090,642 @@ func (m *GetSubscriptionPortalLinkResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *GetVerificationEmailRequest) 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 ErrIntOverflowPaymentservice + } + 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: GetVerificationEmailRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetVerificationEmailRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OwnerAnyId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPaymentservice + } + 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 ErrInvalidLengthPaymentservice + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPaymentservice + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OwnerAnyId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Email", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPaymentservice + } + 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 ErrInvalidLengthPaymentservice + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPaymentservice + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Email = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SubscribeToNewsletter", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPaymentservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.SubscribeToNewsletter = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipPaymentservice(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthPaymentservice + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetVerificationEmailResponse) 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 ErrIntOverflowPaymentservice + } + 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: GetVerificationEmailResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetVerificationEmailResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipPaymentservice(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthPaymentservice + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetVerificationEmailRequestSigned) 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 ErrIntOverflowPaymentservice + } + 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: GetVerificationEmailRequestSigned: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetVerificationEmailRequestSigned: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPaymentservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthPaymentservice + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthPaymentservice + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Payload = append(m.Payload[:0], dAtA[iNdEx:postIndex]...) + if m.Payload == nil { + m.Payload = []byte{} + } + iNdEx = postIndex + case 2: + 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 ErrIntOverflowPaymentservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthPaymentservice + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthPaymentservice + } + 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 := skipPaymentservice(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthPaymentservice + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *VerifyEmailRequest) 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 ErrIntOverflowPaymentservice + } + 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: VerifyEmailRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: VerifyEmailRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OwnerAnyId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPaymentservice + } + 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 ErrInvalidLengthPaymentservice + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPaymentservice + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OwnerAnyId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OwnerEthAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPaymentservice + } + 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 ErrInvalidLengthPaymentservice + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPaymentservice + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OwnerEthAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPaymentservice + } + 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 ErrInvalidLengthPaymentservice + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPaymentservice + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Code = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipPaymentservice(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthPaymentservice + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *VerifyEmailResponse) 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 ErrIntOverflowPaymentservice + } + 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: VerifyEmailResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: VerifyEmailResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Success", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPaymentservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Success = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipPaymentservice(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthPaymentservice + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *VerifyEmailRequestSigned) 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 ErrIntOverflowPaymentservice + } + 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: VerifyEmailRequestSigned: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: VerifyEmailRequestSigned: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPaymentservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthPaymentservice + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthPaymentservice + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Payload = append(m.Payload[:0], dAtA[iNdEx:postIndex]...) + if m.Payload == nil { + m.Payload = []byte{} + } + iNdEx = postIndex + case 2: + 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 ErrIntOverflowPaymentservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthPaymentservice + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthPaymentservice + } + 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 := skipPaymentservice(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthPaymentservice + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipPaymentservice(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/paymentservice/paymentserviceproto/paymentservice_drpc.pb.go b/paymentservice/paymentserviceproto/paymentservice_drpc.pb.go index bef30a6a..369ecb66 100644 --- a/paymentservice/paymentserviceproto/paymentservice_drpc.pb.go +++ b/paymentservice/paymentserviceproto/paymentservice_drpc.pb.go @@ -43,6 +43,8 @@ type DRPCAnyPaymentProcessingClient interface { GetSubscriptionStatus(ctx context.Context, in *GetSubscriptionRequestSigned) (*GetSubscriptionResponse, error) BuySubscription(ctx context.Context, in *BuySubscriptionRequestSigned) (*BuySubscriptionResponse, error) GetSubscriptionPortalLink(ctx context.Context, in *GetSubscriptionPortalLinkRequestSigned) (*GetSubscriptionPortalLinkResponse, error) + GetVerificationEmail(ctx context.Context, in *GetVerificationEmailRequestSigned) (*GetVerificationEmailResponse, error) + VerifyEmail(ctx context.Context, in *VerifyEmailRequestSigned) (*VerifyEmailResponse, error) } type drpcAnyPaymentProcessingClient struct { @@ -82,10 +84,30 @@ func (c *drpcAnyPaymentProcessingClient) GetSubscriptionPortalLink(ctx context.C return out, nil } +func (c *drpcAnyPaymentProcessingClient) GetVerificationEmail(ctx context.Context, in *GetVerificationEmailRequestSigned) (*GetVerificationEmailResponse, error) { + out := new(GetVerificationEmailResponse) + err := c.cc.Invoke(ctx, "/AnyPaymentProcessing/GetVerificationEmail", drpcEncoding_File_paymentservice_paymentserviceproto_protos_paymentservice_proto{}, in, out) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *drpcAnyPaymentProcessingClient) VerifyEmail(ctx context.Context, in *VerifyEmailRequestSigned) (*VerifyEmailResponse, error) { + out := new(VerifyEmailResponse) + err := c.cc.Invoke(ctx, "/AnyPaymentProcessing/VerifyEmail", drpcEncoding_File_paymentservice_paymentserviceproto_protos_paymentservice_proto{}, in, out) + if err != nil { + return nil, err + } + return out, nil +} + type DRPCAnyPaymentProcessingServer interface { GetSubscriptionStatus(context.Context, *GetSubscriptionRequestSigned) (*GetSubscriptionResponse, error) BuySubscription(context.Context, *BuySubscriptionRequestSigned) (*BuySubscriptionResponse, error) GetSubscriptionPortalLink(context.Context, *GetSubscriptionPortalLinkRequestSigned) (*GetSubscriptionPortalLinkResponse, error) + GetVerificationEmail(context.Context, *GetVerificationEmailRequestSigned) (*GetVerificationEmailResponse, error) + VerifyEmail(context.Context, *VerifyEmailRequestSigned) (*VerifyEmailResponse, error) } type DRPCAnyPaymentProcessingUnimplementedServer struct{} @@ -102,9 +124,17 @@ func (s *DRPCAnyPaymentProcessingUnimplementedServer) GetSubscriptionPortalLink( return nil, drpcerr.WithCode(errors.New("Unimplemented"), drpcerr.Unimplemented) } +func (s *DRPCAnyPaymentProcessingUnimplementedServer) GetVerificationEmail(context.Context, *GetVerificationEmailRequestSigned) (*GetVerificationEmailResponse, error) { + return nil, drpcerr.WithCode(errors.New("Unimplemented"), drpcerr.Unimplemented) +} + +func (s *DRPCAnyPaymentProcessingUnimplementedServer) VerifyEmail(context.Context, *VerifyEmailRequestSigned) (*VerifyEmailResponse, error) { + return nil, drpcerr.WithCode(errors.New("Unimplemented"), drpcerr.Unimplemented) +} + type DRPCAnyPaymentProcessingDescription struct{} -func (DRPCAnyPaymentProcessingDescription) NumMethods() int { return 3 } +func (DRPCAnyPaymentProcessingDescription) NumMethods() int { return 5 } func (DRPCAnyPaymentProcessingDescription) Method(n int) (string, drpc.Encoding, drpc.Receiver, interface{}, bool) { switch n { @@ -135,6 +165,24 @@ func (DRPCAnyPaymentProcessingDescription) Method(n int) (string, drpc.Encoding, in1.(*GetSubscriptionPortalLinkRequestSigned), ) }, DRPCAnyPaymentProcessingServer.GetSubscriptionPortalLink, true + case 3: + return "/AnyPaymentProcessing/GetVerificationEmail", drpcEncoding_File_paymentservice_paymentserviceproto_protos_paymentservice_proto{}, + func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) { + return srv.(DRPCAnyPaymentProcessingServer). + GetVerificationEmail( + ctx, + in1.(*GetVerificationEmailRequestSigned), + ) + }, DRPCAnyPaymentProcessingServer.GetVerificationEmail, true + case 4: + return "/AnyPaymentProcessing/VerifyEmail", drpcEncoding_File_paymentservice_paymentserviceproto_protos_paymentservice_proto{}, + func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) { + return srv.(DRPCAnyPaymentProcessingServer). + VerifyEmail( + ctx, + in1.(*VerifyEmailRequestSigned), + ) + }, DRPCAnyPaymentProcessingServer.VerifyEmail, true default: return "", nil, nil, nil, false } @@ -191,3 +239,35 @@ func (x *drpcAnyPaymentProcessing_GetSubscriptionPortalLinkStream) SendAndClose( } return x.CloseSend() } + +type DRPCAnyPaymentProcessing_GetVerificationEmailStream interface { + drpc.Stream + SendAndClose(*GetVerificationEmailResponse) error +} + +type drpcAnyPaymentProcessing_GetVerificationEmailStream struct { + drpc.Stream +} + +func (x *drpcAnyPaymentProcessing_GetVerificationEmailStream) SendAndClose(m *GetVerificationEmailResponse) error { + if err := x.MsgSend(m, drpcEncoding_File_paymentservice_paymentserviceproto_protos_paymentservice_proto{}); err != nil { + return err + } + return x.CloseSend() +} + +type DRPCAnyPaymentProcessing_VerifyEmailStream interface { + drpc.Stream + SendAndClose(*VerifyEmailResponse) error +} + +type drpcAnyPaymentProcessing_VerifyEmailStream struct { + drpc.Stream +} + +func (x *drpcAnyPaymentProcessing_VerifyEmailStream) SendAndClose(m *VerifyEmailResponse) error { + if err := x.MsgSend(m, drpcEncoding_File_paymentservice_paymentserviceproto_protos_paymentservice_proto{}); err != nil { + return err + } + return x.CloseSend() +} diff --git a/paymentservice/paymentserviceproto/protos/paymentservice.proto b/paymentservice/paymentserviceproto/protos/paymentservice.proto index 809a285e..c0e5fcf1 100644 --- a/paymentservice/paymentserviceproto/protos/paymentservice.proto +++ b/paymentservice/paymentserviceproto/protos/paymentservice.proto @@ -74,6 +74,10 @@ message GetSubscriptionResponse { // if name was requested - it will be here // seeBuySubscriptionRequest.requestedAnyName field string requestedAnyName = 9; + + // if user verified her email OR provided it while buying a subscription + // it will be here + string userEmail = 10; } // 2 @@ -130,21 +134,77 @@ message GetSubscriptionPortalLinkResponse { string portalUrl = 1; } +message GetVerificationEmailRequest { + // in the following format: "A5k2d9sFZw84yisTxRnz2bPRd1YPfVfhxqymZ6yESprFTG65" + // you can get it with Account().SignKey.GetPublic().Account() + string ownerAnyId = 1; + + string email = 2; + + bool subscribeToNewsletter = 3; +} + +message GetVerificationEmailResponse { + +} + +message GetVerificationEmailRequestSigned { + // GetVerificationEmailRequest + bytes payload = 1; + + // this is payload signed with payload.ownerAnyID + bytes signature = 2; +} + +message VerifyEmailRequest { + // in the following format: "A5k2d9sFZw84yisTxRnz2bPRd1YPfVfhxqymZ6yESprFTG65" + // you can get it with Account().SignKey.GetPublic().Account() + string ownerAnyId = 1; + + // this is the owner's main EOA (Externally Owned Account) address + // not AccountAbstraction's SCW (Smart Contract Wallet) address! + // this is required to reserve a name for the owner (later that is done by user) + // in the following format: "0x7a250d5630b4cf539739df2c5dacb4c659f2488d" + string ownerEthAddress = 2; + + string code = 3; +} + +message VerifyEmailResponse { + bool success = 1; +} + +message VerifyEmailRequestSigned { + // VerifyEmailRequest + bytes payload = 1; + + // this is payload signed with payload.ownerAnyID + bytes signature = 2; +} + // NOTICE: // 1 - User can not ask for a payment/other links on behalf of another user (a signature is required) // 2 - Admin can do that on behalf of any user service AnyPaymentProcessing { rpc GetSubscriptionStatus(GetSubscriptionRequestSigned) returns (GetSubscriptionResponse) {} - // Will save a new BillingID to DB, and return a payment link. + // Save a new BillingID to DB, and return a payment link. // You can call BuySubscription multiple times even if current payment is not processed yet // (to get new payment link). // If user has already an active subscription, then this will return an error. rpc BuySubscription(BuySubscriptionRequestSigned) returns (BuySubscriptionResponse) {} - // Will generate a link to the portal where user can: + // Generate a link to the portal where user can: // a) change her billing details // b) see payment info, invoices, etc // c) cancel/renew the subscription rpc GetSubscriptionPortalLink(GetSubscriptionPortalLinkRequestSigned) returns (GetSubscriptionPortalLinkResponse) {} + + // Verify user's email: 1st step - get a verification link to the email + // Will fail if already verified, i.e. you can not change your email + rpc GetVerificationEmail(GetVerificationEmailRequestSigned) returns (GetVerificationEmailResponse) {} + + // Enter the code from the email + // Will fail if: link was not requested, link is expired, if email is already verified + rpc VerifyEmail(VerifyEmailRequestSigned) returns (VerifyEmailResponse) {} } From 4d962418abf97efb5bb7b1dac666fb6aaa037f95 Mon Sep 17 00:00:00 2001 From: Anton Akentev Date: Wed, 7 Feb 2024 19:51:44 +0000 Subject: [PATCH 009/140] Update protos --- paymentservice/paymentserviceproto/paymentservice.pb.go | 3 +-- paymentservice/paymentserviceproto/protos/paymentservice.proto | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/paymentservice/paymentserviceproto/paymentservice.pb.go b/paymentservice/paymentserviceproto/paymentservice.pb.go index 9045adf0..4331e9e6 100644 --- a/paymentservice/paymentserviceproto/paymentservice.pb.go +++ b/paymentservice/paymentserviceproto/paymentservice.pb.go @@ -243,8 +243,7 @@ type GetSubscriptionResponse struct { // if name was requested - it will be here // seeBuySubscriptionRequest.requestedAnyName field RequestedAnyName string `protobuf:"bytes,9,opt,name=requestedAnyName,proto3" json:"requestedAnyName,omitempty"` - // if user verified her email OR provided it while buying a subscription - // it will be here + // if user verified her email OR provided it while buying a subscription, it will be here UserEmail string `protobuf:"bytes,10,opt,name=userEmail,proto3" json:"userEmail,omitempty"` } diff --git a/paymentservice/paymentserviceproto/protos/paymentservice.proto b/paymentservice/paymentserviceproto/protos/paymentservice.proto index c0e5fcf1..d842684b 100644 --- a/paymentservice/paymentserviceproto/protos/paymentservice.proto +++ b/paymentservice/paymentserviceproto/protos/paymentservice.proto @@ -75,8 +75,7 @@ message GetSubscriptionResponse { // seeBuySubscriptionRequest.requestedAnyName field string requestedAnyName = 9; - // if user verified her email OR provided it while buying a subscription - // it will be here + // if user verified her email OR provided it while buying a subscription, it will be here string userEmail = 10; } From aae12bce94dd7f93505e64971c59de73bdf3db0f Mon Sep 17 00:00:00 2001 From: Anton Akentev Date: Fri, 9 Feb 2024 18:26:48 +0000 Subject: [PATCH 010/140] Add SubscribeToNewsletter param --- .../paymentserviceproto/paymentservice.pb.go | 159 +++++++++++------- .../protos/paymentservice.proto | 2 + 2 files changed, 102 insertions(+), 59 deletions(-) diff --git a/paymentservice/paymentserviceproto/paymentservice.pb.go b/paymentservice/paymentserviceproto/paymentservice.pb.go index 4331e9e6..6d8d8c78 100644 --- a/paymentservice/paymentserviceproto/paymentservice.pb.go +++ b/paymentservice/paymentserviceproto/paymentservice.pb.go @@ -244,7 +244,8 @@ type GetSubscriptionResponse struct { // seeBuySubscriptionRequest.requestedAnyName field RequestedAnyName string `protobuf:"bytes,9,opt,name=requestedAnyName,proto3" json:"requestedAnyName,omitempty"` // if user verified her email OR provided it while buying a subscription, it will be here - UserEmail string `protobuf:"bytes,10,opt,name=userEmail,proto3" json:"userEmail,omitempty"` + UserEmail string `protobuf:"bytes,10,opt,name=userEmail,proto3" json:"userEmail,omitempty"` + SubscribeToNewsletter bool `protobuf:"varint,11,opt,name=subscribeToNewsletter,proto3" json:"subscribeToNewsletter,omitempty"` } func (m *GetSubscriptionResponse) Reset() { *m = GetSubscriptionResponse{} } @@ -350,6 +351,13 @@ func (m *GetSubscriptionResponse) GetUserEmail() string { return "" } +func (m *GetSubscriptionResponse) GetSubscribeToNewsletter() bool { + if m != nil { + return m.SubscribeToNewsletter + } + return false +} + // 2 type BuySubscriptionRequest struct { // in the following format: "A5k2d9sFZw84yisTxRnz2bPRd1YPfVfhxqymZ6yESprFTG65" @@ -1024,64 +1032,64 @@ func init() { } var fileDescriptor_4feb29dcc5ba50f6 = []byte{ - // 901 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x56, 0xcd, 0x6f, 0xe3, 0x44, - 0x14, 0xb7, 0x9b, 0xf4, 0x23, 0xaf, 0x6d, 0xea, 0x7d, 0xcd, 0x76, 0xbd, 0xa1, 0xb5, 0xc2, 0x48, - 0x40, 0x55, 0x84, 0x2b, 0xca, 0x4a, 0x80, 0x84, 0x10, 0x69, 0xa9, 0x2a, 0xa4, 0xb2, 0x8a, 0x9c, - 0xee, 0x22, 0x76, 0x2f, 0xb8, 0xf1, 0x23, 0x6b, 0x9a, 0xce, 0x98, 0xf1, 0x78, 0xbb, 0xfe, 0x13, - 0xb8, 0x71, 0xe5, 0xc6, 0xff, 0xc2, 0x85, 0xe3, 0x1e, 0x39, 0xa2, 0xf6, 0xef, 0x40, 0x42, 0x1e, - 0xbb, 0xcd, 0x77, 0x5a, 0xe8, 0x25, 0x9e, 0xf7, 0x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75, - 0x15, 0x31, 0x03, 0x5f, 0x42, 0x6d, 0xd2, 0x08, 0xa3, 0xd6, 0x9e, 0x3d, 0xd9, 0xf5, 0x2d, 0x77, - 0xe6, 0x76, 0x30, 0xf0, 0x2b, 0x58, 0x1e, 0x98, 0x0e, 0x7c, 0xec, 0x4e, 0x9b, 0x95, 0x7a, 0xcd, - 0x9d, 0x30, 0x77, 0xcc, 0xd8, 0xff, 0xe2, 0xcf, 0x4b, 0xc7, 0x7c, 0x7b, 0xe9, 0x98, 0x7f, 0x5f, - 0x3a, 0xe6, 0xaf, 0x57, 0x8e, 0xf1, 0xf6, 0xca, 0x31, 0xfe, 0xba, 0x72, 0x8c, 0x17, 0xec, 0xf6, - 0x3f, 0x86, 0xa7, 0x0b, 0xfa, 0xf3, 0xc9, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x0f, 0x6f, 0xc2, - 0xe1, 0x45, 0x0a, 0x00, 0x00, + // 909 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x56, 0xcd, 0x6e, 0xe4, 0x44, + 0x10, 0xb6, 0x33, 0x93, 0x9f, 0xa9, 0x24, 0x13, 0x6f, 0x65, 0x36, 0xeb, 0x1d, 0x12, 0x6b, 0x68, + 0x09, 0x88, 0x82, 0x70, 0x44, 0x58, 0x09, 0x90, 0x10, 0x62, 0x12, 0xa2, 0x08, 0x29, 0xac, 0x46, + 0x9e, 0xec, 0x22, 0x76, 0x2f, 0x38, 0xe3, 0x62, 0xd6, 0x64, 0xd2, 0x6d, 0xda, 0xed, 0xcd, 0xfa, + 0x11, 0xb8, 0x71, 0xe5, 0x79, 0xb8, 0x70, 0xdc, 0x13, 0xe2, 0x88, 0x92, 0xe7, 0x40, 0x42, 0x6e, + 0x3b, 0x99, 0xff, 0x49, 0x20, 0x17, 0xbb, 0xeb, 0xab, 0xea, 0xea, 0xfa, 0xe9, 0xaf, 0x6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0x8e, 0x22, 0x66, 0xe0, 0x4b, 0xa8, 0x4d, 0xa2, + 0x30, 0xea, 0xdd, 0xb3, 0x99, 0x5d, 0xdf, 0x72, 0x67, 0x4e, 0x07, 0x03, 0xbf, 0x82, 0xe5, 0x01, + 0x76, 0xe0, 0x63, 0x77, 0x1a, 0x57, 0xea, 0x35, 0x77, 0x02, 0xef, 0x98, 0xb1, 0xff, 0xc5, 0x1f, + 0x97, 0x8e, 0xf9, 0xf6, 0xd2, 0x31, 0xff, 0xbe, 0x74, 0xcc, 0x5f, 0xaf, 0x1c, 0xe3, 0xed, 0x95, + 0x63, 0xfc, 0x75, 0xe5, 0x18, 0x2f, 0xd8, 0xed, 0xbf, 0x93, 0xa7, 0x0b, 0xfa, 0xf5, 0xc9, 0xbf, + 0x01, 0x00, 0x00, 0xff, 0xff, 0x14, 0xaf, 0xb0, 0x89, 0x7b, 0x0a, 0x00, 0x00, } func (m *GetSubscriptionRequest) Marshal() (dAtA []byte, err error) { @@ -1171,6 +1179,16 @@ func (m *GetSubscriptionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) _ = i var l int _ = l + if m.SubscribeToNewsletter { + i-- + if m.SubscribeToNewsletter { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x58 + } if len(m.UserEmail) > 0 { i -= len(m.UserEmail) copy(dAtA[i:], m.UserEmail) @@ -1751,6 +1769,9 @@ func (m *GetSubscriptionResponse) Size() (n int) { if l > 0 { n += 1 + l + sovPaymentservice(uint64(l)) } + if m.SubscribeToNewsletter { + n += 2 + } return n } @@ -2402,6 +2423,26 @@ func (m *GetSubscriptionResponse) Unmarshal(dAtA []byte) error { } m.UserEmail = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 11: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SubscribeToNewsletter", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPaymentservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.SubscribeToNewsletter = bool(v != 0) default: iNdEx = preIndex skippy, err := skipPaymentservice(dAtA[iNdEx:]) diff --git a/paymentservice/paymentserviceproto/protos/paymentservice.proto b/paymentservice/paymentserviceproto/protos/paymentservice.proto index d842684b..9b883a73 100644 --- a/paymentservice/paymentserviceproto/protos/paymentservice.proto +++ b/paymentservice/paymentserviceproto/protos/paymentservice.proto @@ -77,6 +77,8 @@ message GetSubscriptionResponse { // if user verified her email OR provided it while buying a subscription, it will be here string userEmail = 10; + + bool subscribeToNewsletter = 11; } // 2 From b93dd30913227dc675af87d12c77f8f946a2ef14 Mon Sep 17 00:00:00 2001 From: Anton Akentev Date: Mon, 19 Feb 2024 13:54:08 +0000 Subject: [PATCH 011/140] NS: add AdminNameRegisterSigned command --- .../mock/mock_nameserviceclient.go | 59 +--- .../nameserviceclient/nameserviceclient.go | 12 + .../nameserviceproto/nameservice.pb.go | 51 +-- .../nameserviceproto/nameservice_aa.pb.go | 334 +++++++++++++++--- .../nameserviceproto/nameservice_drpc.pb.go | 42 ++- .../nameserviceproto/protos/nameservice.proto | 5 + .../protos/nameservice_aa.proto | 8 + 7 files changed, 383 insertions(+), 128 deletions(-) diff --git a/nameservice/nameserviceclient/mock/mock_nameserviceclient.go b/nameservice/nameserviceclient/mock/mock_nameserviceclient.go index a90bee8e..e240df51 100644 --- a/nameservice/nameserviceclient/mock/mock_nameserviceclient.go +++ b/nameservice/nameserviceclient/mock/mock_nameserviceclient.go @@ -40,20 +40,6 @@ func (m *MockAnyNsClientServiceBase) EXPECT() *MockAnyNsClientServiceBaseMockRec return m.recorder } -// Close mocks base method. -func (m *MockAnyNsClientServiceBase) Close(ctx context.Context) error { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Close", ctx) - ret0, _ := ret[0].(error) - return ret0 -} - -// Close indicates an expected call of Close. -func (mr *MockAnyNsClientServiceBaseMockRecorder) Close(ctx any) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockAnyNsClientServiceBase)(nil).Close), ctx) -} - // GetNameByAddress mocks base method. func (m *MockAnyNsClientServiceBase) GetNameByAddress(ctx context.Context, in *nameserviceproto.NameByAddressRequest) (*nameserviceproto.NameByAddressResponse, error) { m.ctrl.T.Helper() @@ -112,20 +98,6 @@ func (mr *MockAnyNsClientServiceBaseMockRecorder) Name() *gomock.Call { return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockAnyNsClientServiceBase)(nil).Name)) } -// Run mocks base method. -func (m *MockAnyNsClientServiceBase) Run(ctx context.Context) error { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Run", ctx) - ret0, _ := ret[0].(error) - return ret0 -} - -// Run indicates an expected call of Run. -func (mr *MockAnyNsClientServiceBaseMockRecorder) Run(ctx any) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Run", reflect.TypeOf((*MockAnyNsClientServiceBase)(nil).Run), ctx) -} - // MockAnyNsClientService is a mock of AnyNsClientService interface. type MockAnyNsClientService struct { ctrl *gomock.Controller @@ -164,18 +136,19 @@ func (mr *MockAnyNsClientServiceMockRecorder) AdminFundUserAccount(ctx, in any) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AdminFundUserAccount", reflect.TypeOf((*MockAnyNsClientService)(nil).AdminFundUserAccount), ctx, in) } -// Close mocks base method. -func (m *MockAnyNsClientService) Close(ctx context.Context) error { +// AdminRegisterName mocks base method. +func (m *MockAnyNsClientService) AdminRegisterName(ctx context.Context, in *nameserviceproto.NameRegisterRequestSigned) (*nameserviceproto.OperationResponse, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Close", ctx) - ret0, _ := ret[0].(error) - return ret0 + ret := m.ctrl.Call(m, "AdminRegisterName", ctx, in) + ret0, _ := ret[0].(*nameserviceproto.OperationResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 } -// Close indicates an expected call of Close. -func (mr *MockAnyNsClientServiceMockRecorder) Close(ctx any) *gomock.Call { +// AdminRegisterName indicates an expected call of AdminRegisterName. +func (mr *MockAnyNsClientServiceMockRecorder) AdminRegisterName(ctx, in any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockAnyNsClientService)(nil).Close), ctx) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AdminRegisterName", reflect.TypeOf((*MockAnyNsClientService)(nil).AdminRegisterName), ctx, in) } // CreateOperation mocks base method. @@ -280,17 +253,3 @@ func (mr *MockAnyNsClientServiceMockRecorder) Name() *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockAnyNsClientService)(nil).Name)) } - -// Run mocks base method. -func (m *MockAnyNsClientService) Run(ctx context.Context) error { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Run", ctx) - ret0, _ := ret[0].(error) - return ret0 -} - -// Run indicates an expected call of Run. -func (mr *MockAnyNsClientServiceMockRecorder) Run(ctx any) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Run", reflect.TypeOf((*MockAnyNsClientService)(nil).Run), ctx) -} diff --git a/nameservice/nameserviceclient/nameserviceclient.go b/nameservice/nameserviceclient/nameserviceclient.go index 84ec7d96..4aa9a4ac 100644 --- a/nameservice/nameserviceclient/nameserviceclient.go +++ b/nameservice/nameserviceclient/nameserviceclient.go @@ -35,6 +35,8 @@ type AnyNsClientService interface { GetUserAccount(ctx context.Context, in *nsp.GetUserAccountRequest) (out *nsp.UserAccount, err error) AdminFundUserAccount(ctx context.Context, in *nsp.AdminFundUserAccountRequestSigned) (out *nsp.OperationResponse, err error) + AdminRegisterName(ctx context.Context, in *nsp.NameRegisterRequestSigned) (out *nsp.OperationResponse, err error) + GetOperation(ctx context.Context, in *nsp.GetOperationStatusRequest) (out *nsp.OperationResponse, err error) CreateOperation(ctx context.Context, in *nsp.CreateUserOperationRequestSigned) (out *nsp.OperationResponse, err error) @@ -144,6 +146,16 @@ func (s *service) AdminFundUserAccount(ctx context.Context, in *nsp.AdminFundUse return } +func (s *service) AdminRegisterName(ctx context.Context, in *nsp.NameRegisterRequestSigned) (out *nsp.OperationResponse, err error) { + err = s.doClient(ctx, func(cl nsp.DRPCAnynsClient) error { + if out, err = cl.AdminNameRegisterSigned(ctx, in); err != nil { + return rpcerr.Unwrap(err) + } + return nil + }) + return +} + func (s *service) GetOperation(ctx context.Context, in *nsp.GetOperationStatusRequest) (out *nsp.OperationResponse, err error) { err = s.doClientAA(ctx, func(cl nsp.DRPCAnynsAccountAbstractionClient) error { if out, err = cl.GetOperation(ctx, in); err != nil { diff --git a/nameservice/nameserviceproto/nameservice.pb.go b/nameservice/nameserviceproto/nameservice.pb.go index 28b6a4e5..6b7f96f4 100644 --- a/nameservice/nameserviceproto/nameservice.pb.go +++ b/nameservice/nameserviceproto/nameservice.pb.go @@ -127,7 +127,7 @@ type NameAvailableResponse struct { // This field is non-empty only if name is "already registered" SpaceId string `protobuf:"bytes,5,opt,name=spaceId,proto3" json:"spaceId,omitempty"` // doesn't work with marashalling/unmarshalling - // google.protobuf.Timestamp nameExpires = 5 [(gogoproto.stdtime) = true]; + //google.protobuf.Timestamp nameExpires = 5 [(gogoproto.stdtime) = true]; NameExpires int64 `protobuf:"varint,6,opt,name=nameExpires,proto3" json:"nameExpires,omitempty"` } @@ -270,29 +270,32 @@ func init() { } var fileDescriptor_06bca2ea4304f305 = []byte{ - // 343 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x52, 0x4d, 0x4f, 0xc2, 0x40, - 0x10, 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31, 0x0f, 0x30, 0x35, 0xe1, 0x52, 0x44, 0x6c, 0x88, - 0x7d, 0xdf, 0x2c, 0x48, 0x46, 0x1a, 0xd2, 0x26, 0x5c, 0x6d, 0x6d, 0xee, 0x7d, 0x44, 0xe3, 0x18, - 0x85, 0x59, 0x6c, 0x92, 0x56, 0xce, 0xd3, 0x21, 0xdb, 0xdd, 0xc9, 0xd6, 0xfc, 0x53, 0xb2, 0xab, - 0x50, 0x18, 0x85, 0x53, 0xee, 0x2b, 0xc9, 0xbb, 0x80, 0x52, 0xc8, 0x6f, 0xab, 0x95, 0x40, 0x79, - 0xee, 0x2c, 0x09, 0x14, 0x5c, 0xbe, 0xe0, 0x82, 0x76, 0xa1, 0xd2, 0x17, 0x47, 0x2e, 0xd2, 0x9a, - 0x93, 0xb5, 0xd2, 0xfa, 0x8d, 0x93, 0x69, 0xb6, 0x6d, 0xd0, 0x07, 0xb8, 0x7e, 0xc2, 0xe4, 0xe8, - 0x4e, 0xaa, 0xc9, 0xe9, 0x8e, 0x55, 0x93, 0x3f, 0x57, 0xb7, 0x8d, 0xee, 0xfd, 0xe7, 0xda, 0x22, - 0xab, 0xb5, 0x45, 0xbe, 0xd7, 0x16, 0x59, 0x6e, 0x2c, 0x63, 0xb5, 0xb1, 0x8c, 0xaf, 0x8d, 0x65, - 0xbc, 0x36, 0xfe, 0x7b, 0x9a, 0x83, 0xa2, 0xfc, 0xdd, 0xfe, 0x06, 0x00, 0x00, 0xff, 0xff, 0xed, - 0x14, 0xb9, 0xb1, 0xc1, 0x02, 0x00, 0x00, + // 396 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x52, 0x4d, 0x6b, 0xea, 0x40, + 0x14, 0xcd, 0x3c, 0x3f, 0x9e, 0xce, 0x5b, 0xf8, 0x18, 0xf4, 0xbd, 0x10, 0x24, 0x48, 0x56, 0xae, + 0x22, 0x58, 0x5a, 0xba, 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0xcd, 0x03, 0x3a, 0x84, 0x9e, + 0xa3, 0x16, 0x04, 0x23, 0x2d, 0x49, 0x03, 0xff, 0x89, 0x37, 0xdd, 0x7d, 0x0a, 0xdc, 0x10, 0xb8, + 0x5a, 0x6c, 0xa0, 0x66, 0xce, 0xce, 0x42, 0x86, 0x95, 0xc4, 0xce, 0xec, 0x4f, 0xc6, 0xae, 0xe2, + 0xc2, 0xc8, 0x9f, 0x32, 0x47, 0x46, 0x4e, 0x0a, 0x42, 0x70, 0x3e, 0x56, 0xcb, 0x80, 0xe2, 0xdc, + 0x7e, 0x43, 0xb8, 0x60, 0xb1, 0x05, 0xe3, 0xa4, 0x83, 0x2b, 0x3d, 0xbe, 0xb3, 0x45, 0x52, 0x33, + 0x0f, 0x3d, 0xa9, 0xf6, 0xcf, 0x3c, 0xb8, 0x6c, 0x43, 0x21, 0x17, 0xf8, 0xef, 0x15, 0x44, 0x3b, + 0x77, 0x92, 0x26, 0xfb, 0x6f, 0x2c, 0x4d, 0xbe, 0x5c, 0xdd, 0x50, 0xc8, 0x35, 0xfe, 0x6f, 0x39, + 0x13, 0x97, 0xc5, 0x7d, 0x1b, 0xc6, 0x2e, 0x8f, 0x20, 0xec, 0xbb, 0x63, 0x06, 0x0e, 0xd1, 0xcc, + 0x2c, 0x28, 0xad, 0x92, 0x9e, 0x46, 0xcc, 0xdb, 0x00, 0x42, 0x1a, 0xb9, 0x3e, 0xdb, 0x9a, 0x75, + 0xce, 0x5e, 0x56, 0x3a, 0x5a, 0xae, 0x74, 0xf4, 0xbe, 0xd2, 0xd1, 0xf3, 0x5a, 0x57, 0x96, 0x6b, + 0x5d, 0x79, 0x5d, 0xeb, 0xca, 0x5d, 0xfd, 0xbb, 0x4f, 0x7d, 0x50, 0x14, 0x7f, 0x27, 0x9f, 0x01, + 0x00, 0x00, 0xff, 0xff, 0xd0, 0xac, 0x32, 0x54, 0x48, 0x03, 0x00, 0x00, } func (m *NameAvailableRequest) Marshal() (dAtA []byte, err error) { diff --git a/nameservice/nameserviceproto/nameservice_aa.pb.go b/nameservice/nameserviceproto/nameservice_aa.pb.go index e382e8e3..db21d486 100644 --- a/nameservice/nameserviceproto/nameservice_aa.pb.go +++ b/nameservice/nameserviceproto/nameservice_aa.pb.go @@ -672,6 +672,60 @@ func (m *NameRegisterRequest) GetOwnerEthAddress() string { return "" } +type NameRegisterRequestSigned struct { + // NameRegisterRequest struct + Payload []byte `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"` + // payload signed by payload.ownerEthAddress + Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` +} + +func (m *NameRegisterRequestSigned) Reset() { *m = NameRegisterRequestSigned{} } +func (m *NameRegisterRequestSigned) String() string { return proto.CompactTextString(m) } +func (*NameRegisterRequestSigned) ProtoMessage() {} +func (*NameRegisterRequestSigned) Descriptor() ([]byte, []int) { + return fileDescriptor_c9d3f9b8b141e804, []int{10} +} +func (m *NameRegisterRequestSigned) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NameRegisterRequestSigned) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NameRegisterRequestSigned.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 *NameRegisterRequestSigned) XXX_Merge(src proto.Message) { + xxx_messageInfo_NameRegisterRequestSigned.Merge(m, src) +} +func (m *NameRegisterRequestSigned) XXX_Size() int { + return m.Size() +} +func (m *NameRegisterRequestSigned) XXX_DiscardUnknown() { + xxx_messageInfo_NameRegisterRequestSigned.DiscardUnknown(m) +} + +var xxx_messageInfo_NameRegisterRequestSigned proto.InternalMessageInfo + +func (m *NameRegisterRequestSigned) GetPayload() []byte { + if m != nil { + return m.Payload + } + return nil +} + +func (m *NameRegisterRequestSigned) GetSignature() []byte { + if m != nil { + return m.Signature + } + return nil +} + type NameRegisterForSpaceRequest struct { FullName string `protobuf:"bytes,1,opt,name=fullName,proto3" json:"fullName,omitempty"` // A content hash attached to this name @@ -689,7 +743,7 @@ func (m *NameRegisterForSpaceRequest) Reset() { *m = NameRegisterForSpac func (m *NameRegisterForSpaceRequest) String() string { return proto.CompactTextString(m) } func (*NameRegisterForSpaceRequest) ProtoMessage() {} func (*NameRegisterForSpaceRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_c9d3f9b8b141e804, []int{10} + return fileDescriptor_c9d3f9b8b141e804, []int{11} } func (m *NameRegisterForSpaceRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -754,7 +808,7 @@ func (m *GetOperationStatusRequest) Reset() { *m = GetOperationStatusReq func (m *GetOperationStatusRequest) String() string { return proto.CompactTextString(m) } func (*GetOperationStatusRequest) ProtoMessage() {} func (*GetOperationStatusRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_c9d3f9b8b141e804, []int{11} + return fileDescriptor_c9d3f9b8b141e804, []int{12} } func (m *GetOperationStatusRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -799,7 +853,7 @@ func (m *OperationResponse) Reset() { *m = OperationResponse{} } func (m *OperationResponse) String() string { return proto.CompactTextString(m) } func (*OperationResponse) ProtoMessage() {} func (*OperationResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_c9d3f9b8b141e804, []int{12} + return fileDescriptor_c9d3f9b8b141e804, []int{13} } func (m *OperationResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -854,6 +908,7 @@ func init() { proto.RegisterType((*CreateUserOperationRequest)(nil), "CreateUserOperationRequest") proto.RegisterType((*CreateUserOperationRequestSigned)(nil), "CreateUserOperationRequestSigned") proto.RegisterType((*NameRegisterRequest)(nil), "NameRegisterRequest") + proto.RegisterType((*NameRegisterRequestSigned)(nil), "NameRegisterRequestSigned") proto.RegisterType((*NameRegisterForSpaceRequest)(nil), "NameRegisterForSpaceRequest") proto.RegisterType((*GetOperationStatusRequest)(nil), "GetOperationStatusRequest") proto.RegisterType((*OperationResponse)(nil), "OperationResponse") @@ -864,56 +919,57 @@ func init() { } var fileDescriptor_c9d3f9b8b141e804 = []byte{ - // 781 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x56, 0xcd, 0x4e, 0xe3, 0x56, - 0x14, 0x8e, 0x89, 0xf9, 0xc9, 0x21, 0x0d, 0xe1, 0x06, 0x68, 0x1a, 0x52, 0x37, 0xb8, 0x55, 0x15, - 0x75, 0x61, 0x2a, 0x2a, 0xb5, 0x6c, 0x2a, 0xd5, 0x0d, 0x24, 0x45, 0x54, 0x80, 0x9c, 0xa2, 0x4a, - 0xa0, 0xaa, 0xba, 0xc4, 0x87, 0x34, 0x6a, 0x72, 0x6f, 0x7a, 0x7d, 0x53, 0x9a, 0x07, 0xe8, 0x7e, - 0xa4, 0x79, 0x84, 0x59, 0xcc, 0x23, 0xcc, 0x2b, 0xcc, 0x92, 0xe5, 0x2c, 0x47, 0xf0, 0x22, 0x23, - 0x5f, 0x1c, 0x63, 0x07, 0x27, 0x61, 0x86, 0xc5, 0x6c, 0x12, 0xdf, 0xcf, 0xc7, 0xe7, 0x7c, 0xe7, - 0x3b, 0x3e, 0x5f, 0x02, 0xbb, 0x8c, 0xf6, 0xd0, 0x43, 0xf1, 0x6f, 0xa7, 0x85, 0xdb, 0x91, 0xeb, - 0xbe, 0xe0, 0x92, 0x6f, 0xab, 0x4f, 0x2f, 0x8a, 0xff, 0x49, 0xa9, 0xa5, 0x50, 0xf3, 0xc5, 0x1c, - 0x2c, 0x9f, 0x7a, 0x28, 0xec, 0x56, 0x8b, 0x0f, 0x98, 0x24, 0x55, 0x58, 0xe1, 0x57, 0x0c, 0xc5, - 0xbe, 0xfc, 0xcb, 0x76, 0x5d, 0x81, 0x9e, 0x57, 0xd4, 0x2a, 0x5a, 0x35, 0xe3, 0x8c, 0xc3, 0xa4, - 0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x79, 0xa2, 0x8d, 0x8e, 0x16, 0x89, 0x94, 0xad, 0x29, 0xfb, 0x35, 0x33, - 0xf9, 0x11, 0x14, 0x12, 0x3c, 0x88, 0x6c, 0x59, 0xb3, 0x9c, 0x29, 0x59, 0xb3, 0x9f, 0xbf, 0x7f, - 0x7d, 0x63, 0x68, 0xd7, 0x37, 0x86, 0xf6, 0xf6, 0xc6, 0xd0, 0x9e, 0xdd, 0x1a, 0xa9, 0xeb, 0x5b, - 0x23, 0xf5, 0xe6, 0xd6, 0x48, 0x9d, 0x95, 0xa7, 0xfd, 0xd7, 0xba, 0x58, 0x50, 0x5f, 0xdf, 0xbd, - 0x0b, 0x00, 0x00, 0xff, 0xff, 0xb1, 0xf4, 0xc0, 0x1d, 0x92, 0x09, 0x00, 0x00, + // 787 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x56, 0xcf, 0x4e, 0x13, 0x5f, + 0x14, 0xee, 0xd0, 0xe1, 0x4f, 0x0f, 0xfd, 0x95, 0x72, 0x0b, 0xfc, 0x4a, 0xa9, 0x63, 0x19, 0x8d, + 0x69, 0x5c, 0x0c, 0x06, 0x13, 0x65, 0x63, 0xe2, 0x58, 0x68, 0x25, 0x18, 0x20, 0x53, 0x89, 0x09, + 0xc4, 0x98, 0x4b, 0xe7, 0x52, 0x1b, 0xdb, 0x7b, 0xeb, 0x9d, 0x5b, 0xb1, 0x0f, 0xe0, 0xde, 0xc4, + 0x47, 0x70, 0xe1, 0x23, 0xf8, 0x0a, 0x2e, 0x59, 0xba, 0x34, 0xf0, 0x22, 0x66, 0x2e, 0xd3, 0x61, + 0xa6, 0x4c, 0x5b, 0xb4, 0x0b, 0x37, 0x30, 0xe7, 0x9b, 0x33, 0xe7, 0x7c, 0xe7, 0x3b, 0x73, 0xbf, + 0x29, 0x6c, 0x50, 0xdc, 0x22, 0x0e, 0xe1, 0x1f, 0x1a, 0x35,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 0x1f, + 0x16, 0xa2, 0xbe, 0x00, 0x48, 0x37, 0x46, 0x7e, 0x18, 0x06, 0x54, 0x7c, 0x09, 0x4b, 0xd1, 0x06, + 0x8b, 0xee, 0x1a, 0x37, 0x70, 0xde, 0x01, 0x55, 0x37, 0x20, 0x15, 0xf6, 0x55, 0xb4, 0x64, 0x44, + 0x1a, 0x6d, 0x2e, 0x69, 0x04, 0x40, 0x3d, 0x86, 0x76, 0x20, 0x13, 0x61, 0xa7, 0x68, 0xc1, 0x88, + 0x38, 0x60, 0xb9, 0xbc, 0x31, 0xc4, 0x7a, 0xf5, 0x18, 0x3a, 0x8a, 0xf4, 0xe6, 0xde, 0x41, 0x42, + 0x79, 0x63, 0xc8, 0xf9, 0x1a, 0x59, 0x7c, 0x17, 0x32, 0x11, 0xc6, 0x86, 0x56, 0x8d, 0x51, 0x76, + 0x17, 0xad, 0xd9, 0xb3, 0x47, 0x3f, 0xce, 0x35, 0xe5, 0xec, 0x5c, 0x53, 0x7e, 0x9d, 0x6b, 0xca, + 0xe7, 0x0b, 0x2d, 0x76, 0x76, 0xa1, 0xc5, 0x7e, 0x5e, 0x68, 0xb1, 0xc3, 0xfc, 0xb0, 0x1f, 0x70, + 0xc7, 0x53, 0xf2, 0xdf, 0xc3, 0xdf, 0x01, 0x00, 0x00, 0xff, 0xff, 0xe5, 0x8f, 0x92, 0xa9, 0xe7, + 0x09, 0x00, 0x00, } func (m *UserAccount) Marshal() (dAtA []byte, err error) { @@ -1337,6 +1393,43 @@ func (m *NameRegisterRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *NameRegisterRequestSigned) 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 *NameRegisterRequestSigned) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *NameRegisterRequestSigned) 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 = encodeVarintNameserviceAa(dAtA, i, uint64(len(m.Signature))) + i-- + dAtA[i] = 0x12 + } + if len(m.Payload) > 0 { + i -= len(m.Payload) + copy(dAtA[i:], m.Payload) + i = encodeVarintNameserviceAa(dAtA, i, uint64(len(m.Payload))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func (m *NameRegisterForSpaceRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -1661,6 +1754,23 @@ func (m *NameRegisterRequest) Size() (n int) { return n } +func (m *NameRegisterRequestSigned) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Payload) + if l > 0 { + n += 1 + l + sovNameserviceAa(uint64(l)) + } + l = len(m.Signature) + if l > 0 { + n += 1 + l + sovNameserviceAa(uint64(l)) + } + return n +} + func (m *NameRegisterForSpaceRequest) Size() (n int) { if m == nil { return 0 @@ -3075,6 +3185,124 @@ func (m *NameRegisterRequest) Unmarshal(dAtA []byte) error { } return nil } +func (m *NameRegisterRequestSigned) 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 ErrIntOverflowNameserviceAa + } + 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: NameRegisterRequestSigned: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NameRegisterRequestSigned: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowNameserviceAa + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthNameserviceAa + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthNameserviceAa + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Payload = append(m.Payload[:0], dAtA[iNdEx:postIndex]...) + if m.Payload == nil { + m.Payload = []byte{} + } + iNdEx = postIndex + case 2: + 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 ErrIntOverflowNameserviceAa + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthNameserviceAa + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthNameserviceAa + } + 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 := skipNameserviceAa(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthNameserviceAa + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *NameRegisterForSpaceRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/nameservice/nameserviceproto/nameservice_drpc.pb.go b/nameservice/nameserviceproto/nameservice_drpc.pb.go index 47ed633b..bc8437e2 100644 --- a/nameservice/nameserviceproto/nameservice_drpc.pb.go +++ b/nameservice/nameserviceproto/nameservice_drpc.pb.go @@ -42,6 +42,7 @@ type DRPCAnynsClient interface { IsNameAvailable(ctx context.Context, in *NameAvailableRequest) (*NameAvailableResponse, error) GetNameByAddress(ctx context.Context, in *NameByAddressRequest) (*NameByAddressResponse, error) + AdminNameRegisterSigned(ctx context.Context, in *NameRegisterRequestSigned) (*OperationResponse, error) } type drpcAnynsClient struct { @@ -72,9 +73,19 @@ func (c *drpcAnynsClient) GetNameByAddress(ctx context.Context, in *NameByAddres return out, nil } +func (c *drpcAnynsClient) AdminNameRegisterSigned(ctx context.Context, in *NameRegisterRequestSigned) (*OperationResponse, error) { + out := new(OperationResponse) + err := c.cc.Invoke(ctx, "/Anyns/AdminNameRegisterSigned", drpcEncoding_File_nameservice_nameserviceproto_protos_nameservice_proto{}, in, out) + if err != nil { + return nil, err + } + return out, nil +} + type DRPCAnynsServer interface { IsNameAvailable(context.Context, *NameAvailableRequest) (*NameAvailableResponse, error) GetNameByAddress(context.Context, *NameByAddressRequest) (*NameByAddressResponse, error) + AdminNameRegisterSigned(context.Context, *NameRegisterRequestSigned) (*OperationResponse, error) } type DRPCAnynsUnimplementedServer struct{} @@ -87,9 +98,13 @@ func (s *DRPCAnynsUnimplementedServer) GetNameByAddress(context.Context, *NameBy return nil, drpcerr.WithCode(errors.New("Unimplemented"), drpcerr.Unimplemented) } +func (s *DRPCAnynsUnimplementedServer) AdminNameRegisterSigned(context.Context, *NameRegisterRequestSigned) (*OperationResponse, error) { + return nil, drpcerr.WithCode(errors.New("Unimplemented"), drpcerr.Unimplemented) +} + type DRPCAnynsDescription struct{} -func (DRPCAnynsDescription) NumMethods() int { return 2 } +func (DRPCAnynsDescription) NumMethods() int { return 3 } func (DRPCAnynsDescription) Method(n int) (string, drpc.Encoding, drpc.Receiver, interface{}, bool) { switch n { @@ -111,6 +126,15 @@ func (DRPCAnynsDescription) Method(n int) (string, drpc.Encoding, drpc.Receiver, in1.(*NameByAddressRequest), ) }, DRPCAnynsServer.GetNameByAddress, true + case 2: + return "/Anyns/AdminNameRegisterSigned", drpcEncoding_File_nameservice_nameserviceproto_protos_nameservice_proto{}, + func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) { + return srv.(DRPCAnynsServer). + AdminNameRegisterSigned( + ctx, + in1.(*NameRegisterRequestSigned), + ) + }, DRPCAnynsServer.AdminNameRegisterSigned, true default: return "", nil, nil, nil, false } @@ -151,3 +175,19 @@ func (x *drpcAnyns_GetNameByAddressStream) SendAndClose(m *NameByAddressResponse } return x.CloseSend() } + +type DRPCAnyns_AdminNameRegisterSignedStream interface { + drpc.Stream + SendAndClose(*OperationResponse) error +} + +type drpcAnyns_AdminNameRegisterSignedStream struct { + drpc.Stream +} + +func (x *drpcAnyns_AdminNameRegisterSignedStream) SendAndClose(m *OperationResponse) error { + if err := x.MsgSend(m, drpcEncoding_File_nameservice_nameserviceproto_protos_nameservice_proto{}); err != nil { + return err + } + return x.CloseSend() +} diff --git a/nameservice/nameserviceproto/protos/nameservice.proto b/nameservice/nameserviceproto/protos/nameservice.proto index 75596ac0..23deb31e 100644 --- a/nameservice/nameserviceproto/protos/nameservice.proto +++ b/nameservice/nameserviceproto/protos/nameservice.proto @@ -2,6 +2,7 @@ syntax = "proto3"; option go_package = "nameservice/nameserviceproto"; //import "google/protobuf/timestamp.proto"; +import "nameservice/nameserviceproto/protos/nameservice_aa.proto"; message NameAvailableRequest { // Name including .any suffix @@ -49,4 +50,8 @@ service Anyns { // Reverse lookup: address -> name rpc GetNameByAddress(NameByAddressRequest) returns (NameByAddressResponse) {} + + // Register new name for the user (on behalf of the user) + // Anytype CAN only register names for users, but can not transfer or update them! + rpc AdminNameRegisterSigned(NameRegisterRequestSigned) returns (OperationResponse) {} } diff --git a/nameservice/nameserviceproto/protos/nameservice_aa.proto b/nameservice/nameserviceproto/protos/nameservice_aa.proto index 93664a0a..2412fa7a 100644 --- a/nameservice/nameserviceproto/protos/nameservice_aa.proto +++ b/nameservice/nameserviceproto/protos/nameservice_aa.proto @@ -117,6 +117,14 @@ message NameRegisterRequest { // bool updateReverseResolver = 4; } +message NameRegisterRequestSigned { + // NameRegisterRequest struct + bytes payload = 1; + + // payload signed by payload.ownerEthAddress + bytes signature = 2; +} + message NameRegisterForSpaceRequest { string fullName = 1; From f544d2d08b4083061c1693d63728657dab031e8e Mon Sep 17 00:00:00 2001 From: Anton Akentev Date: Wed, 21 Feb 2024 11:29:48 +0000 Subject: [PATCH 012/140] Add registerToSmartContractWallet param --- .../nameserviceproto/nameservice_aa.pb.go | 146 ++++++++++++------ .../protos/nameservice_aa.proto | 4 + 2 files changed, 99 insertions(+), 51 deletions(-) diff --git a/nameservice/nameserviceproto/nameservice_aa.pb.go b/nameservice/nameserviceproto/nameservice_aa.pb.go index db21d486..db9eccd6 100644 --- a/nameservice/nameserviceproto/nameservice_aa.pb.go +++ b/nameservice/nameserviceproto/nameservice_aa.pb.go @@ -616,6 +616,9 @@ type NameRegisterRequest struct { OwnerAnyAddress string `protobuf:"bytes,2,opt,name=ownerAnyAddress,proto3" json:"ownerAnyAddress,omitempty"` // An Ethereum address that owns that name OwnerEthAddress string `protobuf:"bytes,3,opt,name=ownerEthAddress,proto3" json:"ownerEthAddress,omitempty"` + // if false -> name ownership will belong to ownerEthAddress + // if true -> name ownership will belong to SCW of ownerEthAddress (AccountAbstraction) + RegisterToSmartContractWallet bool `protobuf:"varint,4,opt,name=registerToSmartContractWallet,proto3" json:"registerToSmartContractWallet,omitempty"` } func (m *NameRegisterRequest) Reset() { *m = NameRegisterRequest{} } @@ -672,6 +675,13 @@ func (m *NameRegisterRequest) GetOwnerEthAddress() string { return "" } +func (m *NameRegisterRequest) GetRegisterToSmartContractWallet() bool { + if m != nil { + return m.RegisterToSmartContractWallet + } + return false +} + type NameRegisterRequestSigned struct { // NameRegisterRequest struct Payload []byte `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"` @@ -919,57 +929,58 @@ func init() { } var fileDescriptor_c9d3f9b8b141e804 = []byte{ - // 787 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x56, 0xcf, 0x4e, 0x13, 0x5f, - 0x14, 0xee, 0xd0, 0xe1, 0x4f, 0x0f, 0xfd, 0x95, 0x72, 0x0b, 0xfc, 0x4a, 0xa9, 0x63, 0x19, 0x8d, - 0x69, 0x5c, 0x0c, 0x06, 0x13, 0x65, 0x63, 0xe2, 0x58, 0x68, 0x25, 0x18, 0x20, 0x53, 0x89, 0x09, - 0xc4, 0x98, 0x4b, 0xe7, 0x52, 0x1b, 0xdb, 0x7b, 0xeb, 0x9d, 0x5b, 0xb1, 0x0f, 0xe0, 0xde, 0xc4, - 0x47, 0x70, 0xe1, 0x23, 0xf8, 0x0a, 0x2e, 0x59, 0xba, 0x34, 0xf0, 0x22, 0x66, 0x2e, 0xd3, 0x61, - 0xa6, 0x4c, 0x5b, 0xb4, 0x0b, 0x37, 0x30, 0xe7, 0x9b, 0x33, 0xe7, 0x7c, 0xe7, 0x3b, 0x73, 0xbf, - 0x29, 0x6c, 0x50, 0xdc, 0x22, 0x0e, 0xe1, 0x1f, 0x1a, 0x35, 0xb2, 0x16, 0xb8, 0x6e, 0x73, 0x26, - 0xd8, 0x9a, 0xfc, 0xeb, 0x04, 0xf1, 0x37, 0x18, 0x1b, 0x12, 0xd5, 0xbf, 0x4e, 0xc0, 0xec, 0x81, - 0x43, 0xb8, 0x59, 0xab, 0xb1, 0x0e, 0x15, 0xa8, 0x08, 0x73, 0xec, 0x94, 0x12, 0xbe, 0x25, 0xde, - 0x9a, 0xb6, 0xcd, 0x89, 0xe3, 0x64, 0x95, 0x82, 0x52, 0x4c, 0x58, 0xfd, 0x30, 0x2a, 0x83, 0x26, - 0xa1, 0x6a, 0x0b, 0x73, 0x51, 0x62, 0x54, 0x70, 0x5c, 0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 0x83, 0x90, 0x4e, 0x61, 0x3e, 0xf0, 0x5e, 0x78, 0xe7, 0x66, 0xe4, - 0x63, 0xe8, 0x31, 0xa4, 0x58, 0xb0, 0xe5, 0xa5, 0x84, 0xa9, 0xf5, 0x39, 0x23, 0xc4, 0x84, 0x58, - 0x7d, 0x69, 0xf7, 0x8f, 0x20, 0x15, 0xce, 0x40, 0xb3, 0x30, 0x7d, 0x40, 0xdf, 0x51, 0x76, 0x4a, - 0xd3, 0x31, 0x37, 0xd8, 0x27, 0xd4, 0x6e, 0xd0, 0x7a, 0x5a, 0x41, 0x8b, 0x30, 0xef, 0x05, 0x7b, - 0x7c, 0x97, 0x89, 0x32, 0xeb, 0x50, 0x3b, 0x3d, 0x81, 0xfe, 0x83, 0x44, 0x89, 0xb5, 0xda, 0x4d, - 0x22, 0x88, 0x9d, 0x8e, 0xa3, 0x04, 0x4c, 0x6e, 0x71, 0xce, 0x78, 0x5a, 0x5d, 0xff, 0xae, 0xc2, - 0xff, 0x26, 0xed, 0x52, 0xc7, 0x33, 0x14, 0xf3, 0xd8, 0x71, 0x3f, 0x46, 0x6e, 0x2f, 0xf4, 0x14, - 0x92, 0x41, 0x9d, 0x50, 0xce, 0x18, 0x28, 0x5b, 0x0e, 0x19, 0xd7, 0x34, 0xd1, 0x63, 0x68, 0x1f, - 0x16, 0xa2, 0xbe, 0x00, 0x48, 0x37, 0x46, 0x7e, 0x18, 0x06, 0x54, 0x7c, 0x09, 0x4b, 0xd1, 0x06, - 0x8b, 0xee, 0x1a, 0x37, 0x70, 0xde, 0x01, 0x55, 0x37, 0x20, 0x15, 0xf6, 0x55, 0xb4, 0x64, 0x44, - 0x1a, 0x6d, 0x2e, 0x69, 0x04, 0x40, 0x3d, 0x86, 0x76, 0x20, 0x13, 0x61, 0xa7, 0x68, 0xc1, 0x88, - 0x38, 0x60, 0xb9, 0xbc, 0x31, 0xc4, 0x7a, 0xf5, 0x18, 0x3a, 0x8a, 0xf4, 0xe6, 0xde, 0x41, 0x42, - 0x79, 0x63, 0xc8, 0xf9, 0x1a, 0x59, 0x7c, 0x17, 0x32, 0x11, 0xc6, 0x86, 0x56, 0x8d, 0x51, 0x76, - 0x17, 0xad, 0xd9, 0xb3, 0x47, 0x3f, 0xce, 0x35, 0xe5, 0xec, 0x5c, 0x53, 0x7e, 0x9d, 0x6b, 0xca, - 0xe7, 0x0b, 0x2d, 0x76, 0x76, 0xa1, 0xc5, 0x7e, 0x5e, 0x68, 0xb1, 0xc3, 0xfc, 0xb0, 0x1f, 0x70, - 0xc7, 0x53, 0xf2, 0xdf, 0xc3, 0xdf, 0x01, 0x00, 0x00, 0xff, 0xff, 0xe5, 0x8f, 0x92, 0xa9, 0xe7, - 0x09, 0x00, 0x00, + // 808 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x56, 0xdd, 0x4e, 0xe3, 0x46, + 0x14, 0x8e, 0x89, 0xf9, 0xc9, 0x21, 0x0d, 0x61, 0x02, 0x34, 0x84, 0xe0, 0x06, 0xb7, 0xaa, 0xa2, + 0x5e, 0x98, 0x8a, 0x4a, 0x2d, 0x37, 0x95, 0xea, 0x26, 0x24, 0x45, 0x54, 0x80, 0x1c, 0x50, 0x25, + 0x50, 0x55, 0x0d, 0xf1, 0x90, 0x5a, 0x4d, 0x66, 0xd2, 0xf1, 0xa4, 0x34, 0x6f, 0x51, 0xa9, 0x8f, + 0xb0, 0x17, 0xfb, 0x08, 0xfb, 0x0a, 0x2b, 0xed, 0x0d, 0x97, 0x7b, 0xb9, 0x82, 0x17, 0x59, 0x65, + 0x70, 0xcc, 0x38, 0x38, 0x09, 0xbb, 0xb9, 0xd8, 0x1b, 0xf0, 0x7c, 0x3e, 0x73, 0xce, 0x77, 0xbe, + 0x33, 0xf3, 0x39, 0xb0, 0x4f, 0x71, 0x87, 0xf8, 0x84, 0xff, 0xe3, 0x35, 0xc9, 0xae, 0xf2, 0xdc,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 0x71, 0xfa, 0x24, 0xe3, + 0xf5, 0xa9, 0xc2, 0x36, 0x0f, 0x28, 0x9c, 0x31, 0xd5, 0x83, 0xc4, 0x83, 0x09, 0x49, 0x5d, 0x97, + 0x9c, 0xc9, 0x41, 0x66, 0x03, 0x36, 0x63, 0x9a, 0x99, 0x51, 0xa2, 0x97, 0x1a, 0x6c, 0xa9, 0x59, + 0x6b, 0x8c, 0x37, 0xba, 0xb8, 0x49, 0x3e, 0x95, 0x54, 0x79, 0x58, 0xf4, 0x07, 0xf5, 0x0f, 0xdd, + 0xe0, 0xb0, 0x0d, 0x97, 0xe6, 0x8f, 0xb0, 0x59, 0x27, 0x22, 0x3c, 0x21, 0x0d, 0x81, 0x45, 0x2f, + 0xf4, 0x9e, 0x12, 0x2c, 0x87, 0xd6, 0x70, 0xe8, 0x06, 0x4c, 0x55, 0xc8, 0xa4, 0xb0, 0xaa, 0x9c, + 0xae, 0xe0, 0xf6, 0x4d, 0xdd, 0x86, 0x7e, 0x80, 0x0c, 0x53, 0x4b, 0x3e, 0x48, 0x98, 0xd9, 0x5b, + 0xb1, 0x22, 0x4c, 0x88, 0x33, 0x12, 0xf6, 0xcd, 0x25, 0x64, 0xa2, 0x11, 0x68, 0x19, 0x16, 0xcf, + 0xe9, 0x5f, 0x94, 0xdd, 0xd0, 0x6c, 0x62, 0xb0, 0x38, 0x25, 0xd4, 0xf5, 0x68, 0x2b, 0xab, 0xa1, + 0x75, 0x58, 0x0d, 0x16, 0x27, 0xfc, 0x98, 0x89, 0x1a, 0xeb, 0x51, 0x37, 0x3b, 0x87, 0x3e, 0x83, + 0x54, 0x85, 0x75, 0xba, 0x6d, 0x22, 0x88, 0x9b, 0x4d, 0xa2, 0x14, 0xcc, 0x1f, 0x70, 0xce, 0x78, + 0x56, 0xdf, 0x7b, 0xa5, 0xc3, 0xe7, 0x36, 0xed, 0x53, 0x3f, 0xb0, 0x25, 0xfb, 0xca, 0x97, 0x27, + 0xc5, 0x63, 0x14, 0xfd, 0x04, 0x69, 0x55, 0x27, 0x54, 0xb0, 0xc6, 0xca, 0x56, 0x40, 0xd6, 0x13, + 0x4d, 0xcc, 0x04, 0x3a, 0x85, 0xb5, 0xb8, 0xef, 0x08, 0x32, 0xad, 0xa9, 0x9f, 0x97, 0x31, 0x19, + 0xcf, 0x60, 0x23, 0xde, 0xa6, 0xd1, 0x57, 0xd6, 0x33, 0xfc, 0x7b, 0x4c, 0xd6, 0x7d, 0xc8, 0x44, + 0xdd, 0x19, 0x6d, 0x58, 0xb1, 0x76, 0x5d, 0x48, 0x5b, 0x0a, 0x68, 0x26, 0xd0, 0x11, 0xe4, 0x62, + 0x4c, 0x19, 0xad, 0x59, 0x31, 0x17, 0xac, 0x50, 0xb4, 0x26, 0x18, 0xb8, 0x99, 0x40, 0x97, 0xb1, + 0x0e, 0x3f, 0xbc, 0x48, 0xa8, 0x68, 0x4d, 0xb8, 0x5f, 0x53, 0x93, 0x1f, 0x43, 0x2e, 0xc6, 0x1e, + 0xd1, 0x8e, 0x35, 0xcd, 0x34, 0xe3, 0x35, 0xfb, 0xf9, 0xfb, 0xd7, 0x77, 0x86, 0x76, 0x7b, 0x67, + 0x68, 0xef, 0xee, 0x0c, 0xed, 0xbf, 0x7b, 0x23, 0x71, 0x7b, 0x6f, 0x24, 0xde, 0xde, 0x1b, 0x89, + 0x8b, 0xe2, 0xa4, 0x9f, 0x81, 0x57, 0x0b, 0xf2, 0xdf, 0x77, 0xef, 0x03, 0x00, 0x00, 0xff, 0xff, + 0x6c, 0x4e, 0x44, 0x59, 0x2d, 0x0a, 0x00, 0x00, } func (m *UserAccount) Marshal() (dAtA []byte, err error) { @@ -1369,6 +1380,16 @@ func (m *NameRegisterRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.RegisterToSmartContractWallet { + i-- + if m.RegisterToSmartContractWallet { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x20 + } if len(m.OwnerEthAddress) > 0 { i -= len(m.OwnerEthAddress) copy(dAtA[i:], m.OwnerEthAddress) @@ -1751,6 +1772,9 @@ func (m *NameRegisterRequest) Size() (n int) { if l > 0 { n += 1 + l + sovNameserviceAa(uint64(l)) } + if m.RegisterToSmartContractWallet { + n += 2 + } return n } @@ -3164,6 +3188,26 @@ func (m *NameRegisterRequest) Unmarshal(dAtA []byte) error { } m.OwnerEthAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field RegisterToSmartContractWallet", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowNameserviceAa + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.RegisterToSmartContractWallet = bool(v != 0) default: iNdEx = preIndex skippy, err := skipNameserviceAa(dAtA[iNdEx:]) diff --git a/nameservice/nameserviceproto/protos/nameservice_aa.proto b/nameservice/nameserviceproto/protos/nameservice_aa.proto index 2412fa7a..bbc80b84 100644 --- a/nameservice/nameserviceproto/protos/nameservice_aa.proto +++ b/nameservice/nameserviceproto/protos/nameservice_aa.proto @@ -108,6 +108,10 @@ message NameRegisterRequest { // An Ethereum address that owns that name string ownerEthAddress = 3; + // if false -> name ownership will belong to ownerEthAddress + // if true -> name ownership will belong to SCW of ownerEthAddress (AccountAbstraction) + bool registerToSmartContractWallet = 4; + // Example: // 1 - register alice.any -> ANYID123123 // 2 - register xxxx.any -> ANYID123123 From 2a2061d756bcf96e5865cfab17323847b924be1a Mon Sep 17 00:00:00 2001 From: Anton Akentev Date: Fri, 23 Feb 2024 14:11:50 +0000 Subject: [PATCH 013/140] fix: comment --- .../paymentserviceproto/protos/paymentservice.proto | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/paymentservice/paymentserviceproto/protos/paymentservice.proto b/paymentservice/paymentserviceproto/protos/paymentservice.proto index 9b883a73..0da6caa1 100644 --- a/paymentservice/paymentserviceproto/protos/paymentservice.proto +++ b/paymentservice/paymentserviceproto/protos/paymentservice.proto @@ -71,8 +71,6 @@ message GetSubscriptionResponse { PaymentMethod paymentMethod = 8; - // if name was requested - it will be here - // seeBuySubscriptionRequest.requestedAnyName field string requestedAnyName = 9; // if user verified her email OR provided it while buying a subscription, it will be here @@ -97,9 +95,8 @@ message BuySubscriptionRequest { PaymentMethod paymentMethod = 4; - // this is just to store the requested name in the DB - // and then you will be able to retrieve it via GetSubscriptionRequest - // PP won't register the name in NS! + // if empty - then no name requested + // if non-empty - PP node will register that name on behalf of the user string requestedAnyName = 5; } From fad2e59f37d6be66bc1f1d6835918fc703456905 Mon Sep 17 00:00:00 2001 From: Anton Akentev Date: Mon, 26 Feb 2024 15:09:05 +0000 Subject: [PATCH 014/140] ns: add registerPeriodMonths field --- .../nameserviceproto/nameservice_aa.pb.go | 177 +++++++++++++----- .../protos/nameservice_aa.proto | 6 + .../paymentserviceproto/paymentservice.pb.go | 15 +- 3 files changed, 137 insertions(+), 61 deletions(-) diff --git a/nameservice/nameserviceproto/nameservice_aa.pb.go b/nameservice/nameserviceproto/nameservice_aa.pb.go index db9eccd6..ce0af1c2 100644 --- a/nameservice/nameserviceproto/nameservice_aa.pb.go +++ b/nameservice/nameserviceproto/nameservice_aa.pb.go @@ -619,6 +619,8 @@ type NameRegisterRequest struct { // if false -> name ownership will belong to ownerEthAddress // if true -> name ownership will belong to SCW of ownerEthAddress (AccountAbstraction) RegisterToSmartContractWallet bool `protobuf:"varint,4,opt,name=registerToSmartContractWallet,proto3" json:"registerToSmartContractWallet,omitempty"` + // How many months to register the name for + RegisterPeriodMonths uint32 `protobuf:"varint,5,opt,name=registerPeriodMonths,proto3" json:"registerPeriodMonths,omitempty"` } func (m *NameRegisterRequest) Reset() { *m = NameRegisterRequest{} } @@ -682,6 +684,13 @@ func (m *NameRegisterRequest) GetRegisterToSmartContractWallet() bool { return false } +func (m *NameRegisterRequest) GetRegisterPeriodMonths() uint32 { + if m != nil { + return m.RegisterPeriodMonths + } + return 0 +} + type NameRegisterRequestSigned struct { // NameRegisterRequest struct Payload []byte `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"` @@ -747,6 +756,8 @@ type NameRegisterForSpaceRequest struct { OwnerEthAddress string `protobuf:"bytes,3,opt,name=ownerEthAddress,proto3" json:"ownerEthAddress,omitempty"` // A SpaceID attached to this name SpaceId string `protobuf:"bytes,4,opt,name=spaceId,proto3" json:"spaceId,omitempty"` + // How many months to register the name for + RegisterPeriodMonths uint32 `protobuf:"varint,5,opt,name=registerPeriodMonths,proto3" json:"registerPeriodMonths,omitempty"` } func (m *NameRegisterForSpaceRequest) Reset() { *m = NameRegisterForSpaceRequest{} } @@ -810,6 +821,13 @@ func (m *NameRegisterForSpaceRequest) GetSpaceId() string { return "" } +func (m *NameRegisterForSpaceRequest) GetRegisterPeriodMonths() uint32 { + if m != nil { + return m.RegisterPeriodMonths + } + return 0 +} + type GetOperationStatusRequest struct { OperationId string `protobuf:"bytes,1,opt,name=operationId,proto3" json:"operationId,omitempty"` } @@ -929,58 +947,59 @@ func init() { } var fileDescriptor_c9d3f9b8b141e804 = []byte{ - // 808 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x56, 0xdd, 0x4e, 0xe3, 0x46, - 0x14, 0x8e, 0x89, 0xf9, 0xc9, 0x21, 0x0d, 0x61, 0x02, 0x34, 0x84, 0xe0, 0x06, 0xb7, 0xaa, 0xa2, - 0x5e, 0x98, 0x8a, 0x4a, 0x2d, 0x37, 0x95, 0xea, 0x26, 0x24, 0x45, 0x54, 0x80, 0x1c, 0x50, 0x25, - 0x50, 0x55, 0x0d, 0xf1, 0x90, 0x5a, 0x4d, 0x66, 0xd2, 0xf1, 0xa4, 0x34, 0x6f, 0x51, 0xa9, 0x8f, - 0xb0, 0x17, 0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c, 0x98, 0x89, 0x1a, 0xeb, 0x51, 0x37, 0x3b, 0x87, 0x3e, 0x83, - 0x54, 0x85, 0x75, 0xba, 0x6d, 0x22, 0x88, 0x9b, 0x4d, 0xa2, 0x14, 0xcc, 0x1f, 0x70, 0xce, 0x78, - 0x56, 0xdf, 0x7b, 0xa5, 0xc3, 0xe7, 0x36, 0xed, 0x53, 0x3f, 0xb0, 0x25, 0xfb, 0xca, 0x97, 0x27, - 0xc5, 0x63, 0x14, 0xfd, 0x04, 0x69, 0x55, 0x27, 0x54, 0xb0, 0xc6, 0xca, 0x56, 0x40, 0xd6, 0x13, - 0x4d, 0xcc, 0x04, 0x3a, 0x85, 0xb5, 0xb8, 0xef, 0x08, 0x32, 0xad, 0xa9, 0x9f, 0x97, 0x31, 0x19, - 0xcf, 0x60, 0x23, 0xde, 0xa6, 0xd1, 0x57, 0xd6, 0x33, 0xfc, 0x7b, 0x4c, 0xd6, 0x7d, 0xc8, 0x44, - 0xdd, 0x19, 0x6d, 0x58, 0xb1, 0x76, 0x5d, 0x48, 0x5b, 0x0a, 0x68, 0x26, 0xd0, 0x11, 0xe4, 0x62, - 0x4c, 0x19, 0xad, 0x59, 0x31, 0x17, 0xac, 0x50, 0xb4, 0x26, 0x18, 0xb8, 0x99, 0x40, 0x97, 0xb1, - 0x0e, 0x3f, 0xbc, 0x48, 0xa8, 0x68, 0x4d, 0xb8, 0x5f, 0x53, 0x93, 0x1f, 0x43, 0x2e, 0xc6, 0x1e, - 0xd1, 0x8e, 0x35, 0xcd, 0x34, 0xe3, 0x35, 0xfb, 0xf9, 0xfb, 0xd7, 0x77, 0x86, 0x76, 0x7b, 0x67, - 0x68, 0xef, 0xee, 0x0c, 0xed, 0xbf, 0x7b, 0x23, 0x71, 0x7b, 0x6f, 0x24, 0xde, 0xde, 0x1b, 0x89, - 0x8b, 0xe2, 0xa4, 0x9f, 0x81, 0x57, 0x0b, 0xf2, 0xdf, 0x77, 0xef, 0x03, 0x00, 0x00, 0xff, 0xff, - 0x6c, 0x4e, 0x44, 0x59, 0x2d, 0x0a, 0x00, 0x00, + // 831 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x56, 0x51, 0x6f, 0x1b, 0x45, + 0x10, 0xf6, 0xc5, 0x97, 0x26, 0x9e, 0xb8, 0xae, 0xbb, 0x4e, 0x8b, 0xeb, 0xb8, 0x87, 0x7b, 0x20, + 0x64, 0xf1, 0x70, 0x45, 0x41, 0x82, 0xbe, 0x20, 0x71, 0xd8, 0xb5, 0x89, 0x0a, 0x69, 0x74, 0x6e, + 0x85, 0xd4, 0x08, 0xa1, 0xad, 0x6f, 0xea, 0x9e, 0xb0, 0x77, 0xcd, 0xee, 0x9a, 0xe2, 0x7f, 0x81, + 0xc4, 0x4f, 0xe0, 0x47, 0xf0, 0x17, 0x78, 0xcc, 0x23, 0x12, 0x2f, 0x28, 0xf9, 0x21, 0x20, 0x6f, + 0xce, 0xd7, 0x3d, 0xf7, 0x6c, 0x97, 0xf8, 0xa1, 0x2f, 0xc9, 0xcd, 0x77, 0x73, 0x33, 0xdf, 0x7c, + 0xb3, 0x3b, 0x63, 0x78, 0xc0, 0xe8, 0x08, 0x25, 0x8a, 0x9f, 0xa3, 0x3e, 0xde, 0x37, 0x9e, 0xc7, + 0x82, 0x2b, 0x7e, 0x5f, 0xff, 0x95, 0x26, 0xfe, 0x03, 0xa5, 0x9e, 0x46, 0xdd, 0xdf, 0xb7, 0x60, + 0xef, 0xa9, 0x44, 0xe1, 0xf7, 0xfb, 0x7c, 0xc2, 0x14, 0x69, 0xc2, 0x0d, 0xfe, 0x8a, 0xa1, 0x78, + 0xa8, 0x5e, 0xfa, 0x61, 0x28, 0x50, 0xca, 0xaa, 0xd5, 0xb0, 0x9a, 0x85, 0x60, 0x11, 0x26, 0x1d, + 0x70, 0x34, 0xd4, 0x1b, 0x51, 0xa1, 0x5a, 0x9c, 0x29, 0x41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0xf6, 0xc4, + 0x92, 0xa8, 0x0f, 0xa0, 0x94, 0xde, 0x02, 0xe4, 0xb6, 0x97, 0xb9, 0x16, 0x6a, 0x45, 0xcf, 0x00, + 0xdd, 0x1c, 0x79, 0x04, 0x95, 0x8c, 0xe1, 0x4f, 0xf6, 0xbd, 0x8c, 0x4b, 0x59, 0xab, 0x7b, 0x2b, + 0x16, 0x85, 0x9b, 0x23, 0xa7, 0x99, 0x9b, 0x64, 0x7e, 0xf9, 0x48, 0xdd, 0x5b, 0x71, 0x27, 0xd7, + 0x06, 0x3f, 0x86, 0x4a, 0xc6, 0x18, 0x26, 0xf7, 0xbc, 0x75, 0xc3, 0x39, 0x5b, 0xb3, 0xaf, 0x3e, + 0xfb, 0xf3, 0xdc, 0xb1, 0xce, 0xce, 0x1d, 0xeb, 0x9f, 0x73, 0xc7, 0xfa, 0xf5, 0xc2, 0xc9, 0x9d, + 0x5d, 0x38, 0xb9, 0xbf, 0x2e, 0x9c, 0xdc, 0xb3, 0xfa, 0xaa, 0x9f, 0x9b, 0xcf, 0xaf, 0xe9, 0x7f, + 0x9f, 0xfe, 0x17, 0x00, 0x00, 0xff, 0xff, 0xe2, 0x3c, 0xfb, 0x3d, 0x95, 0x0a, 0x00, 0x00, } func (m *UserAccount) Marshal() (dAtA []byte, err error) { @@ -1380,6 +1399,11 @@ func (m *NameRegisterRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.RegisterPeriodMonths != 0 { + i = encodeVarintNameserviceAa(dAtA, i, uint64(m.RegisterPeriodMonths)) + i-- + dAtA[i] = 0x28 + } if m.RegisterToSmartContractWallet { i-- if m.RegisterToSmartContractWallet { @@ -1471,6 +1495,11 @@ func (m *NameRegisterForSpaceRequest) MarshalToSizedBuffer(dAtA []byte) (int, er _ = i var l int _ = l + if m.RegisterPeriodMonths != 0 { + i = encodeVarintNameserviceAa(dAtA, i, uint64(m.RegisterPeriodMonths)) + i-- + dAtA[i] = 0x28 + } if len(m.SpaceId) > 0 { i -= len(m.SpaceId) copy(dAtA[i:], m.SpaceId) @@ -1775,6 +1804,9 @@ func (m *NameRegisterRequest) Size() (n int) { if m.RegisterToSmartContractWallet { n += 2 } + if m.RegisterPeriodMonths != 0 { + n += 1 + sovNameserviceAa(uint64(m.RegisterPeriodMonths)) + } return n } @@ -1817,6 +1849,9 @@ func (m *NameRegisterForSpaceRequest) Size() (n int) { if l > 0 { n += 1 + l + sovNameserviceAa(uint64(l)) } + if m.RegisterPeriodMonths != 0 { + n += 1 + sovNameserviceAa(uint64(m.RegisterPeriodMonths)) + } return n } @@ -3208,6 +3243,25 @@ func (m *NameRegisterRequest) Unmarshal(dAtA []byte) error { } } m.RegisterToSmartContractWallet = bool(v != 0) + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field RegisterPeriodMonths", wireType) + } + m.RegisterPeriodMonths = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowNameserviceAa + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.RegisterPeriodMonths |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipNameserviceAa(dAtA[iNdEx:]) @@ -3504,6 +3558,25 @@ func (m *NameRegisterForSpaceRequest) Unmarshal(dAtA []byte) error { } m.SpaceId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field RegisterPeriodMonths", wireType) + } + m.RegisterPeriodMonths = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowNameserviceAa + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.RegisterPeriodMonths |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipNameserviceAa(dAtA[iNdEx:]) diff --git a/nameservice/nameserviceproto/protos/nameservice_aa.proto b/nameservice/nameserviceproto/protos/nameservice_aa.proto index bbc80b84..b9c7de6c 100644 --- a/nameservice/nameserviceproto/protos/nameservice_aa.proto +++ b/nameservice/nameserviceproto/protos/nameservice_aa.proto @@ -112,6 +112,9 @@ message NameRegisterRequest { // if true -> name ownership will belong to SCW of ownerEthAddress (AccountAbstraction) bool registerToSmartContractWallet = 4; + // How many months to register the name for + uint32 registerPeriodMonths = 5; + // Example: // 1 - register alice.any -> ANYID123123 // 2 - register xxxx.any -> ANYID123123 @@ -143,6 +146,9 @@ message NameRegisterForSpaceRequest { // A SpaceID attached to this name string spaceId = 4; + + // How many months to register the name for + uint32 registerPeriodMonths = 5; } message GetOperationStatusRequest { diff --git a/paymentservice/paymentserviceproto/paymentservice.pb.go b/paymentservice/paymentserviceproto/paymentservice.pb.go index 6d8d8c78..8117fc7c 100644 --- a/paymentservice/paymentserviceproto/paymentservice.pb.go +++ b/paymentservice/paymentserviceproto/paymentservice.pb.go @@ -237,12 +237,10 @@ type GetSubscriptionResponse struct { // (dateEnds) but then he will be on nextTier until nextTierEnds // // if Tier0_Unknown -> then no next tier - NextTier SubscriptionTier `protobuf:"varint,6,opt,name=nextTier,proto3,enum=SubscriptionTier" json:"nextTier,omitempty"` - NextTierEnds uint64 `protobuf:"varint,7,opt,name=nextTierEnds,proto3" json:"nextTierEnds,omitempty"` - PaymentMethod PaymentMethod `protobuf:"varint,8,opt,name=paymentMethod,proto3,enum=PaymentMethod" json:"paymentMethod,omitempty"` - // if name was requested - it will be here - // seeBuySubscriptionRequest.requestedAnyName field - RequestedAnyName string `protobuf:"bytes,9,opt,name=requestedAnyName,proto3" json:"requestedAnyName,omitempty"` + NextTier SubscriptionTier `protobuf:"varint,6,opt,name=nextTier,proto3,enum=SubscriptionTier" json:"nextTier,omitempty"` + NextTierEnds uint64 `protobuf:"varint,7,opt,name=nextTierEnds,proto3" json:"nextTierEnds,omitempty"` + PaymentMethod PaymentMethod `protobuf:"varint,8,opt,name=paymentMethod,proto3,enum=PaymentMethod" json:"paymentMethod,omitempty"` + RequestedAnyName string `protobuf:"bytes,9,opt,name=requestedAnyName,proto3" json:"requestedAnyName,omitempty"` // if user verified her email OR provided it while buying a subscription, it will be here UserEmail string `protobuf:"bytes,10,opt,name=userEmail,proto3" json:"userEmail,omitempty"` SubscribeToNewsletter bool `protobuf:"varint,11,opt,name=subscribeToNewsletter,proto3" json:"subscribeToNewsletter,omitempty"` @@ -370,9 +368,8 @@ type BuySubscriptionRequest struct { OwnerEthAddress string `protobuf:"bytes,2,opt,name=ownerEthAddress,proto3" json:"ownerEthAddress,omitempty"` RequestedTier SubscriptionTier `protobuf:"varint,3,opt,name=requestedTier,proto3,enum=SubscriptionTier" json:"requestedTier,omitempty"` PaymentMethod PaymentMethod `protobuf:"varint,4,opt,name=paymentMethod,proto3,enum=PaymentMethod" json:"paymentMethod,omitempty"` - // this is just to store the requested name in the DB - // and then you will be able to retrieve it via GetSubscriptionRequest - // PP won't register the name in NS! + // if empty - then no name requested + // if non-empty - PP node will register that name on behalf of the user RequestedAnyName string `protobuf:"bytes,5,opt,name=requestedAnyName,proto3" json:"requestedAnyName,omitempty"` } From 92d3ba6237e0dec6e2d69bd9fc57b852586a2ae1 Mon Sep 17 00:00:00 2001 From: Sergey Cherepanov Date: Thu, 29 Feb 2024 09:15:58 +0100 Subject: [PATCH 015/140] move acl service from coordinator --- acl/acl.go | 104 ++++++++++++++++++++++++++++++++++++ acl/acl_test.go | 136 ++++++++++++++++++++++++++++++++++++++++++++++++ acl/object.go | 94 +++++++++++++++++++++++++++++++++ 3 files changed, 334 insertions(+) create mode 100644 acl/acl.go create mode 100644 acl/acl_test.go create mode 100644 acl/object.go diff --git a/acl/acl.go b/acl/acl.go new file mode 100644 index 00000000..7dfebca9 --- /dev/null +++ b/acl/acl.go @@ -0,0 +1,104 @@ +package acl + +import ( + "context" + "time" + + "github.com/prometheus/client_golang/prometheus" + + commonaccount "github.com/anyproto/any-sync/accountservice" + "github.com/anyproto/any-sync/app" + "github.com/anyproto/any-sync/app/logger" + "github.com/anyproto/any-sync/app/ocache" + "github.com/anyproto/any-sync/commonspace/object/acl/list" + "github.com/anyproto/any-sync/consensus/consensusclient" + "github.com/anyproto/any-sync/consensus/consensusproto" + "github.com/anyproto/any-sync/metric" +) + +const CName = "coordinator.acl" + +var log = logger.NewNamed(CName) + +func New() Acl { + return &aclService{} +} + +type Acl interface { + AddRecord(ctx context.Context, spaceId string, rec *consensusproto.RawRecord) (result *consensusproto.RawRecordWithId, err error) + RecordsAfter(ctx context.Context, spaceId, aclHead string) (result []*consensusproto.RawRecordWithId, err error) + app.ComponentRunnable +} + +type aclService struct { + consService consensusclient.Service + cache ocache.OCache + accountService commonaccount.Service +} + +func (as *aclService) Init(a *app.App) (err error) { + as.consService = app.MustComponent[consensusclient.Service](a) + as.accountService = app.MustComponent[commonaccount.Service](a) + + var metricReg *prometheus.Registry + if m := a.Component(metric.CName); m != nil { + metricReg = m.(metric.Metric).Registry() + } + as.cache = ocache.New(as.loadObject, + ocache.WithTTL(5*time.Minute), + ocache.WithLogger(log.Sugar()), + ocache.WithPrometheus(metricReg, "coordinator", "acl"), + ) + return +} + +func (as *aclService) Name() (name string) { + return CName +} + +func (as *aclService) loadObject(ctx context.Context, id string) (ocache.Object, error) { + return as.newAclObject(ctx, id) +} + +func (as *aclService) get(ctx context.Context, spaceId string) (list.AclList, error) { + obj, err := as.cache.Get(ctx, spaceId) + if err != nil { + return nil, err + } + aObj := obj.(*aclObject) + aObj.lastUsage.Store(time.Now()) + return aObj.AclList, nil +} + +func (as *aclService) AddRecord(ctx context.Context, spaceId string, rec *consensusproto.RawRecord) (result *consensusproto.RawRecordWithId, err error) { + acl, err := as.get(ctx, spaceId) + if err != nil { + return nil, err + } + acl.RLock() + defer acl.RUnlock() + err = acl.ValidateRawRecord(rec, nil) + if err != nil { + return + } + + return as.consService.AddRecord(ctx, spaceId, rec) +} + +func (as *aclService) RecordsAfter(ctx context.Context, spaceId, aclHead string) (result []*consensusproto.RawRecordWithId, err error) { + acl, err := as.get(ctx, spaceId) + if err != nil { + return nil, err + } + acl.RLock() + defer acl.RUnlock() + return acl.RecordsAfter(ctx, aclHead) +} + +func (as *aclService) Run(ctx context.Context) (err error) { + return +} + +func (as *aclService) Close(ctx context.Context) (err error) { + return as.cache.Close() +} diff --git a/acl/acl_test.go b/acl/acl_test.go new file mode 100644 index 00000000..b65ac299 --- /dev/null +++ b/acl/acl_test.go @@ -0,0 +1,136 @@ +package acl + +import ( + "context" + "errors" + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" + + "github.com/anyproto/any-sync/app" + "github.com/anyproto/any-sync/commonspace/object/accountdata" + "github.com/anyproto/any-sync/commonspace/object/acl/list" + "github.com/anyproto/any-sync/consensus/consensusclient" + "github.com/anyproto/any-sync/consensus/consensusclient/mock_consensusclient" + "github.com/anyproto/any-sync/consensus/consensusproto" + "github.com/anyproto/any-sync/testutil/accounttest" +) + +var ctx = context.Background() + +func TestAclService_AddRecord(t *testing.T) { + ownerKeys, err := accountdata.NewRandom() + require.NoError(t, err) + spaceId := "spaceId" + ownerAcl, err := list.NewTestDerivedAcl(spaceId, ownerKeys) + require.NoError(t, err) + inv, err := ownerAcl.RecordBuilder().BuildInvite() + require.NoError(t, err) + + t.Run("success", func(t *testing.T) { + fx := newFixture(t) + defer fx.finish(t) + + expRes := list.WrapAclRecord(inv.InviteRec) + var watcherCh = make(chan consensusclient.Watcher) + fx.consCl.EXPECT().Watch(spaceId, gomock.Any()).DoAndReturn(func(spaceId string, w consensusclient.Watcher) error { + go func() { + w.AddConsensusRecords([]*consensusproto.RawRecordWithId{ + ownerAcl.Root(), + }) + watcherCh <- w + }() + return nil + }) + + fx.consCl.EXPECT().AddRecord(ctx, spaceId, inv.InviteRec).Return(expRes, nil) + fx.consCl.EXPECT().UnWatch(spaceId) + + res, err := fx.AddRecord(ctx, spaceId, inv.InviteRec) + assert.Equal(t, expRes, res) + assert.NoError(t, err) + + w := <-watcherCh + w.AddConsensusRecords([]*consensusproto.RawRecordWithId{ + expRes, + }) + }) + t.Run("error", func(t *testing.T) { + fx := newFixture(t) + defer fx.finish(t) + + var testErr = errors.New("test") + + fx.consCl.EXPECT().Watch(spaceId, gomock.Any()).DoAndReturn(func(spaceId string, w consensusclient.Watcher) error { + go func() { + w.AddConsensusError(testErr) + }() + return nil + }) + fx.consCl.EXPECT().UnWatch(spaceId) + + res, err := fx.AddRecord(ctx, spaceId, inv.InviteRec) + assert.Nil(t, res) + assert.EqualError(t, err, testErr.Error()) + }) + +} + +func TestAclService_RecordsAfter(t *testing.T) { + ownerKeys, err := accountdata.NewRandom() + require.NoError(t, err) + spaceId := "spaceId" + ownerAcl, err := list.NewTestDerivedAcl(spaceId, ownerKeys) + require.NoError(t, err) + + fx := newFixture(t) + defer fx.finish(t) + + fx.consCl.EXPECT().Watch(spaceId, gomock.Any()).DoAndReturn(func(spaceId string, w consensusclient.Watcher) error { + go func() { + w.AddConsensusRecords([]*consensusproto.RawRecordWithId{ + ownerAcl.Root(), + }) + }() + return nil + }) + fx.consCl.EXPECT().UnWatch(spaceId) + + res, err := fx.RecordsAfter(ctx, spaceId, "") + require.NoError(t, err) + assert.Len(t, res, 1) +} + +func newFixture(t *testing.T) *fixture { + ctrl := gomock.NewController(t) + fx := &fixture{ + a: new(app.App), + ctrl: ctrl, + consCl: mock_consensusclient.NewMockService(ctrl), + Acl: New(), + } + + fx.consCl.EXPECT().Name().Return(consensusclient.CName).AnyTimes() + fx.consCl.EXPECT().Init(gomock.Any()).AnyTimes() + fx.consCl.EXPECT().Run(gomock.Any()).AnyTimes() + fx.consCl.EXPECT().Close(gomock.Any()).AnyTimes() + + fx.a.Register(fx.consCl).Register(fx.Acl).Register(&accounttest.AccountTestService{}) + + require.NoError(t, fx.a.Start(ctx)) + return fx +} + +type fixture struct { + a *app.App + ctrl *gomock.Controller + consCl *mock_consensusclient.MockService + Acl +} + +func (fx *fixture) finish(t *testing.T) { + require.NoError(t, fx.a.Close(ctx)) + fx.ctrl.Finish() +} diff --git a/acl/object.go b/acl/object.go new file mode 100644 index 00000000..9ff76df4 --- /dev/null +++ b/acl/object.go @@ -0,0 +1,94 @@ +package acl + +import ( + "context" + "slices" + "sync" + "time" + + "github.com/anyproto/any-sync/commonspace/object/acl/list" + "github.com/anyproto/any-sync/commonspace/object/acl/liststorage" + "github.com/anyproto/any-sync/consensus/consensusproto" + "go.uber.org/atomic" + "go.uber.org/zap" +) + +func (as *aclService) newAclObject(ctx context.Context, id string) (*aclObject, error) { + obj := &aclObject{ + id: id, + aclService: as, + ready: make(chan struct{}), + } + if err := as.consService.Watch(id, obj); err != nil { + return nil, err + } + select { + case <-obj.ready: + if obj.consErr != nil { + _ = as.consService.UnWatch(id) + return nil, obj.consErr + } + return obj, nil + case <-ctx.Done(): + _ = as.consService.UnWatch(id) + return nil, ctx.Err() + } +} + +type aclObject struct { + id string + aclService *aclService + store liststorage.ListStorage + + list.AclList + ready chan struct{} + consErr error + + lastUsage atomic.Time + + mu sync.Mutex +} + +func (a *aclObject) AddConsensusRecords(recs []*consensusproto.RawRecordWithId) { + a.mu.Lock() + defer a.mu.Unlock() + slices.Reverse(recs) + if a.store == nil { + defer close(a.ready) + if a.store, a.consErr = liststorage.NewInMemoryAclListStorage(a.id, recs); a.consErr != nil { + return + } + if a.AclList, a.consErr = list.BuildAclListWithIdentity(a.aclService.accountService.Account(), a.store, list.NoOpAcceptorVerifier{}); a.consErr != nil { + return + } + } else { + a.Lock() + defer a.Unlock() + if err := a.AddRawRecords(recs); err != nil { + log.Warn("unable to add consensus records", zap.Error(err), zap.String("spaceId", a.id)) + return + } + } +} + +func (a *aclObject) AddConsensusError(err error) { + a.mu.Lock() + defer a.mu.Unlock() + if a.store == nil { + a.consErr = err + close(a.ready) + } else { + log.Warn("got consensus error", zap.Error(err)) + } +} + +func (a *aclObject) Close() (err error) { + return a.aclService.consService.UnWatch(a.id) +} + +func (a *aclObject) TryClose(objectTTL time.Duration) (res bool, err error) { + if a.lastUsage.Load().Before(time.Now().Add(-objectTTL)) { + return true, a.Close() + } + return false, nil +} From 287b8303b26f8f98a5491708538be05e7cc5816b Mon Sep 17 00:00:00 2001 From: Sergey Cherepanov Date: Thu, 29 Feb 2024 09:49:17 +0100 Subject: [PATCH 016/140] acl service permissions method --- acl/acl.go | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/acl/acl.go b/acl/acl.go index 7dfebca9..c855b64a 100644 --- a/acl/acl.go +++ b/acl/acl.go @@ -14,6 +14,7 @@ import ( "github.com/anyproto/any-sync/consensus/consensusclient" "github.com/anyproto/any-sync/consensus/consensusproto" "github.com/anyproto/any-sync/metric" + "github.com/anyproto/any-sync/util/crypto" ) const CName = "coordinator.acl" @@ -47,7 +48,7 @@ func (as *aclService) Init(a *app.App) (err error) { as.cache = ocache.New(as.loadObject, ocache.WithTTL(5*time.Minute), ocache.WithLogger(log.Sugar()), - ocache.WithPrometheus(metricReg, "coordinator", "acl"), + ocache.WithPrometheus(metricReg, "acl", ""), ) return } @@ -95,6 +96,16 @@ func (as *aclService) RecordsAfter(ctx context.Context, spaceId, aclHead string) return acl.RecordsAfter(ctx, aclHead) } +func (as *aclService) Permissions(ctx context.Context, identity crypto.PubKey, spaceId string) (res list.AclPermissions, err error) { + acl, err := as.get(ctx, spaceId) + if err != nil { + return + } + acl.RLock() + defer acl.RUnlock() + return acl.AclState().Permissions(identity), nil +} + func (as *aclService) Run(ctx context.Context) (err error) { return } From 878cd316dec69c13882f6022a711fa3e8656ea20 Mon Sep 17 00:00:00 2001 From: Sergey Cherepanov Date: Thu, 29 Feb 2024 09:49:55 +0100 Subject: [PATCH 017/140] file proto: add limit methods --- commonfile/fileproto/file.pb.go | 861 ++++++++++++++++--------- commonfile/fileproto/file_drpc.pb.go | 110 +++- commonfile/fileproto/protos/file.proto | 25 +- 3 files changed, 665 insertions(+), 331 deletions(-) diff --git a/commonfile/fileproto/file.pb.go b/commonfile/fileproto/file.pb.go index 081498f3..2a1edd15 100644 --- a/commonfile/fileproto/file.pb.go +++ b/commonfile/fileproto/file.pb.go @@ -90,6 +90,42 @@ func (AvailabilityStatus) EnumDescriptor() ([]byte, []int) { return fileDescriptor_fd665a7e11c833d5, []int{1} } +type Ok struct { +} + +func (m *Ok) Reset() { *m = Ok{} } +func (m *Ok) String() string { return proto.CompactTextString(m) } +func (*Ok) ProtoMessage() {} +func (*Ok) Descriptor() ([]byte, []int) { + return fileDescriptor_fd665a7e11c833d5, []int{0} +} +func (m *Ok) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Ok) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Ok.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 *Ok) XXX_Merge(src proto.Message) { + xxx_messageInfo_Ok.Merge(m, src) +} +func (m *Ok) XXX_Size() int { + return m.Size() +} +func (m *Ok) XXX_DiscardUnknown() { + xxx_messageInfo_Ok.DiscardUnknown(m) +} + +var xxx_messageInfo_Ok proto.InternalMessageInfo + type BlockGetRequest struct { SpaceId string `protobuf:"bytes,1,opt,name=spaceId,proto3" json:"spaceId,omitempty"` Cid []byte `protobuf:"bytes,2,opt,name=cid,proto3" json:"cid,omitempty"` @@ -99,7 +135,7 @@ func (m *BlockGetRequest) Reset() { *m = BlockGetRequest{} } func (m *BlockGetRequest) String() string { return proto.CompactTextString(m) } func (*BlockGetRequest) ProtoMessage() {} func (*BlockGetRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_fd665a7e11c833d5, []int{0} + return fileDescriptor_fd665a7e11c833d5, []int{1} } func (m *BlockGetRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -151,7 +187,7 @@ func (m *BlockGetResponse) Reset() { *m = BlockGetResponse{} } func (m *BlockGetResponse) String() string { return proto.CompactTextString(m) } func (*BlockGetResponse) ProtoMessage() {} func (*BlockGetResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_fd665a7e11c833d5, []int{1} + return fileDescriptor_fd665a7e11c833d5, []int{2} } func (m *BlockGetResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -205,7 +241,7 @@ func (m *BlockPushRequest) Reset() { *m = BlockPushRequest{} } func (m *BlockPushRequest) String() string { return proto.CompactTextString(m) } func (*BlockPushRequest) ProtoMessage() {} func (*BlockPushRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_fd665a7e11c833d5, []int{2} + return fileDescriptor_fd665a7e11c833d5, []int{3} } func (m *BlockPushRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -262,42 +298,6 @@ func (m *BlockPushRequest) GetData() []byte { return nil } -type BlockPushResponse struct { -} - -func (m *BlockPushResponse) Reset() { *m = BlockPushResponse{} } -func (m *BlockPushResponse) String() string { return proto.CompactTextString(m) } -func (*BlockPushResponse) ProtoMessage() {} -func (*BlockPushResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_fd665a7e11c833d5, []int{3} -} -func (m *BlockPushResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *BlockPushResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BlockPushResponse.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 *BlockPushResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_BlockPushResponse.Merge(m, src) -} -func (m *BlockPushResponse) XXX_Size() int { - return m.Size() -} -func (m *BlockPushResponse) XXX_DiscardUnknown() { - xxx_messageInfo_BlockPushResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_BlockPushResponse proto.InternalMessageInfo - type BlocksCheckRequest struct { SpaceId string `protobuf:"bytes,1,opt,name=spaceId,proto3" json:"spaceId,omitempty"` Cids [][]byte `protobuf:"bytes,2,rep,name=cids,proto3" json:"cids,omitempty"` @@ -506,42 +506,6 @@ func (m *BlocksBindRequest) GetCids() [][]byte { return nil } -type BlocksBindResponse struct { -} - -func (m *BlocksBindResponse) Reset() { *m = BlocksBindResponse{} } -func (m *BlocksBindResponse) String() string { return proto.CompactTextString(m) } -func (*BlocksBindResponse) ProtoMessage() {} -func (*BlocksBindResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_fd665a7e11c833d5, []int{8} -} -func (m *BlocksBindResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *BlocksBindResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BlocksBindResponse.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 *BlocksBindResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_BlocksBindResponse.Merge(m, src) -} -func (m *BlocksBindResponse) XXX_Size() int { - return m.Size() -} -func (m *BlocksBindResponse) XXX_DiscardUnknown() { - xxx_messageInfo_BlocksBindResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_BlocksBindResponse proto.InternalMessageInfo - type FilesDeleteRequest struct { SpaceId string `protobuf:"bytes,1,opt,name=spaceId,proto3" json:"spaceId,omitempty"` FileIds []string `protobuf:"bytes,2,rep,name=fileIds,proto3" json:"fileIds,omitempty"` @@ -551,7 +515,7 @@ func (m *FilesDeleteRequest) Reset() { *m = FilesDeleteRequest{} } func (m *FilesDeleteRequest) String() string { return proto.CompactTextString(m) } func (*FilesDeleteRequest) ProtoMessage() {} func (*FilesDeleteRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_fd665a7e11c833d5, []int{9} + return fileDescriptor_fd665a7e11c833d5, []int{8} } func (m *FilesDeleteRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -601,7 +565,7 @@ func (m *FilesDeleteResponse) Reset() { *m = FilesDeleteResponse{} } func (m *FilesDeleteResponse) String() string { return proto.CompactTextString(m) } func (*FilesDeleteResponse) ProtoMessage() {} func (*FilesDeleteResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_fd665a7e11c833d5, []int{10} + return fileDescriptor_fd665a7e11c833d5, []int{9} } func (m *FilesDeleteResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -639,7 +603,7 @@ func (m *FilesInfoRequest) Reset() { *m = FilesInfoRequest{} } func (m *FilesInfoRequest) String() string { return proto.CompactTextString(m) } func (*FilesInfoRequest) ProtoMessage() {} func (*FilesInfoRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_fd665a7e11c833d5, []int{11} + return fileDescriptor_fd665a7e11c833d5, []int{10} } func (m *FilesInfoRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -690,7 +654,7 @@ func (m *FilesInfoResponse) Reset() { *m = FilesInfoResponse{} } func (m *FilesInfoResponse) String() string { return proto.CompactTextString(m) } func (*FilesInfoResponse) ProtoMessage() {} func (*FilesInfoResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_fd665a7e11c833d5, []int{12} + return fileDescriptor_fd665a7e11c833d5, []int{11} } func (m *FilesInfoResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -736,7 +700,7 @@ func (m *FileInfo) Reset() { *m = FileInfo{} } func (m *FileInfo) String() string { return proto.CompactTextString(m) } func (*FileInfo) ProtoMessage() {} func (*FileInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_fd665a7e11c833d5, []int{13} + return fileDescriptor_fd665a7e11c833d5, []int{12} } func (m *FileInfo) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -793,7 +757,7 @@ func (m *CheckRequest) Reset() { *m = CheckRequest{} } func (m *CheckRequest) String() string { return proto.CompactTextString(m) } func (*CheckRequest) ProtoMessage() {} func (*CheckRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_fd665a7e11c833d5, []int{14} + return fileDescriptor_fd665a7e11c833d5, []int{13} } func (m *CheckRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -831,7 +795,7 @@ func (m *CheckResponse) Reset() { *m = CheckResponse{} } func (m *CheckResponse) String() string { return proto.CompactTextString(m) } func (*CheckResponse) ProtoMessage() {} func (*CheckResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_fd665a7e11c833d5, []int{15} + return fileDescriptor_fd665a7e11c833d5, []int{14} } func (m *CheckResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -882,7 +846,7 @@ func (m *SpaceInfoRequest) Reset() { *m = SpaceInfoRequest{} } func (m *SpaceInfoRequest) String() string { return proto.CompactTextString(m) } func (*SpaceInfoRequest) ProtoMessage() {} func (*SpaceInfoRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_fd665a7e11c833d5, []int{16} + return fileDescriptor_fd665a7e11c833d5, []int{15} } func (m *SpaceInfoRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -931,7 +895,7 @@ func (m *SpaceInfoResponse) Reset() { *m = SpaceInfoResponse{} } func (m *SpaceInfoResponse) String() string { return proto.CompactTextString(m) } func (*SpaceInfoResponse) ProtoMessage() {} func (*SpaceInfoResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_fd665a7e11c833d5, []int{17} + return fileDescriptor_fd665a7e11c833d5, []int{16} } func (m *SpaceInfoResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1009,7 +973,7 @@ func (m *AccountInfoRequest) Reset() { *m = AccountInfoRequest{} } func (m *AccountInfoRequest) String() string { return proto.CompactTextString(m) } func (*AccountInfoRequest) ProtoMessage() {} func (*AccountInfoRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_fd665a7e11c833d5, []int{18} + return fileDescriptor_fd665a7e11c833d5, []int{17} } func (m *AccountInfoRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1049,7 +1013,7 @@ func (m *AccountInfoResponse) Reset() { *m = AccountInfoResponse{} } func (m *AccountInfoResponse) String() string { return proto.CompactTextString(m) } func (*AccountInfoResponse) ProtoMessage() {} func (*AccountInfoResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_fd665a7e11c833d5, []int{19} + return fileDescriptor_fd665a7e11c833d5, []int{18} } func (m *AccountInfoResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1106,18 +1070,113 @@ func (m *AccountInfoResponse) GetSpaces() []*SpaceInfoResponse { return nil } +type AccountLimitSetRequest struct { + Limit uint64 `protobuf:"varint,1,opt,name=limit,proto3" json:"limit,omitempty"` +} + +func (m *AccountLimitSetRequest) Reset() { *m = AccountLimitSetRequest{} } +func (m *AccountLimitSetRequest) String() string { return proto.CompactTextString(m) } +func (*AccountLimitSetRequest) ProtoMessage() {} +func (*AccountLimitSetRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_fd665a7e11c833d5, []int{19} +} +func (m *AccountLimitSetRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AccountLimitSetRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_AccountLimitSetRequest.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 *AccountLimitSetRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_AccountLimitSetRequest.Merge(m, src) +} +func (m *AccountLimitSetRequest) XXX_Size() int { + return m.Size() +} +func (m *AccountLimitSetRequest) XXX_DiscardUnknown() { + xxx_messageInfo_AccountLimitSetRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_AccountLimitSetRequest proto.InternalMessageInfo + +func (m *AccountLimitSetRequest) GetLimit() uint64 { + if m != nil { + return m.Limit + } + return 0 +} + +type SpaceLimitSetRequest struct { + SpaceId string `protobuf:"bytes,1,opt,name=spaceId,proto3" json:"spaceId,omitempty"` + Limit uint64 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"` +} + +func (m *SpaceLimitSetRequest) Reset() { *m = SpaceLimitSetRequest{} } +func (m *SpaceLimitSetRequest) String() string { return proto.CompactTextString(m) } +func (*SpaceLimitSetRequest) ProtoMessage() {} +func (*SpaceLimitSetRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_fd665a7e11c833d5, []int{20} +} +func (m *SpaceLimitSetRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SpaceLimitSetRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SpaceLimitSetRequest.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 *SpaceLimitSetRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_SpaceLimitSetRequest.Merge(m, src) +} +func (m *SpaceLimitSetRequest) XXX_Size() int { + return m.Size() +} +func (m *SpaceLimitSetRequest) XXX_DiscardUnknown() { + xxx_messageInfo_SpaceLimitSetRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_SpaceLimitSetRequest proto.InternalMessageInfo + +func (m *SpaceLimitSetRequest) GetSpaceId() string { + if m != nil { + return m.SpaceId + } + return "" +} + +func (m *SpaceLimitSetRequest) GetLimit() uint64 { + if m != nil { + return m.Limit + } + return 0 +} + func init() { proto.RegisterEnum("filesync.ErrCodes", ErrCodes_name, ErrCodes_value) proto.RegisterEnum("filesync.AvailabilityStatus", AvailabilityStatus_name, AvailabilityStatus_value) + proto.RegisterType((*Ok)(nil), "filesync.Ok") proto.RegisterType((*BlockGetRequest)(nil), "filesync.BlockGetRequest") proto.RegisterType((*BlockGetResponse)(nil), "filesync.BlockGetResponse") proto.RegisterType((*BlockPushRequest)(nil), "filesync.BlockPushRequest") - proto.RegisterType((*BlockPushResponse)(nil), "filesync.BlockPushResponse") proto.RegisterType((*BlocksCheckRequest)(nil), "filesync.BlocksCheckRequest") proto.RegisterType((*BlocksCheckResponse)(nil), "filesync.BlocksCheckResponse") proto.RegisterType((*BlockAvailability)(nil), "filesync.BlockAvailability") proto.RegisterType((*BlocksBindRequest)(nil), "filesync.BlocksBindRequest") - proto.RegisterType((*BlocksBindResponse)(nil), "filesync.BlocksBindResponse") proto.RegisterType((*FilesDeleteRequest)(nil), "filesync.FilesDeleteRequest") proto.RegisterType((*FilesDeleteResponse)(nil), "filesync.FilesDeleteResponse") proto.RegisterType((*FilesInfoRequest)(nil), "filesync.FilesInfoRequest") @@ -1129,6 +1188,8 @@ func init() { proto.RegisterType((*SpaceInfoResponse)(nil), "filesync.SpaceInfoResponse") proto.RegisterType((*AccountInfoRequest)(nil), "filesync.AccountInfoRequest") proto.RegisterType((*AccountInfoResponse)(nil), "filesync.AccountInfoResponse") + proto.RegisterType((*AccountLimitSetRequest)(nil), "filesync.AccountLimitSetRequest") + proto.RegisterType((*SpaceLimitSetRequest)(nil), "filesync.SpaceLimitSetRequest") } func init() { @@ -1136,63 +1197,89 @@ func init() { } var fileDescriptor_fd665a7e11c833d5 = []byte{ - // 889 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0x4f, 0x73, 0xdb, 0x44, - 0x14, 0xf7, 0xc6, 0x8a, 0x6b, 0xbd, 0x34, 0x89, 0xbc, 0x49, 0x83, 0x71, 0x83, 0x26, 0xa3, 0x43, - 0xc7, 0xd3, 0x61, 0x5c, 0x26, 0xe5, 0xd0, 0x0b, 0x87, 0xd8, 0xb1, 0x5b, 0x53, 0xa6, 0x80, 0x32, - 0x9d, 0x0e, 0x70, 0x41, 0x96, 0xd6, 0x8d, 0xa8, 0xa2, 0x35, 0xda, 0x35, 0xc4, 0x1c, 0x39, 0x72, - 0xe2, 0x03, 0xf1, 0x01, 0x7a, 0xcc, 0x91, 0x1b, 0x4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5, 0xbf, 0x3e, 0x81, 0xcd, 0x54, 0xa0, 0x83, 0xdc, 0xaa, 0x20, 0xcd, 0x7b, 0x15, 0x3c, - 0xe7, 0x5f, 0x1f, 0x70, 0x9d, 0xbf, 0xdc, 0xbd, 0x7a, 0xff, 0x74, 0x23, 0x84, 0x22, 0xda, 0x3d, - 0xd6, 0x15, 0xa9, 0xde, 0x7a, 0x5d, 0x91, 0x9a, 0xcb, 0x3f, 0x1c, 0xbc, 0xbd, 0xb6, 0xd1, 0xd5, - 0xb5, 0x8d, 0xfe, 0xbc, 0xb6, 0xd1, 0xaf, 0x37, 0x76, 0xe3, 0xea, 0xc6, 0x6e, 0xfc, 0x7e, 0x63, - 0x37, 0xbe, 0xde, 0xaf, 0xfb, 0x97, 0x36, 0x6b, 0xc9, 0x9f, 0xc7, 0x7f, 0x05, 0x00, 0x00, 0xff, - 0xff, 0x30, 0x1a, 0xf6, 0xe5, 0xc4, 0x09, 0x00, 0x00, + // 937 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0x41, 0x73, 0xdb, 0x44, + 0x14, 0x8e, 0x6c, 0xd9, 0xb5, 0x5e, 0xe2, 0x44, 0xde, 0xa4, 0xc1, 0xb8, 0x41, 0xe3, 0xd1, 0xa1, + 0x93, 0xe9, 0x30, 0x2e, 0x93, 0xc2, 0xd0, 0x4b, 0x0f, 0xb1, 0x63, 0x53, 0x53, 0xa6, 0x01, 0x65, + 0x3a, 0x1d, 0xe0, 0x82, 0x2c, 0xad, 0x1b, 0x11, 0x45, 0x1b, 0xb4, 0x6b, 0x48, 0xf8, 0x09, 0x9c, + 0xf8, 0x41, 0xfc, 0x80, 0x1e, 0x7b, 0xe4, 0x06, 0x93, 0x0c, 0xff, 0x83, 0xd9, 0xd5, 0xca, 0x5a, + 0xad, 0xdc, 0x86, 0x01, 0x2e, 0xce, 0xee, 0xb7, 0xef, 0xbd, 0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 0x41, 0x6f, 0xf2, 0xbd, 0x7b, 0x2b, 0xcf, 0x64, 0x94, 0xc7, 0xd0, 0xc8, 0x04, 0xd9, + 0x2d, 0xac, 0x4a, 0x52, 0xbc, 0x57, 0xc1, 0x0b, 0xfe, 0xe5, 0xcb, 0x51, 0xf9, 0xf5, 0xb6, 0xd8, + 0x7b, 0xd7, 0x53, 0xe3, 0x8a, 0x28, 0x0d, 0x42, 0x55, 0xa4, 0xda, 0x4e, 0x54, 0x45, 0x56, 0x75, + 0x95, 0x43, 0xd8, 0xd2, 0x9e, 0x2b, 0xea, 0x57, 0x3c, 0xb4, 0xb7, 0xa9, 0x5d, 0xd0, 0x13, 0x68, + 0x97, 0x5e, 0x30, 0x72, 0xb4, 0xe4, 0xdf, 0xe9, 0x3e, 0x1c, 0xbc, 0xbe, 0x76, 0x8c, 0x37, 0xd7, + 0x8e, 0xf1, 0xe7, 0xb5, 0x63, 0xfc, 0x7a, 0xe3, 0xac, 0xbd, 0xb9, 0x71, 0xd6, 0x7e, 0xbf, 0x71, + 0xd6, 0xbe, 0xd9, 0x59, 0xf5, 0xbf, 0xe5, 0xac, 0x29, 0xfe, 0x3c, 0xfa, 0x3b, 0x00, 0x00, 0xff, + 0xff, 0xbd, 0x5f, 0xb1, 0x3f, 0x7a, 0x0a, 0x00, 0x00, +} + +func (m *Ok) 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 *Ok) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Ok) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil } func (m *BlockGetRequest) Marshal() (dAtA []byte, err error) { @@ -1320,29 +1407,6 @@ func (m *BlockPushRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *BlockPushResponse) 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 *BlockPushResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BlockPushResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - func (m *BlocksCheckRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -1500,29 +1564,6 @@ func (m *BlocksBindRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *BlocksBindResponse) 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 *BlocksBindResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BlocksBindResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - func (m *FilesDeleteRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -1926,6 +1967,69 @@ func (m *AccountInfoResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *AccountLimitSetRequest) 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 *AccountLimitSetRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *AccountLimitSetRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Limit != 0 { + i = encodeVarintFile(dAtA, i, uint64(m.Limit)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *SpaceLimitSetRequest) 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 *SpaceLimitSetRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SpaceLimitSetRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Limit != 0 { + i = encodeVarintFile(dAtA, i, uint64(m.Limit)) + i-- + dAtA[i] = 0x10 + } + if len(m.SpaceId) > 0 { + i -= len(m.SpaceId) + copy(dAtA[i:], m.SpaceId) + i = encodeVarintFile(dAtA, i, uint64(len(m.SpaceId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func encodeVarintFile(dAtA []byte, offset int, v uint64) int { offset -= sovFile(v) base := offset @@ -1937,6 +2041,15 @@ func encodeVarintFile(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } +func (m *Ok) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + func (m *BlockGetRequest) Size() (n int) { if m == nil { return 0 @@ -1996,15 +2109,6 @@ func (m *BlockPushRequest) Size() (n int) { return n } -func (m *BlockPushResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - func (m *BlocksCheckRequest) Size() (n int) { if m == nil { return 0 @@ -2078,15 +2182,6 @@ func (m *BlocksBindRequest) Size() (n int) { return n } -func (m *BlocksBindResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - func (m *FilesDeleteRequest) Size() (n int) { if m == nil { return 0 @@ -2269,12 +2364,90 @@ func (m *AccountInfoResponse) Size() (n int) { return n } +func (m *AccountLimitSetRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Limit != 0 { + n += 1 + sovFile(uint64(m.Limit)) + } + return n +} + +func (m *SpaceLimitSetRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SpaceId) + if l > 0 { + n += 1 + l + sovFile(uint64(l)) + } + if m.Limit != 0 { + n += 1 + sovFile(uint64(m.Limit)) + } + return n +} + func sovFile(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } func sozFile(x uint64) (n int) { return sovFile(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } +func (m *Ok) 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 ErrIntOverflowFile + } + 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: Ok: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Ok: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipFile(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthFile + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *BlockGetRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -2691,56 +2864,6 @@ func (m *BlockPushRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *BlockPushResponse) 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 ErrIntOverflowFile - } - 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: BlockPushResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BlockPushResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipFile(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthFile - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func (m *BlocksCheckRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -3188,56 +3311,6 @@ func (m *BlocksBindRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *BlocksBindResponse) 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 ErrIntOverflowFile - } - 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: BlocksBindResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BlocksBindResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipFile(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthFile - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func (m *FilesDeleteRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -4322,6 +4395,176 @@ func (m *AccountInfoResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *AccountLimitSetRequest) 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 ErrIntOverflowFile + } + 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: AccountLimitSetRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AccountLimitSetRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Limit", wireType) + } + m.Limit = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFile + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Limit |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipFile(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthFile + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SpaceLimitSetRequest) 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 ErrIntOverflowFile + } + 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: SpaceLimitSetRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SpaceLimitSetRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SpaceId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFile + } + 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 ErrInvalidLengthFile + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthFile + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SpaceId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Limit", wireType) + } + m.Limit = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFile + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Limit |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipFile(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthFile + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipFile(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/commonfile/fileproto/file_drpc.pb.go b/commonfile/fileproto/file_drpc.pb.go index 9d945b1b..be40b2c9 100644 --- a/commonfile/fileproto/file_drpc.pb.go +++ b/commonfile/fileproto/file_drpc.pb.go @@ -41,14 +41,16 @@ type DRPCFileClient interface { DRPCConn() drpc.Conn BlockGet(ctx context.Context, in *BlockGetRequest) (*BlockGetResponse, error) - BlockPush(ctx context.Context, in *BlockPushRequest) (*BlockPushResponse, error) + BlockPush(ctx context.Context, in *BlockPushRequest) (*Ok, error) BlocksCheck(ctx context.Context, in *BlocksCheckRequest) (*BlocksCheckResponse, error) - BlocksBind(ctx context.Context, in *BlocksBindRequest) (*BlocksBindResponse, error) + BlocksBind(ctx context.Context, in *BlocksBindRequest) (*Ok, error) FilesDelete(ctx context.Context, in *FilesDeleteRequest) (*FilesDeleteResponse, error) FilesInfo(ctx context.Context, in *FilesInfoRequest) (*FilesInfoResponse, error) Check(ctx context.Context, in *CheckRequest) (*CheckResponse, error) SpaceInfo(ctx context.Context, in *SpaceInfoRequest) (*SpaceInfoResponse, error) AccountInfo(ctx context.Context, in *AccountInfoRequest) (*AccountInfoResponse, error) + AccountLimitSet(ctx context.Context, in *AccountLimitSetRequest) (*Ok, error) + SpaceLimitSet(ctx context.Context, in *SpaceLimitSetRequest) (*Ok, error) } type drpcFileClient struct { @@ -70,8 +72,8 @@ func (c *drpcFileClient) BlockGet(ctx context.Context, in *BlockGetRequest) (*Bl return out, nil } -func (c *drpcFileClient) BlockPush(ctx context.Context, in *BlockPushRequest) (*BlockPushResponse, error) { - out := new(BlockPushResponse) +func (c *drpcFileClient) BlockPush(ctx context.Context, in *BlockPushRequest) (*Ok, error) { + out := new(Ok) err := c.cc.Invoke(ctx, "/filesync.File/BlockPush", drpcEncoding_File_commonfile_fileproto_protos_file_proto{}, in, out) if err != nil { return nil, err @@ -88,8 +90,8 @@ func (c *drpcFileClient) BlocksCheck(ctx context.Context, in *BlocksCheckRequest return out, nil } -func (c *drpcFileClient) BlocksBind(ctx context.Context, in *BlocksBindRequest) (*BlocksBindResponse, error) { - out := new(BlocksBindResponse) +func (c *drpcFileClient) BlocksBind(ctx context.Context, in *BlocksBindRequest) (*Ok, error) { + out := new(Ok) err := c.cc.Invoke(ctx, "/filesync.File/BlocksBind", drpcEncoding_File_commonfile_fileproto_protos_file_proto{}, in, out) if err != nil { return nil, err @@ -142,16 +144,36 @@ func (c *drpcFileClient) AccountInfo(ctx context.Context, in *AccountInfoRequest return out, nil } +func (c *drpcFileClient) AccountLimitSet(ctx context.Context, in *AccountLimitSetRequest) (*Ok, error) { + out := new(Ok) + err := c.cc.Invoke(ctx, "/filesync.File/AccountLimitSet", drpcEncoding_File_commonfile_fileproto_protos_file_proto{}, in, out) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *drpcFileClient) SpaceLimitSet(ctx context.Context, in *SpaceLimitSetRequest) (*Ok, error) { + out := new(Ok) + err := c.cc.Invoke(ctx, "/filesync.File/SpaceLimitSet", drpcEncoding_File_commonfile_fileproto_protos_file_proto{}, in, out) + if err != nil { + return nil, err + } + return out, nil +} + type DRPCFileServer interface { BlockGet(context.Context, *BlockGetRequest) (*BlockGetResponse, error) - BlockPush(context.Context, *BlockPushRequest) (*BlockPushResponse, error) + BlockPush(context.Context, *BlockPushRequest) (*Ok, error) BlocksCheck(context.Context, *BlocksCheckRequest) (*BlocksCheckResponse, error) - BlocksBind(context.Context, *BlocksBindRequest) (*BlocksBindResponse, error) + BlocksBind(context.Context, *BlocksBindRequest) (*Ok, error) FilesDelete(context.Context, *FilesDeleteRequest) (*FilesDeleteResponse, error) FilesInfo(context.Context, *FilesInfoRequest) (*FilesInfoResponse, error) Check(context.Context, *CheckRequest) (*CheckResponse, error) SpaceInfo(context.Context, *SpaceInfoRequest) (*SpaceInfoResponse, error) AccountInfo(context.Context, *AccountInfoRequest) (*AccountInfoResponse, error) + AccountLimitSet(context.Context, *AccountLimitSetRequest) (*Ok, error) + SpaceLimitSet(context.Context, *SpaceLimitSetRequest) (*Ok, error) } type DRPCFileUnimplementedServer struct{} @@ -160,7 +182,7 @@ func (s *DRPCFileUnimplementedServer) BlockGet(context.Context, *BlockGetRequest return nil, drpcerr.WithCode(errors.New("Unimplemented"), drpcerr.Unimplemented) } -func (s *DRPCFileUnimplementedServer) BlockPush(context.Context, *BlockPushRequest) (*BlockPushResponse, error) { +func (s *DRPCFileUnimplementedServer) BlockPush(context.Context, *BlockPushRequest) (*Ok, error) { return nil, drpcerr.WithCode(errors.New("Unimplemented"), drpcerr.Unimplemented) } @@ -168,7 +190,7 @@ func (s *DRPCFileUnimplementedServer) BlocksCheck(context.Context, *BlocksCheckR return nil, drpcerr.WithCode(errors.New("Unimplemented"), drpcerr.Unimplemented) } -func (s *DRPCFileUnimplementedServer) BlocksBind(context.Context, *BlocksBindRequest) (*BlocksBindResponse, error) { +func (s *DRPCFileUnimplementedServer) BlocksBind(context.Context, *BlocksBindRequest) (*Ok, error) { return nil, drpcerr.WithCode(errors.New("Unimplemented"), drpcerr.Unimplemented) } @@ -192,9 +214,17 @@ func (s *DRPCFileUnimplementedServer) AccountInfo(context.Context, *AccountInfoR return nil, drpcerr.WithCode(errors.New("Unimplemented"), drpcerr.Unimplemented) } +func (s *DRPCFileUnimplementedServer) AccountLimitSet(context.Context, *AccountLimitSetRequest) (*Ok, error) { + return nil, drpcerr.WithCode(errors.New("Unimplemented"), drpcerr.Unimplemented) +} + +func (s *DRPCFileUnimplementedServer) SpaceLimitSet(context.Context, *SpaceLimitSetRequest) (*Ok, error) { + return nil, drpcerr.WithCode(errors.New("Unimplemented"), drpcerr.Unimplemented) +} + type DRPCFileDescription struct{} -func (DRPCFileDescription) NumMethods() int { return 9 } +func (DRPCFileDescription) NumMethods() int { return 11 } func (DRPCFileDescription) Method(n int) (string, drpc.Encoding, drpc.Receiver, interface{}, bool) { switch n { @@ -279,6 +309,24 @@ func (DRPCFileDescription) Method(n int) (string, drpc.Encoding, drpc.Receiver, in1.(*AccountInfoRequest), ) }, DRPCFileServer.AccountInfo, true + case 9: + return "/filesync.File/AccountLimitSet", drpcEncoding_File_commonfile_fileproto_protos_file_proto{}, + func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) { + return srv.(DRPCFileServer). + AccountLimitSet( + ctx, + in1.(*AccountLimitSetRequest), + ) + }, DRPCFileServer.AccountLimitSet, true + case 10: + return "/filesync.File/SpaceLimitSet", drpcEncoding_File_commonfile_fileproto_protos_file_proto{}, + func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) { + return srv.(DRPCFileServer). + SpaceLimitSet( + ctx, + in1.(*SpaceLimitSetRequest), + ) + }, DRPCFileServer.SpaceLimitSet, true default: return "", nil, nil, nil, false } @@ -306,14 +354,14 @@ func (x *drpcFile_BlockGetStream) SendAndClose(m *BlockGetResponse) error { type DRPCFile_BlockPushStream interface { drpc.Stream - SendAndClose(*BlockPushResponse) error + SendAndClose(*Ok) error } type drpcFile_BlockPushStream struct { drpc.Stream } -func (x *drpcFile_BlockPushStream) SendAndClose(m *BlockPushResponse) error { +func (x *drpcFile_BlockPushStream) SendAndClose(m *Ok) error { if err := x.MsgSend(m, drpcEncoding_File_commonfile_fileproto_protos_file_proto{}); err != nil { return err } @@ -338,14 +386,14 @@ func (x *drpcFile_BlocksCheckStream) SendAndClose(m *BlocksCheckResponse) error type DRPCFile_BlocksBindStream interface { drpc.Stream - SendAndClose(*BlocksBindResponse) error + SendAndClose(*Ok) error } type drpcFile_BlocksBindStream struct { drpc.Stream } -func (x *drpcFile_BlocksBindStream) SendAndClose(m *BlocksBindResponse) error { +func (x *drpcFile_BlocksBindStream) SendAndClose(m *Ok) error { if err := x.MsgSend(m, drpcEncoding_File_commonfile_fileproto_protos_file_proto{}); err != nil { return err } @@ -431,3 +479,35 @@ func (x *drpcFile_AccountInfoStream) SendAndClose(m *AccountInfoResponse) error } return x.CloseSend() } + +type DRPCFile_AccountLimitSetStream interface { + drpc.Stream + SendAndClose(*Ok) error +} + +type drpcFile_AccountLimitSetStream struct { + drpc.Stream +} + +func (x *drpcFile_AccountLimitSetStream) SendAndClose(m *Ok) error { + if err := x.MsgSend(m, drpcEncoding_File_commonfile_fileproto_protos_file_proto{}); err != nil { + return err + } + return x.CloseSend() +} + +type DRPCFile_SpaceLimitSetStream interface { + drpc.Stream + SendAndClose(*Ok) error +} + +type drpcFile_SpaceLimitSetStream struct { + drpc.Stream +} + +func (x *drpcFile_SpaceLimitSetStream) SendAndClose(m *Ok) error { + if err := x.MsgSend(m, drpcEncoding_File_commonfile_fileproto_protos_file_proto{}); err != nil { + return err + } + return x.CloseSend() +} diff --git a/commonfile/fileproto/protos/file.proto b/commonfile/fileproto/protos/file.proto index c843300e..6e82976b 100644 --- a/commonfile/fileproto/protos/file.proto +++ b/commonfile/fileproto/protos/file.proto @@ -17,11 +17,11 @@ service File { // BlockGet gets one block from a server rpc BlockGet(BlockGetRequest) returns (BlockGetResponse); // BlockPush pushes one block to a server - rpc BlockPush(BlockPushRequest) returns (BlockPushResponse); + rpc BlockPush(BlockPushRequest) returns (Ok); // BlocksCheck checks is CIDs exists rpc BlocksCheck(BlocksCheckRequest) returns (BlocksCheckResponse); // BlocksBind binds CIDs to space - rpc BlocksBind(BlocksBindRequest) returns (BlocksBindResponse); + rpc BlocksBind(BlocksBindRequest) returns (Ok); // FilesDelete deletes files by id rpc FilesDelete(FilesDeleteRequest) returns (FilesDeleteResponse); // FilesInfo return info by given files id @@ -32,8 +32,14 @@ service File { rpc SpaceInfo(SpaceInfoRequest) returns (SpaceInfoResponse); // AccountInfo returns usage, limit, etc by all spaces rpc AccountInfo(AccountInfoRequest) returns (AccountInfoResponse); + // AccountLimitSet sets the account file storage limit (available only for nodeconf members) + rpc AccountLimitSet(AccountLimitSetRequest) returns (Ok); + // SpaceLimitSet sets the space limit. Limit 0 means space will use account limits. + rpc SpaceLimitSet(SpaceLimitSetRequest) returns (Ok); } +message Ok {} + message BlockGetRequest { string spaceId = 1; bytes cid = 2; @@ -51,9 +57,6 @@ message BlockPushRequest { bytes data = 4; } -message BlockPushResponse {} - - message BlocksCheckRequest { string spaceId = 1; repeated bytes cids = 2; @@ -80,8 +83,6 @@ message BlocksBindRequest { repeated bytes cids = 3; } -message BlocksBindResponse {} - message FilesDeleteRequest { string spaceId = 1; @@ -134,3 +135,13 @@ message AccountInfoResponse { uint64 totalCidsCount = 3; repeated SpaceInfoResponse spaces = 4; } + + +message AccountLimitSetRequest { + uint64 limit = 1; +} + +message SpaceLimitSetRequest { + string spaceId = 1; + uint64 limit = 2; +} From 7704bde02a40a3e6442cb7657c9994416e01197e Mon Sep 17 00:00:00 2001 From: Anton Akentev Date: Fri, 1 Mar 2024 11:46:57 +0000 Subject: [PATCH 018/140] Add tiers, no worries: will be refactored soon --- .../paymentserviceproto/paymentservice.pb.go | 258 +++++++----------- .../protos/paymentservice.proto | 51 +--- 2 files changed, 112 insertions(+), 197 deletions(-) diff --git a/paymentservice/paymentserviceproto/paymentservice.pb.go b/paymentservice/paymentserviceproto/paymentservice.pb.go index 8117fc7c..a1c13412 100644 --- a/paymentservice/paymentserviceproto/paymentservice.pb.go +++ b/paymentservice/paymentserviceproto/paymentservice.pb.go @@ -22,6 +22,9 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +// TODO: +// later we will have an interface to enumerate all available tiers +// it's a bad idea to list them here, because interface will be changed often type SubscriptionTier int32 const ( @@ -35,6 +38,8 @@ const ( // these are the real tiers: SubscriptionTier_TierBuilder1Year SubscriptionTier = 4 SubscriptionTier_TierCoCreator1Year SubscriptionTier = 5 + SubscriptionTier_TierBuilderPlus SubscriptionTier = 6 + SubscriptionTier_TierAnytypeTeam SubscriptionTier = 7 ) var SubscriptionTier_name = map[int32]string{ @@ -44,6 +49,8 @@ var SubscriptionTier_name = map[int32]string{ 3: "TierCoCreator1WeekTEST", 4: "TierBuilder1Year", 5: "TierCoCreator1Year", + 6: "TierBuilderPlus", + 7: "TierAnytypeTeam", } var SubscriptionTier_value = map[string]int32{ @@ -53,6 +60,8 @@ var SubscriptionTier_value = map[string]int32{ "TierCoCreator1WeekTEST": 3, "TierBuilder1Year": 4, "TierCoCreator1Year": 5, + "TierBuilderPlus": 6, + "TierAnytypeTeam": 7, } func (x SubscriptionTier) String() string { @@ -97,10 +106,12 @@ func (SubscriptionStatus) EnumDescriptor() ([]byte, []int) { type PaymentMethod int32 const ( - PaymentMethod_MethodCard PaymentMethod = 0 - PaymentMethod_MethodCrypto PaymentMethod = 1 - PaymentMethod_MethodApplePay PaymentMethod = 2 - PaymentMethod_MethodGooglePay PaymentMethod = 3 + PaymentMethod_MethodCard PaymentMethod = 0 + PaymentMethod_MethodCrypto PaymentMethod = 1 + PaymentMethod_MethodApplePay PaymentMethod = 2 + PaymentMethod_MethodGooglePay PaymentMethod = 3 + PaymentMethod_MethodAppleInapp PaymentMethod = 4 + PaymentMethod_MethodGoogleInapp PaymentMethod = 5 ) var PaymentMethod_name = map[int32]string{ @@ -108,13 +119,17 @@ var PaymentMethod_name = map[int32]string{ 1: "MethodCrypto", 2: "MethodApplePay", 3: "MethodGooglePay", + 4: "MethodAppleInapp", + 5: "MethodGoogleInapp", } var PaymentMethod_value = map[string]int32{ - "MethodCard": 0, - "MethodCrypto": 1, - "MethodApplePay": 2, - "MethodGooglePay": 3, + "MethodCard": 0, + "MethodCrypto": 1, + "MethodApplePay": 2, + "MethodGooglePay": 3, + "MethodAppleInapp": 4, + "MethodGoogleInapp": 5, } func (x PaymentMethod) String() string { @@ -125,7 +140,6 @@ func (PaymentMethod) EnumDescriptor() ([]byte, []int) { return fileDescriptor_4feb29dcc5ba50f6, []int{2} } -// 1 type GetSubscriptionRequest struct { // in the following format: "A5k2d9sFZw84yisTxRnz2bPRd1YPfVfhxqymZ6yESprFTG65" // you can get it with Account().SignKey.GetPublic().Account() @@ -227,23 +241,16 @@ func (m *GetSubscriptionRequestSigned) GetSignature() []byte { } type GetSubscriptionResponse struct { - Tier SubscriptionTier `protobuf:"varint,1,opt,name=tier,proto3,enum=SubscriptionTier" json:"tier,omitempty"` - Status SubscriptionStatus `protobuf:"varint,2,opt,name=status,proto3,enum=SubscriptionStatus" json:"status,omitempty"` - // TODO: use google.protobuf.Timestamp and marshall it - DateStarted uint64 `protobuf:"varint,3,opt,name=dateStarted,proto3" json:"dateStarted,omitempty"` - DateEnds uint64 `protobuf:"varint,4,opt,name=dateEnds,proto3" json:"dateEnds,omitempty"` - IsAutoRenew bool `protobuf:"varint,5,opt,name=isAutoRenew,proto3" json:"isAutoRenew,omitempty"` - // if client has "downgraded" - he is still able to use the service until the end of the period - // (dateEnds) but then he will be on nextTier until nextTierEnds - // - // if Tier0_Unknown -> then no next tier - NextTier SubscriptionTier `protobuf:"varint,6,opt,name=nextTier,proto3,enum=SubscriptionTier" json:"nextTier,omitempty"` - NextTierEnds uint64 `protobuf:"varint,7,opt,name=nextTierEnds,proto3" json:"nextTierEnds,omitempty"` - PaymentMethod PaymentMethod `protobuf:"varint,8,opt,name=paymentMethod,proto3,enum=PaymentMethod" json:"paymentMethod,omitempty"` - RequestedAnyName string `protobuf:"bytes,9,opt,name=requestedAnyName,proto3" json:"requestedAnyName,omitempty"` + Tier SubscriptionTier `protobuf:"varint,1,opt,name=tier,proto3,enum=SubscriptionTier" json:"tier,omitempty"` + Status SubscriptionStatus `protobuf:"varint,2,opt,name=status,proto3,enum=SubscriptionStatus" json:"status,omitempty"` + DateStarted uint64 `protobuf:"varint,3,opt,name=dateStarted,proto3" json:"dateStarted,omitempty"` + DateEnds uint64 `protobuf:"varint,4,opt,name=dateEnds,proto3" json:"dateEnds,omitempty"` + IsAutoRenew bool `protobuf:"varint,5,opt,name=isAutoRenew,proto3" json:"isAutoRenew,omitempty"` + PaymentMethod PaymentMethod `protobuf:"varint,6,opt,name=paymentMethod,proto3,enum=PaymentMethod" json:"paymentMethod,omitempty"` + RequestedAnyName string `protobuf:"bytes,7,opt,name=requestedAnyName,proto3" json:"requestedAnyName,omitempty"` // if user verified her email OR provided it while buying a subscription, it will be here - UserEmail string `protobuf:"bytes,10,opt,name=userEmail,proto3" json:"userEmail,omitempty"` - SubscribeToNewsletter bool `protobuf:"varint,11,opt,name=subscribeToNewsletter,proto3" json:"subscribeToNewsletter,omitempty"` + UserEmail string `protobuf:"bytes,8,opt,name=userEmail,proto3" json:"userEmail,omitempty"` + SubscribeToNewsletter bool `protobuf:"varint,9,opt,name=subscribeToNewsletter,proto3" json:"subscribeToNewsletter,omitempty"` } func (m *GetSubscriptionResponse) Reset() { *m = GetSubscriptionResponse{} } @@ -314,20 +321,6 @@ func (m *GetSubscriptionResponse) GetIsAutoRenew() bool { return false } -func (m *GetSubscriptionResponse) GetNextTier() SubscriptionTier { - if m != nil { - return m.NextTier - } - return SubscriptionTier_TierUnknown -} - -func (m *GetSubscriptionResponse) GetNextTierEnds() uint64 { - if m != nil { - return m.NextTierEnds - } - return 0 -} - func (m *GetSubscriptionResponse) GetPaymentMethod() PaymentMethod { if m != nil { return m.PaymentMethod @@ -356,7 +349,6 @@ func (m *GetSubscriptionResponse) GetSubscribeToNewsletter() bool { return false } -// 2 type BuySubscriptionRequest struct { // in the following format: "A5k2d9sFZw84yisTxRnz2bPRd1YPfVfhxqymZ6yESprFTG65" // you can get it with Account().SignKey.GetPublic().Account() @@ -848,7 +840,8 @@ type VerifyEmailRequest struct { // this is required to reserve a name for the owner (later that is done by user) // in the following format: "0x7a250d5630b4cf539739df2c5dacb4c659f2488d" OwnerEthAddress string `protobuf:"bytes,2,opt,name=ownerEthAddress,proto3" json:"ownerEthAddress,omitempty"` - Code string `protobuf:"bytes,3,opt,name=code,proto3" json:"code,omitempty"` + // code received in the email + Code string `protobuf:"bytes,3,opt,name=code,proto3" json:"code,omitempty"` } func (m *VerifyEmailRequest) Reset() { *m = VerifyEmailRequest{} } @@ -1029,64 +1022,65 @@ func init() { } var fileDescriptor_4feb29dcc5ba50f6 = []byte{ - // 909 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x56, 0xcd, 0x6e, 0xe4, 0x44, - 0x10, 0xb6, 0x33, 0x93, 0x9f, 0xa9, 0x24, 0x13, 0x6f, 0x65, 0x36, 0xeb, 0x1d, 0x12, 0x6b, 0x68, - 0x09, 0x88, 0x82, 0x70, 0x44, 0x58, 0x09, 0x90, 0x10, 0x62, 0x12, 0xa2, 0x08, 0x29, 0xac, 0x46, - 0x9e, 0xec, 0x22, 0x76, 0x2f, 0x38, 0xe3, 0x62, 0xd6, 0x64, 0xd2, 0x6d, 0xda, 0xed, 0xcd, 0xfa, - 0x11, 0xb8, 0x71, 0xe5, 0x79, 0xb8, 0x70, 0xdc, 0x13, 0xe2, 0x88, 0x92, 0xe7, 0x40, 0x42, 0x6e, - 0x3b, 0x99, 0xff, 0x49, 0x20, 0x17, 0xbb, 0xeb, 0xab, 0xea, 0xea, 0xfa, 0xe9, 0xaf, 0x6c, 0xf8, - 0x32, 0xf2, 0xd3, 0x73, 0xe2, 0x2a, 0x26, 0xf9, 0x3a, 0xec, 0xd0, 0xee, 0xb0, 0x18, 0x49, 0xa1, - 0xc4, 0xae, 0x7e, 0xc6, 0x23, 0x2a, 0x57, 0xa3, 0xec, 0x33, 0xd8, 0x38, 0x22, 0xd5, 0x4e, 0x4e, - 0xe3, 0x8e, 0x0c, 0x23, 0x15, 0x0a, 0xee, 0xd1, 0xcf, 0x09, 0xc5, 0x0a, 0x1d, 0x00, 0x71, 0xc1, - 0x49, 0x36, 0x79, 0xfa, 0xcd, 0xd7, 0xb6, 0xd9, 0x30, 0xb7, 0x2b, 0xde, 0x00, 0xc2, 0x9e, 0xc3, - 0xe6, 0xe4, 0x9d, 0xed, 0xb0, 0xcb, 0x29, 0x40, 0x1b, 0x16, 0x23, 0x3f, 0xed, 0x09, 0x3f, 0xd0, - 0x9b, 0x57, 0xbc, 0x6b, 0x11, 0x37, 0xa1, 0x12, 0x87, 0x5d, 0xee, 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, 0x84, 0x65, - 0x22, 0x42, 0x35, 0x47, 0x9a, 0x51, 0xd4, 0xa3, 0x96, 0x9f, 0x5a, 0x73, 0xb8, 0x0e, 0x6b, 0x39, - 0x76, 0x24, 0x44, 0x37, 0x07, 0x4b, 0x7b, 0xbf, 0x97, 0xa0, 0xd6, 0xe4, 0x69, 0xe1, 0xbf, 0x25, - 0x45, 0xd6, 0xaf, 0x90, 0x77, 0xd1, 0x83, 0x87, 0x23, 0x1c, 0x2d, 0xb2, 0xd8, 0x72, 0x67, 0xfd, - 0x25, 0xd4, 0x6d, 0x77, 0xca, 0xb7, 0x9e, 0x19, 0x78, 0x0c, 0x6b, 0x23, 0x83, 0x0d, 0xb7, 0xdc, - 0x59, 0x23, 0xb4, 0x6e, 0xbb, 0x53, 0x26, 0x21, 0x33, 0xf0, 0x27, 0x78, 0x3c, 0x75, 0x8a, 0xe0, - 0x07, 0xee, 0xdd, 0x66, 0x58, 0x9d, 0xb9, 0xb7, 0x8e, 0x22, 0x66, 0xe0, 0x4b, 0xa8, 0x4d, 0xa2, - 0x30, 0xea, 0xdd, 0xb3, 0x99, 0x5d, 0xdf, 0x72, 0x67, 0x4e, 0x07, 0x03, 0xbf, 0x82, 0xe5, 0x01, - 0x76, 0xe0, 0x63, 0x77, 0x1a, 0x57, 0xea, 0x35, 0x77, 0x02, 0xef, 0x98, 0xb1, 0xff, 0xc5, 0x1f, - 0x97, 0x8e, 0xf9, 0xf6, 0xd2, 0x31, 0xff, 0xbe, 0x74, 0xcc, 0x5f, 0xaf, 0x1c, 0xe3, 0xed, 0x95, - 0x63, 0xfc, 0x75, 0xe5, 0x18, 0x2f, 0xd8, 0xed, 0xbf, 0x93, 0xa7, 0x0b, 0xfa, 0xf5, 0xc9, 0xbf, - 0x01, 0x00, 0x00, 0xff, 0xff, 0x14, 0xaf, 0xb0, 0x89, 0x7b, 0x0a, 0x00, 0x00, + // 923 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00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, 0xfe, 0x17, 0x00, + 0x00, 0xff, 0xff, 0x9f, 0xdf, 0x6e, 0x85, 0x80, 0x0a, 0x00, 0x00, } func (m *GetSubscriptionRequest) Marshal() (dAtA []byte, err error) { @@ -1184,35 +1178,25 @@ func (m *GetSubscriptionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) dAtA[i] = 0 } i-- - dAtA[i] = 0x58 + dAtA[i] = 0x48 } if len(m.UserEmail) > 0 { i -= len(m.UserEmail) copy(dAtA[i:], m.UserEmail) i = encodeVarintPaymentservice(dAtA, i, uint64(len(m.UserEmail))) i-- - dAtA[i] = 0x52 + dAtA[i] = 0x42 } if len(m.RequestedAnyName) > 0 { i -= len(m.RequestedAnyName) copy(dAtA[i:], m.RequestedAnyName) i = encodeVarintPaymentservice(dAtA, i, uint64(len(m.RequestedAnyName))) i-- - dAtA[i] = 0x4a + dAtA[i] = 0x3a } if m.PaymentMethod != 0 { i = encodeVarintPaymentservice(dAtA, i, uint64(m.PaymentMethod)) i-- - dAtA[i] = 0x40 - } - if m.NextTierEnds != 0 { - i = encodeVarintPaymentservice(dAtA, i, uint64(m.NextTierEnds)) - i-- - dAtA[i] = 0x38 - } - if m.NextTier != 0 { - i = encodeVarintPaymentservice(dAtA, i, uint64(m.NextTier)) - i-- dAtA[i] = 0x30 } if m.IsAutoRenew { @@ -1749,12 +1733,6 @@ func (m *GetSubscriptionResponse) Size() (n int) { if m.IsAutoRenew { n += 2 } - if m.NextTier != 0 { - n += 1 + sovPaymentservice(uint64(m.NextTier)) - } - if m.NextTierEnds != 0 { - n += 1 + sovPaymentservice(uint64(m.NextTierEnds)) - } if m.PaymentMethod != 0 { n += 1 + sovPaymentservice(uint64(m.PaymentMethod)) } @@ -2300,44 +2278,6 @@ func (m *GetSubscriptionResponse) Unmarshal(dAtA []byte) error { } m.IsAutoRenew = bool(v != 0) case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field NextTier", wireType) - } - m.NextTier = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPaymentservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.NextTier |= SubscriptionTier(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field NextTierEnds", wireType) - } - m.NextTierEnds = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPaymentservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.NextTierEnds |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 8: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field PaymentMethod", wireType) } @@ -2356,7 +2296,7 @@ func (m *GetSubscriptionResponse) Unmarshal(dAtA []byte) error { break } } - case 9: + case 7: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field RequestedAnyName", wireType) } @@ -2388,7 +2328,7 @@ func (m *GetSubscriptionResponse) Unmarshal(dAtA []byte) error { } m.RequestedAnyName = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 10: + case 8: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field UserEmail", wireType) } @@ -2420,7 +2360,7 @@ func (m *GetSubscriptionResponse) Unmarshal(dAtA []byte) error { } m.UserEmail = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 11: + case 9: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field SubscribeToNewsletter", wireType) } diff --git a/paymentservice/paymentserviceproto/protos/paymentservice.proto b/paymentservice/paymentserviceproto/protos/paymentservice.proto index 0da6caa1..229b358d 100644 --- a/paymentservice/paymentserviceproto/protos/paymentservice.proto +++ b/paymentservice/paymentserviceproto/protos/paymentservice.proto @@ -1,12 +1,11 @@ syntax = "proto3"; option go_package = "paymentservice/paymentserviceproto"; -// TODO: no marshalling avail :-( -//import "google/protobuf/timestamp.proto"; - +// TODO: +// later we will have an interface to enumerate all available tiers +// it's a bad idea to list them here, because interface will be changed often enum SubscriptionTier { TierUnknown = 0; - // "free" tier TierExplorer = 1; @@ -18,16 +17,17 @@ enum SubscriptionTier { // these are the real tiers: TierBuilder1Year = 4; TierCoCreator1Year = 5; + + TierBuilderPlus = 6; + TierAnytypeTeam = 7; } enum SubscriptionStatus { StatusUnknown = 0; - // payment is still pending // this will be the status until the payment is confirmed or N is elapsed and no payment is received // in the last case the subscription will switch to Status_Unknown or Status_Active StatusPending = 1; - StatusActive = 2; } @@ -36,9 +36,10 @@ enum PaymentMethod { MethodCrypto = 1; MethodApplePay = 2; MethodGooglePay = 3; + MethodAppleInapp = 4; + MethodGoogleInapp = 5; } -// 1 message GetSubscriptionRequest { // in the following format: "A5k2d9sFZw84yisTxRnz2bPRd1YPfVfhxqymZ6yESprFTG65" // you can get it with Account().SignKey.GetPublic().Account() @@ -48,7 +49,6 @@ message GetSubscriptionRequest { message GetSubscriptionRequestSigned { // GetSubscriptionRequest bytes payload = 1; - // this is payload signed with payload.ownerAnyID bytes signature = 2; } @@ -56,45 +56,27 @@ message GetSubscriptionRequestSigned { message GetSubscriptionResponse { SubscriptionTier tier = 1; SubscriptionStatus status = 2; - - //TODO: use google.protobuf.Timestamp and marshall it uint64 dateStarted = 3; uint64 dateEnds = 4; bool isAutoRenew = 5; - - // if client has "downgraded" - he is still able to use the service until the end of the period - // (dateEnds) but then he will be on nextTier until nextTierEnds - // - // if Tier0_Unknown -> then no next tier - SubscriptionTier nextTier = 6; - uint64 nextTierEnds = 7; - - PaymentMethod paymentMethod = 8; - - string requestedAnyName = 9; - + PaymentMethod paymentMethod = 6; + string requestedAnyName = 7; // if user verified her email OR provided it while buying a subscription, it will be here - string userEmail = 10; - - bool subscribeToNewsletter = 11; + string userEmail = 8; + bool subscribeToNewsletter = 9; } -// 2 message BuySubscriptionRequest { // in the following format: "A5k2d9sFZw84yisTxRnz2bPRd1YPfVfhxqymZ6yESprFTG65" // you can get it with Account().SignKey.GetPublic().Account() string ownerAnyId = 1; - // this is the owner's main EOA (Externally Owned Account) address // not AccountAbstraction's SCW (Smart Contract Wallet) address! // this is required to reserve a name for the owner (later that is done by user) // in the following format: "0x7a250d5630b4cf539739df2c5dacb4c659f2488d" string ownerEthAddress = 2; - SubscriptionTier requestedTier = 3; - PaymentMethod paymentMethod = 4; - // if empty - then no name requested // if non-empty - PP node will register that name on behalf of the user string requestedAnyName = 5; @@ -103,7 +85,6 @@ message BuySubscriptionRequest { message BuySubscriptionRequestSigned { // BuySubscriptionRequest bytes payload = 1; - // this is payload signed with payload.ownerAnyID bytes signature = 2; } @@ -123,7 +104,6 @@ message GetSubscriptionPortalLinkRequest { message GetSubscriptionPortalLinkRequestSigned { // GetSubscriptionPortalLinkRequest bytes payload = 1; - // this is payload signed with payload.ownerAnyID bytes signature = 2; } @@ -136,9 +116,7 @@ message GetVerificationEmailRequest { // in the following format: "A5k2d9sFZw84yisTxRnz2bPRd1YPfVfhxqymZ6yESprFTG65" // you can get it with Account().SignKey.GetPublic().Account() string ownerAnyId = 1; - string email = 2; - bool subscribeToNewsletter = 3; } @@ -149,7 +127,6 @@ message GetVerificationEmailResponse { message GetVerificationEmailRequestSigned { // GetVerificationEmailRequest bytes payload = 1; - // this is payload signed with payload.ownerAnyID bytes signature = 2; } @@ -158,13 +135,12 @@ message VerifyEmailRequest { // in the following format: "A5k2d9sFZw84yisTxRnz2bPRd1YPfVfhxqymZ6yESprFTG65" // you can get it with Account().SignKey.GetPublic().Account() string ownerAnyId = 1; - // this is the owner's main EOA (Externally Owned Account) address // not AccountAbstraction's SCW (Smart Contract Wallet) address! // this is required to reserve a name for the owner (later that is done by user) // in the following format: "0x7a250d5630b4cf539739df2c5dacb4c659f2488d" string ownerEthAddress = 2; - + // code received in the email string code = 3; } @@ -175,7 +151,6 @@ message VerifyEmailResponse { message VerifyEmailRequestSigned { // VerifyEmailRequest bytes payload = 1; - // this is payload signed with payload.ownerAnyID bytes signature = 2; } From c8ba1ff767b3237749ed65c197b606018e53b31b Mon Sep 17 00:00:00 2001 From: Sergey Cherepanov Date: Tue, 5 Mar 2024 16:06:12 +0100 Subject: [PATCH 019/140] fileproto errors --- commonfile/fileproto/file.pb.go | 150 +++++++++++++------------ commonfile/fileproto/protos/file.proto | 3 +- 2 files changed, 79 insertions(+), 74 deletions(-) diff --git a/commonfile/fileproto/file.pb.go b/commonfile/fileproto/file.pb.go index 2a1edd15..9b40efe2 100644 --- a/commonfile/fileproto/file.pb.go +++ b/commonfile/fileproto/file.pb.go @@ -25,33 +25,36 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type ErrCodes int32 const ( - ErrCodes_Unexpected ErrCodes = 0 - ErrCodes_CIDNotFound ErrCodes = 1 - ErrCodes_Forbidden ErrCodes = 2 - ErrCodes_SpaceLimitExceeded ErrCodes = 3 - ErrCodes_QuerySizeExceeded ErrCodes = 4 - ErrCodes_WrongHash ErrCodes = 5 - ErrCodes_ErrorOffset ErrCodes = 200 + ErrCodes_Unexpected ErrCodes = 0 + ErrCodes_CIDNotFound ErrCodes = 1 + ErrCodes_Forbidden ErrCodes = 2 + ErrCodes_LimitExceeded ErrCodes = 3 + ErrCodes_QuerySizeExceeded ErrCodes = 4 + ErrCodes_WrongHash ErrCodes = 5 + ErrCodes_NotEnoughSpace ErrCodes = 6 + ErrCodes_ErrorOffset ErrCodes = 200 ) var ErrCodes_name = map[int32]string{ 0: "Unexpected", 1: "CIDNotFound", 2: "Forbidden", - 3: "SpaceLimitExceeded", + 3: "LimitExceeded", 4: "QuerySizeExceeded", 5: "WrongHash", + 6: "NotEnoughSpace", 200: "ErrorOffset", } var ErrCodes_value = map[string]int32{ - "Unexpected": 0, - "CIDNotFound": 1, - "Forbidden": 2, - "SpaceLimitExceeded": 3, - "QuerySizeExceeded": 4, - "WrongHash": 5, - "ErrorOffset": 200, + "Unexpected": 0, + "CIDNotFound": 1, + "Forbidden": 2, + "LimitExceeded": 3, + "QuerySizeExceeded": 4, + "WrongHash": 5, + "NotEnoughSpace": 6, + "ErrorOffset": 200, } func (x ErrCodes) String() string { @@ -1197,66 +1200,67 @@ func init() { } var fileDescriptor_fd665a7e11c833d5 = []byte{ - // 937 bytes of a gzipped FileDescriptorProto + // 947 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0x41, 0x73, 0xdb, 0x44, - 0x14, 0x8e, 0x6c, 0xd9, 0xb5, 0x5e, 0xe2, 0x44, 0xde, 0xa4, 0xc1, 0xb8, 0x41, 0xe3, 0xd1, 0xa1, + 0x14, 0xb6, 0x6c, 0xd9, 0xb5, 0x5e, 0x62, 0x47, 0xde, 0xa4, 0xc1, 0xb8, 0x41, 0xe3, 0xd1, 0xa1, 0x93, 0xe9, 0x30, 0x2e, 0x93, 0xc2, 0xd0, 0x4b, 0x0f, 0xb1, 0x63, 0x53, 0x53, 0xa6, 0x01, 0x65, - 0x3a, 0x1d, 0xe0, 0x82, 0x2c, 0xad, 0x1b, 0x11, 0x45, 0x1b, 0xb4, 0x6b, 0x48, 0xf8, 0x09, 0x9c, - 0xf8, 0x41, 0xfc, 0x80, 0x1e, 0x7b, 0xe4, 0x06, 0x93, 0x0c, 0xff, 0x83, 0xd9, 0xd5, 0xca, 0x5a, - 0xad, 0xdc, 0x86, 0x01, 0x2e, 0xce, 0xee, 0xb7, 0xef, 0xbd, 0xef, 0xbd, 0x6f, 0xb5, 0xef, 0x05, - 0xee, 0x07, 0xe4, 0xfc, 0x9c, 0x24, 0xf3, 0x28, 0xc6, 0x0f, 0xf9, 0xcf, 0x45, 0x4a, 0x18, 0x79, - 0x28, 0x7e, 0xa9, 0x00, 0x06, 0x62, 0x8d, 0x5a, 0x7c, 0x4d, 0xaf, 0x92, 0xc0, 0x35, 0xa1, 0x76, - 0x7c, 0xe6, 0x3e, 0x81, 0xad, 0x61, 0x4c, 0x82, 0xb3, 0xcf, 0x30, 0x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b, 0x6c, 0x14, 0x2b, 0xdc, + 0x01, 0x74, 0xe8, 0x79, 0x3c, 0x9c, 0xa4, 0x88, 0xfd, 0x9b, 0x06, 0xdb, 0x05, 0xf8, 0x7f, 0xaf, + 0xfc, 0x21, 0xb4, 0x05, 0x34, 0x52, 0xca, 0x57, 0x50, 0xf4, 0x04, 0x1a, 0x22, 0x55, 0xda, 0xd5, + 0xd5, 0xbe, 0x52, 0xba, 0x18, 0x27, 0x35, 0xb5, 0x07, 0xb0, 0x9b, 0x66, 0xff, 0x05, 0xcf, 0xed, + 0x24, 0xef, 0xef, 0x3b, 0x50, 0x17, 0xe9, 0xa6, 0xb9, 0x27, 0x1b, 0x7b, 0x02, 0x3b, 0x22, 0x98, + 0x6a, 0xfd, 0xee, 0x67, 0xb6, 0x8a, 0x53, 0x95, 0xe2, 0x3c, 0xfa, 0x55, 0x83, 0xe6, 0x38, 0x8e, + 0x47, 0xc4, 0xc7, 0x14, 0xb5, 0x01, 0x5e, 0x45, 0xf8, 0xea, 0x12, 0x7b, 0x0c, 0xfb, 0x66, 0x05, + 0x6d, 0xc1, 0xc6, 0x68, 0x7a, 0xf4, 0x92, 0xb0, 0x09, 0x59, 0x44, 0xbe, 0xa9, 0xa1, 0x16, 0x18, + 0x13, 0x12, 0xcf, 0x02, 0xdf, 0xc7, 0x91, 0x59, 0x45, 0x1d, 0x68, 0x09, 0xfe, 0xf1, 0x95, 0x87, + 0xb1, 0x8f, 0x7d, 0xb3, 0x86, 0xee, 0x43, 0xe7, 0xab, 0x05, 0x8e, 0x97, 0x27, 0xc1, 0xcf, 0x78, + 0x05, 0xeb, 0xdc, 0xf1, 0x75, 0x4c, 0xa2, 0xd3, 0xe7, 0x2e, 0x3d, 0x33, 0xeb, 0x08, 0x41, 0xfb, + 0x25, 0x61, 0xe3, 0x88, 0x2c, 0x4e, 0xcf, 0x44, 0x19, 0x66, 0x03, 0x99, 0xb0, 0x31, 0x8e, 0x63, + 0x12, 0x1f, 0xcf, 0xe7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1, 0x41, 0x23, 0x4b, 0x49, + 0xfe, 0x56, 0xf7, 0xe1, 0xe0, 0xcd, 0xb5, 0xa5, 0xbd, 0xbd, 0xb6, 0xb4, 0x3f, 0xaf, 0x2d, 0xed, + 0x97, 0x1b, 0xab, 0xf2, 0xf6, 0xc6, 0xaa, 0xfc, 0x7e, 0x63, 0x55, 0xbe, 0xd9, 0x59, 0xf7, 0xaf, + 0xe6, 0xac, 0x21, 0xfe, 0x3c, 0xf9, 0x3b, 0x00, 0x00, 0xff, 0xff, 0xe4, 0x72, 0x1e, 0xc4, 0x89, + 0x0a, 0x00, 0x00, } func (m *Ok) Marshal() (dAtA []byte, err error) { diff --git a/commonfile/fileproto/protos/file.proto b/commonfile/fileproto/protos/file.proto index 6e82976b..b6bd1373 100644 --- a/commonfile/fileproto/protos/file.proto +++ b/commonfile/fileproto/protos/file.proto @@ -7,9 +7,10 @@ enum ErrCodes { Unexpected = 0; CIDNotFound = 1; Forbidden = 2; - SpaceLimitExceeded = 3; + LimitExceeded = 3; QuerySizeExceeded = 4; WrongHash = 5; + NotEnoughSpace = 6; ErrorOffset = 200; } From df59a3d8d5c8d879434ba33cd4196b5414c28c4a Mon Sep 17 00:00:00 2001 From: Sergey Cherepanov Date: Tue, 5 Mar 2024 16:09:02 +0100 Subject: [PATCH 020/140] fileproto: errors wrap --- commonfile/fileproto/fileprotoerr/fileprotoerr.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/commonfile/fileproto/fileprotoerr/fileprotoerr.go b/commonfile/fileproto/fileprotoerr/fileprotoerr.go index d5ff4d13..876be1a9 100644 --- a/commonfile/fileproto/fileprotoerr/fileprotoerr.go +++ b/commonfile/fileproto/fileprotoerr/fileprotoerr.go @@ -2,6 +2,7 @@ package fileprotoerr import ( "fmt" + "github.com/anyproto/any-sync/commonfile/fileproto" "github.com/anyproto/any-sync/net/rpc/rpcerr" ) @@ -11,7 +12,8 @@ var ( ErrUnexpected = errGroup.Register(fmt.Errorf("unexpected fileproto error"), uint64(fileproto.ErrCodes_Unexpected)) ErrCIDNotFound = errGroup.Register(fmt.Errorf("CID not found"), uint64(fileproto.ErrCodes_CIDNotFound)) ErrForbidden = errGroup.Register(fmt.Errorf("forbidden"), uint64(fileproto.ErrCodes_Forbidden)) - ErrSpaceLimitExceeded = errGroup.Register(fmt.Errorf("space limit exceeded"), uint64(fileproto.ErrCodes_SpaceLimitExceeded)) + ErrSpaceLimitExceeded = errGroup.Register(fmt.Errorf("space limit exceeded"), uint64(fileproto.ErrCodes_LimitExceeded)) ErrQuerySizeExceeded = errGroup.Register(fmt.Errorf("query size exceeded"), uint64(fileproto.ErrCodes_QuerySizeExceeded)) + ErrNotEnoughSpace = errGroup.Register(fmt.Errorf("query size exceeded"), uint64(fileproto.ErrCodes_NotEnoughSpace)) ErrWrongHash = errGroup.Register(fmt.Errorf("wrong block hash"), uint64(fileproto.ErrCodes_WrongHash)) ) From ff5dd605fad76d2492f81990760e0748e2e27583 Mon Sep 17 00:00:00 2001 From: Anton Akentev Date: Tue, 5 Mar 2024 21:14:51 +0000 Subject: [PATCH 021/140] Tier -> int32 --- .../paymentserviceproto/paymentservice.pb.go | 153 +++++++++--------- .../protos/paymentservice.proto | 12 +- 2 files changed, 90 insertions(+), 75 deletions(-) diff --git a/paymentservice/paymentserviceproto/paymentservice.pb.go b/paymentservice/paymentserviceproto/paymentservice.pb.go index a1c13412..c41edb35 100644 --- a/paymentservice/paymentserviceproto/paymentservice.pb.go +++ b/paymentservice/paymentserviceproto/paymentservice.pb.go @@ -81,18 +81,24 @@ const ( // in the last case the subscription will switch to Status_Unknown or Status_Active SubscriptionStatus_StatusPending SubscriptionStatus = 1 SubscriptionStatus_StatusActive SubscriptionStatus = 2 + // when buying from other side - some data is missing in the Subscription + // we need to provide additional data after the payment + // please call BuySubscription to fill-in needed fields + SubscriptionStatus_StatusPendingRequiresInput SubscriptionStatus = 3 ) var SubscriptionStatus_name = map[int32]string{ 0: "StatusUnknown", 1: "StatusPending", 2: "StatusActive", + 3: "StatusPendingRequiresInput", } var SubscriptionStatus_value = map[string]int32{ - "StatusUnknown": 0, - "StatusPending": 1, - "StatusActive": 2, + "StatusUnknown": 0, + "StatusPending": 1, + "StatusActive": 2, + "StatusPendingRequiresInput": 3, } func (x SubscriptionStatus) String() string { @@ -241,7 +247,8 @@ func (m *GetSubscriptionRequestSigned) GetSignature() []byte { } type GetSubscriptionResponse struct { - Tier SubscriptionTier `protobuf:"varint,1,opt,name=tier,proto3,enum=SubscriptionTier" json:"tier,omitempty"` + // was SubscriptionTier before, changed to int32 to allow us to use dynamic tiers + Tier int32 `protobuf:"varint,1,opt,name=tier,proto3" json:"tier,omitempty"` Status SubscriptionStatus `protobuf:"varint,2,opt,name=status,proto3,enum=SubscriptionStatus" json:"status,omitempty"` DateStarted uint64 `protobuf:"varint,3,opt,name=dateStarted,proto3" json:"dateStarted,omitempty"` DateEnds uint64 `protobuf:"varint,4,opt,name=dateEnds,proto3" json:"dateEnds,omitempty"` @@ -286,11 +293,11 @@ func (m *GetSubscriptionResponse) XXX_DiscardUnknown() { var xxx_messageInfo_GetSubscriptionResponse proto.InternalMessageInfo -func (m *GetSubscriptionResponse) GetTier() SubscriptionTier { +func (m *GetSubscriptionResponse) GetTier() int32 { if m != nil { return m.Tier } - return SubscriptionTier_TierUnknown + return 0 } func (m *GetSubscriptionResponse) GetStatus() SubscriptionStatus { @@ -357,9 +364,10 @@ type BuySubscriptionRequest struct { // not AccountAbstraction's SCW (Smart Contract Wallet) address! // this is required to reserve a name for the owner (later that is done by user) // in the following format: "0x7a250d5630b4cf539739df2c5dacb4c659f2488d" - OwnerEthAddress string `protobuf:"bytes,2,opt,name=ownerEthAddress,proto3" json:"ownerEthAddress,omitempty"` - RequestedTier SubscriptionTier `protobuf:"varint,3,opt,name=requestedTier,proto3,enum=SubscriptionTier" json:"requestedTier,omitempty"` - PaymentMethod PaymentMethod `protobuf:"varint,4,opt,name=paymentMethod,proto3,enum=PaymentMethod" json:"paymentMethod,omitempty"` + OwnerEthAddress string `protobuf:"bytes,2,opt,name=ownerEthAddress,proto3" json:"ownerEthAddress,omitempty"` + // was SubscriptionTier before, changed to int32 to allow us to use dynamic tiers + RequestedTier int32 `protobuf:"varint,3,opt,name=requestedTier,proto3" json:"requestedTier,omitempty"` + PaymentMethod PaymentMethod `protobuf:"varint,4,opt,name=paymentMethod,proto3,enum=PaymentMethod" json:"paymentMethod,omitempty"` // if empty - then no name requested // if non-empty - PP node will register that name on behalf of the user RequestedAnyName string `protobuf:"bytes,5,opt,name=requestedAnyName,proto3" json:"requestedAnyName,omitempty"` @@ -412,11 +420,11 @@ func (m *BuySubscriptionRequest) GetOwnerEthAddress() string { return "" } -func (m *BuySubscriptionRequest) GetRequestedTier() SubscriptionTier { +func (m *BuySubscriptionRequest) GetRequestedTier() int32 { if m != nil { return m.RequestedTier } - return SubscriptionTier_TierUnknown + return 0 } func (m *BuySubscriptionRequest) GetPaymentMethod() PaymentMethod { @@ -1022,65 +1030,66 @@ func init() { } var fileDescriptor_4feb29dcc5ba50f6 = []byte{ - // 923 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x56, 0xcf, 0x6f, 0xe3, 0x54, - 0x10, 0x8e, 0x9b, 0xa4, 0x6d, 0xa6, 0xdb, 0xd4, 0x9d, 0xa6, 0x5d, 0x6f, 0x68, 0xa3, 0x60, 0x09, - 0xa8, 0x8a, 0xe4, 0x8a, 0xb2, 0x12, 0x20, 0x21, 0x44, 0x5a, 0xa2, 0x6a, 0xa5, 0xb2, 0x8a, 0x9c, - 0xec, 0x22, 0xd8, 0x0b, 0x6e, 0x3c, 0x64, 0x4d, 0xdd, 0xf7, 0xcc, 0xf3, 0xf3, 0x16, 0x9f, 0x39, - 0x20, 0x6e, 0xfc, 0x4f, 0x7b, 0xe1, 0xd8, 0x23, 0x47, 0xd4, 0xfe, 0x1d, 0x48, 0xc8, 0xc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0xb3, 0x80, 0x27, 0xb0, 0x36, 0xb6, 0x30, 0x71, 0xc7, 0x9a, 0xb7, 0x9a, 0xeb, 0x86, - 0x35, 0x63, 0xc3, 0x9a, 0x05, 0xfc, 0x19, 0x9e, 0xcc, 0xdc, 0x4e, 0xf8, 0x91, 0x75, 0xbf, 0xdd, - 0x58, 0x37, 0xad, 0x3b, 0x57, 0x9c, 0x59, 0xc0, 0x57, 0x50, 0x9b, 0xb6, 0x1a, 0x50, 0x9d, 0x9e, - 0xbf, 0x31, 0xea, 0x3b, 0xd6, 0xdc, 0xad, 0x53, 0xc0, 0xaf, 0x61, 0x25, 0x37, 0x75, 0xf8, 0xc4, - 0x9a, 0x35, 0x83, 0xf5, 0x9a, 0x35, 0x65, 0x9e, 0xcd, 0xc2, 0xe1, 0x97, 0x7f, 0x5d, 0x35, 0xb4, - 0xcb, 0xab, 0x86, 0xf6, 0xcf, 0x55, 0x43, 0xfb, 0xf3, 0xba, 0x51, 0xb8, 0xbc, 0x6e, 0x14, 0xfe, - 0xbe, 0x6e, 0x14, 0x7e, 0x30, 0xef, 0x7e, 0xa7, 0x3c, 0x5d, 0x54, 0x5f, 0x9f, 0xfe, 0x17, 0x00, - 0x00, 0xff, 0xff, 0x9f, 0xdf, 0x6e, 0x85, 0x80, 0x0a, 0x00, 0x00, + // 931 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x56, 0x4f, 0x6f, 0xe3, 0x54, + 0x10, 0x8f, 0xf3, 0xa7, 0x6d, 0xa6, 0xdb, 0xd6, 0x3b, 0x4d, 0xbb, 0xde, 0xd0, 0x5a, 0xc1, 0x42, + 0x50, 0x15, 0xc9, 0x15, 0xcb, 0x1e, 0x40, 0x42, 0x88, 0xb4, 0x44, 0x55, 0xa5, 0x65, 0x15, 0x39, + 0xd9, 0x45, 0xb0, 0x17, 0xdc, 0x78, 0xc8, 0x9a, 0xba, 0xef,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c1, 0x53, 0x9d, 0xf8, 0x6c, 0x88, 0x0e, 0x6c, 0x4d, 0xcc, 0x86, 0x9c, 0x93, + 0x5d, 0x7b, 0xd1, 0x47, 0x42, 0xd3, 0xb0, 0xe7, 0xbc, 0xea, 0xad, 0x12, 0x3e, 0x83, 0x8d, 0x89, + 0x81, 0x8a, 0xbb, 0xf6, 0xa2, 0xd1, 0xdd, 0x34, 0xec, 0x39, 0x13, 0xd8, 0x2a, 0xe1, 0x4f, 0xf0, + 0x78, 0xee, 0xf4, 0xc2, 0x8f, 0xec, 0xbb, 0xcd, 0xce, 0xa6, 0x65, 0xdf, 0x3a, 0x02, 0xad, 0x12, + 0xbe, 0x82, 0xc6, 0xac, 0xd1, 0x81, 0x2a, 0x7a, 0xf1, 0x44, 0x69, 0xee, 0xda, 0x0b, 0xa7, 0x52, + 0x09, 0xbf, 0x82, 0xd5, 0xc2, 0xad, 0xc4, 0xc7, 0xf6, 0xbc, 0x3b, 0xda, 0x6c, 0xd8, 0x33, 0xee, + 0xbb, 0x55, 0x3a, 0xfc, 0xe2, 0x8f, 0x4b, 0x53, 0x7b, 0x77, 0x69, 0x6a, 0x7f, 0x5d, 0x9a, 0xda, + 0xef, 0x57, 0x66, 0xe9, 0xdd, 0x95, 0x59, 0xfa, 0xf3, 0xca, 0x2c, 0x7d, 0x6f, 0xdd, 0xfe, 0x35, + 0x79, 0xba, 0xa4, 0xfe, 0x3e, 0xfd, 0x37, 0x00, 0x00, 0xff, 0xff, 0x34, 0x5d, 0x18, 0xf8, 0x7a, + 0x0a, 0x00, 0x00, } func (m *GetSubscriptionRequest) Marshal() (dAtA []byte, err error) { @@ -2195,7 +2204,7 @@ func (m *GetSubscriptionResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Tier |= SubscriptionTier(b&0x7F) << shift + m.Tier |= int32(b&0x7F) << shift if b < 0x80 { break } @@ -2508,7 +2517,7 @@ func (m *BuySubscriptionRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.RequestedTier |= SubscriptionTier(b&0x7F) << shift + m.RequestedTier |= int32(b&0x7F) << shift if b < 0x80 { break } diff --git a/paymentservice/paymentserviceproto/protos/paymentservice.proto b/paymentservice/paymentserviceproto/protos/paymentservice.proto index 229b358d..9c873271 100644 --- a/paymentservice/paymentserviceproto/protos/paymentservice.proto +++ b/paymentservice/paymentserviceproto/protos/paymentservice.proto @@ -28,7 +28,11 @@ enum SubscriptionStatus { // this will be the status until the payment is confirmed or N is elapsed and no payment is received // in the last case the subscription will switch to Status_Unknown or Status_Active StatusPending = 1; - StatusActive = 2; + StatusActive = 2; + // when buying from other side - some data is missing in the Subscription + // we need to provide additional data after the payment + // please call BuySubscription to fill-in needed fields + StatusPendingRequiresInput = 3; } enum PaymentMethod { @@ -54,7 +58,8 @@ message GetSubscriptionRequestSigned { } message GetSubscriptionResponse { - SubscriptionTier tier = 1; + // was SubscriptionTier before, changed to int32 to allow us to use dynamic tiers + int32 tier = 1; SubscriptionStatus status = 2; uint64 dateStarted = 3; uint64 dateEnds = 4; @@ -75,7 +80,8 @@ message BuySubscriptionRequest { // this is required to reserve a name for the owner (later that is done by user) // in the following format: "0x7a250d5630b4cf539739df2c5dacb4c659f2488d" string ownerEthAddress = 2; - SubscriptionTier requestedTier = 3; + // was SubscriptionTier before, changed to int32 to allow us to use dynamic tiers + int32 requestedTier = 3; PaymentMethod paymentMethod = 4; // if empty - then no name requested // if non-empty - PP node will register that name on behalf of the user From c77a5fe2ff79d3b57a51b49ecdc9d53a7267be4b Mon Sep 17 00:00:00 2001 From: Anton Akentev Date: Wed, 6 Mar 2024 17:25:50 +0000 Subject: [PATCH 022/140] Add FinalizeSubscription method --- .../paymentserviceproto/paymentservice.pb.go | 778 ++++++++++++++++-- .../paymentservice_drpc.pb.go | 46 +- .../protos/paymentservice.proto | 31 +- 3 files changed, 775 insertions(+), 80 deletions(-) diff --git a/paymentservice/paymentserviceproto/paymentservice.pb.go b/paymentservice/paymentserviceproto/paymentservice.pb.go index c41edb35..97be3f29 100644 --- a/paymentservice/paymentserviceproto/paymentservice.pb.go +++ b/paymentservice/paymentserviceproto/paymentservice.pb.go @@ -84,21 +84,21 @@ const ( // when buying from other side - some data is missing in the Subscription // we need to provide additional data after the payment // please call BuySubscription to fill-in needed fields - SubscriptionStatus_StatusPendingRequiresInput SubscriptionStatus = 3 + SubscriptionStatus_StatusPendingRequiresFinalization SubscriptionStatus = 3 ) var SubscriptionStatus_name = map[int32]string{ 0: "StatusUnknown", 1: "StatusPending", 2: "StatusActive", - 3: "StatusPendingRequiresInput", + 3: "StatusPendingRequiresFinalization", } var SubscriptionStatus_value = map[string]int32{ - "StatusUnknown": 0, - "StatusPending": 1, - "StatusActive": 2, - "StatusPendingRequiresInput": 3, + "StatusUnknown": 0, + "StatusPending": 1, + "StatusActive": 2, + "StatusPendingRequiresFinalization": 3, } func (x SubscriptionStatus) String() string { @@ -541,6 +541,163 @@ func (m *BuySubscriptionResponse) GetPaymentUrl() string { return "" } +type FinalizeSubscriptionRequest struct { + // in the following format: "A5k2d9sFZw84yisTxRnz2bPRd1YPfVfhxqymZ6yESprFTG65" + // you can get it with Account().SignKey.GetPublic().Account() + OwnerAnyId string `protobuf:"bytes,1,opt,name=ownerAnyId,proto3" json:"ownerAnyId,omitempty"` + // this is the owner's main EOA (Externally Owned Account) address + // not AccountAbstraction's SCW (Smart Contract Wallet) address! + // this is required to reserve a name for the owner (later that is done by user) + // in the following format: "0x7a250d5630b4cf539739df2c5dacb4c659f2488d" + OwnerEthAddress string `protobuf:"bytes,2,opt,name=ownerEthAddress,proto3" json:"ownerEthAddress,omitempty"` + // if empty - then no name requested + RequestedAnyName string `protobuf:"bytes,3,opt,name=requestedAnyName,proto3" json:"requestedAnyName,omitempty"` +} + +func (m *FinalizeSubscriptionRequest) Reset() { *m = FinalizeSubscriptionRequest{} } +func (m *FinalizeSubscriptionRequest) String() string { return proto.CompactTextString(m) } +func (*FinalizeSubscriptionRequest) ProtoMessage() {} +func (*FinalizeSubscriptionRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_4feb29dcc5ba50f6, []int{6} +} +func (m *FinalizeSubscriptionRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *FinalizeSubscriptionRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_FinalizeSubscriptionRequest.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 *FinalizeSubscriptionRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_FinalizeSubscriptionRequest.Merge(m, src) +} +func (m *FinalizeSubscriptionRequest) XXX_Size() int { + return m.Size() +} +func (m *FinalizeSubscriptionRequest) XXX_DiscardUnknown() { + xxx_messageInfo_FinalizeSubscriptionRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_FinalizeSubscriptionRequest proto.InternalMessageInfo + +func (m *FinalizeSubscriptionRequest) GetOwnerAnyId() string { + if m != nil { + return m.OwnerAnyId + } + return "" +} + +func (m *FinalizeSubscriptionRequest) GetOwnerEthAddress() string { + if m != nil { + return m.OwnerEthAddress + } + return "" +} + +func (m *FinalizeSubscriptionRequest) GetRequestedAnyName() string { + if m != nil { + return m.RequestedAnyName + } + return "" +} + +type FinalizeSubscriptionResponse struct { +} + +func (m *FinalizeSubscriptionResponse) Reset() { *m = FinalizeSubscriptionResponse{} } +func (m *FinalizeSubscriptionResponse) String() string { return proto.CompactTextString(m) } +func (*FinalizeSubscriptionResponse) ProtoMessage() {} +func (*FinalizeSubscriptionResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_4feb29dcc5ba50f6, []int{7} +} +func (m *FinalizeSubscriptionResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *FinalizeSubscriptionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_FinalizeSubscriptionResponse.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 *FinalizeSubscriptionResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_FinalizeSubscriptionResponse.Merge(m, src) +} +func (m *FinalizeSubscriptionResponse) XXX_Size() int { + return m.Size() +} +func (m *FinalizeSubscriptionResponse) XXX_DiscardUnknown() { + xxx_messageInfo_FinalizeSubscriptionResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_FinalizeSubscriptionResponse proto.InternalMessageInfo + +type FinalizeSubscriptionRequestSigned struct { + // VerifyEmailRequest + Payload []byte `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"` + // this is payload signed with payload.ownerAnyID + Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` +} + +func (m *FinalizeSubscriptionRequestSigned) Reset() { *m = FinalizeSubscriptionRequestSigned{} } +func (m *FinalizeSubscriptionRequestSigned) String() string { return proto.CompactTextString(m) } +func (*FinalizeSubscriptionRequestSigned) ProtoMessage() {} +func (*FinalizeSubscriptionRequestSigned) Descriptor() ([]byte, []int) { + return fileDescriptor_4feb29dcc5ba50f6, []int{8} +} +func (m *FinalizeSubscriptionRequestSigned) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *FinalizeSubscriptionRequestSigned) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_FinalizeSubscriptionRequestSigned.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 *FinalizeSubscriptionRequestSigned) XXX_Merge(src proto.Message) { + xxx_messageInfo_FinalizeSubscriptionRequestSigned.Merge(m, src) +} +func (m *FinalizeSubscriptionRequestSigned) XXX_Size() int { + return m.Size() +} +func (m *FinalizeSubscriptionRequestSigned) XXX_DiscardUnknown() { + xxx_messageInfo_FinalizeSubscriptionRequestSigned.DiscardUnknown(m) +} + +var xxx_messageInfo_FinalizeSubscriptionRequestSigned proto.InternalMessageInfo + +func (m *FinalizeSubscriptionRequestSigned) GetPayload() []byte { + if m != nil { + return m.Payload + } + return nil +} + +func (m *FinalizeSubscriptionRequestSigned) GetSignature() []byte { + if m != nil { + return m.Signature + } + return nil +} + type GetSubscriptionPortalLinkRequest struct { // in the following format: "A5k2d9sFZw84yisTxRnz2bPRd1YPfVfhxqymZ6yESprFTG65" // you can get it with Account().SignKey.GetPublic().Account() @@ -551,7 +708,7 @@ func (m *GetSubscriptionPortalLinkRequest) Reset() { *m = GetSubscriptio func (m *GetSubscriptionPortalLinkRequest) String() string { return proto.CompactTextString(m) } func (*GetSubscriptionPortalLinkRequest) ProtoMessage() {} func (*GetSubscriptionPortalLinkRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_4feb29dcc5ba50f6, []int{6} + return fileDescriptor_4feb29dcc5ba50f6, []int{9} } func (m *GetSubscriptionPortalLinkRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -600,7 +757,7 @@ func (m *GetSubscriptionPortalLinkRequestSigned) Reset() { func (m *GetSubscriptionPortalLinkRequestSigned) String() string { return proto.CompactTextString(m) } func (*GetSubscriptionPortalLinkRequestSigned) ProtoMessage() {} func (*GetSubscriptionPortalLinkRequestSigned) Descriptor() ([]byte, []int) { - return fileDescriptor_4feb29dcc5ba50f6, []int{7} + return fileDescriptor_4feb29dcc5ba50f6, []int{10} } func (m *GetSubscriptionPortalLinkRequestSigned) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -651,7 +808,7 @@ func (m *GetSubscriptionPortalLinkResponse) Reset() { *m = GetSubscripti func (m *GetSubscriptionPortalLinkResponse) String() string { return proto.CompactTextString(m) } func (*GetSubscriptionPortalLinkResponse) ProtoMessage() {} func (*GetSubscriptionPortalLinkResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_4feb29dcc5ba50f6, []int{8} + return fileDescriptor_4feb29dcc5ba50f6, []int{11} } func (m *GetSubscriptionPortalLinkResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -699,7 +856,7 @@ func (m *GetVerificationEmailRequest) Reset() { *m = GetVerificationEmai func (m *GetVerificationEmailRequest) String() string { return proto.CompactTextString(m) } func (*GetVerificationEmailRequest) ProtoMessage() {} func (*GetVerificationEmailRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_4feb29dcc5ba50f6, []int{9} + return fileDescriptor_4feb29dcc5ba50f6, []int{12} } func (m *GetVerificationEmailRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -756,7 +913,7 @@ func (m *GetVerificationEmailResponse) Reset() { *m = GetVerificationEma func (m *GetVerificationEmailResponse) String() string { return proto.CompactTextString(m) } func (*GetVerificationEmailResponse) ProtoMessage() {} func (*GetVerificationEmailResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_4feb29dcc5ba50f6, []int{10} + return fileDescriptor_4feb29dcc5ba50f6, []int{13} } func (m *GetVerificationEmailResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -796,7 +953,7 @@ func (m *GetVerificationEmailRequestSigned) Reset() { *m = GetVerificati func (m *GetVerificationEmailRequestSigned) String() string { return proto.CompactTextString(m) } func (*GetVerificationEmailRequestSigned) ProtoMessage() {} func (*GetVerificationEmailRequestSigned) Descriptor() ([]byte, []int) { - return fileDescriptor_4feb29dcc5ba50f6, []int{11} + return fileDescriptor_4feb29dcc5ba50f6, []int{14} } func (m *GetVerificationEmailRequestSigned) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -856,7 +1013,7 @@ func (m *VerifyEmailRequest) Reset() { *m = VerifyEmailRequest{} } func (m *VerifyEmailRequest) String() string { return proto.CompactTextString(m) } func (*VerifyEmailRequest) ProtoMessage() {} func (*VerifyEmailRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_4feb29dcc5ba50f6, []int{12} + return fileDescriptor_4feb29dcc5ba50f6, []int{15} } func (m *VerifyEmailRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -914,7 +1071,7 @@ func (m *VerifyEmailResponse) Reset() { *m = VerifyEmailResponse{} } func (m *VerifyEmailResponse) String() string { return proto.CompactTextString(m) } func (*VerifyEmailResponse) ProtoMessage() {} func (*VerifyEmailResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_4feb29dcc5ba50f6, []int{13} + return fileDescriptor_4feb29dcc5ba50f6, []int{16} } func (m *VerifyEmailResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -961,7 +1118,7 @@ func (m *VerifyEmailRequestSigned) Reset() { *m = VerifyEmailRequestSign func (m *VerifyEmailRequestSigned) String() string { return proto.CompactTextString(m) } func (*VerifyEmailRequestSigned) ProtoMessage() {} func (*VerifyEmailRequestSigned) Descriptor() ([]byte, []int) { - return fileDescriptor_4feb29dcc5ba50f6, []int{14} + return fileDescriptor_4feb29dcc5ba50f6, []int{17} } func (m *VerifyEmailRequestSigned) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1014,6 +1171,9 @@ func init() { proto.RegisterType((*BuySubscriptionRequest)(nil), "BuySubscriptionRequest") proto.RegisterType((*BuySubscriptionRequestSigned)(nil), "BuySubscriptionRequestSigned") proto.RegisterType((*BuySubscriptionResponse)(nil), "BuySubscriptionResponse") + proto.RegisterType((*FinalizeSubscriptionRequest)(nil), "FinalizeSubscriptionRequest") + proto.RegisterType((*FinalizeSubscriptionResponse)(nil), "FinalizeSubscriptionResponse") + proto.RegisterType((*FinalizeSubscriptionRequestSigned)(nil), "FinalizeSubscriptionRequestSigned") proto.RegisterType((*GetSubscriptionPortalLinkRequest)(nil), "GetSubscriptionPortalLinkRequest") proto.RegisterType((*GetSubscriptionPortalLinkRequestSigned)(nil), "GetSubscriptionPortalLinkRequestSigned") proto.RegisterType((*GetSubscriptionPortalLinkResponse)(nil), "GetSubscriptionPortalLinkResponse") @@ -1030,66 +1190,69 @@ func init() { } var fileDescriptor_4feb29dcc5ba50f6 = []byte{ - // 931 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x56, 0x4f, 0x6f, 0xe3, 0x54, - 0x10, 0x8f, 0xf3, 0xa7, 0x6d, 0xa6, 0xdb, 0xd6, 0x3b, 0x4d, 0xbb, 0xde, 0xd0, 0x5a, 0xc1, 0x42, - 0x50, 0x15, 0xc9, 0x15, 0xcb, 0x1e, 0x40, 0x42, 0x88, 0xb4, 0x44, 0x55, 0xa5, 0x65, 0x15, 0x39, - 0xd9, 0x45, 0xb0, 0x17, 0xdc, 0x78, 0xc8, 0x9a, 0xba, 0xef, 0x99, 0xe7, 0xe7, 0x2d, 0xfe, 0x04, - 0x88, 0x1b, 0xdf, 0x69, 0x2f, 0x1c, 0xf7, 0xc8, 0x11, 0xb5, 0x37, 0x4e, 0x7c, 0x04, 0xe4, 0x67, - 0xb7, 0x71, 0xfe, 0xb6, 0xd0, 0x4b, 0xf2, 0xe6, 0xf7, 0x66, 0xc6, 0x33, 0xbf, 0xf7, 0x7b, 0x63, - 0xc3, 0x97, 0xa1, 0x9b, 0x9c, 0x13, 0x93, 0x11, 0x89, 0x37, 0xfe, 0x80, 0x0e, 0xc6, 0xcd, 0x50, - 0x70, 0xc9, 0x0f, 0xd4, 0x6f, 0x34, 0xb1, 0x65, 0x2b, 0xd4, 0xfa, 0x0c, 0xb6, 0x8f, 0x49, 0xf6, - 0xe2, 0xd3, 0x68, 0x20, 0xfc, 0x50, 0xfa, 0x9c, 0x39, 0xf4, 0x73, 0x4c, 0x91, 0x44, 0x13, 0x80, - 0x5f, 0x30, 0x12, 0x6d, 0x96, 0x9c, 0x7c, 0x6d, 0x68, 0x2d, 0x6d, 0xaf, 0xee, 0x14, 0x10, 0xeb, - 0x25, 0xec, 0xcc, 0x8e, 0xec, 0xf9, 0x43, 0x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 0x57, 0x66, 0xe9, 0xdd, 0x95, 0x59, 0xfa, 0xf3, 0xca, 0x2c, 0x7d, 0x6f, 0xdd, 0xfe, 0x35, - 0x79, 0xba, 0xa4, 0xfe, 0x3e, 0xfd, 0x37, 0x00, 0x00, 0xff, 0xff, 0x34, 0x5d, 0x18, 0xf8, 0x7a, - 0x0a, 0x00, 0x00, + // 983 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0x4f, 0x6f, 0xe3, 0x54, + 0x10, 0x8f, 0x9b, 0xa4, 0x7f, 0xa6, 0xdb, 0xd6, 0x3b, 0x4d, 0xbb, 0xde, 0x6c, 0x6b, 0xb5, 0x16, + 0x7f, 0xaa, 0x22, 0xb9, 0x62, 0xd9, 0x03, 0x48, 0x08, 0x91, 0x96, 0x50, 0xad, 0xb4, 0xac, 0x22, + 0x27, 0xbb, 0x08, 0xf6, 0x82, 0x1b, 0x0f, 0x59, 0x53, 0xf7, 0xd9, 0x3c, 0x3f, 0x6f, 0x31, 0x5f, + 0x00, 0x71, 0x43, 0xe2, 0x0b, 0xf0, 0x5d, 0xb8, 0x70, 0xdc, 0x23, 0x47, 0xd4, 0xde, 0x38, 0xf1, + 0x11, 0x90, 0x9f, 0x9d, 0xc6, 0x49, 0x9c, 0xa4, 0x10, 0xed, 0x25, 0x79, 0xf3, 0x7b, 0x6f, 0xc6, + 0x33, 0xbf, 0x19, 0xff, 0x9e, 0xe1, 0x93, 0xc0, 0x8e, 0x2f, 0x88, 0x89, 0x90, 0xf8, 0x2b, 0xb7, + 0x4b, 0x47, 0xc3, 0x66, 0xc0, 0x7d, 0xe1, 0x1f, 0xc9, 0xdf, 0x70, 0x64, 0xcb, 0x94, 0xa8, 0xf1, + 0x21, 0x6c, 0x9f, 0x92, 0x68, 0x47, 0x67, 0x61, 0x97, 0xbb, 0x81, 0x70, 0x7d, 0x66, 0xd1, 0xf7, + 0x11,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0xcc, 0x99, 0xf2, 0x5e, 0xdf, + 0x35, 0xa7, 0x5e, 0x11, 0x25, 0xfc, 0x0e, 0xee, 0x4f, 0x54, 0x48, 0x7c, 0xd7, 0xbc, 0x9d, 0x3e, + 0xd7, 0x0d, 0x73, 0xa6, 0xcc, 0xa6, 0x85, 0x14, 0xc9, 0x13, 0x4a, 0xef, 0xe9, 0xaa, 0x55, 0xdf, + 0x35, 0xa7, 0x2a, 0x5f, 0x09, 0x3f, 0x85, 0xd5, 0xdc, 0x9b, 0x8f, 0xf7, 0xcd, 0x49, 0x3a, 0x50, + 0xaf, 0x99, 0x05, 0x9a, 0x62, 0x94, 0x8e, 0x3f, 0xfe, 0xe3, 0x4a, 0x57, 0x5e, 0x5f, 0xe9, 0xca, + 0x5f, 0x57, 0xba, 0xf2, 0xcb, 0xb5, 0x5e, 0x7a, 0x7d, 0xad, 0x97, 0xfe, 0xbc, 0xd6, 0x4b, 0x5f, + 0x1b, 0xb3, 0x3f, 0xe2, 0xcf, 0x16, 0xe5, 0xdf, 0x07, 0xff, 0x06, 0x00, 0x00, 0xff, 0xff, 0xd1, + 0x76, 0x53, 0x44, 0xf1, 0x0b, 0x00, 0x00, } func (m *GetSubscriptionRequest) Marshal() (dAtA []byte, err error) { @@ -1362,6 +1525,110 @@ func (m *BuySubscriptionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) return len(dAtA) - i, nil } +func (m *FinalizeSubscriptionRequest) 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 *FinalizeSubscriptionRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *FinalizeSubscriptionRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.RequestedAnyName) > 0 { + i -= len(m.RequestedAnyName) + copy(dAtA[i:], m.RequestedAnyName) + i = encodeVarintPaymentservice(dAtA, i, uint64(len(m.RequestedAnyName))) + i-- + dAtA[i] = 0x1a + } + if len(m.OwnerEthAddress) > 0 { + i -= len(m.OwnerEthAddress) + copy(dAtA[i:], m.OwnerEthAddress) + i = encodeVarintPaymentservice(dAtA, i, uint64(len(m.OwnerEthAddress))) + i-- + dAtA[i] = 0x12 + } + if len(m.OwnerAnyId) > 0 { + i -= len(m.OwnerAnyId) + copy(dAtA[i:], m.OwnerAnyId) + i = encodeVarintPaymentservice(dAtA, i, uint64(len(m.OwnerAnyId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *FinalizeSubscriptionResponse) 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 *FinalizeSubscriptionResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *FinalizeSubscriptionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *FinalizeSubscriptionRequestSigned) 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 *FinalizeSubscriptionRequestSigned) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *FinalizeSubscriptionRequestSigned) 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 = encodeVarintPaymentservice(dAtA, i, uint64(len(m.Signature))) + i-- + dAtA[i] = 0x12 + } + if len(m.Payload) > 0 { + i -= len(m.Payload) + copy(dAtA[i:], m.Payload) + i = encodeVarintPaymentservice(dAtA, i, uint64(len(m.Payload))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func (m *GetSubscriptionPortalLinkRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -1816,6 +2083,53 @@ func (m *BuySubscriptionResponse) Size() (n int) { return n } +func (m *FinalizeSubscriptionRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.OwnerAnyId) + if l > 0 { + n += 1 + l + sovPaymentservice(uint64(l)) + } + l = len(m.OwnerEthAddress) + if l > 0 { + n += 1 + l + sovPaymentservice(uint64(l)) + } + l = len(m.RequestedAnyName) + if l > 0 { + n += 1 + l + sovPaymentservice(uint64(l)) + } + return n +} + +func (m *FinalizeSubscriptionResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *FinalizeSubscriptionRequestSigned) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Payload) + if l > 0 { + n += 1 + l + sovPaymentservice(uint64(l)) + } + l = len(m.Signature) + if l > 0 { + n += 1 + l + sovPaymentservice(uint64(l)) + } + return n +} + func (m *GetSubscriptionPortalLinkRequest) Size() (n int) { if m == nil { return 0 @@ -2794,6 +3108,320 @@ func (m *BuySubscriptionResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *FinalizeSubscriptionRequest) 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 ErrIntOverflowPaymentservice + } + 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: FinalizeSubscriptionRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: FinalizeSubscriptionRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OwnerAnyId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPaymentservice + } + 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 ErrInvalidLengthPaymentservice + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPaymentservice + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OwnerAnyId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OwnerEthAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPaymentservice + } + 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 ErrInvalidLengthPaymentservice + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPaymentservice + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OwnerEthAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RequestedAnyName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPaymentservice + } + 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 ErrInvalidLengthPaymentservice + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPaymentservice + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RequestedAnyName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipPaymentservice(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthPaymentservice + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *FinalizeSubscriptionResponse) 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 ErrIntOverflowPaymentservice + } + 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: FinalizeSubscriptionResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: FinalizeSubscriptionResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipPaymentservice(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthPaymentservice + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *FinalizeSubscriptionRequestSigned) 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 ErrIntOverflowPaymentservice + } + 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: FinalizeSubscriptionRequestSigned: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: FinalizeSubscriptionRequestSigned: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPaymentservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthPaymentservice + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthPaymentservice + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Payload = append(m.Payload[:0], dAtA[iNdEx:postIndex]...) + if m.Payload == nil { + m.Payload = []byte{} + } + iNdEx = postIndex + case 2: + 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 ErrIntOverflowPaymentservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthPaymentservice + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthPaymentservice + } + 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 := skipPaymentservice(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthPaymentservice + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *GetSubscriptionPortalLinkRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/paymentservice/paymentserviceproto/paymentservice_drpc.pb.go b/paymentservice/paymentserviceproto/paymentservice_drpc.pb.go index 369ecb66..d034694a 100644 --- a/paymentservice/paymentserviceproto/paymentservice_drpc.pb.go +++ b/paymentservice/paymentserviceproto/paymentservice_drpc.pb.go @@ -42,6 +42,7 @@ type DRPCAnyPaymentProcessingClient interface { GetSubscriptionStatus(ctx context.Context, in *GetSubscriptionRequestSigned) (*GetSubscriptionResponse, error) BuySubscription(ctx context.Context, in *BuySubscriptionRequestSigned) (*BuySubscriptionResponse, error) + FinalizeSubscription(ctx context.Context, in *FinalizeSubscriptionRequestSigned) (*FinalizeSubscriptionResponse, error) GetSubscriptionPortalLink(ctx context.Context, in *GetSubscriptionPortalLinkRequestSigned) (*GetSubscriptionPortalLinkResponse, error) GetVerificationEmail(ctx context.Context, in *GetVerificationEmailRequestSigned) (*GetVerificationEmailResponse, error) VerifyEmail(ctx context.Context, in *VerifyEmailRequestSigned) (*VerifyEmailResponse, error) @@ -75,6 +76,15 @@ func (c *drpcAnyPaymentProcessingClient) BuySubscription(ctx context.Context, in return out, nil } +func (c *drpcAnyPaymentProcessingClient) FinalizeSubscription(ctx context.Context, in *FinalizeSubscriptionRequestSigned) (*FinalizeSubscriptionResponse, error) { + out := new(FinalizeSubscriptionResponse) + err := c.cc.Invoke(ctx, "/AnyPaymentProcessing/FinalizeSubscription", drpcEncoding_File_paymentservice_paymentserviceproto_protos_paymentservice_proto{}, in, out) + if err != nil { + return nil, err + } + return out, nil +} + func (c *drpcAnyPaymentProcessingClient) GetSubscriptionPortalLink(ctx context.Context, in *GetSubscriptionPortalLinkRequestSigned) (*GetSubscriptionPortalLinkResponse, error) { out := new(GetSubscriptionPortalLinkResponse) err := c.cc.Invoke(ctx, "/AnyPaymentProcessing/GetSubscriptionPortalLink", drpcEncoding_File_paymentservice_paymentserviceproto_protos_paymentservice_proto{}, in, out) @@ -105,6 +115,7 @@ func (c *drpcAnyPaymentProcessingClient) VerifyEmail(ctx context.Context, in *Ve type DRPCAnyPaymentProcessingServer interface { GetSubscriptionStatus(context.Context, *GetSubscriptionRequestSigned) (*GetSubscriptionResponse, error) BuySubscription(context.Context, *BuySubscriptionRequestSigned) (*BuySubscriptionResponse, error) + FinalizeSubscription(context.Context, *FinalizeSubscriptionRequestSigned) (*FinalizeSubscriptionResponse, error) GetSubscriptionPortalLink(context.Context, *GetSubscriptionPortalLinkRequestSigned) (*GetSubscriptionPortalLinkResponse, error) GetVerificationEmail(context.Context, *GetVerificationEmailRequestSigned) (*GetVerificationEmailResponse, error) VerifyEmail(context.Context, *VerifyEmailRequestSigned) (*VerifyEmailResponse, error) @@ -120,6 +131,10 @@ func (s *DRPCAnyPaymentProcessingUnimplementedServer) BuySubscription(context.Co return nil, drpcerr.WithCode(errors.New("Unimplemented"), drpcerr.Unimplemented) } +func (s *DRPCAnyPaymentProcessingUnimplementedServer) FinalizeSubscription(context.Context, *FinalizeSubscriptionRequestSigned) (*FinalizeSubscriptionResponse, error) { + return nil, drpcerr.WithCode(errors.New("Unimplemented"), drpcerr.Unimplemented) +} + func (s *DRPCAnyPaymentProcessingUnimplementedServer) GetSubscriptionPortalLink(context.Context, *GetSubscriptionPortalLinkRequestSigned) (*GetSubscriptionPortalLinkResponse, error) { return nil, drpcerr.WithCode(errors.New("Unimplemented"), drpcerr.Unimplemented) } @@ -134,7 +149,7 @@ func (s *DRPCAnyPaymentProcessingUnimplementedServer) VerifyEmail(context.Contex type DRPCAnyPaymentProcessingDescription struct{} -func (DRPCAnyPaymentProcessingDescription) NumMethods() int { return 5 } +func (DRPCAnyPaymentProcessingDescription) NumMethods() int { return 6 } func (DRPCAnyPaymentProcessingDescription) Method(n int) (string, drpc.Encoding, drpc.Receiver, interface{}, bool) { switch n { @@ -157,6 +172,15 @@ func (DRPCAnyPaymentProcessingDescription) Method(n int) (string, drpc.Encoding, ) }, DRPCAnyPaymentProcessingServer.BuySubscription, true case 2: + return "/AnyPaymentProcessing/FinalizeSubscription", drpcEncoding_File_paymentservice_paymentserviceproto_protos_paymentservice_proto{}, + func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) { + return srv.(DRPCAnyPaymentProcessingServer). + FinalizeSubscription( + ctx, + in1.(*FinalizeSubscriptionRequestSigned), + ) + }, DRPCAnyPaymentProcessingServer.FinalizeSubscription, true + case 3: return "/AnyPaymentProcessing/GetSubscriptionPortalLink", drpcEncoding_File_paymentservice_paymentserviceproto_protos_paymentservice_proto{}, func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) { return srv.(DRPCAnyPaymentProcessingServer). @@ -165,7 +189,7 @@ func (DRPCAnyPaymentProcessingDescription) Method(n int) (string, drpc.Encoding, in1.(*GetSubscriptionPortalLinkRequestSigned), ) }, DRPCAnyPaymentProcessingServer.GetSubscriptionPortalLink, true - case 3: + case 4: return "/AnyPaymentProcessing/GetVerificationEmail", drpcEncoding_File_paymentservice_paymentserviceproto_protos_paymentservice_proto{}, func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) { return srv.(DRPCAnyPaymentProcessingServer). @@ -174,7 +198,7 @@ func (DRPCAnyPaymentProcessingDescription) Method(n int) (string, drpc.Encoding, in1.(*GetVerificationEmailRequestSigned), ) }, DRPCAnyPaymentProcessingServer.GetVerificationEmail, true - case 4: + case 5: return "/AnyPaymentProcessing/VerifyEmail", drpcEncoding_File_paymentservice_paymentserviceproto_protos_paymentservice_proto{}, func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) { return srv.(DRPCAnyPaymentProcessingServer). @@ -224,6 +248,22 @@ func (x *drpcAnyPaymentProcessing_BuySubscriptionStream) SendAndClose(m *BuySubs return x.CloseSend() } +type DRPCAnyPaymentProcessing_FinalizeSubscriptionStream interface { + drpc.Stream + SendAndClose(*FinalizeSubscriptionResponse) error +} + +type drpcAnyPaymentProcessing_FinalizeSubscriptionStream struct { + drpc.Stream +} + +func (x *drpcAnyPaymentProcessing_FinalizeSubscriptionStream) SendAndClose(m *FinalizeSubscriptionResponse) error { + if err := x.MsgSend(m, drpcEncoding_File_paymentservice_paymentserviceproto_protos_paymentservice_proto{}); err != nil { + return err + } + return x.CloseSend() +} + type DRPCAnyPaymentProcessing_GetSubscriptionPortalLinkStream interface { drpc.Stream SendAndClose(*GetSubscriptionPortalLinkResponse) error diff --git a/paymentservice/paymentserviceproto/protos/paymentservice.proto b/paymentservice/paymentserviceproto/protos/paymentservice.proto index 9c873271..e68482e0 100644 --- a/paymentservice/paymentserviceproto/protos/paymentservice.proto +++ b/paymentservice/paymentserviceproto/protos/paymentservice.proto @@ -31,8 +31,8 @@ enum SubscriptionStatus { StatusActive = 2; // when buying from other side - some data is missing in the Subscription // we need to provide additional data after the payment - // please call BuySubscription to fill-in needed fields - StatusPendingRequiresInput = 3; + // please call FinalizeSubscription to fill-in needed fields + StatusPendingRequiresFinalization = 3; } enum PaymentMethod { @@ -101,6 +101,30 @@ message BuySubscriptionResponse { string paymentUrl = 1; } +message FinalizeSubscriptionRequest { + // in the following format: "A5k2d9sFZw84yisTxRnz2bPRd1YPfVfhxqymZ6yESprFTG65" + // you can get it with Account().SignKey.GetPublic().Account() + string ownerAnyId = 1; + // this is the owner's main EOA (Externally Owned Account) address + // not AccountAbstraction's SCW (Smart Contract Wallet) address! + // this is required to reserve a name for the owner (later that is done by user) + // in the following format: "0x7a250d5630b4cf539739df2c5dacb4c659f2488d" + string ownerEthAddress = 2; + // if empty - then no name requested + string requestedAnyName = 3; +} + +message FinalizeSubscriptionResponse { + +} + +message FinalizeSubscriptionRequestSigned { + // VerifyEmailRequest + bytes payload = 1; + // this is payload signed with payload.ownerAnyID + bytes signature = 2; +} + message GetSubscriptionPortalLinkRequest { // in the following format: "A5k2d9sFZw84yisTxRnz2bPRd1YPfVfhxqymZ6yESprFTG65" // you can get it with Account().SignKey.GetPublic().Account() @@ -173,6 +197,9 @@ service AnyPaymentProcessing { // If user has already an active subscription, then this will return an error. rpc BuySubscription(BuySubscriptionRequestSigned) returns (BuySubscriptionResponse) {} + // If your subscription is in StatusPendingRequiresFinalization, then you need to call this method + rpc FinalizeSubscription(FinalizeSubscriptionRequestSigned) returns (FinalizeSubscriptionResponse) {} + // Generate a link to the portal where user can: // a) change her billing details // b) see payment info, invoices, etc From a33d831c366be2bc27f5d65b22d0fc689f714670 Mon Sep 17 00:00:00 2001 From: Anton Akentev Date: Wed, 6 Mar 2024 20:26:55 +0000 Subject: [PATCH 023/140] Update paymentclient --- .../mock/mock_paymentserviceclient.go | 15 +++++++++++++++ .../paymentserviceclient/paymentserviceclient.go | 11 +++++++++++ 2 files changed, 26 insertions(+) diff --git a/paymentservice/paymentserviceclient/mock/mock_paymentserviceclient.go b/paymentservice/paymentserviceclient/mock/mock_paymentserviceclient.go index 3f807dea..bccf7e0d 100644 --- a/paymentservice/paymentserviceclient/mock/mock_paymentserviceclient.go +++ b/paymentservice/paymentserviceclient/mock/mock_paymentserviceclient.go @@ -55,6 +55,21 @@ func (mr *MockAnyPpClientServiceMockRecorder) BuySubscription(ctx, in any) *gomo return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BuySubscription", reflect.TypeOf((*MockAnyPpClientService)(nil).BuySubscription), ctx, in) } +// FinalizeSubscription mocks base method. +func (m *MockAnyPpClientService) FinalizeSubscription(ctx context.Context, in *paymentserviceproto.FinalizeSubscriptionRequestSigned) (*paymentserviceproto.FinalizeSubscriptionResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "FinalizeSubscription", ctx, in) + ret0, _ := ret[0].(*paymentserviceproto.FinalizeSubscriptionResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// FinalizeSubscription indicates an expected call of FinalizeSubscription. +func (mr *MockAnyPpClientServiceMockRecorder) FinalizeSubscription(ctx, in any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FinalizeSubscription", reflect.TypeOf((*MockAnyPpClientService)(nil).FinalizeSubscription), ctx, in) +} + // GetSubscriptionPortalLink mocks base method. func (m *MockAnyPpClientService) GetSubscriptionPortalLink(ctx context.Context, in *paymentserviceproto.GetSubscriptionPortalLinkRequestSigned) (*paymentserviceproto.GetSubscriptionPortalLinkResponse, error) { m.ctrl.T.Helper() diff --git a/paymentservice/paymentserviceclient/paymentserviceclient.go b/paymentservice/paymentserviceclient/paymentserviceclient.go index 374867f5..a54605c0 100644 --- a/paymentservice/paymentserviceclient/paymentserviceclient.go +++ b/paymentservice/paymentserviceclient/paymentserviceclient.go @@ -27,6 +27,7 @@ type AnyPpClientService interface { GetSubscriptionPortalLink(ctx context.Context, in *pp.GetSubscriptionPortalLinkRequestSigned) (out *pp.GetSubscriptionPortalLinkResponse, err error) GetVerificationEmail(ctx context.Context, in *pp.GetVerificationEmailRequestSigned) (out *pp.GetVerificationEmailResponse, err error) VerifyEmail(ctx context.Context, in *pp.VerifyEmailRequestSigned) (out *pp.VerifyEmailResponse, err error) + FinalizeSubscription(ctx context.Context, in *pp.FinalizeSubscriptionRequestSigned) (out *pp.FinalizeSubscriptionResponse, err error) app.Component } @@ -123,3 +124,13 @@ func (s *service) VerifyEmail(ctx context.Context, in *pp.VerifyEmailRequestSign }) return } + +func (s *service) FinalizeSubscription(ctx context.Context, in *pp.FinalizeSubscriptionRequestSigned) (out *pp.FinalizeSubscriptionResponse, err error) { + err = s.doClient(ctx, func(cl pp.DRPCAnyPaymentProcessingClient) error { + if out, err = cl.FinalizeSubscription(ctx, in); err != nil { + return rpcerr.Unwrap(err) + } + return nil + }) + return +} From 19798f2295a52c450b0f7ad6cd502bb7c1c01874 Mon Sep 17 00:00:00 2001 From: Sergey Cherepanov Date: Thu, 7 Mar 2024 20:50:12 +0100 Subject: [PATCH 024/140] fileproto set account limit identity --- commonfile/fileproto/file.pb.go | 175 +++++++++++------- .../fileproto/fileprotoerr/fileprotoerr.go | 2 +- commonfile/fileproto/protos/file.proto | 3 +- 3 files changed, 116 insertions(+), 64 deletions(-) diff --git a/commonfile/fileproto/file.pb.go b/commonfile/fileproto/file.pb.go index 9b40efe2..e8b87e17 100644 --- a/commonfile/fileproto/file.pb.go +++ b/commonfile/fileproto/file.pb.go @@ -1074,7 +1074,8 @@ func (m *AccountInfoResponse) GetSpaces() []*SpaceInfoResponse { } type AccountLimitSetRequest struct { - Limit uint64 `protobuf:"varint,1,opt,name=limit,proto3" json:"limit,omitempty"` + Identity string `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"` + Limit uint64 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"` } func (m *AccountLimitSetRequest) Reset() { *m = AccountLimitSetRequest{} } @@ -1110,6 +1111,13 @@ func (m *AccountLimitSetRequest) XXX_DiscardUnknown() { var xxx_messageInfo_AccountLimitSetRequest proto.InternalMessageInfo +func (m *AccountLimitSetRequest) GetIdentity() string { + if m != nil { + return m.Identity + } + return "" +} + func (m *AccountLimitSetRequest) GetLimit() uint64 { if m != nil { return m.Limit @@ -1200,67 +1208,67 @@ func init() { } var fileDescriptor_fd665a7e11c833d5 = []byte{ - // 947 bytes of a gzipped FileDescriptorProto + // 958 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0x41, 0x73, 0xdb, 0x44, - 0x14, 0xb6, 0x6c, 0xd9, 0xb5, 0x5e, 0x62, 0x47, 0xde, 0xa4, 0xc1, 0xb8, 0x41, 0xe3, 0xd1, 0xa1, - 0x93, 0xe9, 0x30, 0x2e, 0x93, 0xc2, 0x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x7b, 0x02, 0x3b, 0x22, 0x98, - 0x6a, 0xfd, 0xee, 0x67, 0xb6, 0x8a, 0x53, 0x95, 0xe2, 0x3c, 0xfa, 0x55, 0x83, 0xe6, 0x38, 0x8e, - 0x47, 0xc4, 0xc7, 0x14, 0xb5, 0x01, 0x5e, 0x45, 0xf8, 0xea, 0x12, 0x7b, 0x0c, 0xfb, 0x66, 0x05, - 0x6d, 0xc1, 0xc6, 0x68, 0x7a, 0xf4, 0x92, 0xb0, 0x09, 0x59, 0x44, 0xbe, 0xa9, 0xa1, 0x16, 0x18, - 0x13, 0x12, 0xcf, 0x02, 0xdf, 0xc7, 0x91, 0x59, 0x45, 0x1d, 0x68, 0x09, 0xfe, 0xf1, 0x95, 0x87, - 0xb1, 0x8f, 0x7d, 0xb3, 0x86, 0xee, 0x43, 0xe7, 0xab, 0x05, 0x8e, 0x97, 0x27, 0xc1, 0xcf, 0x78, - 0x05, 0xeb, 0xdc, 0xf1, 0x75, 0x4c, 0xa2, 0xd3, 0xe7, 0x2e, 0x3d, 0x33, 0xeb, 0x08, 0x41, 0xfb, - 0x25, 0x61, 0xe3, 0x88, 0x2c, 0x4e, 0xcf, 0x44, 0x19, 0x66, 0x03, 0x99, 0xb0, 0x31, 0x8e, 0x63, - 0x12, 0x1f, 0xcf, 0xe7, 0x14, 0x33, 0xf3, 0x8d, 0xf6, 0x68, 0x08, 0xa8, 0xdc, 0x20, 0x79, 0x28, - 0xee, 0x7b, 0x15, 0x50, 0x46, 0xcd, 0x0a, 0x02, 0x68, 0xa4, 0x6b, 0x8d, 0xe7, 0x93, 0xac, 0xa7, - 0x51, 0x12, 0xb5, 0x7a, 0xf0, 0x57, 0x1d, 0x74, 0xfe, 0xf8, 0xd1, 0x21, 0x34, 0xb3, 0xd1, 0x87, - 0xde, 0x57, 0x3a, 0x7d, 0x3e, 0x4d, 0x7b, 0xbd, 0x75, 0x47, 0xe9, 0xa7, 0xf4, 0x09, 0x18, 0xab, - 0x19, 0x88, 0x54, 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, 0x1b, 0xb3, 0xf2, 0xed, 0xd6, 0xaa, 0x7f, 0x43, 0x67, 0x0d, 0xf9, 0xe7, 0xd1, + 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0xc5, 0x21, 0x76, 0x60, 0xa5, 0x0a, 0x00, 0x00, } func (m *Ok) Marshal() (dAtA []byte, err error) { @@ -1994,7 +2002,14 @@ func (m *AccountLimitSetRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) if m.Limit != 0 { i = encodeVarintFile(dAtA, i, uint64(m.Limit)) i-- - dAtA[i] = 0x8 + dAtA[i] = 0x10 + } + if len(m.Identity) > 0 { + i -= len(m.Identity) + copy(dAtA[i:], m.Identity) + i = encodeVarintFile(dAtA, i, uint64(len(m.Identity))) + i-- + dAtA[i] = 0xa } return len(dAtA) - i, nil } @@ -2374,6 +2389,10 @@ func (m *AccountLimitSetRequest) Size() (n int) { } var l int _ = l + l = len(m.Identity) + if l > 0 { + n += 1 + l + sovFile(uint64(l)) + } if m.Limit != 0 { n += 1 + sovFile(uint64(m.Limit)) } @@ -4429,6 +4448,38 @@ func (m *AccountLimitSetRequest) Unmarshal(dAtA []byte) error { } switch fieldNum { case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Identity", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFile + } + 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 ErrInvalidLengthFile + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthFile + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Identity = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Limit", wireType) } diff --git a/commonfile/fileproto/fileprotoerr/fileprotoerr.go b/commonfile/fileproto/fileprotoerr/fileprotoerr.go index 876be1a9..85f72786 100644 --- a/commonfile/fileproto/fileprotoerr/fileprotoerr.go +++ b/commonfile/fileproto/fileprotoerr/fileprotoerr.go @@ -14,6 +14,6 @@ var ( ErrForbidden = errGroup.Register(fmt.Errorf("forbidden"), uint64(fileproto.ErrCodes_Forbidden)) ErrSpaceLimitExceeded = errGroup.Register(fmt.Errorf("space limit exceeded"), uint64(fileproto.ErrCodes_LimitExceeded)) ErrQuerySizeExceeded = errGroup.Register(fmt.Errorf("query size exceeded"), uint64(fileproto.ErrCodes_QuerySizeExceeded)) - ErrNotEnoughSpace = errGroup.Register(fmt.Errorf("query size exceeded"), uint64(fileproto.ErrCodes_NotEnoughSpace)) + ErrNotEnoughSpace = errGroup.Register(fmt.Errorf("not enough space"), uint64(fileproto.ErrCodes_NotEnoughSpace)) ErrWrongHash = errGroup.Register(fmt.Errorf("wrong block hash"), uint64(fileproto.ErrCodes_WrongHash)) ) diff --git a/commonfile/fileproto/protos/file.proto b/commonfile/fileproto/protos/file.proto index b6bd1373..d2a09392 100644 --- a/commonfile/fileproto/protos/file.proto +++ b/commonfile/fileproto/protos/file.proto @@ -139,7 +139,8 @@ message AccountInfoResponse { message AccountLimitSetRequest { - uint64 limit = 1; + string identity = 1; + uint64 limit = 2; } message SpaceLimitSetRequest { From a0e99c2f6f12b856ed49b9235143a44237941aba Mon Sep 17 00:00:00 2001 From: Anton Akentev Date: Fri, 8 Mar 2024 16:14:36 +0000 Subject: [PATCH 025/140] Add GetAllTiers method --- .../mock/mock_paymentserviceclient.go | 15 + .../paymentserviceclient.go | 11 + .../paymentserviceproto/paymentservice.pb.go | 130 +- .../paymentservice_drpc.pb.go | 42 +- .../paymentservice_tiers.pb.go | 1840 +++++++++++++++++ .../protos/paymentservice.proto | 9 + .../protos/paymentservice_tiers.proto | 79 + 7 files changed, 2061 insertions(+), 65 deletions(-) create mode 100644 paymentservice/paymentserviceproto/paymentservice_tiers.pb.go create mode 100644 paymentservice/paymentserviceproto/protos/paymentservice_tiers.proto diff --git a/paymentservice/paymentserviceclient/mock/mock_paymentserviceclient.go b/paymentservice/paymentserviceclient/mock/mock_paymentserviceclient.go index bccf7e0d..395add4d 100644 --- a/paymentservice/paymentserviceclient/mock/mock_paymentserviceclient.go +++ b/paymentservice/paymentserviceclient/mock/mock_paymentserviceclient.go @@ -70,6 +70,21 @@ func (mr *MockAnyPpClientServiceMockRecorder) FinalizeSubscription(ctx, in any) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FinalizeSubscription", reflect.TypeOf((*MockAnyPpClientService)(nil).FinalizeSubscription), ctx, in) } +// GetAllTiers mocks base method. +func (m *MockAnyPpClientService) GetAllTiers(ctx context.Context, in *paymentserviceproto.GetTiersRequestSigned) (*paymentserviceproto.GetTiersResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetAllTiers", ctx, in) + ret0, _ := ret[0].(*paymentserviceproto.GetTiersResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetAllTiers indicates an expected call of GetAllTiers. +func (mr *MockAnyPpClientServiceMockRecorder) GetAllTiers(ctx, in any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAllTiers", reflect.TypeOf((*MockAnyPpClientService)(nil).GetAllTiers), ctx, in) +} + // GetSubscriptionPortalLink mocks base method. func (m *MockAnyPpClientService) GetSubscriptionPortalLink(ctx context.Context, in *paymentserviceproto.GetSubscriptionPortalLinkRequestSigned) (*paymentserviceproto.GetSubscriptionPortalLinkResponse, error) { m.ctrl.T.Helper() diff --git a/paymentservice/paymentserviceclient/paymentserviceclient.go b/paymentservice/paymentserviceclient/paymentserviceclient.go index a54605c0..26c2aaef 100644 --- a/paymentservice/paymentserviceclient/paymentserviceclient.go +++ b/paymentservice/paymentserviceclient/paymentserviceclient.go @@ -28,6 +28,7 @@ type AnyPpClientService interface { GetVerificationEmail(ctx context.Context, in *pp.GetVerificationEmailRequestSigned) (out *pp.GetVerificationEmailResponse, err error) VerifyEmail(ctx context.Context, in *pp.VerifyEmailRequestSigned) (out *pp.VerifyEmailResponse, err error) FinalizeSubscription(ctx context.Context, in *pp.FinalizeSubscriptionRequestSigned) (out *pp.FinalizeSubscriptionResponse, err error) + GetAllTiers(ctx context.Context, in *pp.GetTiersRequestSigned) (out *pp.GetTiersResponse, err error) app.Component } @@ -134,3 +135,13 @@ func (s *service) FinalizeSubscription(ctx context.Context, in *pp.FinalizeSubsc }) return } + +func (s *service) GetAllTiers(ctx context.Context, in *pp.GetTiersRequestSigned) (out *pp.GetTiersResponse, err error) { + err = s.doClient(ctx, func(cl pp.DRPCAnyPaymentProcessingClient) error { + if out, err = cl.GetAllTiers(ctx, in); err != nil { + return rpcerr.Unwrap(err) + } + return nil + }) + return +} diff --git a/paymentservice/paymentserviceproto/paymentservice.pb.go b/paymentservice/paymentserviceproto/paymentservice.pb.go index 97be3f29..92a984ea 100644 --- a/paymentservice/paymentserviceproto/paymentservice.pb.go +++ b/paymentservice/paymentserviceproto/paymentservice.pb.go @@ -83,7 +83,7 @@ const ( SubscriptionStatus_StatusActive SubscriptionStatus = 2 // when buying from other side - some data is missing in the Subscription // we need to provide additional data after the payment - // please call BuySubscription to fill-in needed fields + // please call FinalizeSubscription to fill-in needed fields SubscriptionStatus_StatusPendingRequiresFinalization SubscriptionStatus = 3 ) @@ -1190,69 +1190,71 @@ func init() { } var fileDescriptor_4feb29dcc5ba50f6 = []byte{ - // 983 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0x4f, 0x6f, 0xe3, 0x54, - 0x10, 0x8f, 0x9b, 0xa4, 0x7f, 0xa6, 0xdb, 0xd6, 0x3b, 0x4d, 0xbb, 0xde, 0x6c, 0x6b, 0xb5, 0x16, - 0x7f, 0xaa, 0x22, 0xb9, 0x62, 0xd9, 0x03, 0x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x7a, 0x7d, 0xad, 0x97, 0xfe, 0xbc, 0xd6, 0x4b, 0x5f, - 0x1b, 0xb3, 0x3f, 0xe2, 0xcf, 0x16, 0xe5, 0xdf, 0x07, 0xff, 0x06, 0x00, 0x00, 0xff, 0xff, 0xd1, - 0x76, 0x53, 0x44, 0xf1, 0x0b, 0x00, 0x00, + // 1018 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x57, 0xcf, 0x6e, 0xe4, 0xc4, + 0x13, 0x1e, 0x67, 0x66, 0xf2, 0xa7, 0xb2, 0x49, 0x9c, 0xca, 0x24, 0xeb, 0x9d, 0x4d, 0xac, 0xc4, + 0xfa, 0xfd, 0x20, 0x0a, 0x92, 0x23, 0x96, 0x3d, 0x00, 0x42, 0x08, 0x27, 0x1b, 0xa2, 0x95, 0x96, + 0xd5, 0xc8, 0xc9, 0x2e, 0x82, 0x3d, 0x80, 0x33, 0x2e, 0xb2, 0x26, 0x4e, 0xdb, 0x74, 0xb7, 0x37, + 0x98, 0x17, 0x40, 0xdc, 0x90, 0x78, 0x24, 0x2e, 0x1c, 0xf7, 0xc8, 0x81, 0x03, 0x4a, 0x6e, 0x9c, + 0x78, 0x04, 0xe4, 0xb6, 0x27, 0xe3, 0xc9, 0x78, 0x26, 0x61, 0x23, 0x2e, 0x99, 0xae, 0xaf, 0xbb, + 0xca, 0x55, 0x5f, 0x95, 0xbf, 0x76, 0xe0, 0xe3, 0xd8, 0x4b, 0x4f, 0x89, 0x49, 0x41, 0xfc, 0x55, + 0xd0, 0xa5, 0xed, 0x41, 0x33, 0xe6, 0x91, 0x8c, 0xb6, 0xd5, 0x5f, 0x71, 0x65, 0xcb, 0x56, 0x68, + 0xfb, 0xd1, 0x9b, 0xfa, 0x7f, 0x25, 0x03, 0xe2, 0x22, 0x8f, 0x62, 0xbd, 0x0f, 0x2b, 0xfb, 0x24, + 0x0f, 0x92, 0x23, 0xd1, 0xe5, 0x41, 0x2c, 0x83, 0x88, 0xb9, 0xf4, 0x5d, 0x42, 0x42, 0xa2, 0x09, + 0x10, 0x9d, 0x31, 0xe2, 0x0e, 0x4b, 0x1f, 0x3f, 0x32, 0xb4, 0x75, 0x6d, 0x73, 0xc6, 0x2d, 0x21, + 0xd6, 0x73, 0x58, 0xad, 0xf6, 0x3c, 0x08, 0x8e, 0x19, 0xf9, 0x68, 0xc0, 0x54, 0xec, 0xa5, 0x61, + 0xe4, 0xf9, 0xca, 0xf9, 0x8e, 0xdb, 0x33, 0x71, 0x15, 0x66, 0x44, 0x70, 0xcc, 0x3c, 0x99, 0x70, + 0x32, 0x26, 0xd4, 0x5e, 0x1f, 0xb0, 0xfe, 0x9e, 0x80, 0xbb, 0x43, 0x81, 0x45, 0x1c, 0x31, 0x41, + 0x88, 0xd0, 0xc8, 0x92, 0x57, 0x01, 0x9b, 0xae, 0x5a, 0xe3, 0x3b, 0x30, 0x29, 0xa4, 0x27, 0x13, + 0xa1, 0x42, 0xcd, 0x3f, 0x58, 0xb2, 0xcb, 0xae, 0x07, 0x6a, 0xcb, 0x2d, 0x8e, 0xe0, 0x3a, 0xcc, + 0xfa, 0x9e, 0xa4, 0x03, 0xe9, 0x71, 0x49, 0xbe, 0x51, 0x5f, 0xd7, 0x36, 0x1b, 0x6e, 0x19, 0xc2, + 0x36, 0x4c, 0x67, 0xe6, 0x1e, 0xf3, 0x85, 0xd1, 0x50, 0xdb, 0x97, 0x76, 0xe6, 0x1d, 0x08, 0x27, + 0x91, 0x91, 0x4b, 0x8c, 0xce, 0x8c, 0xe6, 0xba, 0xb6, 0x39, 0xed, 0x96, 0x21, 0x7c, 0x08, 0x73, + 0x05, 0xd9, 0x9f, 0x91, 0x7c, 0x19, 0xf9, 0xc6, 0xa4, 0xca, 0x69, 0xde, 0xee, 0x94, 0x51, 0x77, + 0xf0, 0x10, 0x6e, 0x81, 0xce, 0x73, 0xee, 0xc8, 0x77, 0x58, 0xfa, 0xd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0xdd, 0x64, 0xd5, + 0xf0, 0x05, 0xb4, 0xaa, 0x74, 0x1c, 0x2d, 0xfb, 0x5a, 0x79, 0x6f, 0xaf, 0xd9, 0x63, 0xaf, 0x88, + 0x1a, 0x7e, 0x0b, 0xf7, 0x46, 0x2a, 0x24, 0xbe, 0x6d, 0xdf, 0x4c, 0x9f, 0xdb, 0x96, 0x7d, 0xad, + 0xcc, 0xe6, 0x85, 0x54, 0xc9, 0x13, 0x2a, 0xef, 0xf1, 0xaa, 0xd5, 0x5e, 0xb3, 0xc7, 0x2a, 0x5f, + 0x0d, 0x3f, 0x81, 0xd9, 0xd2, 0x9b, 0x8f, 0xf7, 0xec, 0x51, 0x3a, 0xd0, 0x6e, 0xd9, 0x15, 0x9a, + 0x62, 0xd5, 0xf0, 0x43, 0x98, 0xdd, 0x27, 0xe9, 0x84, 0x61, 0xf6, 0xf2, 0x08, 0x5c, 0xc9, 0x9e, + 0xa8, 0x96, 0x83, 0xee, 0x8b, 0x25, 0xbc, 0xe7, 0xbb, 0xf3, 0xd1, 0x6f, 0xe7, 0xa6, 0xf6, 0xfa, + 0xdc, 0xd4, 0xfe, 0x3c, 0x37, 0xb5, 0x9f, 0x2f, 0xcc, 0xda, 0xeb, 0x0b, 0xb3, 0xf6, 0xfb, 0x85, + 0x59, 0xfb, 0xd2, 0xba, 0xfe, 0xdf, 0x80, 0xa3, 0x49, 0xf5, 0xf3, 0xde, 0x3f, 0x01, 0x00, 0x00, + 0xff, 0xff, 0xe8, 0xfe, 0xa0, 0x90, 0x73, 0x0c, 0x00, 0x00, } func (m *GetSubscriptionRequest) Marshal() (dAtA []byte, err error) { diff --git a/paymentservice/paymentserviceproto/paymentservice_drpc.pb.go b/paymentservice/paymentserviceproto/paymentservice_drpc.pb.go index d034694a..96e1e32f 100644 --- a/paymentservice/paymentserviceproto/paymentservice_drpc.pb.go +++ b/paymentservice/paymentserviceproto/paymentservice_drpc.pb.go @@ -46,6 +46,7 @@ type DRPCAnyPaymentProcessingClient interface { GetSubscriptionPortalLink(ctx context.Context, in *GetSubscriptionPortalLinkRequestSigned) (*GetSubscriptionPortalLinkResponse, error) GetVerificationEmail(ctx context.Context, in *GetVerificationEmailRequestSigned) (*GetVerificationEmailResponse, error) VerifyEmail(ctx context.Context, in *VerifyEmailRequestSigned) (*VerifyEmailResponse, error) + GetAllTiers(ctx context.Context, in *GetTiersRequestSigned) (*GetTiersResponse, error) } type drpcAnyPaymentProcessingClient struct { @@ -112,6 +113,15 @@ func (c *drpcAnyPaymentProcessingClient) VerifyEmail(ctx context.Context, in *Ve return out, nil } +func (c *drpcAnyPaymentProcessingClient) GetAllTiers(ctx context.Context, in *GetTiersRequestSigned) (*GetTiersResponse, error) { + out := new(GetTiersResponse) + err := c.cc.Invoke(ctx, "/AnyPaymentProcessing/GetAllTiers", drpcEncoding_File_paymentservice_paymentserviceproto_protos_paymentservice_proto{}, in, out) + if err != nil { + return nil, err + } + return out, nil +} + type DRPCAnyPaymentProcessingServer interface { GetSubscriptionStatus(context.Context, *GetSubscriptionRequestSigned) (*GetSubscriptionResponse, error) BuySubscription(context.Context, *BuySubscriptionRequestSigned) (*BuySubscriptionResponse, error) @@ -119,6 +129,7 @@ type DRPCAnyPaymentProcessingServer interface { GetSubscriptionPortalLink(context.Context, *GetSubscriptionPortalLinkRequestSigned) (*GetSubscriptionPortalLinkResponse, error) GetVerificationEmail(context.Context, *GetVerificationEmailRequestSigned) (*GetVerificationEmailResponse, error) VerifyEmail(context.Context, *VerifyEmailRequestSigned) (*VerifyEmailResponse, error) + GetAllTiers(context.Context, *GetTiersRequestSigned) (*GetTiersResponse, error) } type DRPCAnyPaymentProcessingUnimplementedServer struct{} @@ -147,9 +158,13 @@ func (s *DRPCAnyPaymentProcessingUnimplementedServer) VerifyEmail(context.Contex return nil, drpcerr.WithCode(errors.New("Unimplemented"), drpcerr.Unimplemented) } +func (s *DRPCAnyPaymentProcessingUnimplementedServer) GetAllTiers(context.Context, *GetTiersRequestSigned) (*GetTiersResponse, error) { + return nil, drpcerr.WithCode(errors.New("Unimplemented"), drpcerr.Unimplemented) +} + type DRPCAnyPaymentProcessingDescription struct{} -func (DRPCAnyPaymentProcessingDescription) NumMethods() int { return 6 } +func (DRPCAnyPaymentProcessingDescription) NumMethods() int { return 7 } func (DRPCAnyPaymentProcessingDescription) Method(n int) (string, drpc.Encoding, drpc.Receiver, interface{}, bool) { switch n { @@ -207,6 +222,15 @@ func (DRPCAnyPaymentProcessingDescription) Method(n int) (string, drpc.Encoding, in1.(*VerifyEmailRequestSigned), ) }, DRPCAnyPaymentProcessingServer.VerifyEmail, true + case 6: + return "/AnyPaymentProcessing/GetAllTiers", drpcEncoding_File_paymentservice_paymentserviceproto_protos_paymentservice_proto{}, + func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) { + return srv.(DRPCAnyPaymentProcessingServer). + GetAllTiers( + ctx, + in1.(*GetTiersRequestSigned), + ) + }, DRPCAnyPaymentProcessingServer.GetAllTiers, true default: return "", nil, nil, nil, false } @@ -311,3 +335,19 @@ func (x *drpcAnyPaymentProcessing_VerifyEmailStream) SendAndClose(m *VerifyEmail } return x.CloseSend() } + +type DRPCAnyPaymentProcessing_GetAllTiersStream interface { + drpc.Stream + SendAndClose(*GetTiersResponse) error +} + +type drpcAnyPaymentProcessing_GetAllTiersStream struct { + drpc.Stream +} + +func (x *drpcAnyPaymentProcessing_GetAllTiersStream) SendAndClose(m *GetTiersResponse) error { + if err := x.MsgSend(m, drpcEncoding_File_paymentservice_paymentserviceproto_protos_paymentservice_proto{}); err != nil { + return err + } + return x.CloseSend() +} diff --git a/paymentservice/paymentserviceproto/paymentservice_tiers.pb.go b/paymentservice/paymentserviceproto/paymentservice_tiers.pb.go new file mode 100644 index 00000000..fb16b9ce --- /dev/null +++ b/paymentservice/paymentserviceproto/paymentservice_tiers.pb.go @@ -0,0 +1,1840 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: paymentservice/paymentserviceproto/protos/paymentservice_tiers.proto + +package paymentserviceproto + +import ( + fmt "fmt" + proto "github.com/gogo/protobuf/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 PeriodType int32 + +const ( + PeriodType_PeriodTypeUnknown PeriodType = 0 + PeriodType_PeriodTypeUnlimited PeriodType = 1 + PeriodType_PeriodTypeDays PeriodType = 2 + PeriodType_PeriodTypeWeeks PeriodType = 3 + PeriodType_PeriodTypeMonths PeriodType = 4 + PeriodType_PeriodTypeYears PeriodType = 5 +) + +var PeriodType_name = map[int32]string{ + 0: "PeriodTypeUnknown", + 1: "PeriodTypeUnlimited", + 2: "PeriodTypeDays", + 3: "PeriodTypeWeeks", + 4: "PeriodTypeMonths", + 5: "PeriodTypeYears", +} + +var PeriodType_value = map[string]int32{ + "PeriodTypeUnknown": 0, + "PeriodTypeUnlimited": 1, + "PeriodTypeDays": 2, + "PeriodTypeWeeks": 3, + "PeriodTypeMonths": 4, + "PeriodTypeYears": 5, +} + +func (x PeriodType) String() string { + return proto.EnumName(PeriodType_name, int32(x)) +} + +func (PeriodType) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_597ac3048c641f44, []int{0} +} + +type Feature struct { + // "invites" + // "GBs" + // "spaces" + // ... + ValueStr string `protobuf:"bytes,1,opt,name=valueStr,proto3" json:"valueStr,omitempty"` + // each uint is a value of the feature + ValueUint uint32 `protobuf:"varint,2,opt,name=valueUint,proto3" json:"valueUint,omitempty"` +} + +func (m *Feature) Reset() { *m = Feature{} } +func (m *Feature) String() string { return proto.CompactTextString(m) } +func (*Feature) ProtoMessage() {} +func (*Feature) Descriptor() ([]byte, []int) { + return fileDescriptor_597ac3048c641f44, []int{0} +} +func (m *Feature) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Feature) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Feature.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 *Feature) XXX_Merge(src proto.Message) { + xxx_messageInfo_Feature.Merge(m, src) +} +func (m *Feature) XXX_Size() int { + return m.Size() +} +func (m *Feature) XXX_DiscardUnknown() { + xxx_messageInfo_Feature.DiscardUnknown(m) +} + +var xxx_messageInfo_Feature proto.InternalMessageInfo + +func (m *Feature) GetValueStr() string { + if m != nil { + return m.ValueStr + } + return "" +} + +func (m *Feature) GetValueUint() uint32 { + if m != nil { + return m.ValueUint + } + return 0 +} + +type GetTiersRequest struct { + // in the following format: "A5k2d9sFZw84yisTxRnz2bPRd1YPfVfhxqymZ6yESprFTG65" + // you can get it with Account().SignKey.GetPublic().Account() + OwnerAnyId string `protobuf:"bytes,1,opt,name=ownerAnyId,proto3" json:"ownerAnyId,omitempty"` + Locale string `protobuf:"bytes,2,opt,name=locale,proto3" json:"locale,omitempty"` + // see PaymentMethod enum + PaymentMethod uint32 `protobuf:"varint,3,opt,name=paymentMethod,proto3" json:"paymentMethod,omitempty"` +} + +func (m *GetTiersRequest) Reset() { *m = GetTiersRequest{} } +func (m *GetTiersRequest) String() string { return proto.CompactTextString(m) } +func (*GetTiersRequest) ProtoMessage() {} +func (*GetTiersRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_597ac3048c641f44, []int{1} +} +func (m *GetTiersRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GetTiersRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GetTiersRequest.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 *GetTiersRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetTiersRequest.Merge(m, src) +} +func (m *GetTiersRequest) XXX_Size() int { + return m.Size() +} +func (m *GetTiersRequest) XXX_DiscardUnknown() { + xxx_messageInfo_GetTiersRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_GetTiersRequest proto.InternalMessageInfo + +func (m *GetTiersRequest) GetOwnerAnyId() string { + if m != nil { + return m.OwnerAnyId + } + return "" +} + +func (m *GetTiersRequest) GetLocale() string { + if m != nil { + return m.Locale + } + return "" +} + +func (m *GetTiersRequest) GetPaymentMethod() uint32 { + if m != nil { + return m.PaymentMethod + } + return 0 +} + +type GetTiersRequestSigned struct { + // GetTiersRequest struct + Payload []byte `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"` + // this is payload signed with payload.ownerAnyID + Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` +} + +func (m *GetTiersRequestSigned) Reset() { *m = GetTiersRequestSigned{} } +func (m *GetTiersRequestSigned) String() string { return proto.CompactTextString(m) } +func (*GetTiersRequestSigned) ProtoMessage() {} +func (*GetTiersRequestSigned) Descriptor() ([]byte, []int) { + return fileDescriptor_597ac3048c641f44, []int{2} +} +func (m *GetTiersRequestSigned) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GetTiersRequestSigned) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GetTiersRequestSigned.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 *GetTiersRequestSigned) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetTiersRequestSigned.Merge(m, src) +} +func (m *GetTiersRequestSigned) XXX_Size() int { + return m.Size() +} +func (m *GetTiersRequestSigned) XXX_DiscardUnknown() { + xxx_messageInfo_GetTiersRequestSigned.DiscardUnknown(m) +} + +var xxx_messageInfo_GetTiersRequestSigned proto.InternalMessageInfo + +func (m *GetTiersRequestSigned) GetPayload() []byte { + if m != nil { + return m.Payload + } + return nil +} + +func (m *GetTiersRequestSigned) GetSignature() []byte { + if m != nil { + return m.Signature + } + return nil +} + +type TierData struct { + // this is a unique ID of the tier + // you should hardcode this in your app and provide icon, graphics, etc for each tier + // (even for old/historical/inactive/hidden tiers) + Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + // localazied name of the tier + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + // just a short technical description + // you don't have to use it, you can use your own UI-friendly texts + Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` + // can you buy it (ON ALL PLATFORMS, without clarification)? + IsActive bool `protobuf:"varint,4,opt,name=isActive,proto3" json:"isActive,omitempty"` + // is this tier for debugging only? + IsTest bool `protobuf:"varint,5,opt,name=isTest,proto3" json:"isTest,omitempty"` + // hidden tiers are only visible once user got them + IsHiddenTier bool `protobuf:"varint,6,opt,name=isHiddenTier,proto3" json:"isHiddenTier,omitempty"` + // how long is the period of the subscription + PeriodType PeriodType `protobuf:"varint,7,opt,name=periodType,proto3,enum=PeriodType" json:"periodType,omitempty"` + // i.e. "5 days" or "3 years" + PeriodValue uint32 `protobuf:"varint,8,opt,name=periodValue,proto3" json:"periodValue,omitempty"` + // this one is a price we use ONLY on Stripe platform + PriceStripeUsdCents uint32 `protobuf:"varint,9,opt,name=priceStripeUsdCents,proto3" json:"priceStripeUsdCents,omitempty"` + // number of ANY NS names that this tier includes + // (not counted as a "feature" and not in the features list) + AnyNamesCountIncluded uint32 `protobuf:"varint,10,opt,name=anyNamesCountIncluded,proto3" json:"anyNamesCountIncluded,omitempty"` + // somename.any - len of 8 + AnyNameMinLength uint32 `protobuf:"varint,11,opt,name=anyNameMinLength,proto3" json:"anyNameMinLength,omitempty"` + // each tier has a set of features + // each feature has a unique key: "storage", "invites", etc + // not using enum here to provide dynamic feature list + Features map[string]*Feature `protobuf:"bytes,12,rep,name=features,proto3" json:"features,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (m *TierData) Reset() { *m = TierData{} } +func (m *TierData) String() string { return proto.CompactTextString(m) } +func (*TierData) ProtoMessage() {} +func (*TierData) Descriptor() ([]byte, []int) { + return fileDescriptor_597ac3048c641f44, []int{3} +} +func (m *TierData) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *TierData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_TierData.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 *TierData) XXX_Merge(src proto.Message) { + xxx_messageInfo_TierData.Merge(m, src) +} +func (m *TierData) XXX_Size() int { + return m.Size() +} +func (m *TierData) XXX_DiscardUnknown() { + xxx_messageInfo_TierData.DiscardUnknown(m) +} + +var xxx_messageInfo_TierData proto.InternalMessageInfo + +func (m *TierData) GetId() uint32 { + if m != nil { + return m.Id + } + return 0 +} + +func (m *TierData) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *TierData) GetDescription() string { + if m != nil { + return m.Description + } + return "" +} + +func (m *TierData) GetIsActive() bool { + if m != nil { + return m.IsActive + } + return false +} + +func (m *TierData) GetIsTest() bool { + if m != nil { + return m.IsTest + } + return false +} + +func (m *TierData) GetIsHiddenTier() bool { + if m != nil { + return m.IsHiddenTier + } + return false +} + +func (m *TierData) GetPeriodType() PeriodType { + if m != nil { + return m.PeriodType + } + return PeriodType_PeriodTypeUnknown +} + +func (m *TierData) GetPeriodValue() uint32 { + if m != nil { + return m.PeriodValue + } + return 0 +} + +func (m *TierData) GetPriceStripeUsdCents() uint32 { + if m != nil { + return m.PriceStripeUsdCents + } + return 0 +} + +func (m *TierData) GetAnyNamesCountIncluded() uint32 { + if m != nil { + return m.AnyNamesCountIncluded + } + return 0 +} + +func (m *TierData) GetAnyNameMinLength() uint32 { + if m != nil { + return m.AnyNameMinLength + } + return 0 +} + +func (m *TierData) GetFeatures() map[string]*Feature { + if m != nil { + return m.Features + } + return nil +} + +type GetTiersResponse struct { + // list of all available tiers + Tiers []*TierData `protobuf:"bytes,1,rep,name=tiers,proto3" json:"tiers,omitempty"` +} + +func (m *GetTiersResponse) Reset() { *m = GetTiersResponse{} } +func (m *GetTiersResponse) String() string { return proto.CompactTextString(m) } +func (*GetTiersResponse) ProtoMessage() {} +func (*GetTiersResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_597ac3048c641f44, []int{4} +} +func (m *GetTiersResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GetTiersResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GetTiersResponse.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 *GetTiersResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetTiersResponse.Merge(m, src) +} +func (m *GetTiersResponse) XXX_Size() int { + return m.Size() +} +func (m *GetTiersResponse) XXX_DiscardUnknown() { + xxx_messageInfo_GetTiersResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_GetTiersResponse proto.InternalMessageInfo + +func (m *GetTiersResponse) GetTiers() []*TierData { + if m != nil { + return m.Tiers + } + return nil +} + +func init() { + proto.RegisterEnum("PeriodType", PeriodType_name, PeriodType_value) + proto.RegisterType((*Feature)(nil), "Feature") + proto.RegisterType((*GetTiersRequest)(nil), "GetTiersRequest") + proto.RegisterType((*GetTiersRequestSigned)(nil), "GetTiersRequestSigned") + proto.RegisterType((*TierData)(nil), "TierData") + proto.RegisterMapType((map[string]*Feature)(nil), "TierData.FeaturesEntry") + proto.RegisterType((*GetTiersResponse)(nil), "GetTiersResponse") +} + +func init() { + proto.RegisterFile("paymentservice/paymentserviceproto/protos/paymentservice_tiers.proto", fileDescriptor_597ac3048c641f44) +} + +var fileDescriptor_597ac3048c641f44 = []byte{ + // 615 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x94, 0xcf, 0x4f, 0xdb, 0x4a, + 0x10, 0xc7, 0xe3, 0xfc, 0x80, 0x64, 0x92, 0x80, 0xdf, 0xf0, 0x78, 0xac, 0xd0, 0x93, 0x5f, 0x64, + 0xbd, 0x43, 0x44, 0xa5, 0x50, 0x41, 0x0f, 0x55, 0xd5, 0x0b, 0x05, 0xda, 0x22, 0x95, 0xb6, 0x5a, + 0xa0, 0x55, 0x7b, 0xa9, 0xb6, 0xf1, 0x14, 0x56, 0x24, 0xbb, 0xae, 0x77, 0x03, 0xf2, 0x5f, 0xd0, + 0x2b, 0x7f, 0x56, 0x8f, 0x1c, 0x7b, 0xac, 0xe0, 0x1f, 0xa9, 0xbc, 0x71, 0xe2, 0x84, 0x22, 0xf5, + 0x92, 0xec, 0xf7, 0xf3, 0xdd, 0x9d, 0x9d, 0xf1, 0x8c, 0x0d, 0x7b, 0xb1, 0x48, 0x87, 0xa4, 0xac, + 0xa1, 0xe4, 0x42, 0xf6, 0x69, 0x73, 0x5e, 0xc6, 0x89, 0xb6, 0x7a, 0xd3, 0xfd, 0x9a, 0x3b, 0xd6, + 0x27, 0x2b, 0x29, 0x31, 0x3d, 0xe7, 0x85, 0xbb, 0xb0, 0xf8, 0x9c, 0x84, 0x1d, 0x25, 0x84, 0xeb, + 0x50, 0xbf, 0x10, 0x83, 0x11, 0x1d, 0xd9, 0x84, 0x79, 0x1d, 0xaf, 0xdb, 0xe0, 0x53, 0x8d, 0xff, + 0x42, 0xc3, 0xad, 0x4f, 0xa4, 0xb2, 0xac, 0xdc, 0xf1, 0xba, 0x6d, 0x5e, 0x80, 0x50, 0xc3, 0xf2, + 0x0b, 0xb2, 0xc7, 0x59, 0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5, 0xc8, 0xf7, 0x10, 0x61, 0xa9, 0x30, 0xf6, 0x44, 0x6a, 0xfc, 0x32, 0xae, 0xc0, 0x72, 0xc1, + 0xde, 0x13, 0x9d, 0x1b, 0xbf, 0x82, 0x7f, 0x83, 0x5f, 0xc0, 0x43, 0xad, 0xec, 0x99, 0xf1, 0xab, + 0xf3, 0x5b, 0x3f, 0x90, 0x48, 0x8c, 0x5f, 0x7b, 0xf6, 0xf4, 0xfb, 0x4d, 0xe0, 0x5d, 0xdf, 0x04, + 0xde, 0xcf, 0x9b, 0xc0, 0xbb, 0xba, 0x0d, 0x4a, 0xd7, 0xb7, 0x41, 0xe9, 0xc7, 0x6d, 0x50, 0xfa, + 0x18, 0xfe, 0xf9, 0xc3, 0xf1, 0x79, 0xc1, 0xfd, 0x6d, 0xff, 0x0a, 0x00, 0x00, 0xff, 0xff, 0x0a, + 0xee, 0x4f, 0x49, 0x65, 0x04, 0x00, 0x00, +} + +func (m *Feature) 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 *Feature) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Feature) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.ValueUint != 0 { + i = encodeVarintPaymentserviceTiers(dAtA, i, uint64(m.ValueUint)) + i-- + dAtA[i] = 0x10 + } + if len(m.ValueStr) > 0 { + i -= len(m.ValueStr) + copy(dAtA[i:], m.ValueStr) + i = encodeVarintPaymentserviceTiers(dAtA, i, uint64(len(m.ValueStr))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *GetTiersRequest) 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 *GetTiersRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetTiersRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.PaymentMethod != 0 { + i = encodeVarintPaymentserviceTiers(dAtA, i, uint64(m.PaymentMethod)) + i-- + dAtA[i] = 0x18 + } + if len(m.Locale) > 0 { + i -= len(m.Locale) + copy(dAtA[i:], m.Locale) + i = encodeVarintPaymentserviceTiers(dAtA, i, uint64(len(m.Locale))) + i-- + dAtA[i] = 0x12 + } + if len(m.OwnerAnyId) > 0 { + i -= len(m.OwnerAnyId) + copy(dAtA[i:], m.OwnerAnyId) + i = encodeVarintPaymentserviceTiers(dAtA, i, uint64(len(m.OwnerAnyId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *GetTiersRequestSigned) 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 *GetTiersRequestSigned) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetTiersRequestSigned) 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 = encodeVarintPaymentserviceTiers(dAtA, i, uint64(len(m.Signature))) + i-- + dAtA[i] = 0x12 + } + if len(m.Payload) > 0 { + i -= len(m.Payload) + copy(dAtA[i:], m.Payload) + i = encodeVarintPaymentserviceTiers(dAtA, i, uint64(len(m.Payload))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *TierData) 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 *TierData) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TierData) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Features) > 0 { + for k := range m.Features { + v := m.Features[k] + baseI := i + if v != nil { + { + size, err := v.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPaymentserviceTiers(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + i -= len(k) + copy(dAtA[i:], k) + i = encodeVarintPaymentserviceTiers(dAtA, i, uint64(len(k))) + i-- + dAtA[i] = 0xa + i = encodeVarintPaymentserviceTiers(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0x62 + } + } + if m.AnyNameMinLength != 0 { + i = encodeVarintPaymentserviceTiers(dAtA, i, uint64(m.AnyNameMinLength)) + i-- + dAtA[i] = 0x58 + } + if m.AnyNamesCountIncluded != 0 { + i = encodeVarintPaymentserviceTiers(dAtA, i, uint64(m.AnyNamesCountIncluded)) + i-- + dAtA[i] = 0x50 + } + if m.PriceStripeUsdCents != 0 { + i = encodeVarintPaymentserviceTiers(dAtA, i, uint64(m.PriceStripeUsdCents)) + i-- + dAtA[i] = 0x48 + } + if m.PeriodValue != 0 { + i = encodeVarintPaymentserviceTiers(dAtA, i, uint64(m.PeriodValue)) + i-- + dAtA[i] = 0x40 + } + if m.PeriodType != 0 { + i = encodeVarintPaymentserviceTiers(dAtA, i, uint64(m.PeriodType)) + i-- + dAtA[i] = 0x38 + } + if m.IsHiddenTier { + i-- + if m.IsHiddenTier { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x30 + } + if m.IsTest { + i-- + if m.IsTest { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x28 + } + if m.IsActive { + i-- + if m.IsActive { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x20 + } + if len(m.Description) > 0 { + i -= len(m.Description) + copy(dAtA[i:], m.Description) + i = encodeVarintPaymentserviceTiers(dAtA, i, uint64(len(m.Description))) + i-- + dAtA[i] = 0x1a + } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintPaymentserviceTiers(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0x12 + } + if m.Id != 0 { + i = encodeVarintPaymentserviceTiers(dAtA, i, uint64(m.Id)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *GetTiersResponse) 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 *GetTiersResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetTiersResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Tiers) > 0 { + for iNdEx := len(m.Tiers) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Tiers[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPaymentserviceTiers(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func encodeVarintPaymentserviceTiers(dAtA []byte, offset int, v uint64) int { + offset -= sovPaymentserviceTiers(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Feature) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ValueStr) + if l > 0 { + n += 1 + l + sovPaymentserviceTiers(uint64(l)) + } + if m.ValueUint != 0 { + n += 1 + sovPaymentserviceTiers(uint64(m.ValueUint)) + } + return n +} + +func (m *GetTiersRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.OwnerAnyId) + if l > 0 { + n += 1 + l + sovPaymentserviceTiers(uint64(l)) + } + l = len(m.Locale) + if l > 0 { + n += 1 + l + sovPaymentserviceTiers(uint64(l)) + } + if m.PaymentMethod != 0 { + n += 1 + sovPaymentserviceTiers(uint64(m.PaymentMethod)) + } + return n +} + +func (m *GetTiersRequestSigned) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Payload) + if l > 0 { + n += 1 + l + sovPaymentserviceTiers(uint64(l)) + } + l = len(m.Signature) + if l > 0 { + n += 1 + l + sovPaymentserviceTiers(uint64(l)) + } + return n +} + +func (m *TierData) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Id != 0 { + n += 1 + sovPaymentserviceTiers(uint64(m.Id)) + } + l = len(m.Name) + if l > 0 { + n += 1 + l + sovPaymentserviceTiers(uint64(l)) + } + l = len(m.Description) + if l > 0 { + n += 1 + l + sovPaymentserviceTiers(uint64(l)) + } + if m.IsActive { + n += 2 + } + if m.IsTest { + n += 2 + } + if m.IsHiddenTier { + n += 2 + } + if m.PeriodType != 0 { + n += 1 + sovPaymentserviceTiers(uint64(m.PeriodType)) + } + if m.PeriodValue != 0 { + n += 1 + sovPaymentserviceTiers(uint64(m.PeriodValue)) + } + if m.PriceStripeUsdCents != 0 { + n += 1 + sovPaymentserviceTiers(uint64(m.PriceStripeUsdCents)) + } + if m.AnyNamesCountIncluded != 0 { + n += 1 + sovPaymentserviceTiers(uint64(m.AnyNamesCountIncluded)) + } + if m.AnyNameMinLength != 0 { + n += 1 + sovPaymentserviceTiers(uint64(m.AnyNameMinLength)) + } + if len(m.Features) > 0 { + for k, v := range m.Features { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovPaymentserviceTiers(uint64(l)) + } + mapEntrySize := 1 + len(k) + sovPaymentserviceTiers(uint64(len(k))) + l + n += mapEntrySize + 1 + sovPaymentserviceTiers(uint64(mapEntrySize)) + } + } + return n +} + +func (m *GetTiersResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Tiers) > 0 { + for _, e := range m.Tiers { + l = e.Size() + n += 1 + l + sovPaymentserviceTiers(uint64(l)) + } + } + return n +} + +func sovPaymentserviceTiers(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozPaymentserviceTiers(x uint64) (n int) { + return sovPaymentserviceTiers(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Feature) 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 ErrIntOverflowPaymentserviceTiers + } + 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: Feature: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Feature: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ValueStr", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPaymentserviceTiers + } + 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 ErrInvalidLengthPaymentserviceTiers + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPaymentserviceTiers + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ValueStr = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ValueUint", wireType) + } + m.ValueUint = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPaymentserviceTiers + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ValueUint |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipPaymentserviceTiers(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthPaymentserviceTiers + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetTiersRequest) 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 ErrIntOverflowPaymentserviceTiers + } + 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: GetTiersRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetTiersRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OwnerAnyId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPaymentserviceTiers + } + 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 ErrInvalidLengthPaymentserviceTiers + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPaymentserviceTiers + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OwnerAnyId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Locale", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPaymentserviceTiers + } + 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 ErrInvalidLengthPaymentserviceTiers + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPaymentserviceTiers + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Locale = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PaymentMethod", wireType) + } + m.PaymentMethod = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPaymentserviceTiers + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.PaymentMethod |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipPaymentserviceTiers(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthPaymentserviceTiers + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetTiersRequestSigned) 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 ErrIntOverflowPaymentserviceTiers + } + 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: GetTiersRequestSigned: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetTiersRequestSigned: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPaymentserviceTiers + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthPaymentserviceTiers + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthPaymentserviceTiers + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Payload = append(m.Payload[:0], dAtA[iNdEx:postIndex]...) + if m.Payload == nil { + m.Payload = []byte{} + } + iNdEx = postIndex + case 2: + 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 ErrIntOverflowPaymentserviceTiers + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthPaymentserviceTiers + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthPaymentserviceTiers + } + 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 := skipPaymentserviceTiers(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthPaymentserviceTiers + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TierData) 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 ErrIntOverflowPaymentserviceTiers + } + 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: TierData: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TierData: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + m.Id = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPaymentserviceTiers + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Id |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPaymentserviceTiers + } + 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 ErrInvalidLengthPaymentserviceTiers + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPaymentserviceTiers + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPaymentserviceTiers + } + 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 ErrInvalidLengthPaymentserviceTiers + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPaymentserviceTiers + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Description = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsActive", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPaymentserviceTiers + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsActive = bool(v != 0) + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsTest", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPaymentserviceTiers + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsTest = bool(v != 0) + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsHiddenTier", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPaymentserviceTiers + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsHiddenTier = bool(v != 0) + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PeriodType", wireType) + } + m.PeriodType = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPaymentserviceTiers + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.PeriodType |= PeriodType(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PeriodValue", wireType) + } + m.PeriodValue = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPaymentserviceTiers + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.PeriodValue |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 9: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PriceStripeUsdCents", wireType) + } + m.PriceStripeUsdCents = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPaymentserviceTiers + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.PriceStripeUsdCents |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 10: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field AnyNamesCountIncluded", wireType) + } + m.AnyNamesCountIncluded = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPaymentserviceTiers + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.AnyNamesCountIncluded |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 11: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field AnyNameMinLength", wireType) + } + m.AnyNameMinLength = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPaymentserviceTiers + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.AnyNameMinLength |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Features", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPaymentserviceTiers + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthPaymentserviceTiers + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthPaymentserviceTiers + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Features == nil { + m.Features = make(map[string]*Feature) + } + var mapkey string + var mapvalue *Feature + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPaymentserviceTiers + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPaymentserviceTiers + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthPaymentserviceTiers + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return ErrInvalidLengthPaymentserviceTiers + } + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPaymentserviceTiers + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthPaymentserviceTiers + } + postmsgIndex := iNdEx + mapmsglen + if postmsgIndex < 0 { + return ErrInvalidLengthPaymentserviceTiers + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &Feature{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipPaymentserviceTiers(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthPaymentserviceTiers + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Features[mapkey] = mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipPaymentserviceTiers(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthPaymentserviceTiers + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetTiersResponse) 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 ErrIntOverflowPaymentserviceTiers + } + 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: GetTiersResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetTiersResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Tiers", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPaymentserviceTiers + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthPaymentserviceTiers + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthPaymentserviceTiers + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Tiers = append(m.Tiers, &TierData{}) + if err := m.Tiers[len(m.Tiers)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipPaymentserviceTiers(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthPaymentserviceTiers + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipPaymentserviceTiers(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, ErrIntOverflowPaymentserviceTiers + } + 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, ErrIntOverflowPaymentserviceTiers + } + 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, ErrIntOverflowPaymentserviceTiers + } + 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, ErrInvalidLengthPaymentserviceTiers + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupPaymentserviceTiers + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthPaymentserviceTiers + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthPaymentserviceTiers = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowPaymentserviceTiers = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupPaymentserviceTiers = fmt.Errorf("proto: unexpected end of group") +) diff --git a/paymentservice/paymentserviceproto/protos/paymentservice.proto b/paymentservice/paymentserviceproto/protos/paymentservice.proto index e68482e0..16ba461a 100644 --- a/paymentservice/paymentserviceproto/protos/paymentservice.proto +++ b/paymentservice/paymentserviceproto/protos/paymentservice.proto @@ -1,6 +1,8 @@ syntax = "proto3"; option go_package = "paymentservice/paymentserviceproto"; +import "paymentservice/paymentserviceproto/protos/paymentservice_tiers.proto"; + // TODO: // later we will have an interface to enumerate all available tiers // it's a bad idea to list them here, because interface will be changed often @@ -213,4 +215,11 @@ service AnyPaymentProcessing { // Enter the code from the email // Will fail if: link was not requested, link is expired, if email is already verified rpc VerifyEmail(VerifyEmailRequestSigned) returns (VerifyEmailResponse) {} + + // Returns all available application tiers, including inactive + // 1 - this list does not depend on the current platform (iOS, Android, Desktop) + // 2 - this list can be different for different users, based on their account ID + // 3 - user can not buy stripe + // 4 - some tiers are custom () + rpc GetAllTiers(GetTiersRequestSigned) returns (GetTiersResponse) {} } diff --git a/paymentservice/paymentserviceproto/protos/paymentservice_tiers.proto b/paymentservice/paymentserviceproto/protos/paymentservice_tiers.proto new file mode 100644 index 00000000..a4e78a58 --- /dev/null +++ b/paymentservice/paymentserviceproto/protos/paymentservice_tiers.proto @@ -0,0 +1,79 @@ +syntax = "proto3"; +option go_package = "paymentservice/paymentserviceproto"; + + +enum PeriodType { + PeriodTypeUnknown = 0; + PeriodTypeUnlimited = 1; + PeriodTypeDays = 2; + PeriodTypeWeeks = 3; + PeriodTypeMonths = 4; + PeriodTypeYears = 5; +} + +message Feature { + // "invites" + // "GBs" + // "spaces" + // ... + string valueStr = 1; + + // each uint is a value of the feature + uint32 valueUint = 2; +} + +message GetTiersRequest { + // in the following format: "A5k2d9sFZw84yisTxRnz2bPRd1YPfVfhxqymZ6yESprFTG65" + // you can get it with Account().SignKey.GetPublic().Account() + string ownerAnyId = 1; + + string locale = 2; + + // see PaymentMethod enum + uint32 paymentMethod = 3; +} + +message GetTiersRequestSigned { + // GetTiersRequest struct + bytes payload = 1; + // this is payload signed with payload.ownerAnyID + bytes signature = 2; +} + +message TierData { + // this is a unique ID of the tier + // you should hardcode this in your app and provide icon, graphics, etc for each tier + // (even for old/historical/inactive/hidden tiers) + uint32 id = 1; + // localazied name of the tier + string name = 2; + // just a short technical description + // you don't have to use it, you can use your own UI-friendly texts + string description = 3; + // can you buy it (ON ALL PLATFORMS, without clarification)? + bool isActive = 4; + // is this tier for debugging only? + bool isTest = 5; + // hidden tiers are only visible once user got them + bool isHiddenTier = 6; + // how long is the period of the subscription + PeriodType periodType = 7; + // i.e. "5 days" or "3 years" + uint32 periodValue = 8; + // this one is a price we use ONLY on Stripe platform + uint32 priceStripeUsdCents = 9; + // number of ANY NS names that this tier includes + // (not counted as a "feature" and not in the features list) + uint32 anyNamesCountIncluded = 10; + // somename.any - len of 8 + uint32 anyNameMinLength = 11; + // each tier has a set of features + // each feature has a unique key: "storage", "invites", etc + // not using enum here to provide dynamic feature list + map features = 12; +} + +message GetTiersResponse { + // list of all available tiers + repeated TierData tiers = 1; +} From 151dd9508d182faca5075fd65e340343bfb3ea44 Mon Sep 17 00:00:00 2001 From: Sergey Cherepanov Date: Mon, 11 Mar 2024 16:04:14 +0100 Subject: [PATCH 026/140] aclService: OwnerId, Permissions --- acl/acl.go | 17 ++- acl/acl_test.go | 44 ++++++- acl/mock_acl/mock_acl.go | 160 +++++++++++++++++++++++ commonspace/object/acl/list/aclstate.go | 10 ++ commonspace/object/acl/list/list_test.go | 8 ++ 5 files changed, 231 insertions(+), 8 deletions(-) create mode 100644 acl/mock_acl/mock_acl.go diff --git a/acl/acl.go b/acl/acl.go index c855b64a..a09b3d8f 100644 --- a/acl/acl.go +++ b/acl/acl.go @@ -1,3 +1,4 @@ +//go:generate mockgen -destination mock_acl/mock_acl.go github.com/anyproto/any-sync/acl AclService package acl import ( @@ -21,13 +22,15 @@ const CName = "coordinator.acl" var log = logger.NewNamed(CName) -func New() Acl { +func New() AclService { return &aclService{} } -type Acl interface { +type AclService interface { AddRecord(ctx context.Context, spaceId string, rec *consensusproto.RawRecord) (result *consensusproto.RawRecordWithId, err error) RecordsAfter(ctx context.Context, spaceId, aclHead string) (result []*consensusproto.RawRecordWithId, err error) + Permissions(ctx context.Context, identity crypto.PubKey, spaceId string) (res list.AclPermissions, err error) + OwnerPubKey(ctx context.Context, spaceId string) (ownerIdentity crypto.PubKey, err error) app.ComponentRunnable } @@ -96,6 +99,16 @@ func (as *aclService) RecordsAfter(ctx context.Context, spaceId, aclHead string) return acl.RecordsAfter(ctx, aclHead) } +func (as *aclService) OwnerPubKey(ctx context.Context, spaceId string) (ownerIdentity crypto.PubKey, err error) { + acl, err := as.get(ctx, spaceId) + if err != nil { + return + } + acl.RLock() + defer acl.RUnlock() + return acl.AclState().OwnerPubKey() +} + func (as *aclService) Permissions(ctx context.Context, identity crypto.PubKey, spaceId string) (res list.AclPermissions, err error) { acl, err := as.get(ctx, spaceId) if err != nil { diff --git a/acl/acl_test.go b/acl/acl_test.go index b65ac299..624087ae 100644 --- a/acl/acl_test.go +++ b/acl/acl_test.go @@ -103,13 +103,45 @@ func TestAclService_RecordsAfter(t *testing.T) { assert.Len(t, res, 1) } +func TestAclService(t *testing.T) { + ownerKeys, err := accountdata.NewRandom() + require.NoError(t, err) + spaceId := "spaceId" + ownerAcl, err := list.NewTestDerivedAcl(spaceId, ownerKeys) + require.NoError(t, err) + + fx := newFixture(t) + defer fx.finish(t) + + fx.consCl.EXPECT().Watch(spaceId, gomock.Any()).DoAndReturn(func(spaceId string, w consensusclient.Watcher) error { + go func() { + w.AddConsensusRecords([]*consensusproto.RawRecordWithId{ + ownerAcl.Root(), + }) + }() + return nil + }) + fx.consCl.EXPECT().UnWatch(spaceId) + + t.Run("permissions", func(t *testing.T) { + res, err := fx.Permissions(ctx, ownerKeys.SignKey.GetPublic(), spaceId) + require.NoError(t, err) + assert.True(t, res.IsOwner()) + }) + t.Run("ownerPUbKey", func(t *testing.T) { + res, err := fx.OwnerPubKey(ctx, spaceId) + require.NoError(t, err) + assert.Equal(t, ownerKeys.SignKey.GetPublic().Account(), res.Account()) + }) +} + func newFixture(t *testing.T) *fixture { ctrl := gomock.NewController(t) fx := &fixture{ - a: new(app.App), - ctrl: ctrl, - consCl: mock_consensusclient.NewMockService(ctrl), - Acl: New(), + a: new(app.App), + ctrl: ctrl, + consCl: mock_consensusclient.NewMockService(ctrl), + AclService: New(), } fx.consCl.EXPECT().Name().Return(consensusclient.CName).AnyTimes() @@ -117,7 +149,7 @@ func newFixture(t *testing.T) *fixture { fx.consCl.EXPECT().Run(gomock.Any()).AnyTimes() fx.consCl.EXPECT().Close(gomock.Any()).AnyTimes() - fx.a.Register(fx.consCl).Register(fx.Acl).Register(&accounttest.AccountTestService{}) + fx.a.Register(fx.consCl).Register(fx.AclService).Register(&accounttest.AccountTestService{}) require.NoError(t, fx.a.Start(ctx)) return fx @@ -127,7 +159,7 @@ type fixture struct { a *app.App ctrl *gomock.Controller consCl *mock_consensusclient.MockService - Acl + AclService } func (fx *fixture) finish(t *testing.T) { diff --git a/acl/mock_acl/mock_acl.go b/acl/mock_acl/mock_acl.go new file mode 100644 index 00000000..de7b8fe3 --- /dev/null +++ b/acl/mock_acl/mock_acl.go @@ -0,0 +1,160 @@ +// Code generated by MockGen. DO NOT EDIT. +// Source: github.com/anyproto/any-sync/acl (interfaces: AclService) +// +// Generated by this command: +// +// mockgen -destination mock_acl/mock_acl.go github.com/anyproto/any-sync/acl AclService +// + +// Package mock_acl is a generated GoMock package. +package mock_acl + +import ( + context "context" + reflect "reflect" + + app "github.com/anyproto/any-sync/app" + list "github.com/anyproto/any-sync/commonspace/object/acl/list" + consensusproto "github.com/anyproto/any-sync/consensus/consensusproto" + crypto "github.com/anyproto/any-sync/util/crypto" + gomock "go.uber.org/mock/gomock" +) + +// MockAclService is a mock of AclService interface. +type MockAclService struct { + ctrl *gomock.Controller + recorder *MockAclServiceMockRecorder +} + +// MockAclServiceMockRecorder is the mock recorder for MockAclService. +type MockAclServiceMockRecorder struct { + mock *MockAclService +} + +// NewMockAclService creates a new mock instance. +func NewMockAclService(ctrl *gomock.Controller) *MockAclService { + mock := &MockAclService{ctrl: ctrl} + mock.recorder = &MockAclServiceMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockAclService) EXPECT() *MockAclServiceMockRecorder { + return m.recorder +} + +// AddRecord mocks base method. +func (m *MockAclService) AddRecord(arg0 context.Context, arg1 string, arg2 *consensusproto.RawRecord) (*consensusproto.RawRecordWithId, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "AddRecord", arg0, arg1, arg2) + ret0, _ := ret[0].(*consensusproto.RawRecordWithId) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// AddRecord indicates an expected call of AddRecord. +func (mr *MockAclServiceMockRecorder) AddRecord(arg0, arg1, arg2 any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddRecord", reflect.TypeOf((*MockAclService)(nil).AddRecord), arg0, arg1, arg2) +} + +// Close mocks base method. +func (m *MockAclService) Close(arg0 context.Context) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Close", arg0) + ret0, _ := ret[0].(error) + return ret0 +} + +// Close indicates an expected call of Close. +func (mr *MockAclServiceMockRecorder) Close(arg0 any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockAclService)(nil).Close), arg0) +} + +// Init mocks base method. +func (m *MockAclService) Init(arg0 *app.App) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Init", arg0) + ret0, _ := ret[0].(error) + return ret0 +} + +// Init indicates an expected call of Init. +func (mr *MockAclServiceMockRecorder) Init(arg0 any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Init", reflect.TypeOf((*MockAclService)(nil).Init), arg0) +} + +// Name mocks base method. +func (m *MockAclService) Name() string { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Name") + ret0, _ := ret[0].(string) + return ret0 +} + +// Name indicates an expected call of Name. +func (mr *MockAclServiceMockRecorder) Name() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockAclService)(nil).Name)) +} + +// OwnerPubKey mocks base method. +func (m *MockAclService) OwnerPubKey(arg0 context.Context, arg1 string) (crypto.PubKey, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "OwnerPubKey", arg0, arg1) + ret0, _ := ret[0].(crypto.PubKey) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// OwnerPubKey indicates an expected call of OwnerPubKey. +func (mr *MockAclServiceMockRecorder) OwnerPubKey(arg0, arg1 any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OwnerPubKey", reflect.TypeOf((*MockAclService)(nil).OwnerPubKey), arg0, arg1) +} + +// Permissions mocks base method. +func (m *MockAclService) Permissions(arg0 context.Context, arg1 crypto.PubKey, arg2 string) (list.AclPermissions, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Permissions", arg0, arg1, arg2) + ret0, _ := ret[0].(list.AclPermissions) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Permissions indicates an expected call of Permissions. +func (mr *MockAclServiceMockRecorder) Permissions(arg0, arg1, arg2 any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Permissions", reflect.TypeOf((*MockAclService)(nil).Permissions), arg0, arg1, arg2) +} + +// RecordsAfter mocks base method. +func (m *MockAclService) RecordsAfter(arg0 context.Context, arg1, arg2 string) ([]*consensusproto.RawRecordWithId, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "RecordsAfter", arg0, arg1, arg2) + ret0, _ := ret[0].([]*consensusproto.RawRecordWithId) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// RecordsAfter indicates an expected call of RecordsAfter. +func (mr *MockAclServiceMockRecorder) RecordsAfter(arg0, arg1, arg2 any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RecordsAfter", reflect.TypeOf((*MockAclService)(nil).RecordsAfter), arg0, arg1, arg2) +} + +// Run mocks base method. +func (m *MockAclService) Run(arg0 context.Context) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Run", arg0) + ret0, _ := ret[0].(error) + return ret0 +} + +// Run indicates an expected call of Run. +func (mr *MockAclServiceMockRecorder) Run(arg0 any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Run", reflect.TypeOf((*MockAclService)(nil).Run), arg0) +} diff --git a/commonspace/object/acl/list/aclstate.go b/commonspace/object/acl/list/aclstate.go index 1a45dfce..d5eac20b 100644 --- a/commonspace/object/acl/list/aclstate.go +++ b/commonspace/object/acl/list/aclstate.go @@ -34,6 +34,7 @@ var ( ErrIncorrectRoot = errors.New("incorrect root") ErrIncorrectRecordSequence = errors.New("incorrect prev id of a record") ErrMetadataTooLarge = errors.New("metadata size too large") + ErrOwnerNotFound = errors.New("owner not found") ) const MaxMetadataLen = 1024 @@ -844,6 +845,15 @@ func (st *AclState) LastRecordId() string { return st.lastRecordId } +func (st *AclState) OwnerPubKey() (ownerIdentity crypto.PubKey, err error) { + for _, aState := range st.accountStates { + if aState.Permissions.IsOwner() { + return aState.PubKey, nil + } + } + return nil, ErrOwnerNotFound +} + func (st *AclState) deriveKey() (crypto.SymKey, error) { keyBytes, err := st.key.Raw() if err != nil { diff --git a/commonspace/object/acl/list/list_test.go b/commonspace/object/acl/list/list_test.go index 4084baa0..1aae71c0 100644 --- a/commonspace/object/acl/list/list_test.go +++ b/commonspace/object/acl/list/list_test.go @@ -4,6 +4,7 @@ import ( "fmt" "testing" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "github.com/anyproto/any-sync/commonspace/object/accountdata" @@ -395,3 +396,10 @@ func TestAclList_RequestRemove(t *testing.T) { require.Nil(t, accountState().keys[removeRec.Id].ReadKey) require.NotEmpty(t, accountState().keys[fx.ownerAcl.Id()]) } + +func TestAclState_OwnerPubKey(t *testing.T) { + fx := newFixture(t) + pubKey, err := fx.ownerAcl.AclState().OwnerPubKey() + require.NoError(t, err) + assert.Equal(t, fx.ownerKeys.SignKey.GetPublic().Account(), pubKey.Account()) +} From 6bed66ffdcacc14077c91ad670edcff7ac7d28cb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 11 Mar 2024 15:46:55 +0000 Subject: [PATCH 027/140] Bump golang.org/x/crypto from 0.20.0 to 0.21.0 Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.20.0 to 0.21.0. - [Commits](https://github.com/golang/crypto/compare/v0.20.0...v0.21.0) --- updated-dependencies: - dependency-name: golang.org/x/crypto dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- go.mod | 4 ++-- go.sum | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index be5b3c97..b7b63cd1 100644 --- a/go.mod +++ b/go.mod @@ -33,7 +33,7 @@ require ( go.uber.org/atomic v1.11.0 go.uber.org/mock v0.4.0 go.uber.org/zap v1.27.0 - golang.org/x/crypto v0.20.0 + golang.org/x/crypto v0.21.0 golang.org/x/exp v0.0.0-20240205201215-2c58cdc269a3 golang.org/x/net v0.21.0 gopkg.in/yaml.v3 v3.0.1 @@ -105,7 +105,7 @@ require ( golang.org/x/image v0.14.0 // indirect golang.org/x/mod v0.15.0 // indirect golang.org/x/sync v0.6.0 // indirect - golang.org/x/sys v0.17.0 // indirect + golang.org/x/sys v0.18.0 // indirect golang.org/x/tools v0.17.0 // indirect google.golang.org/protobuf v1.32.0 // indirect lukechampine.com/blake3 v1.2.1 // indirect diff --git a/go.sum b/go.sum index 49453b34..b320422b 100644 --- a/go.sum +++ b/go.sum @@ -324,8 +324,8 @@ golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20200115085410-6d4e4cb37c7d/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200602180216-279210d13fed/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.20.0 h1:jmAMJJZXr5KiCw05dfYK9QnqaqKLYXijU23lsEdcQqg= -golang.org/x/crypto v0.20.0/go.mod h1:Xwo95rrVNIoSMx9wa1JroENMToLWn3RNVrTBpLHgZPQ= +golang.org/x/crypto v0.21.0 h1:X31++rzVUdKhX5sWmSOFZxx8UW/ldWx55cbf08iNAMA= +golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs= golang.org/x/exp v0.0.0-20240205201215-2c58cdc269a3 h1:/RIbNt/Zr7rVhIkQhooTxCxFcdWLGIKnZA4IXNFSrvo= golang.org/x/exp v0.0.0-20240205201215-2c58cdc269a3/go.mod h1:idGWGoKP1toJGkd5/ig9ZLuPcZBC3ewk7SzmH0uou08= golang.org/x/image v0.14.0 h1:tNgSxAFe3jC4uYqvZdTr84SZoM1KfwdC9SKIFrLjFn4= @@ -363,8 +363,8 @@ golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= -golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= +golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= From c1e1bfba7d4773570953d33fe58ce65eb3390e31 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 11 Mar 2024 15:47:08 +0000 Subject: [PATCH 028/140] Bump golang.org/x/net from 0.21.0 to 0.22.0 Bumps [golang.org/x/net](https://github.com/golang/net) from 0.21.0 to 0.22.0. - [Commits](https://github.com/golang/net/compare/v0.21.0...v0.22.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- go.mod | 6 +++--- go.sum | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/go.mod b/go.mod index be5b3c97..9cb9b0f1 100644 --- a/go.mod +++ b/go.mod @@ -33,9 +33,9 @@ require ( go.uber.org/atomic v1.11.0 go.uber.org/mock v0.4.0 go.uber.org/zap v1.27.0 - golang.org/x/crypto v0.20.0 + golang.org/x/crypto v0.21.0 golang.org/x/exp v0.0.0-20240205201215-2c58cdc269a3 - golang.org/x/net v0.21.0 + golang.org/x/net v0.22.0 gopkg.in/yaml.v3 v3.0.1 storj.io/drpc v0.0.33 ) @@ -105,7 +105,7 @@ require ( golang.org/x/image v0.14.0 // indirect golang.org/x/mod v0.15.0 // indirect golang.org/x/sync v0.6.0 // indirect - golang.org/x/sys v0.17.0 // indirect + golang.org/x/sys v0.18.0 // indirect golang.org/x/tools v0.17.0 // indirect google.golang.org/protobuf v1.32.0 // indirect lukechampine.com/blake3 v1.2.1 // indirect diff --git a/go.sum b/go.sum index 49453b34..9064ac79 100644 --- a/go.sum +++ b/go.sum @@ -324,8 +324,8 @@ golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20200115085410-6d4e4cb37c7d/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200602180216-279210d13fed/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.20.0 h1:jmAMJJZXr5KiCw05dfYK9QnqaqKLYXijU23lsEdcQqg= -golang.org/x/crypto v0.20.0/go.mod h1:Xwo95rrVNIoSMx9wa1JroENMToLWn3RNVrTBpLHgZPQ= +golang.org/x/crypto v0.21.0 h1:X31++rzVUdKhX5sWmSOFZxx8UW/ldWx55cbf08iNAMA= +golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs= golang.org/x/exp v0.0.0-20240205201215-2c58cdc269a3 h1:/RIbNt/Zr7rVhIkQhooTxCxFcdWLGIKnZA4IXNFSrvo= golang.org/x/exp v0.0.0-20240205201215-2c58cdc269a3/go.mod h1:idGWGoKP1toJGkd5/ig9ZLuPcZBC3ewk7SzmH0uou08= golang.org/x/image v0.14.0 h1:tNgSxAFe3jC4uYqvZdTr84SZoM1KfwdC9SKIFrLjFn4= @@ -343,8 +343,8 @@ golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= -golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= +golang.org/x/net v0.22.0 h1:9sGLhx7iRIHEiX0oAJ3MRZMUCElJgy7Br1nO+AMN3Tc= +golang.org/x/net v0.22.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -363,8 +363,8 @@ golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= -golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= +golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= From b43b3cffd53e8bd729b448195b653c7a180aec17 Mon Sep 17 00:00:00 2001 From: Sergey Cherepanov Date: Mon, 11 Mar 2024 16:57:31 +0100 Subject: [PATCH 029/140] fileproto: account limit --- commonfile/fileproto/file.pb.go | 164 +++++++++++++++---------- commonfile/fileproto/protos/file.proto | 1 + 2 files changed, 101 insertions(+), 64 deletions(-) diff --git a/commonfile/fileproto/file.pb.go b/commonfile/fileproto/file.pb.go index e8b87e17..8810c933 100644 --- a/commonfile/fileproto/file.pb.go +++ b/commonfile/fileproto/file.pb.go @@ -1006,10 +1006,11 @@ func (m *AccountInfoRequest) XXX_DiscardUnknown() { var xxx_messageInfo_AccountInfoRequest proto.InternalMessageInfo type AccountInfoResponse struct { - LimitBytes uint64 `protobuf:"varint,1,opt,name=limitBytes,proto3" json:"limitBytes,omitempty"` - TotalUsageBytes uint64 `protobuf:"varint,2,opt,name=totalUsageBytes,proto3" json:"totalUsageBytes,omitempty"` - TotalCidsCount uint64 `protobuf:"varint,3,opt,name=totalCidsCount,proto3" json:"totalCidsCount,omitempty"` - Spaces []*SpaceInfoResponse `protobuf:"bytes,4,rep,name=spaces,proto3" json:"spaces,omitempty"` + LimitBytes uint64 `protobuf:"varint,1,opt,name=limitBytes,proto3" json:"limitBytes,omitempty"` + TotalUsageBytes uint64 `protobuf:"varint,2,opt,name=totalUsageBytes,proto3" json:"totalUsageBytes,omitempty"` + TotalCidsCount uint64 `protobuf:"varint,3,opt,name=totalCidsCount,proto3" json:"totalCidsCount,omitempty"` + Spaces []*SpaceInfoResponse `protobuf:"bytes,4,rep,name=spaces,proto3" json:"spaces,omitempty"` + AccountLimitBytes uint64 `protobuf:"varint,5,opt,name=accountLimitBytes,proto3" json:"accountLimitBytes,omitempty"` } func (m *AccountInfoResponse) Reset() { *m = AccountInfoResponse{} } @@ -1073,6 +1074,13 @@ func (m *AccountInfoResponse) GetSpaces() []*SpaceInfoResponse { return nil } +func (m *AccountInfoResponse) GetAccountLimitBytes() uint64 { + if m != nil { + return m.AccountLimitBytes + } + return 0 +} + type AccountLimitSetRequest struct { Identity string `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"` Limit uint64 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"` @@ -1208,67 +1216,68 @@ func init() { } var fileDescriptor_fd665a7e11c833d5 = []byte{ - // 958 bytes of a gzipped FileDescriptorProto + // 968 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0x41, 0x73, 0xdb, 0x44, - 0x14, 0xb6, 0x6c, 0xd9, 0xb5, 0x5f, 0x62, 0x47, 0x7e, 0x49, 0x83, 0x71, 0x83, 0xc6, 0xa3, 0x43, - 0x27, 0xd3, 0x61, 0x52, 0x26, 0x85, 0xa1, 0x97, 0x1e, 0x62, 0xc7, 0xa6, 0x6e, 0x99, 0x06, 0x94, - 0xe9, 0x74, 0x80, 0x0b, 0xb2, 0xb4, 0x4e, 0x44, 0x14, 0x6d, 0xd0, 0xae, 0x21, 0xe1, 0x57, 0x70, - 0xe5, 0xbf, 0xf0, 0x03, 0x7a, 0xec, 0x91, 0x1b, 0x4c, 0x32, 0xfc, 0x0f, 0x66, 0x57, 0x92, 0xb5, - 0x92, 0xdc, 0x86, 0x81, 0x5e, 0x9c, 0xdd, 0x6f, 0xdf, 0x7b, 0xdf, 0x7b, 0xdf, 0x6a, 0xdf, 0x0b, - 0xdc, 0x77, 0xe9, 0xf9,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, 0xdb, 0xc8, 0xce, 0x8e, 0xce, 0xf0, + 0x39, 0xac, 0x2b, 0x43, 0x0d, 0x77, 0x0b, 0x8e, 0xb9, 0x79, 0xd9, 0xfb, 0xe8, 0x1d, 0xa7, 0x49, + 0x0a, 0x9f, 0x01, 0x64, 0xf3, 0x05, 0x8b, 0xb3, 0x4f, 0x9d, 0x3a, 0xe5, 0x24, 0x94, 0x9e, 0xaf, + 0x26, 0x51, 0x1e, 0x2a, 0x6a, 0x12, 0x2b, 0x06, 0x05, 0x1e, 0x42, 0x73, 0xd9, 0xe0, 0x55, 0x1d, + 0x8a, 0xd3, 0xa3, 0x77, 0x6f, 0xe5, 0x59, 0x12, 0xe5, 0x09, 0xd4, 0x62, 0x41, 0x76, 0x32, 0xab, + 0x9c, 0x14, 0x1f, 0x94, 0xf0, 0x8c, 0x7f, 0xf9, 0x24, 0x55, 0xfe, 0x62, 0xbf, 0xed, 0xbd, 0xef, + 0x0d, 0x0b, 0x45, 0x94, 0xce, 0xa3, 0x2a, 0x52, 0xee, 0x53, 0xaa, 0x22, 0xab, 0xda, 0xd5, 0x00, + 0x36, 0x0b, 0x2f, 0x1b, 0xfb, 0x25, 0x8f, 0xc2, 0x53, 0x2d, 0x5c, 0xd0, 0x53, 0x68, 0xe5, 0x1e, + 0x34, 0x9a, 0x85, 0xe4, 0xdf, 0xeb, 0x3e, 0xdc, 0x7f, 0x73, 0x6d, 0x6a, 0x6f, 0xaf, 0x4d, 0xed, + 0x8f, 0x6b, 0x53, 0xfb, 0xe5, 0xc6, 0x5c, 0x7b, 0x7b, 0x63, 0xae, 0xfd, 0x76, 0x63, 0xae, 0x7d, + 0xb3, 0xbd, 0xea, 0x9f, 0xd6, 0x59, 0x5d, 0xfe, 0x79, 0xfc, 0x77, 0x00, 0x00, 0x00, 0xff, 0xff, + 0x4b, 0x8e, 0xdd, 0x95, 0xd3, 0x0a, 0x00, 0x00, } func (m *Ok) Marshal() (dAtA []byte, err error) { @@ -1947,6 +1956,11 @@ func (m *AccountInfoResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.AccountLimitBytes != 0 { + i = encodeVarintFile(dAtA, i, uint64(m.AccountLimitBytes)) + i-- + dAtA[i] = 0x28 + } if len(m.Spaces) > 0 { for iNdEx := len(m.Spaces) - 1; iNdEx >= 0; iNdEx-- { { @@ -2380,6 +2394,9 @@ func (m *AccountInfoResponse) Size() (n int) { n += 1 + l + sovFile(uint64(l)) } } + if m.AccountLimitBytes != 0 { + n += 1 + sovFile(uint64(m.AccountLimitBytes)) + } return n } @@ -4397,6 +4414,25 @@ func (m *AccountInfoResponse) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field AccountLimitBytes", wireType) + } + m.AccountLimitBytes = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFile + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.AccountLimitBytes |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipFile(dAtA[iNdEx:]) diff --git a/commonfile/fileproto/protos/file.proto b/commonfile/fileproto/protos/file.proto index d2a09392..427c03c4 100644 --- a/commonfile/fileproto/protos/file.proto +++ b/commonfile/fileproto/protos/file.proto @@ -135,6 +135,7 @@ message AccountInfoResponse { uint64 totalUsageBytes = 2; uint64 totalCidsCount = 3; repeated SpaceInfoResponse spaces = 4; + uint64 accountLimitBytes = 5; } From 68c9a7065d476116ca0a650c2da984d21c4dcdcc Mon Sep 17 00:00:00 2001 From: Sergey Cherepanov Date: Mon, 11 Mar 2024 17:01:47 +0100 Subject: [PATCH 030/140] fileproto comments --- commonfile/fileproto/file.pb.go | 12 +++++++----- commonfile/fileproto/protos/file.proto | 2 ++ 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/commonfile/fileproto/file.pb.go b/commonfile/fileproto/file.pb.go index 8810c933..085b7c98 100644 --- a/commonfile/fileproto/file.pb.go +++ b/commonfile/fileproto/file.pb.go @@ -1006,11 +1006,13 @@ func (m *AccountInfoRequest) XXX_DiscardUnknown() { var xxx_messageInfo_AccountInfoRequest proto.InternalMessageInfo type AccountInfoResponse struct { - LimitBytes uint64 `protobuf:"varint,1,opt,name=limitBytes,proto3" json:"limitBytes,omitempty"` - TotalUsageBytes uint64 `protobuf:"varint,2,opt,name=totalUsageBytes,proto3" json:"totalUsageBytes,omitempty"` - TotalCidsCount uint64 `protobuf:"varint,3,opt,name=totalCidsCount,proto3" json:"totalCidsCount,omitempty"` - Spaces []*SpaceInfoResponse `protobuf:"bytes,4,rep,name=spaces,proto3" json:"spaces,omitempty"` - AccountLimitBytes uint64 `protobuf:"varint,5,opt,name=accountLimitBytes,proto3" json:"accountLimitBytes,omitempty"` + // the shared limit excluding isolated spaces + LimitBytes uint64 `protobuf:"varint,1,opt,name=limitBytes,proto3" json:"limitBytes,omitempty"` + TotalUsageBytes uint64 `protobuf:"varint,2,opt,name=totalUsageBytes,proto3" json:"totalUsageBytes,omitempty"` + TotalCidsCount uint64 `protobuf:"varint,3,opt,name=totalCidsCount,proto3" json:"totalCidsCount,omitempty"` + Spaces []*SpaceInfoResponse `protobuf:"bytes,4,rep,name=spaces,proto3" json:"spaces,omitempty"` + // the total limit including isolated spaces + AccountLimitBytes uint64 `protobuf:"varint,5,opt,name=accountLimitBytes,proto3" json:"accountLimitBytes,omitempty"` } func (m *AccountInfoResponse) Reset() { *m = AccountInfoResponse{} } diff --git a/commonfile/fileproto/protos/file.proto b/commonfile/fileproto/protos/file.proto index 427c03c4..994a6ffa 100644 --- a/commonfile/fileproto/protos/file.proto +++ b/commonfile/fileproto/protos/file.proto @@ -131,10 +131,12 @@ message AccountInfoRequest { } message AccountInfoResponse { + // the shared limit excluding isolated spaces uint64 limitBytes = 1; uint64 totalUsageBytes = 2; uint64 totalCidsCount = 3; repeated SpaceInfoResponse spaces = 4; + // the total limit including isolated spaces uint64 accountLimitBytes = 5; } From ef9e107496168468e80b43b09dedad1716dad96e Mon Sep 17 00:00:00 2001 From: Anton Akentev Date: Mon, 11 Mar 2024 17:03:23 +0000 Subject: [PATCH 031/140] NS: Add GetNameByAnyId method --- .../mock/mock_nameserviceclient.go | 30 +++ .../nameserviceclient/nameserviceclient.go | 11 + .../nameserviceproto/nameservice.pb.go | 228 +++++++++++++++--- .../nameserviceproto/nameservice_drpc.pb.go | 42 +++- .../nameserviceproto/protos/nameservice.proto | 7 + 5 files changed, 289 insertions(+), 29 deletions(-) diff --git a/nameservice/nameserviceclient/mock/mock_nameserviceclient.go b/nameservice/nameserviceclient/mock/mock_nameserviceclient.go index e240df51..340b1208 100644 --- a/nameservice/nameserviceclient/mock/mock_nameserviceclient.go +++ b/nameservice/nameserviceclient/mock/mock_nameserviceclient.go @@ -55,6 +55,21 @@ func (mr *MockAnyNsClientServiceBaseMockRecorder) GetNameByAddress(ctx, in any) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetNameByAddress", reflect.TypeOf((*MockAnyNsClientServiceBase)(nil).GetNameByAddress), ctx, in) } +// GetNameByAnyId mocks base method. +func (m *MockAnyNsClientServiceBase) GetNameByAnyId(ctx context.Context, in *nameserviceproto.NameByAnyIdRequest) (*nameserviceproto.NameByAddressResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetNameByAnyId", ctx, in) + ret0, _ := ret[0].(*nameserviceproto.NameByAddressResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetNameByAnyId indicates an expected call of GetNameByAnyId. +func (mr *MockAnyNsClientServiceBaseMockRecorder) GetNameByAnyId(ctx, in any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetNameByAnyId", reflect.TypeOf((*MockAnyNsClientServiceBase)(nil).GetNameByAnyId), ctx, in) +} + // Init mocks base method. func (m *MockAnyNsClientServiceBase) Init(a *app.App) error { m.ctrl.T.Helper() @@ -181,6 +196,21 @@ func (mr *MockAnyNsClientServiceMockRecorder) GetNameByAddress(ctx, in any) *gom return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetNameByAddress", reflect.TypeOf((*MockAnyNsClientService)(nil).GetNameByAddress), ctx, in) } +// GetNameByAnyId mocks base method. +func (m *MockAnyNsClientService) GetNameByAnyId(ctx context.Context, in *nameserviceproto.NameByAnyIdRequest) (*nameserviceproto.NameByAddressResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetNameByAnyId", ctx, in) + ret0, _ := ret[0].(*nameserviceproto.NameByAddressResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetNameByAnyId indicates an expected call of GetNameByAnyId. +func (mr *MockAnyNsClientServiceMockRecorder) GetNameByAnyId(ctx, in any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetNameByAnyId", reflect.TypeOf((*MockAnyNsClientService)(nil).GetNameByAnyId), ctx, in) +} + // GetOperation mocks base method. func (m *MockAnyNsClientService) GetOperation(ctx context.Context, in *nameserviceproto.GetOperationStatusRequest) (*nameserviceproto.OperationResponse, error) { m.ctrl.T.Helper() diff --git a/nameservice/nameserviceclient/nameserviceclient.go b/nameservice/nameserviceclient/nameserviceclient.go index 4aa9a4ac..bb9742f4 100644 --- a/nameservice/nameserviceclient/nameserviceclient.go +++ b/nameservice/nameserviceclient/nameserviceclient.go @@ -26,6 +26,7 @@ type AnyNsClientServiceBase interface { IsNameAvailable(ctx context.Context, in *nsp.NameAvailableRequest) (out *nsp.NameAvailableResponse, err error) // reverse resolve GetNameByAddress(ctx context.Context, in *nsp.NameByAddressRequest) (out *nsp.NameByAddressResponse, err error) + GetNameByAnyId(ctx context.Context, in *nsp.NameByAnyIdRequest) (out *nsp.NameByAddressResponse, err error) app.Component } @@ -125,6 +126,16 @@ func (s *service) GetNameByAddress(ctx context.Context, in *nsp.NameByAddressReq return } +func (s *service) GetNameByAnyId(ctx context.Context, in *nsp.NameByAnyIdRequest) (out *nsp.NameByAddressResponse, err error) { + err = s.doClient(ctx, func(cl nsp.DRPCAnynsClient) error { + if out, err = cl.GetNameByAnyId(ctx, in); err != nil { + return rpcerr.Unwrap(err) + } + return nil + }) + return +} + // AA func (s *service) GetUserAccount(ctx context.Context, in *nsp.GetUserAccountRequest) (out *nsp.UserAccount, err error) { err = s.doClientAA(ctx, func(cl nsp.DRPCAnynsAccountAbstractionClient) error { diff --git a/nameservice/nameserviceproto/nameservice.pb.go b/nameservice/nameserviceproto/nameservice.pb.go index 6b7f96f4..e038dd0a 100644 --- a/nameservice/nameserviceproto/nameservice.pb.go +++ b/nameservice/nameserviceproto/nameservice.pb.go @@ -113,6 +113,50 @@ func (m *NameByAddressRequest) GetOwnerScwEthAddress() string { return "" } +type NameByAnyIdRequest struct { + AnyAddress string `protobuf:"bytes,1,opt,name=anyAddress,proto3" json:"anyAddress,omitempty"` +} + +func (m *NameByAnyIdRequest) Reset() { *m = NameByAnyIdRequest{} } +func (m *NameByAnyIdRequest) String() string { return proto.CompactTextString(m) } +func (*NameByAnyIdRequest) ProtoMessage() {} +func (*NameByAnyIdRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_06bca2ea4304f305, []int{2} +} +func (m *NameByAnyIdRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NameByAnyIdRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NameByAnyIdRequest.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 *NameByAnyIdRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_NameByAnyIdRequest.Merge(m, src) +} +func (m *NameByAnyIdRequest) XXX_Size() int { + return m.Size() +} +func (m *NameByAnyIdRequest) XXX_DiscardUnknown() { + xxx_messageInfo_NameByAnyIdRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_NameByAnyIdRequest proto.InternalMessageInfo + +func (m *NameByAnyIdRequest) GetAnyAddress() string { + if m != nil { + return m.AnyAddress + } + return "" +} + type NameAvailableResponse struct { Available bool `protobuf:"varint,1,opt,name=available,proto3" json:"available,omitempty"` // EOA -> SCW -> name @@ -135,7 +179,7 @@ func (m *NameAvailableResponse) Reset() { *m = NameAvailableResponse{} } func (m *NameAvailableResponse) String() string { return proto.CompactTextString(m) } func (*NameAvailableResponse) ProtoMessage() {} func (*NameAvailableResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_06bca2ea4304f305, []int{2} + return fileDescriptor_06bca2ea4304f305, []int{3} } func (m *NameAvailableResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -215,7 +259,7 @@ func (m *NameByAddressResponse) Reset() { *m = NameByAddressResponse{} } func (m *NameByAddressResponse) String() string { return proto.CompactTextString(m) } func (*NameByAddressResponse) ProtoMessage() {} func (*NameByAddressResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_06bca2ea4304f305, []int{3} + return fileDescriptor_06bca2ea4304f305, []int{4} } func (m *NameByAddressResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -261,6 +305,7 @@ func (m *NameByAddressResponse) GetName() string { func init() { proto.RegisterType((*NameAvailableRequest)(nil), "NameAvailableRequest") proto.RegisterType((*NameByAddressRequest)(nil), "NameByAddressRequest") + proto.RegisterType((*NameByAnyIdRequest)(nil), "NameByAnyIdRequest") proto.RegisterType((*NameAvailableResponse)(nil), "NameAvailableResponse") proto.RegisterType((*NameByAddressResponse)(nil), "NameByAddressResponse") } @@ -270,32 +315,34 @@ func init() { } var fileDescriptor_06bca2ea4304f305 = []byte{ - // 396 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x52, 0x4d, 0x6b, 0xea, 0x40, - 0x14, 0xcd, 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x01, - 0x00, 0x00, 0xff, 0xff, 0xd0, 0xac, 0x32, 0x54, 0x48, 0x03, 0x00, 0x00, + // 430 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x53, 0x4d, 0x6f, 0xd3, 0x40, + 0x10, 0xb5, 0xdb, 0xa6, 0xb4, 0x83, 0x44, 0xd1, 0xd0, 0x82, 0x65, 0x55, 0x56, 0xe4, 0x53, 0x4e, + 0xae, 0x54, 0x3e, 0xc4, 0x0d, 0x39, 0xa8, 0xa0, 0x08, 0x09, 0x24, 0xf7, 0xc6, 0x05, 0x6d, 0xe2, + 0x49, 0xb0, 0xe4, 0xac, 0x8d, 0xd7, 0x49, 0xf0, 0xbf, 0xe0, 0x17, 0xf0, 0x7b, 0x38, 0xe6, 0xc8, + 0x11, 0x25, 0xbf, 0x81, 0x3b, 0xf2, 0x7a, 0x1d, 0x6f, 0x3e, 0x25, 0x2e, 0xf6, 0xee, 0x9b, 0xf7, + 0x9e, 0xde, 0x8c, 0xc7, 0xf0, 0x92, 0xb3, 0x31, 0x09, 0xca, 0xa6, 0xd1, 0x80, 0x6e, 0xb4, 0x73, + 0x9a, 0x25, 0x79, 0x72, 0x23, 0x9f, 0x42, 0xc7, 0x3d, 0x09, 0xd9, 0xaf, 0xff, 0x53, 0xf6, 0x85, + 0xb1, 0x4a, 0xe9, 0xde, 0xc2, 0xe5, 0x47, 0x36, 0x26, 0x7f, 0xca, 0xa2, 0x98, 0xf5, 0x63, 0x0a, + 0xe8, 0xdb, 0x84, 0x44, 0x8e, 0x36, 0x9c, 0x0d, 0x27, 0x71, 0x5c, 0xd6, 0x2c, 0xb3, 0x6d, 0x76, + 0xce, 0x83, 0xd5, 0xdd, 0x7d, 0x57, 0x69, 0xba, 0x85, 0x1f, 0x86, 0x19, 0x09, 0x51, 0x6b, 0x3c, + 0xc0, 0x64, 0xc6, 0x29, 0xbb, 0x1f, 0xcc,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xc1, 0x07, 0x78, 0xe6, + 0x87, 0xe3, 0x88, 0x97, 0xf5, 0x80, 0x46, 0x91, 0xc8, 0x29, 0xbb, 0x8f, 0x46, 0x9c, 0x42, 0xb4, + 0x3d, 0x1d, 0x54, 0x56, 0x55, 0xcd, 0x46, 0xef, 0x53, 0x4a, 0x19, 0xcb, 0xa3, 0x84, 0x37, 0x66, + 0xdd, 0x57, 0xbf, 0x16, 0x8e, 0x39, 0x5f, 0x38, 0xe6, 0x9f, 0x85, 0x63, 0xfe, 0x58, 0x3a, 0xc6, + 0x7c, 0xe9, 0x18, 0xbf, 0x97, 0x8e, 0xf1, 0xf9, 0xfa, 0xd0, 0x1f, 0xd6, 0x3f, 0x95, 0xaf, 0xe7, + 0xff, 0x02, 0x00, 0x00, 0xff, 0xff, 0x9c, 0xb9, 0x86, 0xac, 0xbf, 0x03, 0x00, 0x00, } func (m *NameAvailableRequest) Marshal() (dAtA []byte, err error) { @@ -358,6 +405,36 @@ func (m *NameByAddressRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *NameByAnyIdRequest) 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 *NameByAnyIdRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *NameByAnyIdRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.AnyAddress) > 0 { + i -= len(m.AnyAddress) + copy(dAtA[i:], m.AnyAddress) + i = encodeVarintNameservice(dAtA, i, uint64(len(m.AnyAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func (m *NameAvailableResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -501,6 +578,19 @@ func (m *NameByAddressRequest) Size() (n int) { return n } +func (m *NameByAnyIdRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.AnyAddress) + if l > 0 { + n += 1 + l + sovNameservice(uint64(l)) + } + return n +} + func (m *NameAvailableResponse) Size() (n int) { if m == nil { return 0 @@ -718,6 +808,88 @@ func (m *NameByAddressRequest) Unmarshal(dAtA []byte) error { } return nil } +func (m *NameByAnyIdRequest) 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 ErrIntOverflowNameservice + } + 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: NameByAnyIdRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NameByAnyIdRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AnyAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowNameservice + } + 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 ErrInvalidLengthNameservice + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthNameservice + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AnyAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipNameservice(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthNameservice + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *NameAvailableResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/nameservice/nameserviceproto/nameservice_drpc.pb.go b/nameservice/nameserviceproto/nameservice_drpc.pb.go index bc8437e2..d9b3698e 100644 --- a/nameservice/nameserviceproto/nameservice_drpc.pb.go +++ b/nameservice/nameserviceproto/nameservice_drpc.pb.go @@ -42,6 +42,7 @@ type DRPCAnynsClient interface { IsNameAvailable(ctx context.Context, in *NameAvailableRequest) (*NameAvailableResponse, error) GetNameByAddress(ctx context.Context, in *NameByAddressRequest) (*NameByAddressResponse, error) + GetNameByAnyId(ctx context.Context, in *NameByAnyIdRequest) (*NameByAddressResponse, error) AdminNameRegisterSigned(ctx context.Context, in *NameRegisterRequestSigned) (*OperationResponse, error) } @@ -73,6 +74,15 @@ func (c *drpcAnynsClient) GetNameByAddress(ctx context.Context, in *NameByAddres return out, nil } +func (c *drpcAnynsClient) GetNameByAnyId(ctx context.Context, in *NameByAnyIdRequest) (*NameByAddressResponse, error) { + out := new(NameByAddressResponse) + err := c.cc.Invoke(ctx, "/Anyns/GetNameByAnyId", drpcEncoding_File_nameservice_nameserviceproto_protos_nameservice_proto{}, in, out) + if err != nil { + return nil, err + } + return out, nil +} + func (c *drpcAnynsClient) AdminNameRegisterSigned(ctx context.Context, in *NameRegisterRequestSigned) (*OperationResponse, error) { out := new(OperationResponse) err := c.cc.Invoke(ctx, "/Anyns/AdminNameRegisterSigned", drpcEncoding_File_nameservice_nameserviceproto_protos_nameservice_proto{}, in, out) @@ -85,6 +95,7 @@ func (c *drpcAnynsClient) AdminNameRegisterSigned(ctx context.Context, in *NameR type DRPCAnynsServer interface { IsNameAvailable(context.Context, *NameAvailableRequest) (*NameAvailableResponse, error) GetNameByAddress(context.Context, *NameByAddressRequest) (*NameByAddressResponse, error) + GetNameByAnyId(context.Context, *NameByAnyIdRequest) (*NameByAddressResponse, error) AdminNameRegisterSigned(context.Context, *NameRegisterRequestSigned) (*OperationResponse, error) } @@ -98,13 +109,17 @@ func (s *DRPCAnynsUnimplementedServer) GetNameByAddress(context.Context, *NameBy return nil, drpcerr.WithCode(errors.New("Unimplemented"), drpcerr.Unimplemented) } +func (s *DRPCAnynsUnimplementedServer) GetNameByAnyId(context.Context, *NameByAnyIdRequest) (*NameByAddressResponse, error) { + return nil, drpcerr.WithCode(errors.New("Unimplemented"), drpcerr.Unimplemented) +} + func (s *DRPCAnynsUnimplementedServer) AdminNameRegisterSigned(context.Context, *NameRegisterRequestSigned) (*OperationResponse, error) { return nil, drpcerr.WithCode(errors.New("Unimplemented"), drpcerr.Unimplemented) } type DRPCAnynsDescription struct{} -func (DRPCAnynsDescription) NumMethods() int { return 3 } +func (DRPCAnynsDescription) NumMethods() int { return 4 } func (DRPCAnynsDescription) Method(n int) (string, drpc.Encoding, drpc.Receiver, interface{}, bool) { switch n { @@ -127,6 +142,15 @@ func (DRPCAnynsDescription) Method(n int) (string, drpc.Encoding, drpc.Receiver, ) }, DRPCAnynsServer.GetNameByAddress, true case 2: + return "/Anyns/GetNameByAnyId", drpcEncoding_File_nameservice_nameserviceproto_protos_nameservice_proto{}, + func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) { + return srv.(DRPCAnynsServer). + GetNameByAnyId( + ctx, + in1.(*NameByAnyIdRequest), + ) + }, DRPCAnynsServer.GetNameByAnyId, true + case 3: return "/Anyns/AdminNameRegisterSigned", drpcEncoding_File_nameservice_nameserviceproto_protos_nameservice_proto{}, func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) { return srv.(DRPCAnynsServer). @@ -176,6 +200,22 @@ func (x *drpcAnyns_GetNameByAddressStream) SendAndClose(m *NameByAddressResponse return x.CloseSend() } +type DRPCAnyns_GetNameByAnyIdStream interface { + drpc.Stream + SendAndClose(*NameByAddressResponse) error +} + +type drpcAnyns_GetNameByAnyIdStream struct { + drpc.Stream +} + +func (x *drpcAnyns_GetNameByAnyIdStream) SendAndClose(m *NameByAddressResponse) error { + if err := x.MsgSend(m, drpcEncoding_File_nameservice_nameserviceproto_protos_nameservice_proto{}); err != nil { + return err + } + return x.CloseSend() +} + type DRPCAnyns_AdminNameRegisterSignedStream interface { drpc.Stream SendAndClose(*OperationResponse) error diff --git a/nameservice/nameserviceproto/protos/nameservice.proto b/nameservice/nameserviceproto/protos/nameservice.proto index 23deb31e..86a42b54 100644 --- a/nameservice/nameserviceproto/protos/nameservice.proto +++ b/nameservice/nameserviceproto/protos/nameservice.proto @@ -15,6 +15,10 @@ message NameByAddressRequest { string ownerScwEthAddress = 1; } +message NameByAnyIdRequest { + string anyAddress = 1; +} + message NameAvailableResponse { bool available = 1; @@ -51,6 +55,9 @@ service Anyns { // Reverse lookup: address -> name rpc GetNameByAddress(NameByAddressRequest) returns (NameByAddressResponse) {} + // Reverse lookup: ANY ID -> name + rpc GetNameByAnyId(NameByAnyIdRequest) returns (NameByAddressResponse) {} + // Register new name for the user (on behalf of the user) // Anytype CAN only register names for users, but can not transfer or update them! rpc AdminNameRegisterSigned(NameRegisterRequestSigned) returns (OperationResponse) {} From 95aaeab31ff43e39b2a603f2e9a72c6d12af7593 Mon Sep 17 00:00:00 2001 From: Sergey Cherepanov Date: Tue, 12 Mar 2024 14:12:38 +0100 Subject: [PATCH 032/140] fileproto: FilesGet method --- commonfile/fileproto/file.pb.go | 431 +++++++++++++++++++++---- commonfile/fileproto/file_drpc.pb.go | 78 ++++- commonfile/fileproto/protos/file.proto | 9 + 3 files changed, 443 insertions(+), 75 deletions(-) diff --git a/commonfile/fileproto/file.pb.go b/commonfile/fileproto/file.pb.go index 085b7c98..47806ed0 100644 --- a/commonfile/fileproto/file.pb.go +++ b/commonfile/fileproto/file.pb.go @@ -753,6 +753,86 @@ func (m *FileInfo) GetCidsCount() uint32 { return 0 } +type FilesGetRequest struct { +} + +func (m *FilesGetRequest) Reset() { *m = FilesGetRequest{} } +func (m *FilesGetRequest) String() string { return proto.CompactTextString(m) } +func (*FilesGetRequest) ProtoMessage() {} +func (*FilesGetRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_fd665a7e11c833d5, []int{13} +} +func (m *FilesGetRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *FilesGetRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_FilesGetRequest.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 *FilesGetRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_FilesGetRequest.Merge(m, src) +} +func (m *FilesGetRequest) XXX_Size() int { + return m.Size() +} +func (m *FilesGetRequest) XXX_DiscardUnknown() { + xxx_messageInfo_FilesGetRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_FilesGetRequest proto.InternalMessageInfo + +type FilesGetResponse struct { + FileId string `protobuf:"bytes,1,opt,name=fileId,proto3" json:"fileId,omitempty"` +} + +func (m *FilesGetResponse) Reset() { *m = FilesGetResponse{} } +func (m *FilesGetResponse) String() string { return proto.CompactTextString(m) } +func (*FilesGetResponse) ProtoMessage() {} +func (*FilesGetResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_fd665a7e11c833d5, []int{14} +} +func (m *FilesGetResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *FilesGetResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_FilesGetResponse.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 *FilesGetResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_FilesGetResponse.Merge(m, src) +} +func (m *FilesGetResponse) XXX_Size() int { + return m.Size() +} +func (m *FilesGetResponse) XXX_DiscardUnknown() { + xxx_messageInfo_FilesGetResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_FilesGetResponse proto.InternalMessageInfo + +func (m *FilesGetResponse) GetFileId() string { + if m != nil { + return m.FileId + } + return "" +} + type CheckRequest struct { } @@ -760,7 +840,7 @@ func (m *CheckRequest) Reset() { *m = CheckRequest{} } func (m *CheckRequest) String() string { return proto.CompactTextString(m) } func (*CheckRequest) ProtoMessage() {} func (*CheckRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_fd665a7e11c833d5, []int{13} + return fileDescriptor_fd665a7e11c833d5, []int{15} } func (m *CheckRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -798,7 +878,7 @@ func (m *CheckResponse) Reset() { *m = CheckResponse{} } func (m *CheckResponse) String() string { return proto.CompactTextString(m) } func (*CheckResponse) ProtoMessage() {} func (*CheckResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_fd665a7e11c833d5, []int{14} + return fileDescriptor_fd665a7e11c833d5, []int{16} } func (m *CheckResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -849,7 +929,7 @@ func (m *SpaceInfoRequest) Reset() { *m = SpaceInfoRequest{} } func (m *SpaceInfoRequest) String() string { return proto.CompactTextString(m) } func (*SpaceInfoRequest) ProtoMessage() {} func (*SpaceInfoRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_fd665a7e11c833d5, []int{15} + return fileDescriptor_fd665a7e11c833d5, []int{17} } func (m *SpaceInfoRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -898,7 +978,7 @@ func (m *SpaceInfoResponse) Reset() { *m = SpaceInfoResponse{} } func (m *SpaceInfoResponse) String() string { return proto.CompactTextString(m) } func (*SpaceInfoResponse) ProtoMessage() {} func (*SpaceInfoResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_fd665a7e11c833d5, []int{16} + return fileDescriptor_fd665a7e11c833d5, []int{18} } func (m *SpaceInfoResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -976,7 +1056,7 @@ func (m *AccountInfoRequest) Reset() { *m = AccountInfoRequest{} } func (m *AccountInfoRequest) String() string { return proto.CompactTextString(m) } func (*AccountInfoRequest) ProtoMessage() {} func (*AccountInfoRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_fd665a7e11c833d5, []int{17} + return fileDescriptor_fd665a7e11c833d5, []int{19} } func (m *AccountInfoRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1019,7 +1099,7 @@ func (m *AccountInfoResponse) Reset() { *m = AccountInfoResponse{} } func (m *AccountInfoResponse) String() string { return proto.CompactTextString(m) } func (*AccountInfoResponse) ProtoMessage() {} func (*AccountInfoResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_fd665a7e11c833d5, []int{18} + return fileDescriptor_fd665a7e11c833d5, []int{20} } func (m *AccountInfoResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1092,7 +1172,7 @@ func (m *AccountLimitSetRequest) Reset() { *m = AccountLimitSetRequest{} func (m *AccountLimitSetRequest) String() string { return proto.CompactTextString(m) } func (*AccountLimitSetRequest) ProtoMessage() {} func (*AccountLimitSetRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_fd665a7e11c833d5, []int{19} + return fileDescriptor_fd665a7e11c833d5, []int{21} } func (m *AccountLimitSetRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1144,7 +1224,7 @@ func (m *SpaceLimitSetRequest) Reset() { *m = SpaceLimitSetRequest{} } func (m *SpaceLimitSetRequest) String() string { return proto.CompactTextString(m) } func (*SpaceLimitSetRequest) ProtoMessage() {} func (*SpaceLimitSetRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_fd665a7e11c833d5, []int{20} + return fileDescriptor_fd665a7e11c833d5, []int{22} } func (m *SpaceLimitSetRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1203,6 +1283,8 @@ func init() { proto.RegisterType((*FilesInfoRequest)(nil), "filesync.FilesInfoRequest") proto.RegisterType((*FilesInfoResponse)(nil), "filesync.FilesInfoResponse") proto.RegisterType((*FileInfo)(nil), "filesync.FileInfo") + proto.RegisterType((*FilesGetRequest)(nil), "filesync.FilesGetRequest") + proto.RegisterType((*FilesGetResponse)(nil), "filesync.FilesGetResponse") proto.RegisterType((*CheckRequest)(nil), "filesync.CheckRequest") proto.RegisterType((*CheckResponse)(nil), "filesync.CheckResponse") proto.RegisterType((*SpaceInfoRequest)(nil), "filesync.SpaceInfoRequest") @@ -1218,68 +1300,70 @@ func init() { } var fileDescriptor_fd665a7e11c833d5 = []byte{ - // 968 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0x41, 0x73, 0xdb, 0x44, - 0x14, 0x8e, 0x6c, 0xd9, 0xb5, 0x5f, 0x62, 0x47, 0x7e, 0x49, 0x83, 0x71, 0x83, 0xc6, 0xa3, 0x43, - 0x27, 0xd3, 0xe9, 0xa4, 0x4c, 0x0a, 0x43, 0x2f, 0x3d, 0xd8, 0x8e, 0x4d, 0xdd, 0x32, 0x0d, 0x28, - 0xd3, 0xe9, 0x00, 0x17, 0x64, 0x69, 0x9d, 0x88, 0x28, 0xda, 0xa0, 0x5d, 0x43, 0xc2, 0xaf, 0xe0, - 0xca, 0x3f, 0xea, 0xb1, 0x47, 0x6e, 0x30, 0xc9, 0x70, 0xe1, 0x57, 0x30, 0xbb, 0x92, 0xac, 0x95, - 0xe4, 0x36, 0x0c, 0x70, 0x71, 0x76, 0xbf, 0x7d, 0xef, 0x7d, 0xef, 0x7d, 0xab, 0x7d, 0x2f, 0x70, - 0xdf, 0xa5, 0xe7, 0xe7, 0x34, 0x9c, 0xfb, 0x01, 0x79, 0x24, 0x7e, 0x2e, 0x22, 0xca, 0xe9, 0x23, - 0xf9, 0xcb, 0x24, 0xb0, 0x2f, 0xd7, 0xd8, 0x10, 0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, 0x1d, - 0x8a, 0xd3, 0xa3, 0x77, 0x6f, 0xe5, 0x59, 0x12, 0xe5, 0x09, 0xd4, 0x62, 0x41, 0x76, 0x32, 0xab, - 0x9c, 0x14, 0x1f, 0x94, 0xf0, 0x8c, 0x7f, 0xf9, 0x24, 0x55, 0xfe, 0x62, 0xbf, 0xed, 0xbd, 0xef, - 0x0d, 0x0b, 0x45, 0x94, 0xce, 0xa3, 0x2a, 0x52, 0xee, 0x53, 0xaa, 0x22, 0xab, 0xda, 0xd5, 0x00, - 0x36, 0x0b, 0x2f, 0x1b, 0xfb, 0x25, 0x8f, 0xc2, 0x53, 0x2d, 0x5c, 0xd0, 0x53, 0x68, 0xe5, 0x1e, - 0x34, 0x9a, 0x85, 0xe4, 0xdf, 0xeb, 0x3e, 0xdc, 0x7f, 0x73, 0x6d, 0x6a, 0x6f, 0xaf, 0x4d, 0xed, - 0x8f, 0x6b, 0x53, 0xfb, 0xe5, 0xc6, 0x5c, 0x7b, 0x7b, 0x63, 0xae, 0xfd, 0x76, 0x63, 0xae, 0x7d, - 0xb3, 0xbd, 0xea, 0x9f, 0xd6, 0x59, 0x5d, 0xfe, 0x79, 0xfc, 0x77, 0x00, 0x00, 0x00, 0xff, 0xff, - 0x4b, 0x8e, 0xdd, 0x95, 0xd3, 0x0a, 0x00, 0x00, + // 1002 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0x4f, 0x6f, 0xdb, 0xb6, + 0x1b, 0xb6, 0x6c, 0xc5, 0xb5, 0xdf, 0xc4, 0xb6, 0xcc, 0xa4, 0xf9, 0xf9, 0xa7, 0x66, 0x86, 0xc1, + 0x43, 0x11, 0x04, 0x45, 0x5a, 0xa4, 0x1b, 0xd6, 0x4b, 0x0f, 0xb6, 0x63, 0xaf, 0x6e, 0x87, 0x66, + 0x53, 0x50, 0x14, 0xdb, 0x2e, 0x93, 0x25, 0x3a, 0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x26, 0x7f, 0x80, 0x5f, 0xc2, 0x76, 0x57, 0x03, 0x8f, 0x33, 0x31, + 0x71, 0xa1, 0x12, 0x85, 0x24, 0xe6, 0x6a, 0x2a, 0x0a, 0xde, 0x16, 0x7b, 0xb4, 0x05, 0x6b, 0xb2, + 0xf1, 0xb4, 0x41, 0xb5, 0xc1, 0x43, 0xd8, 0x92, 0x65, 0x99, 0x91, 0x6e, 0x7f, 0xef, 0x2b, 0xe3, + 0xec, 0xfd, 0x62, 0x41, 0x65, 0x90, 0x24, 0x7d, 0x1a, 0x12, 0x86, 0xea, 0x00, 0x6f, 0x62, 0x72, + 0x79, 0x41, 0x02, 0x4e, 0x42, 0xa7, 0x80, 0x1a, 0xb0, 0xde, 0x1f, 0x1d, 0xbe, 0xa6, 0x7c, 0x48, + 0x67, 0x71, 0xe8, 0x58, 0xa8, 0x06, 0xd5, 0x21, 0x4d, 0xc6, 0x51, 0x18, 0x92, 0xd8, 0x29, 0xa2, + 0x26, 0xd4, 0x64, 0xfe, 0xc1, 0x65, 0x40, 0x48, 0x48, 0x42, 0xa7, 0x84, 0xee, 0x43, 0xf3, 0xcb, + 0x19, 0x49, 0xae, 0x8e, 0xa3, 0x9f, 0xc8, 0x02, 0xb6, 0x85, 0xe3, 0xdb, 0x84, 0xc6, 0x27, 0x2f, + 0x7c, 0x76, 0xea, 0xac, 0x21, 0x04, 0xf5, 0xd7, 0x94, 0x0f, 0x62, 0x3a, 0x3b, 0x39, 0x95, 0x6d, + 0x38, 0x65, 0xe4, 0xc0, 0xfa, 0x20, 0x49, 0x68, 0x72, 0x34, 0x99, 0x30, 0xc2, 0x9d, 0x77, 0xd6, + 0x5e, 0x0f, 0x50, 0x7e, 0x52, 0x8b, 0x50, 0xc2, 0xf7, 0x32, 0x62, 0x9c, 0x39, 0x05, 0x04, 0x50, + 0x4e, 0xd7, 0x96, 0xa8, 0x47, 0xad, 0x47, 0xb1, 0x8a, 0x5a, 0x3c, 0xf8, 0xb5, 0x0c, 0x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, 0xad, 0x9f, 0x6f, 0xda, 0x85, 0xf7, 0x37, 0xed, 0xc2, 0x6f, 0x37, + 0xed, 0xc2, 0xd7, 0x5b, 0xab, 0xfe, 0x71, 0x1e, 0x97, 0xe5, 0x9f, 0xa7, 0x7f, 0x05, 0x00, 0x00, + 0xff, 0xff, 0x8e, 0xc9, 0x8d, 0x4c, 0x57, 0x0b, 0x00, 0x00, } func (m *Ok) Marshal() (dAtA []byte, err error) { @@ -1765,6 +1849,59 @@ func (m *FileInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *FilesGetRequest) 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 *FilesGetRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *FilesGetRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *FilesGetResponse) 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 *FilesGetResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *FilesGetResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.FileId) > 0 { + i -= len(m.FileId) + copy(dAtA[i:], m.FileId) + i = encodeVarintFile(dAtA, i, uint64(len(m.FileId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func (m *CheckRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -2298,6 +2435,28 @@ func (m *FileInfo) Size() (n int) { return n } +func (m *FilesGetRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *FilesGetResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.FileId) + if l > 0 { + n += 1 + l + sovFile(uint64(l)) + } + return n +} + func (m *CheckRequest) Size() (n int) { if m == nil { return 0 @@ -3835,6 +3994,138 @@ func (m *FileInfo) Unmarshal(dAtA []byte) error { } return nil } +func (m *FilesGetRequest) 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 ErrIntOverflowFile + } + 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: FilesGetRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: FilesGetRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipFile(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthFile + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *FilesGetResponse) 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 ErrIntOverflowFile + } + 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: FilesGetResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: FilesGetResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FileId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFile + } + 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 ErrInvalidLengthFile + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthFile + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FileId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipFile(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthFile + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *CheckRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/commonfile/fileproto/file_drpc.pb.go b/commonfile/fileproto/file_drpc.pb.go index be40b2c9..1f5e4ea0 100644 --- a/commonfile/fileproto/file_drpc.pb.go +++ b/commonfile/fileproto/file_drpc.pb.go @@ -46,6 +46,7 @@ type DRPCFileClient interface { BlocksBind(ctx context.Context, in *BlocksBindRequest) (*Ok, error) FilesDelete(ctx context.Context, in *FilesDeleteRequest) (*FilesDeleteResponse, error) FilesInfo(ctx context.Context, in *FilesInfoRequest) (*FilesInfoResponse, error) + FilesGet(ctx context.Context, in *FilesGetRequest) (DRPCFile_FilesGetClient, error) Check(ctx context.Context, in *CheckRequest) (*CheckResponse, error) SpaceInfo(ctx context.Context, in *SpaceInfoRequest) (*SpaceInfoResponse, error) AccountInfo(ctx context.Context, in *AccountInfoRequest) (*AccountInfoResponse, error) @@ -117,6 +118,46 @@ func (c *drpcFileClient) FilesInfo(ctx context.Context, in *FilesInfoRequest) (* return out, nil } +func (c *drpcFileClient) FilesGet(ctx context.Context, in *FilesGetRequest) (DRPCFile_FilesGetClient, error) { + stream, err := c.cc.NewStream(ctx, "/filesync.File/FilesGet", drpcEncoding_File_commonfile_fileproto_protos_file_proto{}) + if err != nil { + return nil, err + } + x := &drpcFile_FilesGetClient{stream} + if err := x.MsgSend(in, drpcEncoding_File_commonfile_fileproto_protos_file_proto{}); err != nil { + return nil, err + } + if err := x.CloseSend(); err != nil { + return nil, err + } + return x, nil +} + +type DRPCFile_FilesGetClient interface { + drpc.Stream + Recv() (*FilesGetResponse, error) +} + +type drpcFile_FilesGetClient struct { + drpc.Stream +} + +func (x *drpcFile_FilesGetClient) GetStream() drpc.Stream { + return x.Stream +} + +func (x *drpcFile_FilesGetClient) Recv() (*FilesGetResponse, error) { + m := new(FilesGetResponse) + if err := x.MsgRecv(m, drpcEncoding_File_commonfile_fileproto_protos_file_proto{}); err != nil { + return nil, err + } + return m, nil +} + +func (x *drpcFile_FilesGetClient) RecvMsg(m *FilesGetResponse) error { + return x.MsgRecv(m, drpcEncoding_File_commonfile_fileproto_protos_file_proto{}) +} + func (c *drpcFileClient) Check(ctx context.Context, in *CheckRequest) (*CheckResponse, error) { out := new(CheckResponse) err := c.cc.Invoke(ctx, "/filesync.File/Check", drpcEncoding_File_commonfile_fileproto_protos_file_proto{}, in, out) @@ -169,6 +210,7 @@ type DRPCFileServer interface { BlocksBind(context.Context, *BlocksBindRequest) (*Ok, error) FilesDelete(context.Context, *FilesDeleteRequest) (*FilesDeleteResponse, error) FilesInfo(context.Context, *FilesInfoRequest) (*FilesInfoResponse, error) + FilesGet(*FilesGetRequest, DRPCFile_FilesGetStream) error Check(context.Context, *CheckRequest) (*CheckResponse, error) SpaceInfo(context.Context, *SpaceInfoRequest) (*SpaceInfoResponse, error) AccountInfo(context.Context, *AccountInfoRequest) (*AccountInfoResponse, error) @@ -202,6 +244,10 @@ func (s *DRPCFileUnimplementedServer) FilesInfo(context.Context, *FilesInfoReque return nil, drpcerr.WithCode(errors.New("Unimplemented"), drpcerr.Unimplemented) } +func (s *DRPCFileUnimplementedServer) FilesGet(*FilesGetRequest, DRPCFile_FilesGetStream) error { + return drpcerr.WithCode(errors.New("Unimplemented"), drpcerr.Unimplemented) +} + func (s *DRPCFileUnimplementedServer) Check(context.Context, *CheckRequest) (*CheckResponse, error) { return nil, drpcerr.WithCode(errors.New("Unimplemented"), drpcerr.Unimplemented) } @@ -224,7 +270,7 @@ func (s *DRPCFileUnimplementedServer) SpaceLimitSet(context.Context, *SpaceLimit type DRPCFileDescription struct{} -func (DRPCFileDescription) NumMethods() int { return 11 } +func (DRPCFileDescription) NumMethods() int { return 12 } func (DRPCFileDescription) Method(n int) (string, drpc.Encoding, drpc.Receiver, interface{}, bool) { switch n { @@ -283,6 +329,15 @@ func (DRPCFileDescription) Method(n int) (string, drpc.Encoding, drpc.Receiver, ) }, DRPCFileServer.FilesInfo, true case 6: + return "/filesync.File/FilesGet", drpcEncoding_File_commonfile_fileproto_protos_file_proto{}, + func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) { + return nil, srv.(DRPCFileServer). + FilesGet( + in1.(*FilesGetRequest), + &drpcFile_FilesGetStream{in2.(drpc.Stream)}, + ) + }, DRPCFileServer.FilesGet, true + case 7: return "/filesync.File/Check", drpcEncoding_File_commonfile_fileproto_protos_file_proto{}, func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) { return srv.(DRPCFileServer). @@ -291,7 +346,7 @@ func (DRPCFileDescription) Method(n int) (string, drpc.Encoding, drpc.Receiver, in1.(*CheckRequest), ) }, DRPCFileServer.Check, true - case 7: + case 8: return "/filesync.File/SpaceInfo", drpcEncoding_File_commonfile_fileproto_protos_file_proto{}, func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) { return srv.(DRPCFileServer). @@ -300,7 +355,7 @@ func (DRPCFileDescription) Method(n int) (string, drpc.Encoding, drpc.Receiver, in1.(*SpaceInfoRequest), ) }, DRPCFileServer.SpaceInfo, true - case 8: + case 9: return "/filesync.File/AccountInfo", drpcEncoding_File_commonfile_fileproto_protos_file_proto{}, func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) { return srv.(DRPCFileServer). @@ -309,7 +364,7 @@ func (DRPCFileDescription) Method(n int) (string, drpc.Encoding, drpc.Receiver, in1.(*AccountInfoRequest), ) }, DRPCFileServer.AccountInfo, true - case 9: + case 10: return "/filesync.File/AccountLimitSet", drpcEncoding_File_commonfile_fileproto_protos_file_proto{}, func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) { return srv.(DRPCFileServer). @@ -318,7 +373,7 @@ func (DRPCFileDescription) Method(n int) (string, drpc.Encoding, drpc.Receiver, in1.(*AccountLimitSetRequest), ) }, DRPCFileServer.AccountLimitSet, true - case 10: + case 11: return "/filesync.File/SpaceLimitSet", drpcEncoding_File_commonfile_fileproto_protos_file_proto{}, func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) { return srv.(DRPCFileServer). @@ -432,6 +487,19 @@ func (x *drpcFile_FilesInfoStream) SendAndClose(m *FilesInfoResponse) error { return x.CloseSend() } +type DRPCFile_FilesGetStream interface { + drpc.Stream + Send(*FilesGetResponse) error +} + +type drpcFile_FilesGetStream struct { + drpc.Stream +} + +func (x *drpcFile_FilesGetStream) Send(m *FilesGetResponse) error { + return x.MsgSend(m, drpcEncoding_File_commonfile_fileproto_protos_file_proto{}) +} + type DRPCFile_CheckStream interface { drpc.Stream SendAndClose(*CheckResponse) error diff --git a/commonfile/fileproto/protos/file.proto b/commonfile/fileproto/protos/file.proto index 994a6ffa..b85403a5 100644 --- a/commonfile/fileproto/protos/file.proto +++ b/commonfile/fileproto/protos/file.proto @@ -27,6 +27,8 @@ service File { rpc FilesDelete(FilesDeleteRequest) returns (FilesDeleteResponse); // FilesInfo return info by given files id rpc FilesInfo(FilesInfoRequest) returns (FilesInfoResponse); + // FilesGet returns a stream that streams all file ids in the space + rpc FilesGet(FilesGetRequest) returns (stream FilesGetResponse); // Check checks the connection and credentials rpc Check(CheckRequest) returns (CheckResponse); // SpaceInfo returns usage, limit, etc about space @@ -107,6 +109,13 @@ message FileInfo { uint32 cidsCount = 3; } +message FilesGetRequest {} + +message FilesGetResponse { + string fileId = 1; +} + + message CheckRequest {} message CheckResponse { From dbff72a85b9fd6fe630d32ee1214d171214deb8d Mon Sep 17 00:00:00 2001 From: Sergey Cherepanov Date: Tue, 12 Mar 2024 14:18:11 +0100 Subject: [PATCH 033/140] fileproto: fix --- commonfile/fileproto/file.pb.go | 179 ++++++++++++++++--------- commonfile/fileproto/protos/file.proto | 4 +- 2 files changed, 118 insertions(+), 65 deletions(-) diff --git a/commonfile/fileproto/file.pb.go b/commonfile/fileproto/file.pb.go index 47806ed0..3840f063 100644 --- a/commonfile/fileproto/file.pb.go +++ b/commonfile/fileproto/file.pb.go @@ -754,6 +754,7 @@ func (m *FileInfo) GetCidsCount() uint32 { } type FilesGetRequest struct { + SpaceId string `protobuf:"bytes,1,opt,name=spaceId,proto3" json:"spaceId,omitempty"` } func (m *FilesGetRequest) Reset() { *m = FilesGetRequest{} } @@ -789,6 +790,13 @@ func (m *FilesGetRequest) XXX_DiscardUnknown() { var xxx_messageInfo_FilesGetRequest proto.InternalMessageInfo +func (m *FilesGetRequest) GetSpaceId() string { + if m != nil { + return m.SpaceId + } + return "" +} + type FilesGetResponse struct { FileId string `protobuf:"bytes,1,opt,name=fileId,proto3" json:"fileId,omitempty"` } @@ -1300,70 +1308,70 @@ func init() { } var fileDescriptor_fd665a7e11c833d5 = []byte{ - // 1002 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56,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e1, 0x34, 0x46, 0xf0, 0x9f, 0x16, 0x6c, 0x2e, - 0xc1, 0xff, 0x79, 0xe7, 0x0f, 0xa1, 0x2e, 0xa1, 0xbe, 0xd1, 0xbe, 0x81, 0xa2, 0xa7, 0x50, 0x96, - 0xa5, 0xb2, 0x96, 0x6d, 0x8e, 0xa5, 0xdc, 0xc5, 0x78, 0xa9, 0x29, 0x7a, 0x04, 0x4d, 0x5f, 0x55, - 0xff, 0x79, 0x56, 0xad, 0xa2, 0x26, 0x7f, 0x80, 0x5f, 0xc2, 0x76, 0x57, 0x03, 0x8f, 0x33, 0x31, - 0x71, 0xa1, 0x12, 0x85, 0x24, 0xe6, 0x6a, 0x2a, 0x0a, 0xde, 0x16, 0x7b, 0xb4, 0x05, 0x6b, 0xb2, - 0xf1, 0xb4, 0x41, 0xb5, 0xc1, 0x43, 0xd8, 0x92, 0x65, 0x99, 0x91, 0x6e, 0x7f, 0xef, 0x2b, 0xe3, - 0xec, 0xfd, 0x62, 0x41, 0x65, 0x90, 0x24, 0x7d, 0x1a, 0x12, 0x86, 0xea, 0x00, 0x6f, 0x62, 0x72, - 0x79, 0x41, 0x02, 0x4e, 0x42, 0xa7, 0x80, 0x1a, 0xb0, 0xde, 0x1f, 0x1d, 0xbe, 0xa6, 0x7c, 0x48, - 0x67, 0x71, 0xe8, 0x58, 0xa8, 0x06, 0xd5, 0x21, 0x4d, 0xc6, 0x51, 0x18, 0x92, 0xd8, 0x29, 0xa2, - 0x26, 0xd4, 0x64, 0xfe, 0xc1, 0x65, 0x40, 0x48, 0x48, 0x42, 0xa7, 0x84, 0xee, 0x43, 0xf3, 0xcb, - 0x19, 0x49, 0xae, 0x8e, 0xa3, 0x9f, 0xc8, 0x02, 0xb6, 0x85, 0xe3, 0xdb, 0x84, 0xc6, 0x27, 0x2f, - 0x7c, 0x76, 0xea, 0xac, 0x21, 0x04, 0xf5, 0xd7, 0x94, 0x0f, 0x62, 0x3a, 0x3b, 0x39, 0x95, 0x6d, - 0x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4e, 0x6b, 0x7e, 0xd8, 0xe9, 0xb4, 0xae, 0x9a, - 0x79, 0x5d, 0x68, 0x18, 0xe3, 0x01, 0x75, 0x72, 0x1e, 0xc6, 0x7b, 0x37, 0x6e, 0xf9, 0x39, 0xd4, - 0x96, 0xa6, 0x02, 0x6a, 0x1b, 0xc5, 0x7f, 0xd0, 0xbd, 0xb7, 0xff, 0xee, 0xba, 0x6d, 0xbd, 0xbf, - 0x6e, 0x5b, 0x7f, 0x5c, 0xb7, 0xad, 0x9f, 0x6f, 0xda, 0x85, 0xf7, 0x37, 0xed, 0xc2, 0x6f, 0x37, - 0xed, 0xc2, 0xd7, 0x5b, 0xab, 0xfe, 0x71, 0x1e, 0x97, 0xe5, 0x9f, 0xa7, 0x7f, 0x05, 0x00, 0x00, - 0xff, 0xff, 0x8e, 0xc9, 0x8d, 0x4c, 0x57, 0x0b, 0x00, 0x00, + // 1004 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0x41, 0x73, 0x1b, 0x35, + 0x14, 0xce, 0xda, 0x1b, 0xd7, 0x7e, 0x89, 0xed, 0xb5, 0x92, 0x06, 0xb3, 0x0d, 0x1e, 0x8f, 0x0e, + 0x9d, 0x4c, 0xe8, 0xa4, 0x9d, 0x14, 0x86, 0x5e, 0x7a, 0xb0, 0x1d, 0x9b, 0xba, 0x65, 0x1a, 0xd8, + 0x4c, 0xa7, 0x03, 0x5c, 0x58, 0xef, 0xca, 0xc9, 0x12, 0x67, 0x15, 0x56, 0x32, 0x24, 0xfc, 0x0a, + 0xae, 0xfc, 0x05, 0x7e, 0x49, 0x8f, 0x3d, 0x72, 0x83, 0x49, 0x6e, 0xfc, 0x0a, 0x46, 0xd2, 0xda, + 0x2b, 0x6b, 0x9d, 0xa6, 0x03, 0xbd, 0x38, 0xd2, 0xa7, 0xf7, 0xbe, 0xf7, 0xde, 0xa7, 0xd5, 0x7b, +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1, 0xb8, 0x30, 0x88, 0xdd, 0x4f, + 0x6e, 0x38, 0x4d, 0x53, 0xf8, 0x02, 0x20, 0x1b, 0x5c, 0xc8, 0x1c, 0xaa, 0xfa, 0x38, 0xcb, 0x27, + 0xa1, 0x0d, 0x13, 0x3d, 0x89, 0xfc, 0xb4, 0xd2, 0x93, 0x58, 0x32, 0x81, 0xd0, 0x01, 0x54, 0xe6, + 0x93, 0x43, 0xd7, 0xc1, 0x1c, 0x4b, 0xee, 0xbd, 0xa5, 0x67, 0x29, 0x4b, 0x4f, 0x0d, 0x0e, 0x66, + 0x5c, 0x88, 0xd1, 0xea, 0x5d, 0x77, 0xd9, 0x91, 0xa2, 0x78, 0x64, 0xa1, 0x27, 0xb0, 0xaa, 0x54, + 0xdd, 0xca, 0xcc, 0x16, 0xf4, 0xfc, 0x28, 0x87, 0x67, 0x45, 0xcc, 0xdf, 0xb5, 0x5e, 0x84, 0xd9, + 0xb4, 0xdd, 0x77, 0x35, 0x02, 0x21, 0xab, 0xd6, 0xbe, 0x74, 0x59, 0xf3, 0xcd, 0x4e, 0x97, 0x75, + 0x59, 0xcf, 0xeb, 0x40, 0xdd, 0x68, 0x0f, 0xa8, 0x9d, 0xf3, 0x30, 0xde, 0xbb, 0x71, 0xcb, 0x4f, + 0xa1, 0xba, 0xd0, 0x15, 0x50, 0xcb, 0x48, 0xfe, 0x9d, 0xee, 0xdd, 0xbd, 0x37, 0x57, 0x2d, 0xeb, + 0xed, 0x55, 0xcb, 0xfa, 0xfb, 0xaa, 0x65, 0xfd, 0x76, 0xdd, 0x5a, 0x79, 0x7b, 0xdd, 0x5a, 0xf9, + 0xf3, 0xba, 0xb5, 0xf2, 0xdd, 0xe6, 0xb2, 0x7f, 0xa9, 0x47, 0x25, 0xf9, 0xe7, 0xf1, 0xbf, 0x01, + 0x00, 0x00, 0xff, 0xff, 0xd1, 0x3b, 0x80, 0x72, 0x71, 0x0b, 0x00, 0x00, } func (m *Ok) Marshal() (dAtA []byte, err error) { @@ -1869,6 +1877,13 @@ func (m *FilesGetRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.SpaceId) > 0 { + i -= len(m.SpaceId) + copy(dAtA[i:], m.SpaceId) + i = encodeVarintFile(dAtA, i, uint64(len(m.SpaceId))) + i-- + dAtA[i] = 0xa + } return len(dAtA) - i, nil } @@ -2441,6 +2456,10 @@ func (m *FilesGetRequest) Size() (n int) { } var l int _ = l + l = len(m.SpaceId) + if l > 0 { + n += 1 + l + sovFile(uint64(l)) + } return n } @@ -4023,6 +4042,38 @@ func (m *FilesGetRequest) Unmarshal(dAtA []byte) error { return fmt.Errorf("proto: FilesGetRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SpaceId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFile + } + 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 ErrInvalidLengthFile + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthFile + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SpaceId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipFile(dAtA[iNdEx:]) diff --git a/commonfile/fileproto/protos/file.proto b/commonfile/fileproto/protos/file.proto index b85403a5..fb7b4ba9 100644 --- a/commonfile/fileproto/protos/file.proto +++ b/commonfile/fileproto/protos/file.proto @@ -109,7 +109,9 @@ message FileInfo { uint32 cidsCount = 3; } -message FilesGetRequest {} +message FilesGetRequest { + string spaceId = 1; +} message FilesGetResponse { string fileId = 1; From b387be4bd19d06c3c7ce653988d169ffe992c9ea Mon Sep 17 00:00:00 2001 From: Anton Akentev Date: Tue, 12 Mar 2024 13:22:59 +0000 Subject: [PATCH 034/140] NS: Add batch methods --- .../mock/mock_nameserviceclient.go | 90 ++ .../nameserviceclient/nameserviceclient.go | 36 + .../nameserviceproto/nameservice.pb.go | 960 +++++++++++++++++- .../nameserviceproto/nameservice_drpc.pb.go | 126 ++- .../nameserviceproto/protos/nameservice.proto | 26 + 5 files changed, 1203 insertions(+), 35 deletions(-) diff --git a/nameservice/nameserviceclient/mock/mock_nameserviceclient.go b/nameservice/nameserviceclient/mock/mock_nameserviceclient.go index 340b1208..05c4a2af 100644 --- a/nameservice/nameserviceclient/mock/mock_nameserviceclient.go +++ b/nameservice/nameserviceclient/mock/mock_nameserviceclient.go @@ -40,6 +40,51 @@ func (m *MockAnyNsClientServiceBase) EXPECT() *MockAnyNsClientServiceBaseMockRec return m.recorder } +// BatchGetNameByAddress mocks base method. +func (m *MockAnyNsClientServiceBase) BatchGetNameByAddress(ctx context.Context, in *nameserviceproto.BatchNameByAddressRequest) (*nameserviceproto.BatchNameByAddressResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "BatchGetNameByAddress", ctx, in) + ret0, _ := ret[0].(*nameserviceproto.BatchNameByAddressResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// BatchGetNameByAddress indicates an expected call of BatchGetNameByAddress. +func (mr *MockAnyNsClientServiceBaseMockRecorder) BatchGetNameByAddress(ctx, in any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BatchGetNameByAddress", reflect.TypeOf((*MockAnyNsClientServiceBase)(nil).BatchGetNameByAddress), ctx, in) +} + +// BatchGetNameByAnyId mocks base method. +func (m *MockAnyNsClientServiceBase) BatchGetNameByAnyId(ctx context.Context, in *nameserviceproto.BatchNameByAnyIdRequest) (*nameserviceproto.BatchNameByAddressResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "BatchGetNameByAnyId", ctx, in) + ret0, _ := ret[0].(*nameserviceproto.BatchNameByAddressResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// BatchGetNameByAnyId indicates an expected call of BatchGetNameByAnyId. +func (mr *MockAnyNsClientServiceBaseMockRecorder) BatchGetNameByAnyId(ctx, in any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BatchGetNameByAnyId", reflect.TypeOf((*MockAnyNsClientServiceBase)(nil).BatchGetNameByAnyId), ctx, in) +} + +// BatchIsNameAvailable mocks base method. +func (m *MockAnyNsClientServiceBase) BatchIsNameAvailable(ctx context.Context, in *nameserviceproto.BatchNameAvailableRequest) (*nameserviceproto.BatchNameAvailableResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "BatchIsNameAvailable", ctx, in) + ret0, _ := ret[0].(*nameserviceproto.BatchNameAvailableResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// BatchIsNameAvailable indicates an expected call of BatchIsNameAvailable. +func (mr *MockAnyNsClientServiceBaseMockRecorder) BatchIsNameAvailable(ctx, in any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BatchIsNameAvailable", reflect.TypeOf((*MockAnyNsClientServiceBase)(nil).BatchIsNameAvailable), ctx, in) +} + // GetNameByAddress mocks base method. func (m *MockAnyNsClientServiceBase) GetNameByAddress(ctx context.Context, in *nameserviceproto.NameByAddressRequest) (*nameserviceproto.NameByAddressResponse, error) { m.ctrl.T.Helper() @@ -166,6 +211,51 @@ func (mr *MockAnyNsClientServiceMockRecorder) AdminRegisterName(ctx, in any) *go return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AdminRegisterName", reflect.TypeOf((*MockAnyNsClientService)(nil).AdminRegisterName), ctx, in) } +// BatchGetNameByAddress mocks base method. +func (m *MockAnyNsClientService) BatchGetNameByAddress(ctx context.Context, in *nameserviceproto.BatchNameByAddressRequest) (*nameserviceproto.BatchNameByAddressResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "BatchGetNameByAddress", ctx, in) + ret0, _ := ret[0].(*nameserviceproto.BatchNameByAddressResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// BatchGetNameByAddress indicates an expected call of BatchGetNameByAddress. +func (mr *MockAnyNsClientServiceMockRecorder) BatchGetNameByAddress(ctx, in any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BatchGetNameByAddress", reflect.TypeOf((*MockAnyNsClientService)(nil).BatchGetNameByAddress), ctx, in) +} + +// BatchGetNameByAnyId mocks base method. +func (m *MockAnyNsClientService) BatchGetNameByAnyId(ctx context.Context, in *nameserviceproto.BatchNameByAnyIdRequest) (*nameserviceproto.BatchNameByAddressResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "BatchGetNameByAnyId", ctx, in) + ret0, _ := ret[0].(*nameserviceproto.BatchNameByAddressResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// BatchGetNameByAnyId indicates an expected call of BatchGetNameByAnyId. +func (mr *MockAnyNsClientServiceMockRecorder) BatchGetNameByAnyId(ctx, in any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BatchGetNameByAnyId", reflect.TypeOf((*MockAnyNsClientService)(nil).BatchGetNameByAnyId), ctx, in) +} + +// BatchIsNameAvailable mocks base method. +func (m *MockAnyNsClientService) BatchIsNameAvailable(ctx context.Context, in *nameserviceproto.BatchNameAvailableRequest) (*nameserviceproto.BatchNameAvailableResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "BatchIsNameAvailable", ctx, in) + ret0, _ := ret[0].(*nameserviceproto.BatchNameAvailableResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// BatchIsNameAvailable indicates an expected call of BatchIsNameAvailable. +func (mr *MockAnyNsClientServiceMockRecorder) BatchIsNameAvailable(ctx, in any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BatchIsNameAvailable", reflect.TypeOf((*MockAnyNsClientService)(nil).BatchIsNameAvailable), ctx, in) +} + // CreateOperation mocks base method. func (m *MockAnyNsClientService) CreateOperation(ctx context.Context, in *nameserviceproto.CreateUserOperationRequestSigned) (*nameserviceproto.OperationResponse, error) { m.ctrl.T.Helper() diff --git a/nameservice/nameserviceclient/nameserviceclient.go b/nameservice/nameserviceclient/nameserviceclient.go index bb9742f4..9d0cba24 100644 --- a/nameservice/nameserviceclient/nameserviceclient.go +++ b/nameservice/nameserviceclient/nameserviceclient.go @@ -28,6 +28,11 @@ type AnyNsClientServiceBase interface { GetNameByAddress(ctx context.Context, in *nsp.NameByAddressRequest) (out *nsp.NameByAddressResponse, err error) GetNameByAnyId(ctx context.Context, in *nsp.NameByAnyIdRequest) (out *nsp.NameByAddressResponse, err error) + BatchIsNameAvailable(ctx context.Context, in *nsp.BatchNameAvailableRequest) (out *nsp.BatchNameAvailableResponse, err error) + // reverse resolve + BatchGetNameByAddress(ctx context.Context, in *nsp.BatchNameByAddressRequest) (out *nsp.BatchNameByAddressResponse, err error) + BatchGetNameByAnyId(ctx context.Context, in *nsp.BatchNameByAnyIdRequest) (out *nsp.BatchNameByAddressResponse, err error) + app.Component } @@ -136,6 +141,37 @@ func (s *service) GetNameByAnyId(ctx context.Context, in *nsp.NameByAnyIdRequest return } +func (s *service) BatchIsNameAvailable(ctx context.Context, in *nsp.BatchNameAvailableRequest) (out *nsp.BatchNameAvailableResponse, err error) { + err = s.doClient(ctx, func(cl nsp.DRPCAnynsClient) error { + if out, err = cl.BatchIsNameAvailable(ctx, in); err != nil { + return rpcerr.Unwrap(err) + } + return nil + }) + return +} + +// reverse resolve +func (s *service) BatchGetNameByAddress(ctx context.Context, in *nsp.BatchNameByAddressRequest) (out *nsp.BatchNameByAddressResponse, err error) { + err = s.doClient(ctx, func(cl nsp.DRPCAnynsClient) error { + if out, err = cl.BatchGetNameByAddress(ctx, in); err != nil { + return rpcerr.Unwrap(err) + } + return nil + }) + return +} + +func (s *service) BatchGetNameByAnyId(ctx context.Context, in *nsp.BatchNameByAnyIdRequest) (out *nsp.BatchNameByAddressResponse, err error) { + err = s.doClient(ctx, func(cl nsp.DRPCAnynsClient) error { + if out, err = cl.BatchGetNameByAnyId(ctx, in); err != nil { + return rpcerr.Unwrap(err) + } + return nil + }) + return +} + // AA func (s *service) GetUserAccount(ctx context.Context, in *nsp.GetUserAccountRequest) (out *nsp.UserAccount, err error) { err = s.doClientAA(ctx, func(cl nsp.DRPCAnynsAccountAbstractionClient) error { diff --git a/nameservice/nameserviceproto/nameservice.pb.go b/nameservice/nameserviceproto/nameservice.pb.go index e038dd0a..8bdb1fbf 100644 --- a/nameservice/nameserviceproto/nameservice.pb.go +++ b/nameservice/nameserviceproto/nameservice.pb.go @@ -67,6 +67,51 @@ func (m *NameAvailableRequest) GetFullName() string { return "" } +type BatchNameAvailableRequest struct { + // Names including .any suffix + FullNames []string `protobuf:"bytes,1,rep,name=fullNames,proto3" json:"fullNames,omitempty"` +} + +func (m *BatchNameAvailableRequest) Reset() { *m = BatchNameAvailableRequest{} } +func (m *BatchNameAvailableRequest) String() string { return proto.CompactTextString(m) } +func (*BatchNameAvailableRequest) ProtoMessage() {} +func (*BatchNameAvailableRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_06bca2ea4304f305, []int{1} +} +func (m *BatchNameAvailableRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *BatchNameAvailableRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_BatchNameAvailableRequest.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 *BatchNameAvailableRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_BatchNameAvailableRequest.Merge(m, src) +} +func (m *BatchNameAvailableRequest) XXX_Size() int { + return m.Size() +} +func (m *BatchNameAvailableRequest) XXX_DiscardUnknown() { + xxx_messageInfo_BatchNameAvailableRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_BatchNameAvailableRequest proto.InternalMessageInfo + +func (m *BatchNameAvailableRequest) GetFullNames() []string { + if m != nil { + return m.FullNames + } + return nil +} + type NameByAddressRequest struct { // EOA -> SCW -> name // A SCW Ethereum address that owns that name @@ -77,7 +122,7 @@ func (m *NameByAddressRequest) Reset() { *m = NameByAddressRequest{} } func (m *NameByAddressRequest) String() string { return proto.CompactTextString(m) } func (*NameByAddressRequest) ProtoMessage() {} func (*NameByAddressRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_06bca2ea4304f305, []int{1} + return fileDescriptor_06bca2ea4304f305, []int{2} } func (m *NameByAddressRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -113,6 +158,52 @@ func (m *NameByAddressRequest) GetOwnerScwEthAddress() string { return "" } +type BatchNameByAddressRequest struct { + // EOA -> SCW -> name + // A SCW Ethereum address that owns that name + OwnerScwEthAddresses []string `protobuf:"bytes,1,rep,name=ownerScwEthAddresses,proto3" json:"ownerScwEthAddresses,omitempty"` +} + +func (m *BatchNameByAddressRequest) Reset() { *m = BatchNameByAddressRequest{} } +func (m *BatchNameByAddressRequest) String() string { return proto.CompactTextString(m) } +func (*BatchNameByAddressRequest) ProtoMessage() {} +func (*BatchNameByAddressRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_06bca2ea4304f305, []int{3} +} +func (m *BatchNameByAddressRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *BatchNameByAddressRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_BatchNameByAddressRequest.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 *BatchNameByAddressRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_BatchNameByAddressRequest.Merge(m, src) +} +func (m *BatchNameByAddressRequest) XXX_Size() int { + return m.Size() +} +func (m *BatchNameByAddressRequest) XXX_DiscardUnknown() { + xxx_messageInfo_BatchNameByAddressRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_BatchNameByAddressRequest proto.InternalMessageInfo + +func (m *BatchNameByAddressRequest) GetOwnerScwEthAddresses() []string { + if m != nil { + return m.OwnerScwEthAddresses + } + return nil +} + type NameByAnyIdRequest struct { AnyAddress string `protobuf:"bytes,1,opt,name=anyAddress,proto3" json:"anyAddress,omitempty"` } @@ -121,7 +212,7 @@ func (m *NameByAnyIdRequest) Reset() { *m = NameByAnyIdRequest{} } func (m *NameByAnyIdRequest) String() string { return proto.CompactTextString(m) } func (*NameByAnyIdRequest) ProtoMessage() {} func (*NameByAnyIdRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_06bca2ea4304f305, []int{2} + return fileDescriptor_06bca2ea4304f305, []int{4} } func (m *NameByAnyIdRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -157,6 +248,50 @@ func (m *NameByAnyIdRequest) GetAnyAddress() string { return "" } +type BatchNameByAnyIdRequest struct { + AnyAddresses []string `protobuf:"bytes,1,rep,name=anyAddresses,proto3" json:"anyAddresses,omitempty"` +} + +func (m *BatchNameByAnyIdRequest) Reset() { *m = BatchNameByAnyIdRequest{} } +func (m *BatchNameByAnyIdRequest) String() string { return proto.CompactTextString(m) } +func (*BatchNameByAnyIdRequest) ProtoMessage() {} +func (*BatchNameByAnyIdRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_06bca2ea4304f305, []int{5} +} +func (m *BatchNameByAnyIdRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *BatchNameByAnyIdRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_BatchNameByAnyIdRequest.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 *BatchNameByAnyIdRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_BatchNameByAnyIdRequest.Merge(m, src) +} +func (m *BatchNameByAnyIdRequest) XXX_Size() int { + return m.Size() +} +func (m *BatchNameByAnyIdRequest) XXX_DiscardUnknown() { + xxx_messageInfo_BatchNameByAnyIdRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_BatchNameByAnyIdRequest proto.InternalMessageInfo + +func (m *BatchNameByAnyIdRequest) GetAnyAddresses() []string { + if m != nil { + return m.AnyAddresses + } + return nil +} + type NameAvailableResponse struct { Available bool `protobuf:"varint,1,opt,name=available,proto3" json:"available,omitempty"` // EOA -> SCW -> name @@ -179,7 +314,7 @@ func (m *NameAvailableResponse) Reset() { *m = NameAvailableResponse{} } func (m *NameAvailableResponse) String() string { return proto.CompactTextString(m) } func (*NameAvailableResponse) ProtoMessage() {} func (*NameAvailableResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_06bca2ea4304f305, []int{3} + return fileDescriptor_06bca2ea4304f305, []int{6} } func (m *NameAvailableResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -250,6 +385,50 @@ func (m *NameAvailableResponse) GetNameExpires() int64 { return 0 } +type BatchNameAvailableResponse struct { + Results []*NameAvailableResponse `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"` +} + +func (m *BatchNameAvailableResponse) Reset() { *m = BatchNameAvailableResponse{} } +func (m *BatchNameAvailableResponse) String() string { return proto.CompactTextString(m) } +func (*BatchNameAvailableResponse) ProtoMessage() {} +func (*BatchNameAvailableResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_06bca2ea4304f305, []int{7} +} +func (m *BatchNameAvailableResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *BatchNameAvailableResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_BatchNameAvailableResponse.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 *BatchNameAvailableResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_BatchNameAvailableResponse.Merge(m, src) +} +func (m *BatchNameAvailableResponse) XXX_Size() int { + return m.Size() +} +func (m *BatchNameAvailableResponse) XXX_DiscardUnknown() { + xxx_messageInfo_BatchNameAvailableResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_BatchNameAvailableResponse proto.InternalMessageInfo + +func (m *BatchNameAvailableResponse) GetResults() []*NameAvailableResponse { + if m != nil { + return m.Results + } + return nil +} + type NameByAddressResponse struct { Found bool `protobuf:"varint,1,opt,name=found,proto3" json:"found,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` @@ -259,7 +438,7 @@ func (m *NameByAddressResponse) Reset() { *m = NameByAddressResponse{} } func (m *NameByAddressResponse) String() string { return proto.CompactTextString(m) } func (*NameByAddressResponse) ProtoMessage() {} func (*NameByAddressResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_06bca2ea4304f305, []int{4} + return fileDescriptor_06bca2ea4304f305, []int{8} } func (m *NameByAddressResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -302,12 +481,61 @@ func (m *NameByAddressResponse) GetName() string { return "" } +type BatchNameByAddressResponse struct { + Results []*NameByAddressResponse `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"` +} + +func (m *BatchNameByAddressResponse) Reset() { *m = BatchNameByAddressResponse{} } +func (m *BatchNameByAddressResponse) String() string { return proto.CompactTextString(m) } +func (*BatchNameByAddressResponse) ProtoMessage() {} +func (*BatchNameByAddressResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_06bca2ea4304f305, []int{9} +} +func (m *BatchNameByAddressResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *BatchNameByAddressResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_BatchNameByAddressResponse.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 *BatchNameByAddressResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_BatchNameByAddressResponse.Merge(m, src) +} +func (m *BatchNameByAddressResponse) XXX_Size() int { + return m.Size() +} +func (m *BatchNameByAddressResponse) XXX_DiscardUnknown() { + xxx_messageInfo_BatchNameByAddressResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_BatchNameByAddressResponse proto.InternalMessageInfo + +func (m *BatchNameByAddressResponse) GetResults() []*NameByAddressResponse { + if m != nil { + return m.Results + } + return nil +} + func init() { proto.RegisterType((*NameAvailableRequest)(nil), "NameAvailableRequest") + proto.RegisterType((*BatchNameAvailableRequest)(nil), "BatchNameAvailableRequest") proto.RegisterType((*NameByAddressRequest)(nil), "NameByAddressRequest") + proto.RegisterType((*BatchNameByAddressRequest)(nil), "BatchNameByAddressRequest") proto.RegisterType((*NameByAnyIdRequest)(nil), "NameByAnyIdRequest") + proto.RegisterType((*BatchNameByAnyIdRequest)(nil), "BatchNameByAnyIdRequest") proto.RegisterType((*NameAvailableResponse)(nil), "NameAvailableResponse") + proto.RegisterType((*BatchNameAvailableResponse)(nil), "BatchNameAvailableResponse") proto.RegisterType((*NameByAddressResponse)(nil), "NameByAddressResponse") + proto.RegisterType((*BatchNameByAddressResponse)(nil), "BatchNameByAddressResponse") } func init() { @@ -315,34 +543,43 @@ func init() { } var fileDescriptor_06bca2ea4304f305 = []byte{ - // 430 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x53, 0x4d, 0x6f, 0xd3, 0x40, - 0x10, 0xb5, 0xdb, 0xa6, 0xb4, 0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, 0xbf, 0x16, 0x8e, 0x39, 0x5f, 0x38, 0xe6, 0x9f, 0x85, 0x63, 0xfe, 0x58, 0x3a, 0xc6, - 0x7c, 0xe9, 0x18, 0xbf, 0x97, 0x8e, 0xf1, 0xf9, 0xfa, 0xd0, 0x1f, 0xd6, 0x3f, 0x95, 0xaf, 0xe7, - 0xff, 0x02, 0x00, 0x00, 0xff, 0xff, 0x9c, 0xb9, 0x86, 0xac, 0xbf, 0x03, 0x00, 0x00, + // 562 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x54, 0x4d, 0x6f, 0xd3, 0x40, + 0x10, 0xb5, 0x49, 0xd2, 0x36, 0x53, 0x44, 0xd1, 0x36, 0xa1, 0xc6, 0xad, 0xac, 0x68, 0x4f, 0x39, + 0x6d, 0x51, 0xf8, 0x10, 0x1c, 0x10, 0x72, 0x50, 0x41, 0x11, 0x52, 0x2a, 0xdc, 0x1b, 0x17, 0xb4, + 0x8d, 0xb7, 0xad, 0xa5, 0x64, 0x1d, 0xbc, 0x4e, 0x4b, 0xfe, 0x05, 0x17, 0xfe, 0x13, 0xc7, 0x1e, + 0x39, 0xa2, 0xe4, 0x37, 0x70, 0x47, 0x5e, 0xdb, 0xf1, 0xfa, 0xab, 0xa8, 0x97, 0xd6, 0xfb, 0xe6, + 0xcd, 0xdb, 0x37, 0x4f, 0x3b, 0x81, 0x97, 0x9c, 0xce, 0x98, 0x60, 0xc1, 0xb5, 0x37, 0x61, 0xc7, + 0xca, 0xf7, 0x3c, 0xf0, 0x43, 0xff, 0x58, 0xfe, 0x15, 0x2a, 0x4e, 0x24, 0x64, 0xbe, 0xbe, 0x67, + 0xdb, 0x57, 0x4a, 0xe3, 0x4e, 0x3c, 0x80, 0xce, 0x98, 0xce, 0x98, 0x7d, 0x4d, 0xbd, 0x29, 0x3d, + 0x9f, 0x32, 0x87, 0x7d, 0x5b, 0x30, 0x11, 0x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x38, 0x2a, + 0x84, 0xc7, 0x60, 0x56, 0x3d, 0xa0, 0x64, 0xf6, 0x67, 0xb0, 0x1d, 0x30, 0xb1, 0x98, 0x86, 0x71, + 0x68, 0xbb, 0x83, 0x27, 0xa4, 0x92, 0xe8, 0xa4, 0x34, 0x6c, 0xc7, 0x31, 0x2a, 0x0f, 0x21, 0x91, + 0xea, 0x40, 0xeb, 0xc2, 0x5f, 0x70, 0x37, 0x89, 0x30, 0x3e, 0x20, 0x04, 0xcd, 0xc8, 0x4d, 0x12, + 0x98, 0xfc, 0xce, 0x59, 0x2a, 0xeb, 0xd4, 0x58, 0x2a, 0x11, 0x37, 0x96, 0x06, 0x3f, 0x9b, 0xd0, + 0xb2, 0xf9, 0x92, 0x0b, 0x34, 0x84, 0xbd, 0x91, 0xc8, 0x0d, 0x80, 0xba, 0xa4, 0x6a, 0x75, 0xcc, + 0x9a, 0x39, 0xb1, 0x86, 0x3e, 0x43, 0x47, 0xba, 0x2b, 0x0a, 0x99, 0xa4, 0x76, 0x11, 0xcd, 0x43, + 0x52, 0x9f, 0x31, 0xd6, 0xd0, 0x7b, 0x78, 0xfc, 0x91, 0x85, 0xb9, 0x29, 0x12, 0x5f, 0xc5, 0x7d, + 0x32, 0x6b, 0x86, 0xc5, 0x1a, 0x72, 0xa0, 0x2b, 0x2f, 0x29, 0x29, 0x29, 0xc6, 0x4a, 0x72, 0x87, + 0xa4, 0x3e, 0x69, 0xac, 0xa1, 0x77, 0xf0, 0x28, 0x93, 0x8b, 0x36, 0x0a, 0xed, 0x93, 0xf2, 0x7e, + 0xdd, 0x61, 0x6a, 0x0c, 0xfb, 0x05, 0x53, 0x52, 0xc5, 0x20, 0x35, 0xab, 0xfa, 0x3f, 0x43, 0x9f, + 0xe0, 0xc0, 0x76, 0x67, 0x1e, 0x8f, 0xea, 0x0e, 0xbb, 0xf4, 0x44, 0xc8, 0x82, 0x33, 0xef, 0x92, + 0x33, 0x17, 0x99, 0x44, 0x05, 0x13, 0xbd, 0xb8, 0x66, 0x22, 0x72, 0x3a, 0x67, 0x01, 0x0d, 0x3d, + 0x9f, 0x67, 0x62, 0xc3, 0x57, 0xbf, 0x56, 0x96, 0x7e, 0xbb, 0xb2, 0xf4, 0x3f, 0x2b, 0x4b, 0xff, + 0xb1, 0xb6, 0xb4, 0xdb, 0xb5, 0xa5, 0xfd, 0x5e, 0x5b, 0xda, 0x97, 0xa3, 0xbb, 0x7e, 0xc3, 0xcf, + 0xb7, 0xe4, 0xbf, 0xe7, 0xff, 0x02, 0x00, 0x00, 0xff, 0xff, 0xc3, 0x04, 0xfe, 0x4d, 0x21, 0x06, + 0x00, 0x00, } func (m *NameAvailableRequest) Marshal() (dAtA []byte, err error) { @@ -375,6 +612,38 @@ func (m *NameAvailableRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *BatchNameAvailableRequest) 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 *BatchNameAvailableRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *BatchNameAvailableRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.FullNames) > 0 { + for iNdEx := len(m.FullNames) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.FullNames[iNdEx]) + copy(dAtA[i:], m.FullNames[iNdEx]) + i = encodeVarintNameservice(dAtA, i, uint64(len(m.FullNames[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + func (m *NameByAddressRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -405,6 +674,38 @@ func (m *NameByAddressRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *BatchNameByAddressRequest) 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 *BatchNameByAddressRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *BatchNameByAddressRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.OwnerScwEthAddresses) > 0 { + for iNdEx := len(m.OwnerScwEthAddresses) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.OwnerScwEthAddresses[iNdEx]) + copy(dAtA[i:], m.OwnerScwEthAddresses[iNdEx]) + i = encodeVarintNameservice(dAtA, i, uint64(len(m.OwnerScwEthAddresses[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + func (m *NameByAnyIdRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -435,6 +736,38 @@ func (m *NameByAnyIdRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *BatchNameByAnyIdRequest) 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 *BatchNameByAnyIdRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *BatchNameByAnyIdRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.AnyAddresses) > 0 { + for iNdEx := len(m.AnyAddresses) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.AnyAddresses[iNdEx]) + copy(dAtA[i:], m.AnyAddresses[iNdEx]) + i = encodeVarintNameservice(dAtA, i, uint64(len(m.AnyAddresses[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + func (m *NameAvailableResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -501,6 +834,43 @@ func (m *NameAvailableResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *BatchNameAvailableResponse) 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 *BatchNameAvailableResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *BatchNameAvailableResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Results) > 0 { + for iNdEx := len(m.Results) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Results[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintNameservice(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + func (m *NameByAddressResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -541,6 +911,43 @@ func (m *NameByAddressResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *BatchNameByAddressResponse) 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 *BatchNameByAddressResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *BatchNameByAddressResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Results) > 0 { + for iNdEx := len(m.Results) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Results[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintNameservice(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + func encodeVarintNameservice(dAtA []byte, offset int, v uint64) int { offset -= sovNameservice(v) base := offset @@ -565,6 +972,21 @@ func (m *NameAvailableRequest) Size() (n int) { return n } +func (m *BatchNameAvailableRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.FullNames) > 0 { + for _, s := range m.FullNames { + l = len(s) + n += 1 + l + sovNameservice(uint64(l)) + } + } + return n +} + func (m *NameByAddressRequest) Size() (n int) { if m == nil { return 0 @@ -578,6 +1000,21 @@ func (m *NameByAddressRequest) Size() (n int) { return n } +func (m *BatchNameByAddressRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.OwnerScwEthAddresses) > 0 { + for _, s := range m.OwnerScwEthAddresses { + l = len(s) + n += 1 + l + sovNameservice(uint64(l)) + } + } + return n +} + func (m *NameByAnyIdRequest) Size() (n int) { if m == nil { return 0 @@ -591,6 +1028,21 @@ func (m *NameByAnyIdRequest) Size() (n int) { return n } +func (m *BatchNameByAnyIdRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.AnyAddresses) > 0 { + for _, s := range m.AnyAddresses { + l = len(s) + n += 1 + l + sovNameservice(uint64(l)) + } + } + return n +} + func (m *NameAvailableResponse) Size() (n int) { if m == nil { return 0 @@ -622,6 +1074,21 @@ func (m *NameAvailableResponse) Size() (n int) { return n } +func (m *BatchNameAvailableResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Results) > 0 { + for _, e := range m.Results { + l = e.Size() + n += 1 + l + sovNameservice(uint64(l)) + } + } + return n +} + func (m *NameByAddressResponse) Size() (n int) { if m == nil { return 0 @@ -638,6 +1105,21 @@ func (m *NameByAddressResponse) Size() (n int) { return n } +func (m *BatchNameByAddressResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Results) > 0 { + for _, e := range m.Results { + l = e.Size() + n += 1 + l + sovNameservice(uint64(l)) + } + } + return n +} + func sovNameservice(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -726,6 +1208,88 @@ func (m *NameAvailableRequest) Unmarshal(dAtA []byte) error { } return nil } +func (m *BatchNameAvailableRequest) 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 ErrIntOverflowNameservice + } + 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: BatchNameAvailableRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: BatchNameAvailableRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FullNames", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowNameservice + } + 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 ErrInvalidLengthNameservice + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthNameservice + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FullNames = append(m.FullNames, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipNameservice(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthNameservice + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *NameByAddressRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -808,6 +1372,88 @@ func (m *NameByAddressRequest) Unmarshal(dAtA []byte) error { } return nil } +func (m *BatchNameByAddressRequest) 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 ErrIntOverflowNameservice + } + 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: BatchNameByAddressRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: BatchNameByAddressRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OwnerScwEthAddresses", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowNameservice + } + 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 ErrInvalidLengthNameservice + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthNameservice + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OwnerScwEthAddresses = append(m.OwnerScwEthAddresses, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipNameservice(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthNameservice + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *NameByAnyIdRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -890,6 +1536,88 @@ func (m *NameByAnyIdRequest) Unmarshal(dAtA []byte) error { } return nil } +func (m *BatchNameByAnyIdRequest) 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 ErrIntOverflowNameservice + } + 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: BatchNameByAnyIdRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: BatchNameByAnyIdRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AnyAddresses", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowNameservice + } + 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 ErrInvalidLengthNameservice + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthNameservice + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AnyAddresses = append(m.AnyAddresses, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipNameservice(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthNameservice + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *NameAvailableResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -1107,6 +1835,90 @@ func (m *NameAvailableResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *BatchNameAvailableResponse) 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 ErrIntOverflowNameservice + } + 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: BatchNameAvailableResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: BatchNameAvailableResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Results", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowNameservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthNameservice + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthNameservice + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Results = append(m.Results, &NameAvailableResponse{}) + if err := m.Results[len(m.Results)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipNameservice(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthNameservice + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *NameByAddressResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -1209,6 +2021,90 @@ func (m *NameByAddressResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *BatchNameByAddressResponse) 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 ErrIntOverflowNameservice + } + 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: BatchNameByAddressResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: BatchNameByAddressResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Results", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowNameservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthNameservice + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthNameservice + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Results = append(m.Results, &NameByAddressResponse{}) + if err := m.Results[len(m.Results)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipNameservice(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthNameservice + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipNameservice(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/nameservice/nameserviceproto/nameservice_drpc.pb.go b/nameservice/nameserviceproto/nameservice_drpc.pb.go index d9b3698e..bc4630bc 100644 --- a/nameservice/nameserviceproto/nameservice_drpc.pb.go +++ b/nameservice/nameserviceproto/nameservice_drpc.pb.go @@ -41,8 +41,11 @@ type DRPCAnynsClient interface { DRPCConn() drpc.Conn IsNameAvailable(ctx context.Context, in *NameAvailableRequest) (*NameAvailableResponse, error) + BatchIsNameAvailable(ctx context.Context, in *BatchNameAvailableRequest) (*BatchNameAvailableResponse, error) GetNameByAddress(ctx context.Context, in *NameByAddressRequest) (*NameByAddressResponse, error) + BatchGetNameByAddress(ctx context.Context, in *BatchNameByAddressRequest) (*BatchNameByAddressResponse, error) GetNameByAnyId(ctx context.Context, in *NameByAnyIdRequest) (*NameByAddressResponse, error) + BatchGetNameByAnyId(ctx context.Context, in *BatchNameByAnyIdRequest) (*BatchNameByAddressResponse, error) AdminNameRegisterSigned(ctx context.Context, in *NameRegisterRequestSigned) (*OperationResponse, error) } @@ -65,6 +68,15 @@ func (c *drpcAnynsClient) IsNameAvailable(ctx context.Context, in *NameAvailable return out, nil } +func (c *drpcAnynsClient) BatchIsNameAvailable(ctx context.Context, in *BatchNameAvailableRequest) (*BatchNameAvailableResponse, error) { + out := new(BatchNameAvailableResponse) + err := c.cc.Invoke(ctx, "/Anyns/BatchIsNameAvailable", drpcEncoding_File_nameservice_nameserviceproto_protos_nameservice_proto{}, in, out) + if err != nil { + return nil, err + } + return out, nil +} + func (c *drpcAnynsClient) GetNameByAddress(ctx context.Context, in *NameByAddressRequest) (*NameByAddressResponse, error) { out := new(NameByAddressResponse) err := c.cc.Invoke(ctx, "/Anyns/GetNameByAddress", drpcEncoding_File_nameservice_nameserviceproto_protos_nameservice_proto{}, in, out) @@ -74,6 +86,15 @@ func (c *drpcAnynsClient) GetNameByAddress(ctx context.Context, in *NameByAddres return out, nil } +func (c *drpcAnynsClient) BatchGetNameByAddress(ctx context.Context, in *BatchNameByAddressRequest) (*BatchNameByAddressResponse, error) { + out := new(BatchNameByAddressResponse) + err := c.cc.Invoke(ctx, "/Anyns/BatchGetNameByAddress", drpcEncoding_File_nameservice_nameserviceproto_protos_nameservice_proto{}, in, out) + if err != nil { + return nil, err + } + return out, nil +} + func (c *drpcAnynsClient) GetNameByAnyId(ctx context.Context, in *NameByAnyIdRequest) (*NameByAddressResponse, error) { out := new(NameByAddressResponse) err := c.cc.Invoke(ctx, "/Anyns/GetNameByAnyId", drpcEncoding_File_nameservice_nameserviceproto_protos_nameservice_proto{}, in, out) @@ -83,6 +104,15 @@ func (c *drpcAnynsClient) GetNameByAnyId(ctx context.Context, in *NameByAnyIdReq return out, nil } +func (c *drpcAnynsClient) BatchGetNameByAnyId(ctx context.Context, in *BatchNameByAnyIdRequest) (*BatchNameByAddressResponse, error) { + out := new(BatchNameByAddressResponse) + err := c.cc.Invoke(ctx, "/Anyns/BatchGetNameByAnyId", drpcEncoding_File_nameservice_nameserviceproto_protos_nameservice_proto{}, in, out) + if err != nil { + return nil, err + } + return out, nil +} + func (c *drpcAnynsClient) AdminNameRegisterSigned(ctx context.Context, in *NameRegisterRequestSigned) (*OperationResponse, error) { out := new(OperationResponse) err := c.cc.Invoke(ctx, "/Anyns/AdminNameRegisterSigned", drpcEncoding_File_nameservice_nameserviceproto_protos_nameservice_proto{}, in, out) @@ -94,8 +124,11 @@ func (c *drpcAnynsClient) AdminNameRegisterSigned(ctx context.Context, in *NameR type DRPCAnynsServer interface { IsNameAvailable(context.Context, *NameAvailableRequest) (*NameAvailableResponse, error) + BatchIsNameAvailable(context.Context, *BatchNameAvailableRequest) (*BatchNameAvailableResponse, error) GetNameByAddress(context.Context, *NameByAddressRequest) (*NameByAddressResponse, error) + BatchGetNameByAddress(context.Context, *BatchNameByAddressRequest) (*BatchNameByAddressResponse, error) GetNameByAnyId(context.Context, *NameByAnyIdRequest) (*NameByAddressResponse, error) + BatchGetNameByAnyId(context.Context, *BatchNameByAnyIdRequest) (*BatchNameByAddressResponse, error) AdminNameRegisterSigned(context.Context, *NameRegisterRequestSigned) (*OperationResponse, error) } @@ -105,21 +138,33 @@ func (s *DRPCAnynsUnimplementedServer) IsNameAvailable(context.Context, *NameAva return nil, drpcerr.WithCode(errors.New("Unimplemented"), drpcerr.Unimplemented) } +func (s *DRPCAnynsUnimplementedServer) BatchIsNameAvailable(context.Context, *BatchNameAvailableRequest) (*BatchNameAvailableResponse, error) { + return nil, drpcerr.WithCode(errors.New("Unimplemented"), drpcerr.Unimplemented) +} + func (s *DRPCAnynsUnimplementedServer) GetNameByAddress(context.Context, *NameByAddressRequest) (*NameByAddressResponse, error) { return nil, drpcerr.WithCode(errors.New("Unimplemented"), drpcerr.Unimplemented) } +func (s *DRPCAnynsUnimplementedServer) BatchGetNameByAddress(context.Context, *BatchNameByAddressRequest) (*BatchNameByAddressResponse, error) { + return nil, drpcerr.WithCode(errors.New("Unimplemented"), drpcerr.Unimplemented) +} + func (s *DRPCAnynsUnimplementedServer) GetNameByAnyId(context.Context, *NameByAnyIdRequest) (*NameByAddressResponse, error) { return nil, drpcerr.WithCode(errors.New("Unimplemented"), drpcerr.Unimplemented) } +func (s *DRPCAnynsUnimplementedServer) BatchGetNameByAnyId(context.Context, *BatchNameByAnyIdRequest) (*BatchNameByAddressResponse, error) { + return nil, drpcerr.WithCode(errors.New("Unimplemented"), drpcerr.Unimplemented) +} + func (s *DRPCAnynsUnimplementedServer) AdminNameRegisterSigned(context.Context, *NameRegisterRequestSigned) (*OperationResponse, error) { return nil, drpcerr.WithCode(errors.New("Unimplemented"), drpcerr.Unimplemented) } type DRPCAnynsDescription struct{} -func (DRPCAnynsDescription) NumMethods() int { return 4 } +func (DRPCAnynsDescription) NumMethods() int { return 7 } func (DRPCAnynsDescription) Method(n int) (string, drpc.Encoding, drpc.Receiver, interface{}, bool) { switch n { @@ -133,6 +178,15 @@ func (DRPCAnynsDescription) Method(n int) (string, drpc.Encoding, drpc.Receiver, ) }, DRPCAnynsServer.IsNameAvailable, true case 1: + return "/Anyns/BatchIsNameAvailable", drpcEncoding_File_nameservice_nameserviceproto_protos_nameservice_proto{}, + func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) { + return srv.(DRPCAnynsServer). + BatchIsNameAvailable( + ctx, + in1.(*BatchNameAvailableRequest), + ) + }, DRPCAnynsServer.BatchIsNameAvailable, true + case 2: return "/Anyns/GetNameByAddress", drpcEncoding_File_nameservice_nameserviceproto_protos_nameservice_proto{}, func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) { return srv.(DRPCAnynsServer). @@ -141,7 +195,16 @@ func (DRPCAnynsDescription) Method(n int) (string, drpc.Encoding, drpc.Receiver, in1.(*NameByAddressRequest), ) }, DRPCAnynsServer.GetNameByAddress, true - case 2: + case 3: + return "/Anyns/BatchGetNameByAddress", drpcEncoding_File_nameservice_nameserviceproto_protos_nameservice_proto{}, + func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) { + return srv.(DRPCAnynsServer). + BatchGetNameByAddress( + ctx, + in1.(*BatchNameByAddressRequest), + ) + }, DRPCAnynsServer.BatchGetNameByAddress, true + case 4: return "/Anyns/GetNameByAnyId", drpcEncoding_File_nameservice_nameserviceproto_protos_nameservice_proto{}, func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) { return srv.(DRPCAnynsServer). @@ -150,7 +213,16 @@ func (DRPCAnynsDescription) Method(n int) (string, drpc.Encoding, drpc.Receiver, in1.(*NameByAnyIdRequest), ) }, DRPCAnynsServer.GetNameByAnyId, true - case 3: + case 5: + return "/Anyns/BatchGetNameByAnyId", drpcEncoding_File_nameservice_nameserviceproto_protos_nameservice_proto{}, + func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) { + return srv.(DRPCAnynsServer). + BatchGetNameByAnyId( + ctx, + in1.(*BatchNameByAnyIdRequest), + ) + }, DRPCAnynsServer.BatchGetNameByAnyId, true + case 6: return "/Anyns/AdminNameRegisterSigned", drpcEncoding_File_nameservice_nameserviceproto_protos_nameservice_proto{}, func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) { return srv.(DRPCAnynsServer). @@ -184,6 +256,22 @@ func (x *drpcAnyns_IsNameAvailableStream) SendAndClose(m *NameAvailableResponse) return x.CloseSend() } +type DRPCAnyns_BatchIsNameAvailableStream interface { + drpc.Stream + SendAndClose(*BatchNameAvailableResponse) error +} + +type drpcAnyns_BatchIsNameAvailableStream struct { + drpc.Stream +} + +func (x *drpcAnyns_BatchIsNameAvailableStream) SendAndClose(m *BatchNameAvailableResponse) error { + if err := x.MsgSend(m, drpcEncoding_File_nameservice_nameserviceproto_protos_nameservice_proto{}); err != nil { + return err + } + return x.CloseSend() +} + type DRPCAnyns_GetNameByAddressStream interface { drpc.Stream SendAndClose(*NameByAddressResponse) error @@ -200,6 +288,22 @@ func (x *drpcAnyns_GetNameByAddressStream) SendAndClose(m *NameByAddressResponse return x.CloseSend() } +type DRPCAnyns_BatchGetNameByAddressStream interface { + drpc.Stream + SendAndClose(*BatchNameByAddressResponse) error +} + +type drpcAnyns_BatchGetNameByAddressStream struct { + drpc.Stream +} + +func (x *drpcAnyns_BatchGetNameByAddressStream) SendAndClose(m *BatchNameByAddressResponse) error { + if err := x.MsgSend(m, drpcEncoding_File_nameservice_nameserviceproto_protos_nameservice_proto{}); err != nil { + return err + } + return x.CloseSend() +} + type DRPCAnyns_GetNameByAnyIdStream interface { drpc.Stream SendAndClose(*NameByAddressResponse) error @@ -216,6 +320,22 @@ func (x *drpcAnyns_GetNameByAnyIdStream) SendAndClose(m *NameByAddressResponse) return x.CloseSend() } +type DRPCAnyns_BatchGetNameByAnyIdStream interface { + drpc.Stream + SendAndClose(*BatchNameByAddressResponse) error +} + +type drpcAnyns_BatchGetNameByAnyIdStream struct { + drpc.Stream +} + +func (x *drpcAnyns_BatchGetNameByAnyIdStream) SendAndClose(m *BatchNameByAddressResponse) error { + if err := x.MsgSend(m, drpcEncoding_File_nameservice_nameserviceproto_protos_nameservice_proto{}); err != nil { + return err + } + return x.CloseSend() +} + type DRPCAnyns_AdminNameRegisterSignedStream interface { drpc.Stream SendAndClose(*OperationResponse) error diff --git a/nameservice/nameserviceproto/protos/nameservice.proto b/nameservice/nameserviceproto/protos/nameservice.proto index 86a42b54..084daa71 100644 --- a/nameservice/nameserviceproto/protos/nameservice.proto +++ b/nameservice/nameserviceproto/protos/nameservice.proto @@ -9,16 +9,31 @@ message NameAvailableRequest { string fullName = 1; } +message BatchNameAvailableRequest { + // Names including .any suffix + repeated string fullNames = 1; +} + message NameByAddressRequest { // EOA -> SCW -> name // A SCW Ethereum address that owns that name string ownerScwEthAddress = 1; } +message BatchNameByAddressRequest { + // EOA -> SCW -> name + // A SCW Ethereum address that owns that name + repeated string ownerScwEthAddresses = 1; +} + message NameByAnyIdRequest { string anyAddress = 1; } +message BatchNameByAnyIdRequest { + repeated string anyAddresses = 1; +} + message NameAvailableResponse { bool available = 1; @@ -42,21 +57,32 @@ message NameAvailableResponse { int64 nameExpires = 6; } +message BatchNameAvailableResponse { + repeated NameAvailableResponse results = 1; +} + message NameByAddressResponse { bool found = 1; string name = 2; } +message BatchNameByAddressResponse { + repeated NameByAddressResponse results = 1; +} + service Anyns { // Lookup: name -> address rpc IsNameAvailable(NameAvailableRequest) returns (NameAvailableResponse) {} + rpc BatchIsNameAvailable(BatchNameAvailableRequest) returns (BatchNameAvailableResponse) {} // Reverse lookup: address -> name rpc GetNameByAddress(NameByAddressRequest) returns (NameByAddressResponse) {} + rpc BatchGetNameByAddress(BatchNameByAddressRequest) returns (BatchNameByAddressResponse) {} // Reverse lookup: ANY ID -> name rpc GetNameByAnyId(NameByAnyIdRequest) returns (NameByAddressResponse) {} + rpc BatchGetNameByAnyId(BatchNameByAnyIdRequest) returns (BatchNameByAddressResponse) {} // Register new name for the user (on behalf of the user) // Anytype CAN only register names for users, but can not transfer or update them! From 199dea2be5d2efa31233d92fa3f5934e7715ca5f Mon Sep 17 00:00:00 2001 From: Sergey Cherepanov Date: Tue, 12 Mar 2024 18:23:03 +0100 Subject: [PATCH 035/140] coordinatorproto: accountLimitsSet --- .../coordinatorproto/protos/coordinator.proto | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/coordinator/coordinatorproto/protos/coordinator.proto b/coordinator/coordinatorproto/protos/coordinator.proto index ac8d9528..1a423f5d 100644 --- a/coordinator/coordinatorproto/protos/coordinator.proto +++ b/coordinator/coordinatorproto/protos/coordinator.proto @@ -41,6 +41,8 @@ service Coordinator { rpc AclAddRecord(AclAddRecordRequest) returns (AclAddRecordResponse); // AclGetRecords gets acl records rpc AclGetRecords(AclGetRecordsRequest) returns (AclGetRecordsResponse); + + rpc AccountLimitsSet(AccountLimitsSetRequest) returns (AccountLimitsSetResponse); } message SpaceSignRequest { @@ -335,4 +337,15 @@ message AclGetRecordsRequest { // AclGetRecordsResponse contains list of marshaled consensusproto.RawRecordWithId message AclGetRecordsResponse { repeated bytes records = 1; -} \ No newline at end of file +} + +message AccountLimitsSetRequest { + string identity = 1; + string reason = 2; + uint64 fileStorageLimitBytes = 3; + uint32 spaceMembersRead = 4; + uint32 spaceMembersWrite = 5; +} + + +message AccountLimitsSetResponse {} From 7bac8703dafc0ea76ef81c1487ffe1578300cff0 Mon Sep 17 00:00:00 2001 From: Sergey Cherepanov Date: Tue, 12 Mar 2024 18:25:22 +0100 Subject: [PATCH 036/140] coordinatorproto: accountLimitsSet proto gen --- .../coordinatorproto/coordinator.pb.go | 658 +++++++++++++++--- .../coordinatorproto/coordinator_drpc.pb.go | 42 +- 2 files changed, 596 insertions(+), 104 deletions(-) diff --git a/coordinator/coordinatorproto/coordinator.pb.go b/coordinator/coordinatorproto/coordinator.pb.go index 747d1293..99fc3be1 100644 --- a/coordinator/coordinatorproto/coordinator.pb.go +++ b/coordinator/coordinatorproto/coordinator.pb.go @@ -2025,6 +2025,118 @@ func (m *AclGetRecordsResponse) GetRecords() [][]byte { return nil } +type AccountLimitsSetRequest struct { + Identity string `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"` + Reason string `protobuf:"bytes,2,opt,name=reason,proto3" json:"reason,omitempty"` + FileStorageLimitBytes uint64 `protobuf:"varint,3,opt,name=fileStorageLimitBytes,proto3" json:"fileStorageLimitBytes,omitempty"` + SpaceMembersRead uint32 `protobuf:"varint,4,opt,name=spaceMembersRead,proto3" json:"spaceMembersRead,omitempty"` + SpaceMembersWrite uint32 `protobuf:"varint,5,opt,name=spaceMembersWrite,proto3" json:"spaceMembersWrite,omitempty"` +} + +func (m *AccountLimitsSetRequest) Reset() { *m = AccountLimitsSetRequest{} } +func (m *AccountLimitsSetRequest) String() string { return proto.CompactTextString(m) } +func (*AccountLimitsSetRequest) ProtoMessage() {} +func (*AccountLimitsSetRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_d94f6f99586adae2, []int{32} +} +func (m *AccountLimitsSetRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AccountLimitsSetRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_AccountLimitsSetRequest.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 *AccountLimitsSetRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_AccountLimitsSetRequest.Merge(m, src) +} +func (m *AccountLimitsSetRequest) XXX_Size() int { + return m.Size() +} +func (m *AccountLimitsSetRequest) XXX_DiscardUnknown() { + xxx_messageInfo_AccountLimitsSetRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_AccountLimitsSetRequest proto.InternalMessageInfo + +func (m *AccountLimitsSetRequest) GetIdentity() string { + if m != nil { + return m.Identity + } + return "" +} + +func (m *AccountLimitsSetRequest) GetReason() string { + if m != nil { + return m.Reason + } + return "" +} + +func (m *AccountLimitsSetRequest) GetFileStorageLimitBytes() uint64 { + if m != nil { + return m.FileStorageLimitBytes + } + return 0 +} + +func (m *AccountLimitsSetRequest) GetSpaceMembersRead() uint32 { + if m != nil { + return m.SpaceMembersRead + } + return 0 +} + +func (m *AccountLimitsSetRequest) GetSpaceMembersWrite() uint32 { + if m != nil { + return m.SpaceMembersWrite + } + return 0 +} + +type AccountLimitsSetResponse struct { +} + +func (m *AccountLimitsSetResponse) Reset() { *m = AccountLimitsSetResponse{} } +func (m *AccountLimitsSetResponse) String() string { return proto.CompactTextString(m) } +func (*AccountLimitsSetResponse) ProtoMessage() {} +func (*AccountLimitsSetResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_d94f6f99586adae2, []int{33} +} +func (m *AccountLimitsSetResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AccountLimitsSetResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_AccountLimitsSetResponse.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 *AccountLimitsSetResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_AccountLimitsSetResponse.Merge(m, src) +} +func (m *AccountLimitsSetResponse) XXX_Size() int { + return m.Size() +} +func (m *AccountLimitsSetResponse) XXX_DiscardUnknown() { + xxx_messageInfo_AccountLimitsSetResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_AccountLimitsSetResponse proto.InternalMessageInfo + func init() { proto.RegisterEnum("coordinator.ErrorCodes", ErrorCodes_name, ErrorCodes_value) proto.RegisterEnum("coordinator.SpaceStatus", SpaceStatus_name, SpaceStatus_value) @@ -2064,6 +2176,8 @@ func init() { proto.RegisterType((*AclAddRecordResponse)(nil), "coordinator.AclAddRecordResponse") proto.RegisterType((*AclGetRecordsRequest)(nil), "coordinator.AclGetRecordsRequest") proto.RegisterType((*AclGetRecordsResponse)(nil), "coordinator.AclGetRecordsResponse") + proto.RegisterType((*AccountLimitsSetRequest)(nil), "coordinator.AccountLimitsSetRequest") + proto.RegisterType((*AccountLimitsSetResponse)(nil), "coordinator.AccountLimitsSetResponse") } func init() { @@ -2071,109 +2185,116 @@ func init() { } var fileDescriptor_d94f6f99586adae2 = []byte{ - // 1626 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x58, 0xcf, 0x6f, 0x13, 0xc7, - 0x17, 0xf7, 0x6e, 0x9c, 0xc4, 0x7e, 0x0e, 0x66, 0x33, 0xf9, 0x81, 0x31, 0xc6, 0x84, 0x85, 0x2f, - 0xdf, 0xe0, 0xef, 0x57, 0x40, 0x8d, 0x5a, 0x15, 0x51, 0xa9, 0x84, 0x40, 0x69, 0xf8, 0x11, 0xa2, - 0x0d, 0xa1, 0x6a, 0x39, 0x54, 0xcb, 0xee, 0xc4, 0x59, 0xc5, 0x9e, 0x75, 0x67, 0xc7, 0x84, 0xfc, - 0x17, 0xbd, 0xf5, 0xd4, 0x7b, 0xa5, 0xf6, 0x50, 0x55, 0xaa, 0x7a, 0xa8, 0xd4, 0x73, 0x8f, 0x1c, - 0x7b, 0x44, 0x70, 0xed, 0x1f, 0x51, 0xcd, 0xec, 0xec, 0xee, 0xec, 0x0f, 0x3b, 0xa9, 0x38, 0x70, - 0x49, 0x3c, 0x9f, 0x79, 0xef, 0xcd, 0xfb, 0x35, 0xef, 0xcd, 0x5b, 0xf8, 0xd0, 0xf1, 0x7d, 0xea, - 0x7a, 0xc4, 0x66, 0x3e, 0xbd, 0xaa, 0xfc, 0x1e, 0x52, 0x9f, 0xf9, 0x57,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 0x98, 0x26, 0xbe, 0x8b, 0x79, 0x6d, 0xe5, 0xa9, 0x31, 0x9f, 0x32, 0x6f, 0xd3, 0x77, 0xb1, 0x15, - 0xee, 0xa3, 0x0e, 0x18, 0x0e, 0xc5, 0x76, 0x54, 0x9f, 0x77, 0x88, 0xf7, 0x52, 0xf8, 0xbd, 0x6c, - 0xe5, 0x70, 0xd3, 0x83, 0x32, 0x67, 0x55, 0xca, 0x91, 0x96, 0x2a, 0x47, 0x2d, 0xa8, 0xda, 0xae, - 0x4b, 0x71, 0x10, 0xe0, 0xa0, 0xa1, 0x8b, 0x7c, 0x4e, 0x00, 0xf4, 0x3f, 0x98, 0x66, 0x87, 0x43, - 0xa9, 0x52, 0xbd, 0xbb, 0x94, 0x53, 0x49, 0xc4, 0x32, 0xa4, 0x31, 0x07, 0x70, 0x21, 0x8a, 0xb4, - 0x70, 0x14, 0x1d, 0xc8, 0x40, 0xa4, 0x6b, 0x72, 0x41, 0x8a, 0x69, 0xc5, 0x29, 0x36, 0xb9, 0x16, - 0xff, 0xac, 0xc1, 0x72, 0xf1, 0x79, 0xef, 0xb1, 0x2a, 0xb7, 0xa0, 0xca, 0xe2, 0x5e, 0x3a, 0x2d, - 0x7a, 0x69, 0x02, 0x98, 0x77, 0x00, 0x45, 0x1a, 0x3f, 0xf4, 0x7b, 0xca, 0xdd, 0xb5, 0x77, 0x99, - 0x12, 0x9b, 0x68, 0x99, 0x14, 0x53, 0xae, 0xec, 0x09, 0x59, 0x4c, 0x4d, 0x0f, 0x16, 0x52, 0x52, - 0x64, 0x1a, 0x7e, 0x2c, 0x5a, 0xa9, 0x4f, 0xe3, 0xda, 0xd2, 0x2e, 0xbc, 0x84, 0x82, 0x85, 0x93, - 0x59, 0x11, 0x39, 0x57, 0x60, 0xcf, 0x0e, 0x1e, 0xf9, 0xd2, 0xcb, 0x15, 0x2b, 0x5a, 0x9a, 0xbf, - 0x69, 0x30, 0x9f, 0x63, 0x44, 0x75, 0xd0, 0xbd, 0x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, 0xb5, 0x6f, 0xdf, 0xb6, 0x4b, 0xaf, 0xde, 0xb6, 0x4b, 0x7f, 0xbd, 0x6d, - 0x97, 0xbe, 0x6a, 0x4d, 0xfa, 0xe6, 0xf9, 0x7c, 0x46, 0xfc, 0xbb, 0xfe, 0x4f, 0x00, 0x00, 0x00, - 0xff, 0xff, 0x83, 0x2d, 0x56, 0x38, 0x1a, 0x15, 0x00, 0x00, + // 1731 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x58, 0xcd, 0x6f, 0x13, 0x47, + 0x14, 0xf7, 0x3a, 0xce, 0x87, 0x9f, 0x13, 0xb3, 0x99, 0x7c, 0x60, 0x8c, 0x31, 0x61, 0xa1, 0x34, + 0xb8, 0x15, 0x50, 0xd3, 0x56, 0x45, 0x54, 0x2a, 0x21, 0x50, 0x1a, 0x3e, 0x42, 0x34, 0x21, 0xa0, + 0x96, 0x03, 0x5a, 0x76, 0x27, 0xce, 0x2a, 0xf6, 0xae, 0x3b, 0x3b, 0x26, 0xf8, 0xbf, 0xe8, 0xad, + 0xa7, 0xde, 0x2b, 0xb5, 0x87, 0xaa, 0x52, 0xd5, 0x43, 0xa5, 0x9e, 0x7b, 0xa9, 0xc4, 0xb1, 0x97, + 0x4a, 0x08, 0xfe, 0x91, 0x6a, 0x66, 0x67, 0x77, 0x67, 0x3f, 0xec, 0xa4, 0xe2, 0xc0, 0x25, 0xf1, + 0xfc, 0xe6, 0xbd, 0x37, 0xef, 0xbd, 0x79, 0xef, 0xcd, 0x7b, 0x0b, 0x9f, 0x58, 0x9e, 0x47, 0x6d, + 0xc7, 0x35, 0x99, 0x47, 0x2f, 0x29, 0xbf, 0xfb, 0xd4, 0x63, 0xde, 0x25, 0xf1, 0xd7, 0x57, 0xf1, + 0x8b, 0x02, 0x42, 0x15, 0x05, 0x32, 0xfe, 0xd4, 0x40, 0xdf, 0xee, 0x9b, 0x16, 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, 0x5c, 0xa2, 0xf6, 0xa1, 0x33, 0x09, 0x96, 0xbc, 0x8e, 0xaa, 0x6e, 0x8c, 0x23, 0x91, 0x72, + 0xdd, 0xa8, 0xfb, 0x48, 0x36, 0x04, 0xe8, 0x42, 0x1e, 0x73, 0x6e, 0x53, 0x51, 0x6f, 0x1d, 0x85, + 0x54, 0x9e, 0xb7, 0x0d, 0xb3, 0x6a, 0x53, 0x80, 0x56, 0x52, 0xbc, 0x99, 0xd6, 0xa3, 0x7e, 0x66, + 0x0c, 0x85, 0xea, 0x1c, 0xe5, 0x3d, 0xcf, 0x38, 0x27, 0xdb, 0x37, 0x64, 0x9c, 0x93, 0xd7, 0x0e, + 0x3c, 0x05, 0x3d, 0xfd, 0x28, 0xa6, 0xf2, 0x76, 0x44, 0x4b, 0x90, 0xca, 0xdb, 0x51, 0x2f, 0xeb, + 0x8d, 0x4f, 0xff, 0x7a, 0xdd, 0xd4, 0x5e, 0xbe, 0x6e, 0x6a, 0xaf, 0x5e, 0x37, 0xb5, 0xef, 0xde, + 0x34, 0x0b, 0x2f, 0xdf, 0x34, 0x0b, 0xff, 0xbc, 0x69, 0x16, 0xbe, 0x69, 0x8c, 0xfb, 0xa0, 0xfc, + 0x6c, 0x4a, 0xfc, 0xbb, 0xf2, 0x5f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x0a, 0x91, 0x31, 0xc1, 0x77, + 0x16, 0x00, 0x00, } func (m *SpaceSignRequest) Marshal() (dAtA []byte, err error) { @@ -3445,6 +3566,81 @@ func (m *AclGetRecordsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *AccountLimitsSetRequest) 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 *AccountLimitsSetRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *AccountLimitsSetRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.SpaceMembersWrite != 0 { + i = encodeVarintCoordinator(dAtA, i, uint64(m.SpaceMembersWrite)) + i-- + dAtA[i] = 0x28 + } + if m.SpaceMembersRead != 0 { + i = encodeVarintCoordinator(dAtA, i, uint64(m.SpaceMembersRead)) + i-- + dAtA[i] = 0x20 + } + if m.FileStorageLimitBytes != 0 { + i = encodeVarintCoordinator(dAtA, i, uint64(m.FileStorageLimitBytes)) + i-- + dAtA[i] = 0x18 + } + if len(m.Reason) > 0 { + i -= len(m.Reason) + copy(dAtA[i:], m.Reason) + i = encodeVarintCoordinator(dAtA, i, uint64(len(m.Reason))) + i-- + dAtA[i] = 0x12 + } + if len(m.Identity) > 0 { + i -= len(m.Identity) + copy(dAtA[i:], m.Identity) + i = encodeVarintCoordinator(dAtA, i, uint64(len(m.Identity))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *AccountLimitsSetResponse) 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 *AccountLimitsSetResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *AccountLimitsSetResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + func encodeVarintCoordinator(dAtA []byte, offset int, v uint64) int { offset -= sovCoordinator(v) base := offset @@ -4030,6 +4226,41 @@ func (m *AclGetRecordsResponse) Size() (n int) { return n } +func (m *AccountLimitsSetRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Identity) + if l > 0 { + n += 1 + l + sovCoordinator(uint64(l)) + } + l = len(m.Reason) + if l > 0 { + n += 1 + l + sovCoordinator(uint64(l)) + } + if m.FileStorageLimitBytes != 0 { + n += 1 + sovCoordinator(uint64(m.FileStorageLimitBytes)) + } + if m.SpaceMembersRead != 0 { + n += 1 + sovCoordinator(uint64(m.SpaceMembersRead)) + } + if m.SpaceMembersWrite != 0 { + n += 1 + sovCoordinator(uint64(m.SpaceMembersWrite)) + } + return n +} + +func (m *AccountLimitsSetResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + func sovCoordinator(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -7808,6 +8039,227 @@ func (m *AclGetRecordsResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *AccountLimitsSetRequest) 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 ErrIntOverflowCoordinator + } + 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: AccountLimitsSetRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AccountLimitsSetRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Identity", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCoordinator + } + 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 ErrInvalidLengthCoordinator + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthCoordinator + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Identity = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCoordinator + } + 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 ErrInvalidLengthCoordinator + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthCoordinator + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Reason = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FileStorageLimitBytes", wireType) + } + m.FileStorageLimitBytes = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCoordinator + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.FileStorageLimitBytes |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SpaceMembersRead", wireType) + } + m.SpaceMembersRead = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCoordinator + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SpaceMembersRead |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SpaceMembersWrite", wireType) + } + m.SpaceMembersWrite = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCoordinator + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SpaceMembersWrite |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipCoordinator(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthCoordinator + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AccountLimitsSetResponse) 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 ErrIntOverflowCoordinator + } + 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: AccountLimitsSetResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AccountLimitsSetResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipCoordinator(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthCoordinator + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipCoordinator(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/coordinator/coordinatorproto/coordinator_drpc.pb.go b/coordinator/coordinatorproto/coordinator_drpc.pb.go index 48de9697..055de61d 100644 --- a/coordinator/coordinatorproto/coordinator_drpc.pb.go +++ b/coordinator/coordinatorproto/coordinator_drpc.pb.go @@ -52,6 +52,7 @@ type DRPCCoordinatorClient interface { AccountRevertDeletion(ctx context.Context, in *AccountRevertDeletionRequest) (*AccountRevertDeletionResponse, error) AclAddRecord(ctx context.Context, in *AclAddRecordRequest) (*AclAddRecordResponse, error) AclGetRecords(ctx context.Context, in *AclGetRecordsRequest) (*AclGetRecordsResponse, error) + AccountLimitsSet(ctx context.Context, in *AccountLimitsSetRequest) (*AccountLimitsSetResponse, error) } type drpcCoordinatorClient struct { @@ -172,6 +173,15 @@ func (c *drpcCoordinatorClient) AclGetRecords(ctx context.Context, in *AclGetRec return out, nil } +func (c *drpcCoordinatorClient) AccountLimitsSet(ctx context.Context, in *AccountLimitsSetRequest) (*AccountLimitsSetResponse, error) { + out := new(AccountLimitsSetResponse) + err := c.cc.Invoke(ctx, "/coordinator.Coordinator/AccountLimitsSet", drpcEncoding_File_coordinator_coordinatorproto_protos_coordinator_proto{}, in, out) + if err != nil { + return nil, err + } + return out, nil +} + type DRPCCoordinatorServer interface { SpaceSign(context.Context, *SpaceSignRequest) (*SpaceSignResponse, error) FileLimitCheck(context.Context, *FileLimitCheckRequest) (*FileLimitCheckResponse, error) @@ -185,6 +195,7 @@ type DRPCCoordinatorServer interface { AccountRevertDeletion(context.Context, *AccountRevertDeletionRequest) (*AccountRevertDeletionResponse, error) AclAddRecord(context.Context, *AclAddRecordRequest) (*AclAddRecordResponse, error) AclGetRecords(context.Context, *AclGetRecordsRequest) (*AclGetRecordsResponse, error) + AccountLimitsSet(context.Context, *AccountLimitsSetRequest) (*AccountLimitsSetResponse, error) } type DRPCCoordinatorUnimplementedServer struct{} @@ -237,9 +248,13 @@ func (s *DRPCCoordinatorUnimplementedServer) AclGetRecords(context.Context, *Acl return nil, drpcerr.WithCode(errors.New("Unimplemented"), drpcerr.Unimplemented) } +func (s *DRPCCoordinatorUnimplementedServer) AccountLimitsSet(context.Context, *AccountLimitsSetRequest) (*AccountLimitsSetResponse, error) { + return nil, drpcerr.WithCode(errors.New("Unimplemented"), drpcerr.Unimplemented) +} + type DRPCCoordinatorDescription struct{} -func (DRPCCoordinatorDescription) NumMethods() int { return 12 } +func (DRPCCoordinatorDescription) NumMethods() int { return 13 } func (DRPCCoordinatorDescription) Method(n int) (string, drpc.Encoding, drpc.Receiver, interface{}, bool) { switch n { @@ -351,6 +366,15 @@ func (DRPCCoordinatorDescription) Method(n int) (string, drpc.Encoding, drpc.Rec in1.(*AclGetRecordsRequest), ) }, DRPCCoordinatorServer.AclGetRecords, true + case 12: + return "/coordinator.Coordinator/AccountLimitsSet", drpcEncoding_File_coordinator_coordinatorproto_protos_coordinator_proto{}, + func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) { + return srv.(DRPCCoordinatorServer). + AccountLimitsSet( + ctx, + in1.(*AccountLimitsSetRequest), + ) + }, DRPCCoordinatorServer.AccountLimitsSet, true default: return "", nil, nil, nil, false } @@ -551,3 +575,19 @@ func (x *drpcCoordinator_AclGetRecordsStream) SendAndClose(m *AclGetRecordsRespo } return x.CloseSend() } + +type DRPCCoordinator_AccountLimitsSetStream interface { + drpc.Stream + SendAndClose(*AccountLimitsSetResponse) error +} + +type drpcCoordinator_AccountLimitsSetStream struct { + drpc.Stream +} + +func (x *drpcCoordinator_AccountLimitsSetStream) SendAndClose(m *AccountLimitsSetResponse) error { + if err := x.MsgSend(m, drpcEncoding_File_coordinator_coordinatorproto_protos_coordinator_proto{}); err != nil { + return err + } + return x.CloseSend() +} From 6fa52bd8c7642f7e91ebdbd4ea7d2b45ee48d727 Mon Sep 17 00:00:00 2001 From: Sergey Cherepanov Date: Tue, 12 Mar 2024 18:34:37 +0100 Subject: [PATCH 037/140] coordinatorproto: remove FileLimitCheck, add AccountLimitsSet --- .../coordinatorclient/coordinatorclient.go | 24 +- .../coordinatorproto/coordinator.pb.go | 703 ++++-------------- .../coordinatorproto/coordinator_drpc.pb.go | 62 +- .../coordinatorproto/protos/coordinator.proto | 23 +- 4 files changed, 154 insertions(+), 658 deletions(-) diff --git a/coordinator/coordinatorclient/coordinatorclient.go b/coordinator/coordinatorclient/coordinatorclient.go index a8e00da6..9662d7cc 100644 --- a/coordinator/coordinatorclient/coordinatorclient.go +++ b/coordinator/coordinatorclient/coordinatorclient.go @@ -37,7 +37,6 @@ type CoordinatorClient interface { StatusCheckMany(ctx context.Context, spaceIds []string) (statuses []*coordinatorproto.SpaceStatusPayload, err error) StatusCheck(ctx context.Context, spaceId string) (status *coordinatorproto.SpaceStatusPayload, err error) SpaceSign(ctx context.Context, payload SpaceSignPayload) (receipt *coordinatorproto.SpaceReceiptWithSignature, err error) - FileLimitCheck(ctx context.Context, spaceId string, identity []byte) (response *coordinatorproto.FileLimitCheckResponse, err error) NetworkConfiguration(ctx context.Context, currentId string) (*coordinatorproto.NetworkConfigurationResponse, error) DeletionLog(ctx context.Context, lastRecordId string, limit int) (records []*coordinatorproto.DeletionLogRecord, err error) @@ -47,6 +46,8 @@ type CoordinatorClient interface { AclAddRecord(ctx context.Context, spaceId string, rec *consensusproto.RawRecord) (res *consensusproto.RawRecordWithId, err error) AclGetRecords(ctx context.Context, spaceId, aclHead string) (res []*consensusproto.RawRecordWithId, err error) + AccountLimitsSet(ctx context.Context, req *coordinatorproto.AccountLimitsSetRequest) error + app.Component } @@ -207,20 +208,6 @@ func (c *coordinatorClient) SpaceSign(ctx context.Context, payload SpaceSignPayl return } -func (c *coordinatorClient) FileLimitCheck(ctx context.Context, spaceId string, identity []byte) (resp *coordinatorproto.FileLimitCheckResponse, err error) { - err = c.doClient(ctx, func(cl coordinatorproto.DRPCCoordinatorClient) error { - resp, err = cl.FileLimitCheck(ctx, &coordinatorproto.FileLimitCheckRequest{ - AccountIdentity: identity, - SpaceId: spaceId, - }) - if err != nil { - return rpcerr.Unwrap(err) - } - return nil - }) - return -} - func (c *coordinatorClient) NetworkConfiguration(ctx context.Context, currentId string) (resp *coordinatorproto.NetworkConfigurationResponse, err error) { err = c.doClient(ctx, func(cl coordinatorproto.DRPCCoordinatorClient) error { resp, err = cl.NetworkConfiguration(ctx, &coordinatorproto.NetworkConfigurationRequest{ @@ -306,6 +293,13 @@ func (c *coordinatorClient) AclGetRecords(ctx context.Context, spaceId, aclHead return } +func (c *coordinatorClient) AccountLimitsSet(ctx context.Context, req *coordinatorproto.AccountLimitsSetRequest) error { + return c.doClient(ctx, func(cl coordinatorproto.DRPCCoordinatorClient) error { + _, err := cl.AccountLimitsSet(ctx, req) + return err + }) +} + func (c *coordinatorClient) doClient(ctx context.Context, f func(cl coordinatorproto.DRPCCoordinatorClient) error) error { p, err := c.getPeer(ctx) if err != nil { diff --git a/coordinator/coordinatorproto/coordinator.pb.go b/coordinator/coordinatorproto/coordinator.pb.go index 99fc3be1..2225c5a9 100644 --- a/coordinator/coordinatorproto/coordinator.pb.go +++ b/coordinator/coordinatorproto/coordinator.pb.go @@ -550,115 +550,6 @@ func (m *SpaceReceipt) GetValidUntil() uint64 { return 0 } -// FileLimitCheckRequest contains an account identity and spaceId -// control node checks that identity owns a given space -type FileLimitCheckRequest struct { - AccountIdentity []byte `protobuf:"bytes,1,opt,name=accountIdentity,proto3" json:"accountIdentity,omitempty"` - SpaceId string `protobuf:"bytes,2,opt,name=spaceId,proto3" json:"spaceId,omitempty"` -} - -func (m *FileLimitCheckRequest) Reset() { *m = FileLimitCheckRequest{} } -func (m *FileLimitCheckRequest) String() string { return proto.CompactTextString(m) } -func (*FileLimitCheckRequest) ProtoMessage() {} -func (*FileLimitCheckRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{5} -} -func (m *FileLimitCheckRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *FileLimitCheckRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_FileLimitCheckRequest.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 *FileLimitCheckRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_FileLimitCheckRequest.Merge(m, src) -} -func (m *FileLimitCheckRequest) XXX_Size() int { - return m.Size() -} -func (m *FileLimitCheckRequest) XXX_DiscardUnknown() { - xxx_messageInfo_FileLimitCheckRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_FileLimitCheckRequest proto.InternalMessageInfo - -func (m *FileLimitCheckRequest) GetAccountIdentity() []byte { - if m != nil { - return m.AccountIdentity - } - return nil -} - -func (m *FileLimitCheckRequest) GetSpaceId() string { - if m != nil { - return m.SpaceId - } - return "" -} - -// FileLimitCheckResponse returns a current space limit in bytes -type FileLimitCheckResponse struct { - // Limit in bytes - Limit uint64 `protobuf:"varint,1,opt,name=limit,proto3" json:"limit,omitempty"` - // StorageKey tells a key that filenode should use to save files - StorageKey string `protobuf:"bytes,2,opt,name=storageKey,proto3" json:"storageKey,omitempty"` -} - -func (m *FileLimitCheckResponse) Reset() { *m = FileLimitCheckResponse{} } -func (m *FileLimitCheckResponse) String() string { return proto.CompactTextString(m) } -func (*FileLimitCheckResponse) ProtoMessage() {} -func (*FileLimitCheckResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{6} -} -func (m *FileLimitCheckResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *FileLimitCheckResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_FileLimitCheckResponse.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 *FileLimitCheckResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_FileLimitCheckResponse.Merge(m, src) -} -func (m *FileLimitCheckResponse) XXX_Size() int { - return m.Size() -} -func (m *FileLimitCheckResponse) XXX_DiscardUnknown() { - xxx_messageInfo_FileLimitCheckResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_FileLimitCheckResponse proto.InternalMessageInfo - -func (m *FileLimitCheckResponse) GetLimit() uint64 { - if m != nil { - return m.Limit - } - return 0 -} - -func (m *FileLimitCheckResponse) GetStorageKey() string { - if m != nil { - return m.StorageKey - } - return "" -} - // SpaceStatusCheckRequest contains the spaceId of requested space type SpaceStatusCheckRequest struct { SpaceId string `protobuf:"bytes,1,opt,name=spaceId,proto3" json:"spaceId,omitempty"` @@ -668,7 +559,7 @@ func (m *SpaceStatusCheckRequest) Reset() { *m = SpaceStatusCheckRequest func (m *SpaceStatusCheckRequest) String() string { return proto.CompactTextString(m) } func (*SpaceStatusCheckRequest) ProtoMessage() {} func (*SpaceStatusCheckRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{7} + return fileDescriptor_d94f6f99586adae2, []int{5} } func (m *SpaceStatusCheckRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -713,7 +604,7 @@ func (m *SpaceStatusCheckResponse) Reset() { *m = SpaceStatusCheckRespon func (m *SpaceStatusCheckResponse) String() string { return proto.CompactTextString(m) } func (*SpaceStatusCheckResponse) ProtoMessage() {} func (*SpaceStatusCheckResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{8} + return fileDescriptor_d94f6f99586adae2, []int{6} } func (m *SpaceStatusCheckResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -758,7 +649,7 @@ func (m *SpaceStatusCheckManyRequest) Reset() { *m = SpaceStatusCheckMan func (m *SpaceStatusCheckManyRequest) String() string { return proto.CompactTextString(m) } func (*SpaceStatusCheckManyRequest) ProtoMessage() {} func (*SpaceStatusCheckManyRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{9} + return fileDescriptor_d94f6f99586adae2, []int{7} } func (m *SpaceStatusCheckManyRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -803,7 +694,7 @@ func (m *SpaceStatusCheckManyResponse) Reset() { *m = SpaceStatusCheckMa func (m *SpaceStatusCheckManyResponse) String() string { return proto.CompactTextString(m) } func (*SpaceStatusCheckManyResponse) ProtoMessage() {} func (*SpaceStatusCheckManyResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{10} + return fileDescriptor_d94f6f99586adae2, []int{8} } func (m *SpaceStatusCheckManyResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -851,7 +742,7 @@ func (m *SpaceStatusChangeRequest) Reset() { *m = SpaceStatusChangeReque func (m *SpaceStatusChangeRequest) String() string { return proto.CompactTextString(m) } func (*SpaceStatusChangeRequest) ProtoMessage() {} func (*SpaceStatusChangeRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{11} + return fileDescriptor_d94f6f99586adae2, []int{9} } func (m *SpaceStatusChangeRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -917,7 +808,7 @@ func (m *SpaceStatusChangeResponse) Reset() { *m = SpaceStatusChangeResp func (m *SpaceStatusChangeResponse) String() string { return proto.CompactTextString(m) } func (*SpaceStatusChangeResponse) ProtoMessage() {} func (*SpaceStatusChangeResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{12} + return fileDescriptor_d94f6f99586adae2, []int{10} } func (m *SpaceStatusChangeResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -964,7 +855,7 @@ func (m *NetworkConfigurationRequest) Reset() { *m = NetworkConfiguratio func (m *NetworkConfigurationRequest) String() string { return proto.CompactTextString(m) } func (*NetworkConfigurationRequest) ProtoMessage() {} func (*NetworkConfigurationRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{13} + return fileDescriptor_d94f6f99586adae2, []int{11} } func (m *NetworkConfigurationRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1016,7 +907,7 @@ func (m *NetworkConfigurationResponse) Reset() { *m = NetworkConfigurati func (m *NetworkConfigurationResponse) String() string { return proto.CompactTextString(m) } func (*NetworkConfigurationResponse) ProtoMessage() {} func (*NetworkConfigurationResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{14} + return fileDescriptor_d94f6f99586adae2, []int{12} } func (m *NetworkConfigurationResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1087,7 +978,7 @@ func (m *Node) Reset() { *m = Node{} } func (m *Node) String() string { return proto.CompactTextString(m) } func (*Node) ProtoMessage() {} func (*Node) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{15} + return fileDescriptor_d94f6f99586adae2, []int{13} } func (m *Node) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1147,7 +1038,7 @@ func (m *DeletionConfirmPayloadWithSignature) Reset() { *m = DeletionCon func (m *DeletionConfirmPayloadWithSignature) String() string { return proto.CompactTextString(m) } func (*DeletionConfirmPayloadWithSignature) ProtoMessage() {} func (*DeletionConfirmPayloadWithSignature) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{16} + return fileDescriptor_d94f6f99586adae2, []int{14} } func (m *DeletionConfirmPayloadWithSignature) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1208,7 +1099,7 @@ func (m *DeletionConfirmPayload) Reset() { *m = DeletionConfirmPayload{} func (m *DeletionConfirmPayload) String() string { return proto.CompactTextString(m) } func (*DeletionConfirmPayload) ProtoMessage() {} func (*DeletionConfirmPayload) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{17} + return fileDescriptor_d94f6f99586adae2, []int{15} } func (m *DeletionConfirmPayload) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1283,7 +1174,7 @@ func (m *DeletionLogRequest) Reset() { *m = DeletionLogRequest{} } func (m *DeletionLogRequest) String() string { return proto.CompactTextString(m) } func (*DeletionLogRequest) ProtoMessage() {} func (*DeletionLogRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{18} + return fileDescriptor_d94f6f99586adae2, []int{16} } func (m *DeletionLogRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1337,7 +1228,7 @@ func (m *DeletionLogResponse) Reset() { *m = DeletionLogResponse{} } func (m *DeletionLogResponse) String() string { return proto.CompactTextString(m) } func (*DeletionLogResponse) ProtoMessage() {} func (*DeletionLogResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{19} + return fileDescriptor_d94f6f99586adae2, []int{17} } func (m *DeletionLogResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1397,7 +1288,7 @@ func (m *DeletionLogRecord) Reset() { *m = DeletionLogRecord{} } func (m *DeletionLogRecord) String() string { return proto.CompactTextString(m) } func (*DeletionLogRecord) ProtoMessage() {} func (*DeletionLogRecord) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{20} + return fileDescriptor_d94f6f99586adae2, []int{18} } func (m *DeletionLogRecord) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1473,7 +1364,7 @@ func (m *SpaceDeleteRequest) Reset() { *m = SpaceDeleteRequest{} } func (m *SpaceDeleteRequest) String() string { return proto.CompactTextString(m) } func (*SpaceDeleteRequest) ProtoMessage() {} func (*SpaceDeleteRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{21} + return fileDescriptor_d94f6f99586adae2, []int{19} } func (m *SpaceDeleteRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1539,7 +1430,7 @@ func (m *SpaceDeleteResponse) Reset() { *m = SpaceDeleteResponse{} } func (m *SpaceDeleteResponse) String() string { return proto.CompactTextString(m) } func (*SpaceDeleteResponse) ProtoMessage() {} func (*SpaceDeleteResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{22} + return fileDescriptor_d94f6f99586adae2, []int{20} } func (m *SpaceDeleteResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1585,7 +1476,7 @@ func (m *AccountDeleteRequest) Reset() { *m = AccountDeleteRequest{} } func (m *AccountDeleteRequest) String() string { return proto.CompactTextString(m) } func (*AccountDeleteRequest) ProtoMessage() {} func (*AccountDeleteRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{23} + return fileDescriptor_d94f6f99586adae2, []int{21} } func (m *AccountDeleteRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1644,7 +1535,7 @@ func (m *AccountDeletionConfirmPayload) Reset() { *m = AccountDeletionCo func (m *AccountDeletionConfirmPayload) String() string { return proto.CompactTextString(m) } func (*AccountDeletionConfirmPayload) ProtoMessage() {} func (*AccountDeletionConfirmPayload) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{24} + return fileDescriptor_d94f6f99586adae2, []int{22} } func (m *AccountDeletionConfirmPayload) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1710,7 +1601,7 @@ func (m *AccountDeleteResponse) Reset() { *m = AccountDeleteResponse{} } func (m *AccountDeleteResponse) String() string { return proto.CompactTextString(m) } func (*AccountDeleteResponse) ProtoMessage() {} func (*AccountDeleteResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{25} + return fileDescriptor_d94f6f99586adae2, []int{23} } func (m *AccountDeleteResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1754,7 +1645,7 @@ func (m *AccountRevertDeletionRequest) Reset() { *m = AccountRevertDelet func (m *AccountRevertDeletionRequest) String() string { return proto.CompactTextString(m) } func (*AccountRevertDeletionRequest) ProtoMessage() {} func (*AccountRevertDeletionRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{26} + return fileDescriptor_d94f6f99586adae2, []int{24} } func (m *AccountRevertDeletionRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1791,7 +1682,7 @@ func (m *AccountRevertDeletionResponse) Reset() { *m = AccountRevertDele func (m *AccountRevertDeletionResponse) String() string { return proto.CompactTextString(m) } func (*AccountRevertDeletionResponse) ProtoMessage() {} func (*AccountRevertDeletionResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{27} + return fileDescriptor_d94f6f99586adae2, []int{25} } func (m *AccountRevertDeletionResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1830,7 +1721,7 @@ func (m *AclAddRecordRequest) Reset() { *m = AclAddRecordRequest{} } func (m *AclAddRecordRequest) String() string { return proto.CompactTextString(m) } func (*AclAddRecordRequest) ProtoMessage() {} func (*AclAddRecordRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{28} + return fileDescriptor_d94f6f99586adae2, []int{26} } func (m *AclAddRecordRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1883,7 +1774,7 @@ func (m *AclAddRecordResponse) Reset() { *m = AclAddRecordResponse{} } func (m *AclAddRecordResponse) String() string { return proto.CompactTextString(m) } func (*AclAddRecordResponse) ProtoMessage() {} func (*AclAddRecordResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{29} + return fileDescriptor_d94f6f99586adae2, []int{27} } func (m *AclAddRecordResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1937,7 +1828,7 @@ func (m *AclGetRecordsRequest) Reset() { *m = AclGetRecordsRequest{} } func (m *AclGetRecordsRequest) String() string { return proto.CompactTextString(m) } func (*AclGetRecordsRequest) ProtoMessage() {} func (*AclGetRecordsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{30} + return fileDescriptor_d94f6f99586adae2, []int{28} } func (m *AclGetRecordsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1989,7 +1880,7 @@ func (m *AclGetRecordsResponse) Reset() { *m = AclGetRecordsResponse{} } func (m *AclGetRecordsResponse) String() string { return proto.CompactTextString(m) } func (*AclGetRecordsResponse) ProtoMessage() {} func (*AclGetRecordsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{31} + return fileDescriptor_d94f6f99586adae2, []int{29} } func (m *AclGetRecordsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2037,7 +1928,7 @@ func (m *AccountLimitsSetRequest) Reset() { *m = AccountLimitsSetRequest func (m *AccountLimitsSetRequest) String() string { return proto.CompactTextString(m) } func (*AccountLimitsSetRequest) ProtoMessage() {} func (*AccountLimitsSetRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{32} + return fileDescriptor_d94f6f99586adae2, []int{30} } func (m *AccountLimitsSetRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2108,7 +1999,7 @@ func (m *AccountLimitsSetResponse) Reset() { *m = AccountLimitsSetRespon func (m *AccountLimitsSetResponse) String() string { return proto.CompactTextString(m) } func (*AccountLimitsSetResponse) ProtoMessage() {} func (*AccountLimitsSetResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{33} + return fileDescriptor_d94f6f99586adae2, []int{31} } func (m *AccountLimitsSetResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2149,8 +2040,6 @@ func init() { proto.RegisterType((*SpaceSignResponse)(nil), "coordinator.SpaceSignResponse") proto.RegisterType((*SpaceReceiptWithSignature)(nil), "coordinator.SpaceReceiptWithSignature") proto.RegisterType((*SpaceReceipt)(nil), "coordinator.SpaceReceipt") - proto.RegisterType((*FileLimitCheckRequest)(nil), "coordinator.FileLimitCheckRequest") - proto.RegisterType((*FileLimitCheckResponse)(nil), "coordinator.FileLimitCheckResponse") proto.RegisterType((*SpaceStatusCheckRequest)(nil), "coordinator.SpaceStatusCheckRequest") proto.RegisterType((*SpaceStatusCheckResponse)(nil), "coordinator.SpaceStatusCheckResponse") proto.RegisterType((*SpaceStatusCheckManyRequest)(nil), "coordinator.SpaceStatusCheckManyRequest") @@ -2185,116 +2074,112 @@ func init() { } var fileDescriptor_d94f6f99586adae2 = []byte{ - // 1731 bytes of a gzipped FileDescriptor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5, 0xce, 0x2c, - 0x50, 0x31, 0xd4, 0x58, 0xd7, 0x52, 0xfb, 0xe1, 0xc6, 0x36, 0x33, 0x29, 0xe7, 0x2f, 0xa6, 0xe4, - 0x86, 0x1a, 0x4d, 0x44, 0xc6, 0x07, 0xb8, 0x62, 0x56, 0xeb, 0x8e, 0x9c, 0xef, 0x95, 0x41, 0x14, - 0x9d, 0x94, 0xf3, 0x85, 0x82, 0xed, 0xb8, 0xfb, 0xae, 0x77, 0xe0, 0xea, 0x05, 0x74, 0x02, 0x96, - 0xd2, 0x9b, 0x0f, 0x0e, 0x5c, 0x42, 0x75, 0xad, 0x75, 0x00, 0x33, 0x61, 0x97, 0x83, 0x2a, 0x30, - 0xfd, 0x90, 0x12, 0xb2, 0xb6, 0xb5, 0xa1, 0x17, 0xf8, 0x82, 0x0f, 0x40, 0x7c, 0xa1, 0x71, 0x8f, - 0xad, 0xc7, 0xcf, 0x1a, 0xc7, 0xc4, 0x15, 0xac, 0xf3, 0x6b, 0x75, 0xfd, 0x81, 0xcf, 0x91, 0x09, - 0x34, 0x0f, 0x73, 0x9b, 0x66, 0xcf, 0x71, 0x3b, 0x5c, 0x22, 0x87, 0x4a, 0xdc, 0x88, 0x2d, 0x73, - 0xd8, 0x23, 0x2e, 0xdb, 0xa2, 0x9e, 0x45, 0x7c, 0xdf, 0x71, 0x3b, 0x7c, 0x67, 0xb2, 0x75, 0x35, - 0x7e, 0xe3, 0x95, 0x06, 0x19, 0xcd, 0x40, 0x89, 0xeb, 0x10, 0x28, 0x20, 0xeb, 0xab, 0xae, 0xf1, - 0x85, 0xbc, 0x32, 0xbd, 0xd8, 0xba, 0x0e, 0xc7, 0x47, 0x3c, 0xac, 0x68, 0x0a, 0x8a, 0x0f, 0xf6, - 0xf5, 0x02, 0x57, 0x05, 0x93, 0x9e, 0xf7, 0x9c, 0x6c, 0x51, 0xd2, 0x37, 0x29, 0xd1, 0x35, 0x04, - 0x30, 0x15, 0x40, 0x7a, 0xb1, 0xfd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99, 0xd6, 0xa3, 0x7e, 0x66, - 0x0c, 0x85, 0xea, 0x1c, 0xe5, 0x3d, 0xcf, 0x38, 0x27, 0xdb, 0x37, 0x64, 0x9c, 0x93, 0xd7, 0x0e, - 0x3c, 0x05, 0x3d, 0xfd, 0x28, 0xa6, 0xf2, 0x76, 0x44, 0x4b, 0x90, 0xca, 0xdb, 0x51, 0x2f, 0xeb, - 0x8d, 0x4f, 0xff, 0x7a, 0xdd, 0xd4, 0x5e, 0xbe, 0x6e, 0x6a, 0xaf, 0x5e, 0x37, 0xb5, 0xef, 0xde, - 0x34, 0x0b, 0x2f, 0xdf, 0x34, 0x0b, 0xff, 0xbc, 0x69, 0x16, 0xbe, 0x69, 0x8c, 0xfb, 0xa0, 0xfc, - 0x6c, 0x4a, 0xfc, 0xbb, 0xf2, 0x5f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x0a, 0x91, 0x31, 0xc1, 0x77, - 0x16, 0x00, 0x00, + // 1667 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x18, 0x4d, 0x6f, 0x14, 0x47, + 0x76, 0x7a, 0x3c, 0xb6, 0x67, 0xde, 0xd8, 0xa6, 0x5d, 0xb6, 0x61, 0x18, 0x86, 0xc1, 0xf4, 0xb2, + 0xac, 0x99, 0x5d, 0x01, 0x3b, 0xec, 0xae, 0x16, 0xb1, 0xd2, 0x62, 0x0c, 0x21, 0x26, 0x60, 0xac, + 0x32, 0x06, 0x29, 0x39, 0xa0, 0xa6, 0xbb, 0x3c, 0x6e, 0x79, 0xa6, 0x7a, 0x52, 0x5d, 0x83, 0xf1, + 0xbf, 0xc8, 0x2d, 0xa7, 0xdc, 0x23, 0x25, 0x87, 0x28, 0x52, 0x94, 0x43, 0xa4, 0x9c, 0x73, 0xe4, + 0x98, 0x4b, 0x24, 0x04, 0xff, 0x20, 0xbf, 0x20, 0xaa, 0xea, 0xea, 0xee,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 0x94, 0x99, 0xf9, 0x29, 0x67, 0x56, 0x32, 0xce, 0x14, 0xd8, + 0x3d, 0xaf, 0x4f, 0xee, 0x33, 0x7f, 0x14, 0xba, 0xba, 0x86, 0x13, 0x80, 0xf5, 0x7d, 0xf4, 0xf0, + 0x90, 0x97, 0x7c, 0xc0, 0x3e, 0xd9, 0x01, 0x33, 0x02, 0xdd, 0x55, 0x9d, 0x40, 0xd9, 0x92, 0x83, + 0x5b, 0x9b, 0xb0, 0x94, 0xd2, 0x59, 0x45, 0xb6, 0x0b, 0xcb, 0xdc, 0xbf, 0xa3, 0xa0, 0x6e, 0xf2, + 0xfc, 0x31, 0xa4, 0x98, 0x42, 0x9c, 0x45, 0x61, 0x79, 0x3d, 0xcc, 0xdc, 0xb4, 0x03, 0x0a, 0xcd, + 0x34, 0xfe, 0x84, 0x99, 0xe5, 0x42, 0x33, 0xad, 0xaf, 0x0c, 0x38, 0xaf, 0x5f, 0x98, 0x2f, 0xca, + 0x71, 0x1d, 0xa8, 0xa0, 0xf4, 0xca, 0x27, 0x28, 0xbd, 0xa9, 0x89, 0xa5, 0x97, 0xcd, 0x16, 0xeb, + 0x13, 0x58, 0xc9, 0xf8, 0xe3, 0x3d, 0x9c, 0xdb, 0x86, 0x96, 0x12, 0x86, 0xc9, 0x4b, 0xc2, 0x62, + 0x8b, 0xa3, 0x57, 0xef, 0x85, 0xd8, 0x17, 0x59, 0x7c, 0x78, 0xa9, 0x08, 0xf4, 0xba, 0xd3, 0x5f, + 0x77, 0x5d, 0x55, 0x8a, 0xc7, 0x66, 0x67, 0x23, 0x19, 0x7e, 0xa1, 0x73, 0xe2, 0xd9, 0xf6, 0x50, + 0x04, 0x5a, 0x17, 0xa5, 0xec, 0x6a, 0x42, 0x35, 0xac, 0xef, 0x58, 0x58, 0x7c, 0x9e, 0x20, 0xed, + 0x81, 0x94, 0x76, 0x9f, 0xf0, 0x50, 0x5a, 0x70, 0x22, 0xcd, 0x6c, 0xa7, 0xff, 0x31, 0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, 0x54, 0x7f, 0x35, 0x0d, + 0x71, 0x50, 0x21, 0x33, 0xcb, 0x9d, 0xdb, 0x70, 0x66, 0xcc, 0x60, 0x45, 0x33, 0x50, 0x7e, 0x7c, + 0x60, 0x96, 0x84, 0x2a, 0x98, 0x0c, 0xfc, 0x97, 0x64, 0x9b, 0x91, 0xa1, 0xcd, 0x88, 0x69, 0x20, + 0x80, 0x99, 0x10, 0x64, 0x96, 0xbb, 0xbf, 0x57, 0xa1, 0xae, 0x19, 0x84, 0x1e, 0x40, 0x2d, 0x5e, + 0x86, 0x51, 0xc1, 0x16, 0xad, 0x7d, 0x9c, 0x68, 0xb6, 0xc7, 0xa1, 0x55, 0xed, 0x3f, 0x8f, 0x3e, + 0x68, 0x24, 0x2b, 0x12, 0xba, 0x34, 0xee, 0x21, 0xaf, 0x2f, 0x82, 0xcd, 0xbf, 0x1e, 0x43, 0xa5, + 0x2e, 0x38, 0x48, 0x25, 0x46, 0xbc, 0x83, 0xa1, 0xb5, 0x89, 0xec, 0xda, 0x86, 0xd7, 0xbc, 0x72, + 0x02, 0x4a, 0x75, 0xd9, 0x8b, 0xe8, 0x33, 0x81, 0xb6, 0xb0, 0xa0, 0x09, 0x8a, 0x6a, 0x2b, 0x5b, + 0xf3, 0xf2, 0x71, 0x64, 0x89, 0x41, 0x45, 0xeb, 0x47, 0xc6, 0xa0, 0x09, 0xfb, 0x4d, 0xc6, 0xa0, + 0x89, 0xbb, 0xcc, 0x36, 0xd4, 0xb5, 0xe4, 0x41, 0x17, 0xc6, 0xbf, 0xd7, 0x42, 0xd1, 0xab, 0xe3, + 0x09, 0x12, 0x89, 0x5a, 0xdf, 0x42, 0x05, 0x4b, 0x5b, 0xea, 0x81, 0x92, 0x91, 0x58, 0xf4, 0x1c, + 0x7a, 0x0a, 0xf3, 0xa9, 0x06, 0x85, 0x2e, 0xa6, 0x58, 0x8a, 0x9e, 0x3d, 0x4d, 0x6b, 0x12, 0x89, + 0x92, 0x4b, 0xe3, 0x27, 0x42, 0x7a, 0x6a, 0xa3, 0x2b, 0x45, 0xcc, 0x85, 0x93, 0xbf, 0xd9, 0x39, + 0x09, 0xa9, 0xba, 0x6f, 0x07, 0xe6, 0xf4, 0xc9, 0x8d, 0x56, 0x33, 0xbc, 0xb9, 0xf7, 0x41, 0xf3, + 0xe2, 0x04, 0x0a, 0xdd, 0x39, 0xda, 0xd0, 0xcd, 0x39, 0x27, 0x3f, 0xdc, 0x73, 0xce, 0x29, 0x9a, + 0xd9, 0xcf, 0xc1, 0xcc, 0x4e, 0xae, 0x4c, 0xdd, 0x8e, 0x99, 0xdb, 0x99, 0xba, 0x1d, 0x37, 0xfe, + 0xee, 0xfc, 0xe7, 0x97, 0xb7, 0x6d, 0xe3, 0xf5, 0xdb, 0xb6, 0xf1, 0xe6, 0x6d, 0xdb, 0xf8, 0xe2, + 0x5d, 0xbb, 0xf4, 0xfa, 0x5d, 0xbb, 0xf4, 0xeb, 0xbb, 0x76, 0xe9, 0xd3, 0xd6, 0xa4, 0x0f, 0xa9, + 0x2f, 0x66, 0xe4, 0xbf, 0x1b, 0x7f, 0x04, 0x00, 0x00, 0xff, 0xff, 0x82, 0x8a, 0x2d, 0xb0, 0x6f, + 0x15, 0x00, 0x00, } func (m *SpaceSignRequest) Marshal() (dAtA []byte, err error) { @@ -2524,78 +2409,6 @@ func (m *SpaceReceipt) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *FileLimitCheckRequest) 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 *FileLimitCheckRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *FileLimitCheckRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.SpaceId) > 0 { - i -= len(m.SpaceId) - copy(dAtA[i:], m.SpaceId) - i = encodeVarintCoordinator(dAtA, i, uint64(len(m.SpaceId))) - i-- - dAtA[i] = 0x12 - } - if len(m.AccountIdentity) > 0 { - i -= len(m.AccountIdentity) - copy(dAtA[i:], m.AccountIdentity) - i = encodeVarintCoordinator(dAtA, i, uint64(len(m.AccountIdentity))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *FileLimitCheckResponse) 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 *FileLimitCheckResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *FileLimitCheckResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.StorageKey) > 0 { - i -= len(m.StorageKey) - copy(dAtA[i:], m.StorageKey) - i = encodeVarintCoordinator(dAtA, i, uint64(len(m.StorageKey))) - i-- - dAtA[i] = 0x12 - } - if m.Limit != 0 { - i = encodeVarintCoordinator(dAtA, i, uint64(m.Limit)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - func (m *SpaceStatusCheckRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -3756,39 +3569,6 @@ func (m *SpaceReceipt) Size() (n int) { return n } -func (m *FileLimitCheckRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.AccountIdentity) - if l > 0 { - n += 1 + l + sovCoordinator(uint64(l)) - } - l = len(m.SpaceId) - if l > 0 { - n += 1 + l + sovCoordinator(uint64(l)) - } - return n -} - -func (m *FileLimitCheckResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Limit != 0 { - n += 1 + sovCoordinator(uint64(m.Limit)) - } - l = len(m.StorageKey) - if l > 0 { - n += 1 + l + sovCoordinator(uint64(l)) - } - return n -} - func (m *SpaceStatusCheckRequest) Size() (n int) { if m == nil { return 0 @@ -4981,223 +4761,6 @@ func (m *SpaceReceipt) Unmarshal(dAtA []byte) error { } return nil } -func (m *FileLimitCheckRequest) 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 ErrIntOverflowCoordinator - } - 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: FileLimitCheckRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: FileLimitCheckRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AccountIdentity", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthCoordinator - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthCoordinator - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AccountIdentity = append(m.AccountIdentity[:0], dAtA[iNdEx:postIndex]...) - if m.AccountIdentity == nil { - m.AccountIdentity = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SpaceId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - 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 ErrInvalidLengthCoordinator - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCoordinator - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SpaceId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCoordinator(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCoordinator - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *FileLimitCheckResponse) 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 ErrIntOverflowCoordinator - } - 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: FileLimitCheckResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: FileLimitCheckResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Limit", wireType) - } - m.Limit = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Limit |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StorageKey", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - 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 ErrInvalidLengthCoordinator - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCoordinator - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.StorageKey = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCoordinator(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCoordinator - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func (m *SpaceStatusCheckRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/coordinator/coordinatorproto/coordinator_drpc.pb.go b/coordinator/coordinatorproto/coordinator_drpc.pb.go index 055de61d..20723965 100644 --- a/coordinator/coordinatorproto/coordinator_drpc.pb.go +++ b/coordinator/coordinatorproto/coordinator_drpc.pb.go @@ -41,7 +41,6 @@ type DRPCCoordinatorClient interface { DRPCConn() drpc.Conn SpaceSign(ctx context.Context, in *SpaceSignRequest) (*SpaceSignResponse, error) - FileLimitCheck(ctx context.Context, in *FileLimitCheckRequest) (*FileLimitCheckResponse, error) SpaceStatusCheck(ctx context.Context, in *SpaceStatusCheckRequest) (*SpaceStatusCheckResponse, error) SpaceStatusCheckMany(ctx context.Context, in *SpaceStatusCheckManyRequest) (*SpaceStatusCheckManyResponse, error) SpaceStatusChange(ctx context.Context, in *SpaceStatusChangeRequest) (*SpaceStatusChangeResponse, error) @@ -74,15 +73,6 @@ func (c *drpcCoordinatorClient) SpaceSign(ctx context.Context, in *SpaceSignRequ return out, nil } -func (c *drpcCoordinatorClient) FileLimitCheck(ctx context.Context, in *FileLimitCheckRequest) (*FileLimitCheckResponse, error) { - out := new(FileLimitCheckResponse) - err := c.cc.Invoke(ctx, "/coordinator.Coordinator/FileLimitCheck", drpcEncoding_File_coordinator_coordinatorproto_protos_coordinator_proto{}, in, out) - if err != nil { - return nil, err - } - return out, nil -} - func (c *drpcCoordinatorClient) SpaceStatusCheck(ctx context.Context, in *SpaceStatusCheckRequest) (*SpaceStatusCheckResponse, error) { out := new(SpaceStatusCheckResponse) err := c.cc.Invoke(ctx, "/coordinator.Coordinator/SpaceStatusCheck", drpcEncoding_File_coordinator_coordinatorproto_protos_coordinator_proto{}, in, out) @@ -184,7 +174,6 @@ func (c *drpcCoordinatorClient) AccountLimitsSet(ctx context.Context, in *Accoun type DRPCCoordinatorServer interface { SpaceSign(context.Context, *SpaceSignRequest) (*SpaceSignResponse, error) - FileLimitCheck(context.Context, *FileLimitCheckRequest) (*FileLimitCheckResponse, error) SpaceStatusCheck(context.Context, *SpaceStatusCheckRequest) (*SpaceStatusCheckResponse, error) SpaceStatusCheckMany(context.Context, *SpaceStatusCheckManyRequest) (*SpaceStatusCheckManyResponse, error) SpaceStatusChange(context.Context, *SpaceStatusChangeRequest) (*SpaceStatusChangeResponse, error) @@ -204,10 +193,6 @@ func (s *DRPCCoordinatorUnimplementedServer) SpaceSign(context.Context, *SpaceSi return nil, drpcerr.WithCode(errors.New("Unimplemented"), drpcerr.Unimplemented) } -func (s *DRPCCoordinatorUnimplementedServer) FileLimitCheck(context.Context, *FileLimitCheckRequest) (*FileLimitCheckResponse, error) { - return nil, drpcerr.WithCode(errors.New("Unimplemented"), drpcerr.Unimplemented) -} - func (s *DRPCCoordinatorUnimplementedServer) SpaceStatusCheck(context.Context, *SpaceStatusCheckRequest) (*SpaceStatusCheckResponse, error) { return nil, drpcerr.WithCode(errors.New("Unimplemented"), drpcerr.Unimplemented) } @@ -254,7 +239,7 @@ func (s *DRPCCoordinatorUnimplementedServer) AccountLimitsSet(context.Context, * type DRPCCoordinatorDescription struct{} -func (DRPCCoordinatorDescription) NumMethods() int { return 13 } +func (DRPCCoordinatorDescription) NumMethods() int { return 12 } func (DRPCCoordinatorDescription) Method(n int) (string, drpc.Encoding, drpc.Receiver, interface{}, bool) { switch n { @@ -268,15 +253,6 @@ func (DRPCCoordinatorDescription) Method(n int) (string, drpc.Encoding, drpc.Rec ) }, DRPCCoordinatorServer.SpaceSign, true case 1: - return "/coordinator.Coordinator/FileLimitCheck", drpcEncoding_File_coordinator_coordinatorproto_protos_coordinator_proto{}, - func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) { - return srv.(DRPCCoordinatorServer). - FileLimitCheck( - ctx, - in1.(*FileLimitCheckRequest), - ) - }, DRPCCoordinatorServer.FileLimitCheck, true - case 2: return "/coordinator.Coordinator/SpaceStatusCheck", drpcEncoding_File_coordinator_coordinatorproto_protos_coordinator_proto{}, func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) { return srv.(DRPCCoordinatorServer). @@ -285,7 +261,7 @@ func (DRPCCoordinatorDescription) Method(n int) (string, drpc.Encoding, drpc.Rec in1.(*SpaceStatusCheckRequest), ) }, DRPCCoordinatorServer.SpaceStatusCheck, true - case 3: + case 2: return "/coordinator.Coordinator/SpaceStatusCheckMany", drpcEncoding_File_coordinator_coordinatorproto_protos_coordinator_proto{}, func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) { return srv.(DRPCCoordinatorServer). @@ -294,7 +270,7 @@ func (DRPCCoordinatorDescription) Method(n int) (string, drpc.Encoding, drpc.Rec in1.(*SpaceStatusCheckManyRequest), ) }, DRPCCoordinatorServer.SpaceStatusCheckMany, true - case 4: + case 3: return "/coordinator.Coordinator/SpaceStatusChange", drpcEncoding_File_coordinator_coordinatorproto_protos_coordinator_proto{}, func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) { return srv.(DRPCCoordinatorServer). @@ -303,7 +279,7 @@ func (DRPCCoordinatorDescription) Method(n int) (string, drpc.Encoding, drpc.Rec in1.(*SpaceStatusChangeRequest), ) }, DRPCCoordinatorServer.SpaceStatusChange, true - case 5: + case 4: return "/coordinator.Coordinator/NetworkConfiguration", drpcEncoding_File_coordinator_coordinatorproto_protos_coordinator_proto{}, func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) { return srv.(DRPCCoordinatorServer). @@ -312,7 +288,7 @@ func (DRPCCoordinatorDescription) Method(n int) (string, drpc.Encoding, drpc.Rec in1.(*NetworkConfigurationRequest), ) }, DRPCCoordinatorServer.NetworkConfiguration, true - case 6: + case 5: return "/coordinator.Coordinator/DeletionLog", drpcEncoding_File_coordinator_coordinatorproto_protos_coordinator_proto{}, func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) { return srv.(DRPCCoordinatorServer). @@ -321,7 +297,7 @@ func (DRPCCoordinatorDescription) Method(n int) (string, drpc.Encoding, drpc.Rec in1.(*DeletionLogRequest), ) }, DRPCCoordinatorServer.DeletionLog, true - case 7: + case 6: return "/coordinator.Coordinator/SpaceDelete", drpcEncoding_File_coordinator_coordinatorproto_protos_coordinator_proto{}, func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) { return srv.(DRPCCoordinatorServer). @@ -330,7 +306,7 @@ func (DRPCCoordinatorDescription) Method(n int) (string, drpc.Encoding, drpc.Rec in1.(*SpaceDeleteRequest), ) }, DRPCCoordinatorServer.SpaceDelete, true - case 8: + case 7: return "/coordinator.Coordinator/AccountDelete", drpcEncoding_File_coordinator_coordinatorproto_protos_coordinator_proto{}, func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) { return srv.(DRPCCoordinatorServer). @@ -339,7 +315,7 @@ func (DRPCCoordinatorDescription) Method(n int) (string, drpc.Encoding, drpc.Rec in1.(*AccountDeleteRequest), ) }, DRPCCoordinatorServer.AccountDelete, true - case 9: + case 8: return "/coordinator.Coordinator/AccountRevertDeletion", drpcEncoding_File_coordinator_coordinatorproto_protos_coordinator_proto{}, func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) { return srv.(DRPCCoordinatorServer). @@ -348,7 +324,7 @@ func (DRPCCoordinatorDescription) Method(n int) (string, drpc.Encoding, drpc.Rec in1.(*AccountRevertDeletionRequest), ) }, DRPCCoordinatorServer.AccountRevertDeletion, true - case 10: + case 9: return "/coordinator.Coordinator/AclAddRecord", drpcEncoding_File_coordinator_coordinatorproto_protos_coordinator_proto{}, func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) { return srv.(DRPCCoordinatorServer). @@ -357,7 +333,7 @@ func (DRPCCoordinatorDescription) Method(n int) (string, drpc.Encoding, drpc.Rec in1.(*AclAddRecordRequest), ) }, DRPCCoordinatorServer.AclAddRecord, true - case 11: + case 10: return "/coordinator.Coordinator/AclGetRecords", drpcEncoding_File_coordinator_coordinatorproto_protos_coordinator_proto{}, func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) { return srv.(DRPCCoordinatorServer). @@ -366,7 +342,7 @@ func (DRPCCoordinatorDescription) Method(n int) (string, drpc.Encoding, drpc.Rec in1.(*AclGetRecordsRequest), ) }, DRPCCoordinatorServer.AclGetRecords, true - case 12: + case 11: return "/coordinator.Coordinator/AccountLimitsSet", drpcEncoding_File_coordinator_coordinatorproto_protos_coordinator_proto{}, func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) { return srv.(DRPCCoordinatorServer). @@ -400,22 +376,6 @@ func (x *drpcCoordinator_SpaceSignStream) SendAndClose(m *SpaceSignResponse) err return x.CloseSend() } -type DRPCCoordinator_FileLimitCheckStream interface { - drpc.Stream - SendAndClose(*FileLimitCheckResponse) error -} - -type drpcCoordinator_FileLimitCheckStream struct { - drpc.Stream -} - -func (x *drpcCoordinator_FileLimitCheckStream) SendAndClose(m *FileLimitCheckResponse) error { - if err := x.MsgSend(m, drpcEncoding_File_coordinator_coordinatorproto_protos_coordinator_proto{}); err != nil { - return err - } - return x.CloseSend() -} - type DRPCCoordinator_SpaceStatusCheckStream interface { drpc.Stream SendAndClose(*SpaceStatusCheckResponse) error diff --git a/coordinator/coordinatorproto/protos/coordinator.proto b/coordinator/coordinatorproto/protos/coordinator.proto index 1a423f5d..29314cee 100644 --- a/coordinator/coordinatorproto/protos/coordinator.proto +++ b/coordinator/coordinatorproto/protos/coordinator.proto @@ -7,12 +7,6 @@ service Coordinator { // SpaceSign signs a space creation operation rpc SpaceSign(SpaceSignRequest) returns (SpaceSignResponse); - // FileLimitCheck checks a limit by account and space - // can be used only: - // - if a handshake identity matches a given identity - // - if a requester contains in nodeconf list - rpc FileLimitCheck(FileLimitCheckRequest) returns (FileLimitCheckResponse); - // SpaceStatusCheck checks the status of space and tells if it is deleted or not rpc SpaceStatusCheck(SpaceStatusCheckRequest) returns (SpaceStatusCheckResponse); @@ -41,7 +35,7 @@ service Coordinator { rpc AclAddRecord(AclAddRecordRequest) returns (AclAddRecordResponse); // AclGetRecords gets acl records rpc AclGetRecords(AclGetRecordsRequest) returns (AclGetRecordsResponse); - + // AccountLimitsSet sets limits to the account. Can be used only by a network config member rpc AccountLimitsSet(AccountLimitsSetRequest) returns (AccountLimitsSetResponse); } @@ -112,21 +106,6 @@ message SpaceReceipt { uint64 validUntil = 5; } -// FileLimitCheckRequest contains an account identity and spaceId -// control node checks that identity owns a given space -message FileLimitCheckRequest { - bytes accountIdentity = 1; - string spaceId = 2; -} - -// FileLimitCheckResponse returns a current space limit in bytes -message FileLimitCheckResponse { - // Limit in bytes - uint64 limit = 1; - // StorageKey tells a key that filenode should use to save files - string storageKey = 2; -} - // SpaceStatusCheckRequest contains the spaceId of requested space message SpaceStatusCheckRequest { string spaceId = 1; From b9d85b09bed804e54fae27147654b5d6ffef8db7 Mon Sep 17 00:00:00 2001 From: Sergey Cherepanov Date: Tue, 12 Mar 2024 18:38:22 +0100 Subject: [PATCH 038/140] generate mocks --- .../object/acl/list/mock_list/mock_list.go | 1 + .../acl/syncacl/mock_syncacl/mock_syncacl.go | 1 + .../mock_treesyncer/mock_treesyncer.go | 1 + .../mock_coordinatorclient.go | 29 +++++++++---------- 4 files changed, 17 insertions(+), 15 deletions(-) diff --git a/commonspace/object/acl/list/mock_list/mock_list.go b/commonspace/object/acl/list/mock_list/mock_list.go index 4f965735..53fb5686 100644 --- a/commonspace/object/acl/list/mock_list/mock_list.go +++ b/commonspace/object/acl/list/mock_list/mock_list.go @@ -5,6 +5,7 @@ // // mockgen -destination mock_list/mock_list.go github.com/anyproto/any-sync/commonspace/object/acl/list AclList // + // Package mock_list is a generated GoMock package. package mock_list diff --git a/commonspace/object/acl/syncacl/mock_syncacl/mock_syncacl.go b/commonspace/object/acl/syncacl/mock_syncacl/mock_syncacl.go index 8ff0c633..c9f88108 100644 --- a/commonspace/object/acl/syncacl/mock_syncacl/mock_syncacl.go +++ b/commonspace/object/acl/syncacl/mock_syncacl/mock_syncacl.go @@ -5,6 +5,7 @@ // // mockgen -destination mock_syncacl/mock_syncacl.go github.com/anyproto/any-sync/commonspace/object/acl/syncacl SyncAcl,SyncClient,RequestFactory,AclSyncProtocol // + // Package mock_syncacl is a generated GoMock package. package mock_syncacl diff --git a/commonspace/object/treesyncer/mock_treesyncer/mock_treesyncer.go b/commonspace/object/treesyncer/mock_treesyncer/mock_treesyncer.go index 257afd19..fb68da8e 100644 --- a/commonspace/object/treesyncer/mock_treesyncer/mock_treesyncer.go +++ b/commonspace/object/treesyncer/mock_treesyncer/mock_treesyncer.go @@ -5,6 +5,7 @@ // // mockgen -destination mock_treesyncer/mock_treesyncer.go github.com/anyproto/any-sync/commonspace/object/treesyncer TreeSyncer // + // Package mock_treesyncer is a generated GoMock package. package mock_treesyncer diff --git a/coordinator/coordinatorclient/mock_coordinatorclient/mock_coordinatorclient.go b/coordinator/coordinatorclient/mock_coordinatorclient/mock_coordinatorclient.go index c80c92da..bb38971b 100644 --- a/coordinator/coordinatorclient/mock_coordinatorclient/mock_coordinatorclient.go +++ b/coordinator/coordinatorclient/mock_coordinatorclient/mock_coordinatorclient.go @@ -59,6 +59,20 @@ func (mr *MockCoordinatorClientMockRecorder) AccountDelete(arg0, arg1 any) *gomo return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AccountDelete", reflect.TypeOf((*MockCoordinatorClient)(nil).AccountDelete), arg0, arg1) } +// AccountLimitsSet mocks base method. +func (m *MockCoordinatorClient) AccountLimitsSet(arg0 context.Context, arg1 *coordinatorproto.AccountLimitsSetRequest) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "AccountLimitsSet", arg0, arg1) + ret0, _ := ret[0].(error) + return ret0 +} + +// AccountLimitsSet indicates an expected call of AccountLimitsSet. +func (mr *MockCoordinatorClientMockRecorder) AccountLimitsSet(arg0, arg1 any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AccountLimitsSet", reflect.TypeOf((*MockCoordinatorClient)(nil).AccountLimitsSet), arg0, arg1) +} + // AccountRevertDeletion mocks base method. func (m *MockCoordinatorClient) AccountRevertDeletion(arg0 context.Context) error { m.ctrl.T.Helper() @@ -118,21 +132,6 @@ func (mr *MockCoordinatorClientMockRecorder) DeletionLog(arg0, arg1, arg2 any) * return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeletionLog", reflect.TypeOf((*MockCoordinatorClient)(nil).DeletionLog), arg0, arg1, arg2) } -// FileLimitCheck mocks base method. -func (m *MockCoordinatorClient) FileLimitCheck(arg0 context.Context, arg1 string, arg2 []byte) (*coordinatorproto.FileLimitCheckResponse, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "FileLimitCheck", arg0, arg1, arg2) - ret0, _ := ret[0].(*coordinatorproto.FileLimitCheckResponse) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// FileLimitCheck indicates an expected call of FileLimitCheck. -func (mr *MockCoordinatorClientMockRecorder) FileLimitCheck(arg0, arg1, arg2 any) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FileLimitCheck", reflect.TypeOf((*MockCoordinatorClient)(nil).FileLimitCheck), arg0, arg1, arg2) -} - // IdentityRepoGet mocks base method. func (m *MockCoordinatorClient) IdentityRepoGet(arg0 context.Context, arg1, arg2 []string) ([]*identityrepoproto.DataWithIdentity, error) { m.ctrl.T.Helper() From 870f6375dfbeb4f0e622da24ef33be0a7d458148 Mon Sep 17 00:00:00 2001 From: Sergey Cherepanov Date: Tue, 12 Mar 2024 19:47:31 +0100 Subject: [PATCH 039/140] fix test --- commonspace/spaceutils_test.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/commonspace/spaceutils_test.go b/commonspace/spaceutils_test.go index dd044500..00cd374f 100644 --- a/commonspace/spaceutils_test.go +++ b/commonspace/spaceutils_test.go @@ -374,9 +374,15 @@ func (t *mockTreeManager) DeleteTree(ctx context.Context, spaceId, treeId string return nil } +var _ coordinatorclient.CoordinatorClient = (*mockCoordinatorClient)(nil) + type mockCoordinatorClient struct { } +func (m mockCoordinatorClient) AccountLimitsSet(ctx context.Context, req *coordinatorproto.AccountLimitsSetRequest) error { + return nil +} + func (m mockCoordinatorClient) SpaceDelete(ctx context.Context, spaceId string, conf *coordinatorproto.DeletionConfirmPayloadWithSignature) (err error) { return } @@ -401,10 +407,6 @@ func (m mockCoordinatorClient) SpaceSign(ctx context.Context, payload coordinato return } -func (m mockCoordinatorClient) FileLimitCheck(ctx context.Context, spaceId string, identity []byte) (response *coordinatorproto.FileLimitCheckResponse, err error) { - return -} - func (m mockCoordinatorClient) NetworkConfiguration(ctx context.Context, currentId string) (*coordinatorproto.NetworkConfigurationResponse, error) { return nil, nil } From 3b41982485ad629efc6add7150bcc4842badfe52 Mon Sep 17 00:00:00 2001 From: Sergey Cherepanov Date: Thu, 14 Mar 2024 13:58:22 +0100 Subject: [PATCH 040/140] fileproto: blockGetRequest.wait --- commonfile/fileproto/file.pb.go | 170 +++++++++++++++---------- commonfile/fileproto/protos/file.proto | 1 + 2 files changed, 107 insertions(+), 64 deletions(-) diff --git a/commonfile/fileproto/file.pb.go b/commonfile/fileproto/file.pb.go index 3840f063..2afd1b94 100644 --- a/commonfile/fileproto/file.pb.go +++ b/commonfile/fileproto/file.pb.go @@ -132,6 +132,7 @@ var xxx_messageInfo_Ok proto.InternalMessageInfo type BlockGetRequest struct { SpaceId string `protobuf:"bytes,1,opt,name=spaceId,proto3" json:"spaceId,omitempty"` Cid []byte `protobuf:"bytes,2,opt,name=cid,proto3" json:"cid,omitempty"` + Wait bool `protobuf:"varint,3,opt,name=wait,proto3" json:"wait,omitempty"` } func (m *BlockGetRequest) Reset() { *m = BlockGetRequest{} } @@ -181,6 +182,13 @@ func (m *BlockGetRequest) GetCid() []byte { return nil } +func (m *BlockGetRequest) GetWait() bool { + if m != nil { + return m.Wait + } + return false +} + type BlockGetResponse struct { Cid []byte `protobuf:"bytes,1,opt,name=cid,proto3" json:"cid,omitempty"` Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` @@ -1308,70 +1316,71 @@ func init() { } var fileDescriptor_fd665a7e11c833d5 = []byte{ - // 1004 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0x41, 0x73, 0x1b, 0x35, - 0x14, 0xce, 0xda, 0x1b, 0xd7, 0x7e, 0x89, 0xed, 0xb5, 0x92, 0x06, 0xb3, 0x0d, 0x1e, 0x8f, 0x0e, - 0x9d, 0x4c, 0xe8, 0xa4, 0x9d, 0x14, 0x86, 0x5e, 0x7a, 0xb0, 0x1d, 0x9b, 0xba, 0x65, 0x1a, 0xd8, - 0x4c, 0xa7, 0x03, 0x5c, 0x58, 0xef, 0xca, 0xc9, 0x12, 0x67, 0x15, 0x56, 0x32, 0x24, 0xfc, 0x0a, - 0xae, 0xfc, 0x05, 0x7e, 0x49, 0x8f, 0x3d, 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2, 0x7f, 0xa9, 0x47, 0x25, 0xf9, 0xe7, 0xf1, 0xbf, 0x01, - 0x00, 0x00, 0xff, 0xff, 0xd1, 0x3b, 0x80, 0x72, 0x71, 0x0b, 0x00, 0x00, + // 1014 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0x41, 0x73, 0xdb, 0x44, + 0x14, 0xb6, 0x6c, 0xc5, 0xb5, 0x5f, 0x62, 0x5b, 0xde, 0xa4, 0xc1, 0xa8, 0xc1, 0xe3, 0xd9, 0x43, + 0xc7, 0x13, 0x3a, 0x69, 0x27, 0x85, 0xa1, 0x17, 0x0e, 0xb6, 0x63, 0x53, 0xb7, 0x4c, 0x43, 0x95, + 0xe9, 0x74, 0x80, 0x0b, 0xb2, 0xb4, 0x4e, 0x44, 0x1c, 0x29, 0x68, 0xd7, 0x34, 0xe1, 0x57, 0x70, + 0xe5, 0x2f, 0xf0, 0x4b, 0x7a, 0xec, 0x91, 0x1b, 0x4c, 0x72, 0xe3, 0x57, 0x30, 0xbb, 0x2b, 0x5b, + 0xab, 0x95, 0xd3, 0x74, 0x80, 0x8b, 0xb3, 0xfb, 0xed, 0x7b, 0xdf, 0x7b, 0xef, 0x5b, 0xed, 0x7b, + 0x81, 0xfb, 0x5e, 0x74, 0x76, 0x16, 0x85, 0xd3, 0x60, 0x46, 0x1e, 0xf2, 0x9f, 0xf3, 0x38, 0x62, + 0xd1, 0x43, 0xf1, 0x4b, 0x05, 0xb0, 0x27, 0xd6, 0xa8, 0xc2, 0xd7, 0xf4, 0x32, 0xf4, 0xb0, 0x09, + 0xc5, 0xc3, 0x53, 0xfc, 0x12, 0x1a, 0xfd, 0x59, 0xe4, 0x9d, 0x7e, 0x45, 0x98, 0x43, 0x7e, 0x9a, + 0x13, 0xca, 0x50, 0x0b, 0xee, 0xd0, 0x73, 0xd7, 0x23, 0x63, 0xbf, 0x65, 0x74, 0x8c,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36, 0x4f, 0x01, 0x8d, 0x78, 0x06, 0x07, 0x64, 0x46, 0x18, 0xb9, 0x9d, 0xbb, + 0x05, 0x77, 0x24, 0x9b, 0x94, 0xb8, 0xea, 0x2c, 0xb6, 0xf8, 0x2e, 0x6c, 0x66, 0x98, 0xa4, 0xca, + 0x78, 0x04, 0x96, 0x80, 0xc7, 0xe1, 0x34, 0xfa, 0x2f, 0xf4, 0x43, 0x68, 0x2a, 0x3c, 0xc9, 0x15, + 0x3e, 0x82, 0xea, 0x74, 0x01, 0x26, 0x37, 0x87, 0x52, 0x45, 0xb9, 0xbd, 0x30, 0x4f, 0x8d, 0xf0, + 0x0f, 0x50, 0x59, 0xc0, 0x8a, 0x4e, 0x46, 0x46, 0xa7, 0x36, 0xc0, 0x9c, 0xba, 0xc7, 0xa4, 0x7f, + 0xc9, 0x88, 0xbc, 0x28, 0xd3, 0x51, 0x10, 0xb4, 0x03, 0x55, 0xae, 0xdd, 0x20, 0x9a, 0x87, 0xf2, + 0x49, 0xd5, 0x9c, 0x14, 0xc0, 0x9f, 0x42, 0x43, 0x24, 0xfa, 0x21, 0x4f, 0x15, 0xef, 0x26, 0xea, + 0xa8, 0x8f, 0xf0, 0x86, 0xb4, 0x70, 0x1d, 0x36, 0xd4, 0x47, 0x80, 0x9f, 0x43, 0x2d, 0xfb, 0x41, + 0xdb, 0x50, 0x49, 0x78, 0xa9, 0x10, 0xa3, 0xea, 0x2c, 0xf7, 0xbc, 0x26, 0x77, 0x36, 0x8b, 0xde, + 0xbc, 0x8e, 0x03, 0x46, 0x44, 0x4d, 0x15, 0x47, 0x41, 0xf0, 0x03, 0xb0, 0x8e, 0x84, 0xed, 0x87, + 0x5c, 0x13, 0xfe, 0xd3, 0x80, 0xa6, 0x62, 0x9e, 0xc4, 0x6f, 0x03, 0xcc, 0x82, 0xb3, 0x80, 0x49, + 0xdd, 0x0c, 0xa9, 0x5b, 0x8a, 0xa0, 0x2e, 0x34, 0x58, 0xc4, 0xdc, 0xd9,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, 0x07, 0x07, 0xd5, 0x2e, 0x44, 0x6b, 0xf5, 0xb6, + 0xbd, 0xea, 0x48, 0x52, 0x3c, 0x32, 0xd0, 0x13, 0x58, 0x93, 0xaa, 0x6e, 0xa7, 0x66, 0x19, 0x3d, + 0x3f, 0xca, 0xe1, 0x69, 0x11, 0xcb, 0x77, 0xad, 0x16, 0xa1, 0x37, 0x6d, 0xfb, 0x7d, 0x8d, 0x80, + 0xcb, 0xaa, 0xb4, 0x2f, 0x55, 0xd6, 0x7c, 0xb3, 0x53, 0x65, 0x5d, 0xd5, 0xf3, 0x7a, 0xd0, 0xd0, + 0xda, 0x03, 0xea, 0xe4, 0x3c, 0xb4, 0xf7, 0xae, 0xdd, 0xf2, 0x97, 0x50, 0xcb, 0x74, 0x05, 0xd4, + 0xd6, 0x92, 0x7f, 0xaf, 0x7b, 0x7f, 0xef, 0xed, 0x55, 0xdb, 0x78, 0x77, 0xd5, 0x36, 0xfe, 0xba, + 0x6a, 0x1b, 0xbf, 0x5e, 0xb7, 0x0b, 0xef, 0xae, 0xdb, 0x85, 0x3f, 0xae, 0xdb, 0x85, 0xef, 0xb6, + 0x56, 0xfd, 0x9b, 0x3d, 0x29, 0x8b, 0x3f, 0x8f, 0xff, 0x09, 0x00, 0x00, 0xff, 0xff, 0xef, 0x18, + 0x68, 0x52, 0x85, 0x0b, 0x00, 0x00, } func (m *Ok) Marshal() (dAtA []byte, err error) { @@ -1417,6 +1426,16 @@ func (m *BlockGetRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.Wait { + i-- + if m.Wait { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x18 + } if len(m.Cid) > 0 { i -= len(m.Cid) copy(dAtA[i:], m.Cid) @@ -2251,6 +2270,9 @@ func (m *BlockGetRequest) Size() (n int) { if l > 0 { n += 1 + l + sovFile(uint64(l)) } + if m.Wait { + n += 2 + } return n } @@ -2763,6 +2785,26 @@ func (m *BlockGetRequest) Unmarshal(dAtA []byte) error { m.Cid = []byte{} } iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Wait", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFile + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Wait = bool(v != 0) default: iNdEx = preIndex skippy, err := skipFile(dAtA[iNdEx:]) diff --git a/commonfile/fileproto/protos/file.proto b/commonfile/fileproto/protos/file.proto index fb7b4ba9..cd79e67c 100644 --- a/commonfile/fileproto/protos/file.proto +++ b/commonfile/fileproto/protos/file.proto @@ -46,6 +46,7 @@ message Ok {} message BlockGetRequest { string spaceId = 1; bytes cid = 2; + bool wait = 3; } message BlockGetResponse { From d499647a9805c1cb381ad2602a0bb099557d4214 Mon Sep 17 00:00:00 2001 From: Sergey Cherepanov Date: Fri, 15 Mar 2024 18:09:09 +0100 Subject: [PATCH 041/140] coordinatorproto: errForbidden --- .../coordinatorproto/coordinator.pb.go | 215 +++++++++--------- coordinator/coordinatorproto/errors.go | 1 + .../coordinatorproto/protos/coordinator.proto | 1 + 3 files changed, 111 insertions(+), 106 deletions(-) diff --git a/coordinator/coordinatorproto/coordinator.pb.go b/coordinator/coordinatorproto/coordinator.pb.go index 2225c5a9..af8297af 100644 --- a/coordinator/coordinatorproto/coordinator.pb.go +++ b/coordinator/coordinatorproto/coordinator.pb.go @@ -32,6 +32,7 @@ const ( ErrorCodes_SpaceNotExists ErrorCodes = 4 ErrorCodes_SpaceLimitReached ErrorCodes = 5 ErrorCodes_AccountDeleted ErrorCodes = 6 + ErrorCodes_Forbidden ErrorCodes = 7 ErrorCodes_ErrorOffset ErrorCodes = 300 ) @@ -43,6 +44,7 @@ var ErrorCodes_name = map[int32]string{ 4: "SpaceNotExists", 5: "SpaceLimitReached", 6: "AccountDeleted", + 7: "Forbidden", 300: "ErrorOffset", } @@ -54,6 +56,7 @@ var ErrorCodes_value = map[string]int32{ "SpaceNotExists": 4, "SpaceLimitReached": 5, "AccountDeleted": 6, + "Forbidden": 7, "ErrorOffset": 300, } @@ -2074,112 +2077,112 @@ func init() { } var fileDescriptor_d94f6f99586adae2 = []byte{ - // 1667 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x18, 0x4d, 0x6f, 0x14, 0x47, - 0x76, 0x7a, 0x3c, 0xb6, 0x67, 0xde, 0xd8, 0xa6, 0x5d, 0xb6, 0x61, 0x18, 0x86, 0xc1, 0xf4, 0xb2, - 0xac, 0x99, 0x5d, 0x01, 0x3b, 0xec, 0xae, 0x16, 0xb1, 0xd2, 0x62, 0x0c, 0x21, 0x26, 0x60, 0xac, - 0x32, 0x06, 0x29, 0x39, 0xa0, 0xa6, 0xbb, 0x3c, 0x6e, 0x79, 0xa6, 0x7a, 0x52, 0x5d, 0x83, 0xf1, - 0xbf, 0xc8, 0x2d, 0xa7, 0xdc, 0x23, 0x25, 0x87, 0x28, 0x52, 0x94, 0x43, 0xa4, 0x9c, 0x73, 0xe4, - 0x98, 0x4b, 0x24, 0x04, 0xff, 0x20, 0xbf, 0x20, 0xaa, 0xea, 0xea, 0xee, 0xea, 0x8f, 0x19, 0x3b, - 0xe2, 0xc0, 0xc5, 0x9e, 0x7a, 0x5f, 0xf5, 0xbe, 0x5f, 0xbd, 0x86, 0x7f, 0x3b, 0xbe, 0xcf, 0x5c, - 0x8f, 0xda, 0xdc, 0x67, 0xd7, 0xb4, 0xdf, 0x43, 0xe6, 0x73, 0xff, 0x9a, 0xfc, 0x1b, 0xe8, 0xf0, - 0xab, 0x12, 0x84, 0xea, 0x1a, 0xc8, 0xfa, 0xd9, 0x00, 0x73, 0x67, 0x68, 0x3b, 0x64, 0xc7, 0xeb, - 0x51, 0x4c, 0x3e, 0x1f, 0x91, 0x80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0xe3, 0x7b, 0x82, 0x56, 0x38, 0x4a, 0x66, 0x1c, 0xe5, 0x3c, 0x42, 0x04, 0x3c, - 0x03, 0x8c, 0x02, 0x9e, 0x01, 0x23, 0x0c, 0x4b, 0x19, 0xd0, 0x93, 0xa3, 0x61, 0xd8, 0x30, 0x16, - 0xba, 0xab, 0x29, 0xb3, 0xee, 0xe6, 0xe9, 0x70, 0x11, 0xb3, 0xf5, 0x54, 0x95, 0x47, 0xda, 0xc2, - 0xf7, 0x0f, 0xe9, 0x2d, 0x38, 0xb7, 0x15, 0xe6, 0xe2, 0x86, 0x4f, 0xf7, 0xbc, 0xde, 0x88, 0xd9, - 0xe2, 0xea, 0xc8, 0x79, 0x2d, 0xa8, 0x39, 0x23, 0xc6, 0x88, 0x48, 0x67, 0xe5, 0xbe, 0x04, 0x60, - 0xfd, 0x64, 0x40, 0xab, 0x98, 0x5b, 0x29, 0xb6, 0x06, 0xa7, 0x1c, 0x1d, 0x11, 0x0b, 0xc9, 0x82, - 0xd3, 0x45, 0x52, 0xce, 0x16, 0xc9, 0xdf, 0x60, 0x9a, 0xfa, 0x2e, 0x11, 0xed, 0x4a, 0xa4, 0xc6, - 0x62, 0xca, 0xbc, 0x2d, 0xdf, 0x25, 0x38, 0xc4, 0xa3, 0x0e, 0x98, 0x0e, 0x23, 0x76, 0xd4, 0xf2, - 0x76, 0xa9, 0xf7, 0x4a, 0xfa, 0xbd, 0x82, 0x73, 0x70, 0xcb, 0x83, 0x8a, 0x60, 0xd5, 0x2a, 0xdc, - 0x48, 0x55, 0x78, 0x0b, 0x6a, 0xb6, 0xeb, 0x32, 0x12, 0x04, 0x24, 0x68, 0x94, 0x65, 0x3e, 0x27, - 0x00, 0xf4, 0x77, 0x98, 0xe6, 0x47, 0x43, 0xa5, 0xd2, 0x42, 0x77, 0x25, 0xa7, 0x92, 0x8c, 0x65, - 0x48, 0x63, 0x0d, 0xe0, 0x2f, 0x51, 0xa4, 0xa5, 0xa3, 0xd8, 0x40, 0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ce, - 0xc8, 0x8d, 0x34, 0x9a, 0x8a, 0x8d, 0x0f, 0xe1, 0x9a, 0x59, 0x9d, 0x07, 0x6a, 0x65, 0xd6, 0x76, - 0x3b, 0x74, 0x4e, 0xed, 0x17, 0x1a, 0x6c, 0x97, 0x1e, 0x50, 0xff, 0x90, 0x9a, 0x25, 0x74, 0x16, - 0x56, 0xb2, 0xc8, 0xc7, 0x87, 0x94, 0x30, 0xd3, 0xe8, 0x1c, 0x42, 0x35, 0x7a, 0xe5, 0xa0, 0x3a, - 0xcc, 0x3e, 0x61, 0x84, 0xac, 0x6f, 0x6f, 0x9a, 0x25, 0x71, 0xf8, 0xc8, 0xeb, 0xcb, 0x83, 0x21, - 0x3c, 0xb6, 0x91, 0x8c, 0x35, 0x01, 0x93, 0x21, 0xd8, 0x10, 0x61, 0xa5, 0xc1, 0x28, 0x10, 0x90, - 0x29, 0xb4, 0x08, 0xf3, 0x5b, 0xf6, 0xc0, 0xa3, 0x3d, 0x21, 0x51, 0x80, 0x2a, 0xc2, 0x88, 0x6d, - 0xfb, 0x68, 0x40, 0x28, 0xdf, 0x66, 0xbe, 0x43, 0x82, 0xc0, 0xa3, 0x3d, 0x81, 0x99, 0xee, 0xdc, - 0x4c, 0x66, 0xbc, 0xf6, 0x40, 0x46, 0x55, 0xa8, 0x08, 0x1d, 0x42, 0x05, 0x54, 0x7f, 0x35, 0x0d, - 0x71, 0x50, 0x21, 0x33, 0xcb, 0x9d, 0xdb, 0x70, 0x66, 0xcc, 0x60, 0x45, 0x33, 0x50, 0x7e, 0x7c, - 0x60, 0x96, 0x84, 0x2a, 0x98, 0x0c, 0xfc, 0x97, 0x64, 0x9b, 0x91, 0xa1, 0xcd, 0x88, 0x69, 0x20, - 0x80, 0x99, 0x10, 0x64, 0x96, 0xbb, 0xbf, 0x57, 0xa1, 0xae, 0x19, 0x84, 0x1e, 0x40, 0x2d, 0x5e, - 0x86, 0x51, 0xc1, 0x16, 0xad, 0x7d, 0x9c, 0x68, 0x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37, 0xfe, - 0xee, 0xfc, 0xe7, 0x97, 0xb7, 0x6d, 0xe3, 0xf5, 0xdb, 0xb6, 0xf1, 0xe6, 0x6d, 0xdb, 0xf8, 0xe2, - 0x5d, 0xbb, 0xf4, 0xfa, 0x5d, 0xbb, 0xf4, 0xeb, 0xbb, 0x76, 0xe9, 0xd3, 0xd6, 0xa4, 0x0f, 0xa9, - 0x2f, 0x66, 0xe4, 0xbf, 0x1b, 0x7f, 0x04, 0x00, 0x00, 0xff, 0xff, 0x82, 0x8a, 0x2d, 0xb0, 0x6f, - 0x15, 0x00, 0x00, + // 1677 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x18, 0xcd, 0x6f, 0x13, 0xc7, + 0xd7, 0xeb, 0x38, 0x89, 0xfd, 0x9c, 0x84, 0xcd, 0x24, 0x01, 0x63, 0x8c, 0x09, 0xfb, 0xe3, 0x47, + 0x83, 0x5b, 0x01, 0x35, 0x6d, 0x55, 0x44, 0xa5, 0x12, 0xc2, 0x47, 0x43, 0x21, 0x44, 0x1b, 0x02, + 0x52, 0x7b, 0x40, 0x1b, 0xef, 0xc4, 0x59, 0xc5, 0x9e, 0x71, 0x67, 0xc7, 0x84, 0xfc, 0x17, 0xbd, + 0xf5, 0xd4, 0x7b, 0x0f, 0x3d, 0x54, 0x95, 0xaa, 0x4a, 0xad, 0xd4, 0x73, 0x8f, 0x1c, 0x7b, 0xa9, + 0x84, 0xe0, 0x3f, 0xe8, 0x5f, 0x50, 0xcd, 0xec, 0xec, 0xee, 0xec, 0x87, 0x9d, 0x54, 0x1c, 0xb8, + 0x24, 0x9e, 0xf7, 0x35, 0xef, 0xfb, 0xbd, 0x59, 0xf8, 0xb8, 0x43, 0x29, 0x73, 0x3d, 0xe2, 0x70, + 0xca, 0xae, 0x68, 0xbf, 0x07, 0x8c, 0x72, 0x7a, 0x45, 0xfe, 0xf5, 0x75, 0xf8, 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 0xf2, 0x59, 0x95, 0x56, 0x37, + 0xa0, 0xac, 0x6e, 0x09, 0x78, 0x8f, 0xa1, 0x56, 0xc4, 0x60, 0xbd, 0x32, 0x52, 0xf6, 0x3a, 0xa4, + 0x8b, 0x8f, 0xee, 0x09, 0x5a, 0xe1, 0x28, 0x99, 0x51, 0x94, 0xb3, 0x08, 0x11, 0xf0, 0x14, 0x30, + 0x0c, 0x78, 0x0a, 0x8c, 0x6c, 0x58, 0x48, 0x81, 0x1e, 0x1f, 0x0e, 0x82, 0x86, 0x31, 0xd7, 0x5e, + 0x4e, 0x98, 0x75, 0x3b, 0x4b, 0x67, 0xe7, 0x31, 0x5b, 0x4f, 0x54, 0x79, 0x24, 0x2d, 0x7c, 0xfb, + 0x90, 0xde, 0x80, 0x33, 0x1b, 0x41, 0x2e, 0xae, 0x51, 0xb2, 0xeb, 0x75, 0x87, 0xcc, 0x11, 0x57, + 0x87, 0xce, 0x6b, 0x40, 0xa5, 0x33, 0x64, 0x0c, 0x8b, 0x74, 0x56, 0xee, 0x8b, 0x01, 0xd6, 0xef, + 0x06, 0x34, 0xf2, 0xb9, 0x95, 0x62, 0x2b, 0x70, 0xa2, 0xa3, 0x23, 0x22, 0x21, 0x69, 0x70, 0xb2, + 0x48, 0x8a, 0xe9, 0x22, 0x79, 0x0f, 0x26, 0x09, 0x75, 0xb1, 0x68, 0x57, 0x22, 0x35, 0xe6, 0x13, + 0xe6, 0x6d, 0x50, 0x17, 0xdb, 0x01, 0x1e, 0xb5, 0xc0, 0xec, 0x30, 0xec, 0x84, 0x2d, 0x6f, 0x9b, + 0x78, 0x2f, 0xa4, 0xdf, 0x4b, 0x76, 0x06, 0x6e, 0x79, 0x50, 0x12, 0xac, 0x5a, 0x85, 0x1b, 0x89, + 0x0a, 0x6f, 0x40, 0xc5, 0x71, 0x5d, 0x86, 0x7d, 0x1f, 0xfb, 0xb5, 0xa2, 0xcc, 0xe7, 0x18, 0x80, + 0xde, 0x87, 0x49, 0x7e, 0x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82, 0x28, 0x83, 0xc2, 0xb3, 0xc8, 0x2d, 0x86, 0x1d, 0x9f, 0x92, 0xb0, 0xad, 0x07, 0x27, + 0xf4, 0x11, 0x2c, 0x89, 0x96, 0xb0, 0xc5, 0x29, 0x73, 0xba, 0x58, 0x8a, 0xbc, 0x75, 0xc8, 0x71, + 0xd0, 0x8e, 0x4a, 0x76, 0x3e, 0x52, 0x94, 0xac, 0xb4, 0xee, 0x21, 0xee, 0xef, 0x60, 0xe6, 0xdb, + 0xc2, 0xb6, 0x92, 0xec, 0xc0, 0x19, 0xb8, 0xa8, 0x27, 0x1d, 0xf6, 0x94, 0x79, 0x1c, 0xcb, 0x6e, + 0x34, 0x6b, 0x67, 0x11, 0x56, 0x1d, 0x6a, 0x59, 0xf3, 0x02, 0xaf, 0xb4, 0x7e, 0x33, 0x00, 0xee, + 0x30, 0x46, 0xd9, 0x9a, 0x1c, 0xf2, 0x73, 0x00, 0xdb, 0x04, 0xbf, 0x18, 0xe0, 0x0e, 0xc7, 0xae, + 0x59, 0x40, 0xa6, 0x5a, 0xe6, 0x55, 0x32, 0x9a, 0x06, 0xaa, 0xc1, 0x62, 0x0c, 0x11, 0xa5, 0x88, + 0x89, 0xeb, 0x91, 0xae, 0x59, 0x8c, 0x68, 0xd7, 0xc4, 0x36, 0x80, 0x5d, 0x73, 0x02, 0x21, 0x98, + 0x93, 0x90, 0x0d, 0xca, 0xef, 0xbc, 0xf0, 0x7c, 0xee, 0x9b, 0x25, 0xb4, 0xa4, 0xde, 0x38, 0x52, + 0x15, 0x1b, 0x3b, 0x9d, 0x3d, 0xec, 0x9a, 0x93, 0x82, 0x34, 0x51, 0x29, 0xae, 0x39, 0x85, 0x66, + 0xa1, 0x72, 0x97, 0xb2, 0x1d, 0xcf, 0x75, 0x31, 0x31, 0xa7, 0x91, 0x09, 0x55, 0xa9, 0xe9, 0xa3, + 0xdd, 0x5d, 0x1f, 0x73, 0xf3, 0xc7, 0x62, 0xeb, 0x3b, 0x03, 0xa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, 0xfd, 0xfc, 0x18, 0x0a, 0xdd, 0x39, 0xda, + 0x0c, 0xce, 0x38, 0x27, 0x3b, 0xeb, 0x33, 0xce, 0xc9, 0x1b, 0xe1, 0xcf, 0xc0, 0x4c, 0x0f, 0xb2, + 0x54, 0xdd, 0x8e, 0x18, 0xe3, 0xa9, 0xba, 0x1d, 0x35, 0x0d, 0x6f, 0x7d, 0xf2, 0xe7, 0xeb, 0xa6, + 0xf1, 0xf2, 0x75, 0xd3, 0x78, 0xf5, 0xba, 0x69, 0x7c, 0xfb, 0xa6, 0x59, 0x78, 0xf9, 0xa6, 0x59, + 0xf8, 0xeb, 0x4d, 0xb3, 0xf0, 0x55, 0x63, 0xdc, 0x77, 0xd5, 0x9d, 0x29, 0xf9, 0xef, 0xda, 0xbf, + 0x01, 0x00, 0x00, 0xff, 0xff, 0xae, 0x34, 0xc8, 0xd0, 0x7e, 0x15, 0x00, 0x00, } func (m *SpaceSignRequest) Marshal() (dAtA []byte, err error) { diff --git a/coordinator/coordinatorproto/errors.go b/coordinator/coordinatorproto/errors.go index aaaf1c41..dba975f4 100644 --- a/coordinator/coordinatorproto/errors.go +++ b/coordinator/coordinatorproto/errors.go @@ -16,4 +16,5 @@ var ( ErrSpaceNotExists = errGroup.Register(errors.New("space not exists"), uint64(ErrorCodes_SpaceNotExists)) ErrSpaceLimitReached = errGroup.Register(errors.New("space limit reached"), uint64(ErrorCodes_SpaceLimitReached)) ErrAccountIsDeleted = errGroup.Register(errors.New("account is deleted"), uint64(ErrorCodes_AccountDeleted)) + ErrForbidden = errGroup.Register(errors.New("forbidden"), uint64(ErrorCodes_Forbidden)) ) diff --git a/coordinator/coordinatorproto/protos/coordinator.proto b/coordinator/coordinatorproto/protos/coordinator.proto index 29314cee..3981314f 100644 --- a/coordinator/coordinatorproto/protos/coordinator.proto +++ b/coordinator/coordinatorproto/protos/coordinator.proto @@ -60,6 +60,7 @@ enum ErrorCodes { SpaceNotExists = 4; SpaceLimitReached = 5; AccountDeleted = 6; + Forbidden = 7; ErrorOffset = 300; } From 045ab6196288bf46b414b585985e2191bd89489b Mon Sep 17 00:00:00 2001 From: Sergey Cherepanov Date: Mon, 18 Mar 2024 14:30:43 +0100 Subject: [PATCH 042/140] acl.AddRecord check limits --- acl/acl.go | 29 ++++++++++++++++++++++++++--- acl/acl_test.go | 14 +++++++++++--- 2 files changed, 37 insertions(+), 6 deletions(-) diff --git a/acl/acl.go b/acl/acl.go index a09b3d8f..2467b09f 100644 --- a/acl/acl.go +++ b/acl/acl.go @@ -3,6 +3,7 @@ package acl import ( "context" + "errors" "time" "github.com/prometheus/client_golang/prometheus" @@ -22,12 +23,19 @@ const CName = "coordinator.acl" var log = logger.NewNamed(CName) +var ErrLimitExceed = errors.New("limit exceed") + +type Limits struct { + ReadMembers uint32 + WriteMembers uint32 +} + func New() AclService { return &aclService{} } type AclService interface { - AddRecord(ctx context.Context, spaceId string, rec *consensusproto.RawRecord) (result *consensusproto.RawRecordWithId, err error) + AddRecord(ctx context.Context, spaceId string, rec *consensusproto.RawRecord, limits Limits) (result *consensusproto.RawRecordWithId, err error) RecordsAfter(ctx context.Context, spaceId, aclHead string) (result []*consensusproto.RawRecordWithId, err error) Permissions(ctx context.Context, identity crypto.PubKey, spaceId string) (res list.AclPermissions, err error) OwnerPubKey(ctx context.Context, spaceId string) (ownerIdentity crypto.PubKey, err error) @@ -74,14 +82,29 @@ func (as *aclService) get(ctx context.Context, spaceId string) (list.AclList, er return aObj.AclList, nil } -func (as *aclService) AddRecord(ctx context.Context, spaceId string, rec *consensusproto.RawRecord) (result *consensusproto.RawRecordWithId, err error) { +func (as *aclService) AddRecord(ctx context.Context, spaceId string, rec *consensusproto.RawRecord, limits Limits) (result *consensusproto.RawRecordWithId, err error) { acl, err := as.get(ctx, spaceId) if err != nil { return nil, err } acl.RLock() defer acl.RUnlock() - err = acl.ValidateRawRecord(rec, nil) + err = acl.ValidateRawRecord(rec, func(state *list.AclState) error { + var readers, writers int + for _, acc := range state.CurrentAccounts() { + readers++ + if acc.Permissions.CanWrite() { + writers++ + } + if uint32(readers) > limits.ReadMembers { + return ErrLimitExceed + } + if uint32(writers) > limits.WriteMembers { + return ErrLimitExceed + } + } + return nil + }) if err != nil { return } diff --git a/acl/acl_test.go b/acl/acl_test.go index 624087ae..fbddc728 100644 --- a/acl/acl_test.go +++ b/acl/acl_test.go @@ -48,7 +48,10 @@ func TestAclService_AddRecord(t *testing.T) { fx.consCl.EXPECT().AddRecord(ctx, spaceId, inv.InviteRec).Return(expRes, nil) fx.consCl.EXPECT().UnWatch(spaceId) - res, err := fx.AddRecord(ctx, spaceId, inv.InviteRec) + res, err := fx.AddRecord(ctx, spaceId, inv.InviteRec, Limits{ + ReadMembers: 10, + WriteMembers: 10, + }) assert.Equal(t, expRes, res) assert.NoError(t, err) @@ -71,11 +74,16 @@ func TestAclService_AddRecord(t *testing.T) { }) fx.consCl.EXPECT().UnWatch(spaceId) - res, err := fx.AddRecord(ctx, spaceId, inv.InviteRec) + res, err := fx.AddRecord(ctx, spaceId, inv.InviteRec, Limits{ + ReadMembers: 10, + WriteMembers: 10, + }) assert.Nil(t, res) assert.EqualError(t, err, testErr.Error()) }) - + t.Run("limit exceed", func(t *testing.T) { + // TODO: + }) } func TestAclService_RecordsAfter(t *testing.T) { From 214c63d6c06ec5c298580f467e9cc2e70a88f403 Mon Sep 17 00:00:00 2001 From: Sergey Cherepanov Date: Mon, 18 Mar 2024 14:58:22 +0100 Subject: [PATCH 043/140] acl: do not add records if limits is 1-1 --- acl/acl.go | 5 +++++ acl/acl_test.go | 10 ++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/acl/acl.go b/acl/acl.go index 2467b09f..3c9e053c 100644 --- a/acl/acl.go +++ b/acl/acl.go @@ -83,12 +83,17 @@ func (as *aclService) get(ctx context.Context, spaceId string) (list.AclList, er } func (as *aclService) AddRecord(ctx context.Context, spaceId string, rec *consensusproto.RawRecord, limits Limits) (result *consensusproto.RawRecordWithId, err error) { + if limits.ReadMembers <= 1 && limits.WriteMembers <= 1 { + return nil, ErrLimitExceed + } + acl, err := as.get(ctx, spaceId) if err != nil { return nil, err } acl.RLock() defer acl.RUnlock() + err = acl.ValidateRawRecord(rec, func(state *list.AclState) error { var readers, writers int for _, acc := range state.CurrentAccounts() { diff --git a/acl/acl_test.go b/acl/acl_test.go index fbddc728..3e835a98 100644 --- a/acl/acl_test.go +++ b/acl/acl_test.go @@ -82,7 +82,13 @@ func TestAclService_AddRecord(t *testing.T) { assert.EqualError(t, err, testErr.Error()) }) t.Run("limit exceed", func(t *testing.T) { - // TODO: + fx := newFixture(t) + defer fx.finish(t) + _, err := fx.AddRecord(ctx, spaceId, inv.InviteRec, Limits{ + ReadMembers: 1, + WriteMembers: 1, + }) + assert.ErrorIs(t, err, ErrLimitExceed) }) } @@ -136,7 +142,7 @@ func TestAclService(t *testing.T) { require.NoError(t, err) assert.True(t, res.IsOwner()) }) - t.Run("ownerPUbKey", func(t *testing.T) { + t.Run("ownerPubKey", func(t *testing.T) { res, err := fx.OwnerPubKey(ctx, spaceId) require.NoError(t, err) assert.Equal(t, ownerKeys.SignKey.GetPublic().Account(), res.Account()) From 59c2462b4f6e134f6314e2f28783044e703b6380 Mon Sep 17 00:00:00 2001 From: Sergey Cherepanov Date: Mon, 18 Mar 2024 14:58:42 +0100 Subject: [PATCH 044/140] coordinatorproto: SpaceLimits --- .../coordinatorproto/coordinator.pb.go | 540 +++++++++++++----- .../coordinatorproto/protos/coordinator.proto | 6 + 2 files changed, 402 insertions(+), 144 deletions(-) diff --git a/coordinator/coordinatorproto/coordinator.pb.go b/coordinator/coordinatorproto/coordinator.pb.go index af8297af..932be480 100644 --- a/coordinator/coordinatorproto/coordinator.pb.go +++ b/coordinator/coordinatorproto/coordinator.pb.go @@ -314,17 +314,70 @@ func (m *SpaceSignRequest) GetForceRequest() bool { return false } +type SpaceLimits struct { + ReadMembers uint32 `protobuf:"varint,1,opt,name=readMembers,proto3" json:"readMembers,omitempty"` + WriteMembers uint32 `protobuf:"varint,2,opt,name=writeMembers,proto3" json:"writeMembers,omitempty"` +} + +func (m *SpaceLimits) Reset() { *m = SpaceLimits{} } +func (m *SpaceLimits) String() string { return proto.CompactTextString(m) } +func (*SpaceLimits) ProtoMessage() {} +func (*SpaceLimits) Descriptor() ([]byte, []int) { + return fileDescriptor_d94f6f99586adae2, []int{1} +} +func (m *SpaceLimits) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SpaceLimits) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SpaceLimits.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 *SpaceLimits) XXX_Merge(src proto.Message) { + xxx_messageInfo_SpaceLimits.Merge(m, src) +} +func (m *SpaceLimits) XXX_Size() int { + return m.Size() +} +func (m *SpaceLimits) XXX_DiscardUnknown() { + xxx_messageInfo_SpaceLimits.DiscardUnknown(m) +} + +var xxx_messageInfo_SpaceLimits proto.InternalMessageInfo + +func (m *SpaceLimits) GetReadMembers() uint32 { + if m != nil { + return m.ReadMembers + } + return 0 +} + +func (m *SpaceLimits) GetWriteMembers() uint32 { + if m != nil { + return m.WriteMembers + } + return 0 +} + type SpaceStatusPayload struct { Status SpaceStatus `protobuf:"varint,1,opt,name=status,proto3,enum=coordinator.SpaceStatus" json:"status,omitempty"` DeletionTimestamp int64 `protobuf:"varint,2,opt,name=deletionTimestamp,proto3" json:"deletionTimestamp,omitempty"` Permissions SpacePermissions `protobuf:"varint,3,opt,name=permissions,proto3,enum=coordinator.SpacePermissions" json:"permissions,omitempty"` + Limits *SpaceLimits `protobuf:"bytes,4,opt,name=limits,proto3" json:"limits,omitempty"` } func (m *SpaceStatusPayload) Reset() { *m = SpaceStatusPayload{} } func (m *SpaceStatusPayload) String() string { return proto.CompactTextString(m) } func (*SpaceStatusPayload) ProtoMessage() {} func (*SpaceStatusPayload) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{1} + return fileDescriptor_d94f6f99586adae2, []int{2} } func (m *SpaceStatusPayload) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -374,6 +427,13 @@ func (m *SpaceStatusPayload) GetPermissions() SpacePermissions { return SpacePermissions_SpacePermissionsUnknown } +func (m *SpaceStatusPayload) GetLimits() *SpaceLimits { + if m != nil { + return m.Limits + } + return nil +} + type SpaceSignResponse struct { Receipt *SpaceReceiptWithSignature `protobuf:"bytes,1,opt,name=receipt,proto3" json:"receipt,omitempty"` } @@ -382,7 +442,7 @@ func (m *SpaceSignResponse) Reset() { *m = SpaceSignResponse{} } func (m *SpaceSignResponse) String() string { return proto.CompactTextString(m) } func (*SpaceSignResponse) ProtoMessage() {} func (*SpaceSignResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{2} + return fileDescriptor_d94f6f99586adae2, []int{3} } func (m *SpaceSignResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -428,7 +488,7 @@ func (m *SpaceReceiptWithSignature) Reset() { *m = SpaceReceiptWithSigna func (m *SpaceReceiptWithSignature) String() string { return proto.CompactTextString(m) } func (*SpaceReceiptWithSignature) ProtoMessage() {} func (*SpaceReceiptWithSignature) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{3} + return fileDescriptor_d94f6f99586adae2, []int{4} } func (m *SpaceReceiptWithSignature) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -489,7 +549,7 @@ func (m *SpaceReceipt) Reset() { *m = SpaceReceipt{} } func (m *SpaceReceipt) String() string { return proto.CompactTextString(m) } func (*SpaceReceipt) ProtoMessage() {} func (*SpaceReceipt) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{4} + return fileDescriptor_d94f6f99586adae2, []int{5} } func (m *SpaceReceipt) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -562,7 +622,7 @@ func (m *SpaceStatusCheckRequest) Reset() { *m = SpaceStatusCheckRequest func (m *SpaceStatusCheckRequest) String() string { return proto.CompactTextString(m) } func (*SpaceStatusCheckRequest) ProtoMessage() {} func (*SpaceStatusCheckRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{5} + return fileDescriptor_d94f6f99586adae2, []int{6} } func (m *SpaceStatusCheckRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -607,7 +667,7 @@ func (m *SpaceStatusCheckResponse) Reset() { *m = SpaceStatusCheckRespon func (m *SpaceStatusCheckResponse) String() string { return proto.CompactTextString(m) } func (*SpaceStatusCheckResponse) ProtoMessage() {} func (*SpaceStatusCheckResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{6} + return fileDescriptor_d94f6f99586adae2, []int{7} } func (m *SpaceStatusCheckResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -652,7 +712,7 @@ func (m *SpaceStatusCheckManyRequest) Reset() { *m = SpaceStatusCheckMan func (m *SpaceStatusCheckManyRequest) String() string { return proto.CompactTextString(m) } func (*SpaceStatusCheckManyRequest) ProtoMessage() {} func (*SpaceStatusCheckManyRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{7} + return fileDescriptor_d94f6f99586adae2, []int{8} } func (m *SpaceStatusCheckManyRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -697,7 +757,7 @@ func (m *SpaceStatusCheckManyResponse) Reset() { *m = SpaceStatusCheckMa func (m *SpaceStatusCheckManyResponse) String() string { return proto.CompactTextString(m) } func (*SpaceStatusCheckManyResponse) ProtoMessage() {} func (*SpaceStatusCheckManyResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{8} + return fileDescriptor_d94f6f99586adae2, []int{9} } func (m *SpaceStatusCheckManyResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -745,7 +805,7 @@ func (m *SpaceStatusChangeRequest) Reset() { *m = SpaceStatusChangeReque func (m *SpaceStatusChangeRequest) String() string { return proto.CompactTextString(m) } func (*SpaceStatusChangeRequest) ProtoMessage() {} func (*SpaceStatusChangeRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{9} + return fileDescriptor_d94f6f99586adae2, []int{10} } func (m *SpaceStatusChangeRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -811,7 +871,7 @@ func (m *SpaceStatusChangeResponse) Reset() { *m = SpaceStatusChangeResp func (m *SpaceStatusChangeResponse) String() string { return proto.CompactTextString(m) } func (*SpaceStatusChangeResponse) ProtoMessage() {} func (*SpaceStatusChangeResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{10} + return fileDescriptor_d94f6f99586adae2, []int{11} } func (m *SpaceStatusChangeResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -858,7 +918,7 @@ func (m *NetworkConfigurationRequest) Reset() { *m = NetworkConfiguratio func (m *NetworkConfigurationRequest) String() string { return proto.CompactTextString(m) } func (*NetworkConfigurationRequest) ProtoMessage() {} func (*NetworkConfigurationRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{11} + return fileDescriptor_d94f6f99586adae2, []int{12} } func (m *NetworkConfigurationRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -910,7 +970,7 @@ func (m *NetworkConfigurationResponse) Reset() { *m = NetworkConfigurati func (m *NetworkConfigurationResponse) String() string { return proto.CompactTextString(m) } func (*NetworkConfigurationResponse) ProtoMessage() {} func (*NetworkConfigurationResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{12} + return fileDescriptor_d94f6f99586adae2, []int{13} } func (m *NetworkConfigurationResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -981,7 +1041,7 @@ func (m *Node) Reset() { *m = Node{} } func (m *Node) String() string { return proto.CompactTextString(m) } func (*Node) ProtoMessage() {} func (*Node) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{13} + return fileDescriptor_d94f6f99586adae2, []int{14} } func (m *Node) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1041,7 +1101,7 @@ func (m *DeletionConfirmPayloadWithSignature) Reset() { *m = DeletionCon func (m *DeletionConfirmPayloadWithSignature) String() string { return proto.CompactTextString(m) } func (*DeletionConfirmPayloadWithSignature) ProtoMessage() {} func (*DeletionConfirmPayloadWithSignature) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{14} + return fileDescriptor_d94f6f99586adae2, []int{15} } func (m *DeletionConfirmPayloadWithSignature) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1102,7 +1162,7 @@ func (m *DeletionConfirmPayload) Reset() { *m = DeletionConfirmPayload{} func (m *DeletionConfirmPayload) String() string { return proto.CompactTextString(m) } func (*DeletionConfirmPayload) ProtoMessage() {} func (*DeletionConfirmPayload) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{15} + return fileDescriptor_d94f6f99586adae2, []int{16} } func (m *DeletionConfirmPayload) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1177,7 +1237,7 @@ func (m *DeletionLogRequest) Reset() { *m = DeletionLogRequest{} } func (m *DeletionLogRequest) String() string { return proto.CompactTextString(m) } func (*DeletionLogRequest) ProtoMessage() {} func (*DeletionLogRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{16} + return fileDescriptor_d94f6f99586adae2, []int{17} } func (m *DeletionLogRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1231,7 +1291,7 @@ func (m *DeletionLogResponse) Reset() { *m = DeletionLogResponse{} } func (m *DeletionLogResponse) String() string { return proto.CompactTextString(m) } func (*DeletionLogResponse) ProtoMessage() {} func (*DeletionLogResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{17} + return fileDescriptor_d94f6f99586adae2, []int{18} } func (m *DeletionLogResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1291,7 +1351,7 @@ func (m *DeletionLogRecord) Reset() { *m = DeletionLogRecord{} } func (m *DeletionLogRecord) String() string { return proto.CompactTextString(m) } func (*DeletionLogRecord) ProtoMessage() {} func (*DeletionLogRecord) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{18} + return fileDescriptor_d94f6f99586adae2, []int{19} } func (m *DeletionLogRecord) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1367,7 +1427,7 @@ func (m *SpaceDeleteRequest) Reset() { *m = SpaceDeleteRequest{} } func (m *SpaceDeleteRequest) String() string { return proto.CompactTextString(m) } func (*SpaceDeleteRequest) ProtoMessage() {} func (*SpaceDeleteRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{19} + return fileDescriptor_d94f6f99586adae2, []int{20} } func (m *SpaceDeleteRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1433,7 +1493,7 @@ func (m *SpaceDeleteResponse) Reset() { *m = SpaceDeleteResponse{} } func (m *SpaceDeleteResponse) String() string { return proto.CompactTextString(m) } func (*SpaceDeleteResponse) ProtoMessage() {} func (*SpaceDeleteResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{20} + return fileDescriptor_d94f6f99586adae2, []int{21} } func (m *SpaceDeleteResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1479,7 +1539,7 @@ func (m *AccountDeleteRequest) Reset() { *m = AccountDeleteRequest{} } func (m *AccountDeleteRequest) String() string { return proto.CompactTextString(m) } func (*AccountDeleteRequest) ProtoMessage() {} func (*AccountDeleteRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{21} + return fileDescriptor_d94f6f99586adae2, []int{22} } func (m *AccountDeleteRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1538,7 +1598,7 @@ func (m *AccountDeletionConfirmPayload) Reset() { *m = AccountDeletionCo func (m *AccountDeletionConfirmPayload) String() string { return proto.CompactTextString(m) } func (*AccountDeletionConfirmPayload) ProtoMessage() {} func (*AccountDeletionConfirmPayload) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{22} + return fileDescriptor_d94f6f99586adae2, []int{23} } func (m *AccountDeletionConfirmPayload) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1604,7 +1664,7 @@ func (m *AccountDeleteResponse) Reset() { *m = AccountDeleteResponse{} } func (m *AccountDeleteResponse) String() string { return proto.CompactTextString(m) } func (*AccountDeleteResponse) ProtoMessage() {} func (*AccountDeleteResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{23} + return fileDescriptor_d94f6f99586adae2, []int{24} } func (m *AccountDeleteResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1648,7 +1708,7 @@ func (m *AccountRevertDeletionRequest) Reset() { *m = AccountRevertDelet func (m *AccountRevertDeletionRequest) String() string { return proto.CompactTextString(m) } func (*AccountRevertDeletionRequest) ProtoMessage() {} func (*AccountRevertDeletionRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{24} + return fileDescriptor_d94f6f99586adae2, []int{25} } func (m *AccountRevertDeletionRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1685,7 +1745,7 @@ func (m *AccountRevertDeletionResponse) Reset() { *m = AccountRevertDele func (m *AccountRevertDeletionResponse) String() string { return proto.CompactTextString(m) } func (*AccountRevertDeletionResponse) ProtoMessage() {} func (*AccountRevertDeletionResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{25} + return fileDescriptor_d94f6f99586adae2, []int{26} } func (m *AccountRevertDeletionResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1724,7 +1784,7 @@ func (m *AclAddRecordRequest) Reset() { *m = AclAddRecordRequest{} } func (m *AclAddRecordRequest) String() string { return proto.CompactTextString(m) } func (*AclAddRecordRequest) ProtoMessage() {} func (*AclAddRecordRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{26} + return fileDescriptor_d94f6f99586adae2, []int{27} } func (m *AclAddRecordRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1777,7 +1837,7 @@ func (m *AclAddRecordResponse) Reset() { *m = AclAddRecordResponse{} } func (m *AclAddRecordResponse) String() string { return proto.CompactTextString(m) } func (*AclAddRecordResponse) ProtoMessage() {} func (*AclAddRecordResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{27} + return fileDescriptor_d94f6f99586adae2, []int{28} } func (m *AclAddRecordResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1831,7 +1891,7 @@ func (m *AclGetRecordsRequest) Reset() { *m = AclGetRecordsRequest{} } func (m *AclGetRecordsRequest) String() string { return proto.CompactTextString(m) } func (*AclGetRecordsRequest) ProtoMessage() {} func (*AclGetRecordsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{28} + return fileDescriptor_d94f6f99586adae2, []int{29} } func (m *AclGetRecordsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1883,7 +1943,7 @@ func (m *AclGetRecordsResponse) Reset() { *m = AclGetRecordsResponse{} } func (m *AclGetRecordsResponse) String() string { return proto.CompactTextString(m) } func (*AclGetRecordsResponse) ProtoMessage() {} func (*AclGetRecordsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{29} + return fileDescriptor_d94f6f99586adae2, []int{30} } func (m *AclGetRecordsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1931,7 +1991,7 @@ func (m *AccountLimitsSetRequest) Reset() { *m = AccountLimitsSetRequest func (m *AccountLimitsSetRequest) String() string { return proto.CompactTextString(m) } func (*AccountLimitsSetRequest) ProtoMessage() {} func (*AccountLimitsSetRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{30} + return fileDescriptor_d94f6f99586adae2, []int{31} } func (m *AccountLimitsSetRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2002,7 +2062,7 @@ func (m *AccountLimitsSetResponse) Reset() { *m = AccountLimitsSetRespon func (m *AccountLimitsSetResponse) String() string { return proto.CompactTextString(m) } func (*AccountLimitsSetResponse) ProtoMessage() {} func (*AccountLimitsSetResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{31} + return fileDescriptor_d94f6f99586adae2, []int{32} } func (m *AccountLimitsSetResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2039,6 +2099,7 @@ func init() { proto.RegisterEnum("coordinator.DeletionPayloadType", DeletionPayloadType_name, DeletionPayloadType_value) proto.RegisterEnum("coordinator.DeletionLogRecordStatus", DeletionLogRecordStatus_name, DeletionLogRecordStatus_value) proto.RegisterType((*SpaceSignRequest)(nil), "coordinator.SpaceSignRequest") + proto.RegisterType((*SpaceLimits)(nil), "coordinator.SpaceLimits") proto.RegisterType((*SpaceStatusPayload)(nil), "coordinator.SpaceStatusPayload") proto.RegisterType((*SpaceSignResponse)(nil), "coordinator.SpaceSignResponse") proto.RegisterType((*SpaceReceiptWithSignature)(nil), "coordinator.SpaceReceiptWithSignature") @@ -2077,112 +2138,115 @@ func init() { } var fileDescriptor_d94f6f99586adae2 = []byte{ - // 1677 bytes of a gzipped FileDescriptorProto + // 1721 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x18, 0xcd, 0x6f, 0x13, 0xc7, 0xd7, 0xeb, 0x38, 0x89, 0xfd, 0x9c, 0x84, 0xcd, 0x24, 0x01, 0x63, 0x8c, 0x09, 0xfb, 0xe3, 0x47, - 0x83, 0x5b, 0x01, 0x35, 0x6d, 0x55, 0x44, 0xa5, 0x12, 0xc2, 0x47, 0x43, 0x21, 0x44, 0x1b, 0x02, - 0x52, 0x7b, 0x40, 0x1b, 0xef, 0xc4, 0x59, 0xc5, 0x9e, 0x71, 0x67, 0xc7, 0x84, 0xfc, 0x17, 0xbd, - 0xf5, 0xd4, 0x7b, 0x0f, 0x3d, 0x54, 0x95, 0xaa, 0x4a, 0xad, 0xd4, 0x73, 0x8f, 0x1c, 0x7b, 0xa9, - 0x84, 0xe0, 0x3f, 0xe8, 0x5f, 0x50, 0xcd, 0xec, 0xec, 0xee, 0xec, 0x87, 0x9d, 0x54, 0x1c, 0xb8, - 0x24, 0x9e, 0xf7, 0x35, 0xef, 0xfb, 0xbd, 0x59, 0xf8, 0xb8, 0x43, 0x29, 0x73, 0x3d, 0xe2, 0x70, - 0xca, 0xae, 0x68, 0xbf, 0x07, 0x8c, 0x72, 0x7a, 0x45, 0xfe, 0xf5, 0x75, 0xf8, 0x65, 0x09, 0x42, - 0x55, 0x0d, 0x64, 0xfd, 0x61, 0x80, 0xb9, 0x35, 0x70, 0x3a, 0x78, 0xcb, 0xeb, 0x12, 0x1b, 0x7f, - 0x33, 0xc4, 0x3e, 0x47, 0x35, 0x98, 0xf6, 0x05, 0x6c, 0xdd, 0xad, 0x19, 0xcb, 0xc6, 0x4a, 0xc5, - 0x0e, 0x8f, 0xe8, 0x24, 0x4c, 0xed, 0x61, 0xc7, 0xc5, 0xac, 0x56, 0x5c, 0x36, 0x56, 0x66, 0x6c, - 0x75, 0x42, 0xcb, 0x50, 0xa5, 0x3d, 0x77, 0xdd, 0xc5, 0x84, 0x7b, 0xfc, 0xb0, 0x36, 0x21, 0x91, - 0x3a, 0x08, 0xb5, 0x61, 0x91, 0xe0, 0x83, 0xf0, 0x28, 0x6e, 0x73, 0xf8, 0x90, 0xe1, 0x5a, 0x49, - 0x92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xf2, 0x73, 0x00, 0xdb, 0x04, 0xbf, 0x18, 0xe0, 0x0e, 0xc7, 0xae, - 0x59, 0x40, 0xa6, 0x5a, 0xe6, 0x55, 0x32, 0x9a, 0x06, 0xaa, 0xc1, 0x62, 0x0c, 0x11, 0xa5, 0x88, - 0x89, 0xeb, 0x91, 0xae, 0x59, 0x8c, 0x68, 0xd7, 0xc4, 0x36, 0x80, 0x5d, 0x73, 0x02, 0x21, 0x98, - 0x93, 0x90, 0x0d, 0xca, 0xef, 0xbc, 0xf0, 0x7c, 0xee, 0x9b, 0x25, 0xb4, 0xa4, 0xde, 0x38, 0x52, - 0x15, 0x1b, 0x3b, 0x9d, 0x3d, 0xec, 0x9a, 0x93, 0x82, 0x34, 0x51, 0x29, 0xae, 0x39, 0x85, 0x66, - 0xa1, 0x72, 0x97, 0xb2, 0x1d, 0xcf, 0x75, 0x31, 0x31, 0xa7, 0x91, 0x09, 0x55, 0xa9, 0xe9, 0xa3, - 0xdd, 0x5d, 0x1f, 0x73, 0xf3, 0xc7, 0x62, 0xeb, 0x3b, 0x03, 0xaa, 0xda, 0x06, 0x86, 0x4e, 0x26, - 0x9e, 0x7d, 0xa1, 0x1e, 0x05, 0xd4, 0x84, 0xba, 0xbe, 0xa8, 0x05, 0x1a, 0x87, 0x06, 0x98, 0x46, - 0x0a, 0x1f, 0x22, 0xb6, 0xb8, 0xc3, 0x04, 0x7f, 0x31, 0x25, 0x37, 0x54, 0x70, 0x22, 0xf2, 0x45, - 0x00, 0xd7, 0xac, 0x6c, 0xdd, 0x57, 0x2f, 0x68, 0xed, 0xa9, 0x87, 0xce, 0xa8, 0xe7, 0x86, 0x06, - 0xdb, 0x26, 0xfb, 0x84, 0x1e, 0x10, 0xb3, 0x80, 0x4e, 0xc3, 0x52, 0x1a, 0xf9, 0xe8, 0x80, 0x60, - 0x66, 0x1a, 0xad, 0x03, 0x28, 0x87, 0x4b, 0x0f, 0xaa, 0xc2, 0xf4, 0x63, 0x86, 0xf1, 0xea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30, 0x7c, 0xf0, 0x14, 0x18, 0x61, 0x58, 0x48, 0x81, 0x1e, 0x1f, 0x0e, 0x82, + 0xba, 0x35, 0xd7, 0x5e, 0x4e, 0x98, 0x75, 0x3b, 0x4b, 0x87, 0xf3, 0x98, 0xad, 0x27, 0x2a, 0x3d, + 0x92, 0x16, 0xbe, 0xfd, 0x93, 0xde, 0x80, 0x33, 0x1b, 0x41, 0x2c, 0xae, 0x79, 0x74, 0xd7, 0xed, + 0x0e, 0x99, 0x2d, 0xae, 0x0e, 0x9d, 0xd7, 0x80, 0x4a, 0x67, 0xc8, 0x18, 0x11, 0xe1, 0xac, 0xdc, + 0x17, 0x03, 0xac, 0xdf, 0x0c, 0x68, 0xe4, 0x73, 0x2b, 0xc5, 0x56, 0xe0, 0x44, 0x47, 0x47, 0x44, + 0x42, 0xd2, 0xe0, 0x64, 0x92, 0x14, 0xd3, 0x49, 0xf2, 0x1e, 0x4c, 0x52, 0xcf, 0x21, 0xa2, 0xc0, + 0x89, 0xd0, 0x98, 0x4f, 0x98, 0xb7, 0xe1, 0x39, 0x04, 0x07, 0x78, 0xd4, 0x02, 0xb3, 0xc3, 0x88, + 0x1d, 0x16, 0xc9, 0x6d, 0xea, 0xbe, 0x90, 0x7e, 0x2f, 0xe1, 0x0c, 0xdc, 0x72, 0xa1, 0x24, 0x58, + 0xb5, 0x0c, 0x37, 0x12, 0x19, 0xde, 0x80, 0x8a, 0xed, 0x38, 0x8c, 0xf8, 0x3e, 0x11, 0x35, 0x5f, + 0xc4, 0x73, 0x0c, 0x40, 0xef, 0xc3, 0x24, 0x3f, 0x1c, 0x28, 0x95, 0xe6, 0xda, 0x4b, 0x19, 0x95, + 0xe4, 0x5b, 0x06, 0x34, 0x56, 0x1f, 0xfe, 0x17, 0xbe, 0xb4, 0x74, 0x14, 0xeb, 0xab, 0x87, 0x48, + 0x96, 0xb9, 0x9c, 0x10, 0x33, 0xf2, 0x43, 0x6c, 0x7c, 0x79, 0xfb, 0xc9, 0x80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ad, 0x53, 0x6b, 0x0f, 0x16, 0xb6, 0x95, + 0x64, 0x05, 0xce, 0xc0, 0x45, 0x3e, 0xe9, 0xb0, 0xa7, 0x62, 0x5d, 0x92, 0xd5, 0x68, 0x16, 0x67, + 0x11, 0x56, 0x1d, 0x6a, 0x59, 0xf3, 0x02, 0xaf, 0xb4, 0x7e, 0x35, 0x00, 0xee, 0x30, 0xe6, 0xb1, + 0x35, 0xd9, 0xe4, 0xe7, 0x00, 0xb6, 0x29, 0x79, 0x31, 0x20, 0x1d, 0x4e, 0x1c, 0xb3, 0x80, 0x4c, + 0x35, 0xcc, 0xab, 0x60, 0x34, 0x0d, 0x54, 0x83, 0xc5, 0x18, 0x22, 0x52, 0x91, 0x50, 0xc7, 0xa5, + 0x5d, 0xb3, 0x18, 0xd1, 0xae, 0x89, 0x69, 0x80, 0x38, 0xe6, 0x04, 0x42, 0x30, 0x27, 0x21, 0x1b, + 0x1e, 0xbf, 0xf3, 0xc2, 0xf5, 0xb9, 0x6f, 0x96, 0xd0, 0x92, 0xda, 0x71, 0xa4, 0x2a, 0x98, 0xd8, + 0x9d, 0x3d, 0xe2, 0x98, 0x93, 0x82, 0x34, 0x91, 0x29, 0x8e, 0x39, 0x85, 0x66, 0xa1, 0x72, 0xd7, + 0x63, 0x3b, 0xae, 0xe3, 0x10, 0x6a, 0x4e, 0x23, 0x13, 0xaa, 0x52, 0xd3, 0x47, 0xbb, 0xbb, 0x3e, + 0xe1, 0xe6, 0x8f, 0xc5, 0xd6, 0x77, 0x86, 0xda, 0x37, 0x83, 0x12, 0x8e, 0x4e, 0x26, 0x16, 0xc5, + 0x50, 0x8f, 0x02, 0x6a, 0x42, 0x5d, 0x1f, 0xd4, 0x02, 0x8d, 0x43, 0x03, 0x4c, 0x23, 0x85, 0x0f, + 0x11, 0x5b, 0xdc, 0x66, 0x82, 0xbf, 0x98, 0x92, 0x1b, 0x2a, 0x38, 0x11, 0xf9, 0x22, 0x80, 0x6b, + 0x56, 0xb6, 0x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a, 0xaf, 0x5e, 0x37, 0x8d, 0x6f, 0xdf, 0x34, 0x0b, 0x2f, 0xdf, 0x34, 0x0b, 0x7f, 0xbe, 0x69, + 0x16, 0xbe, 0x6a, 0x8c, 0xfb, 0xbc, 0xbb, 0x33, 0x25, 0xff, 0x5d, 0xfb, 0x37, 0x00, 0x00, 0xff, + 0xff, 0x82, 0x38, 0x48, 0x4a, 0x05, 0x16, 0x00, 0x00, } func (m *SpaceSignRequest) Marshal() (dAtA []byte, err error) { @@ -2246,6 +2310,39 @@ func (m *SpaceSignRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *SpaceLimits) 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 *SpaceLimits) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SpaceLimits) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.WriteMembers != 0 { + i = encodeVarintCoordinator(dAtA, i, uint64(m.WriteMembers)) + i-- + dAtA[i] = 0x10 + } + if m.ReadMembers != 0 { + i = encodeVarintCoordinator(dAtA, i, uint64(m.ReadMembers)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + func (m *SpaceStatusPayload) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -2266,6 +2363,18 @@ func (m *SpaceStatusPayload) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.Limits != nil { + { + size, err := m.Limits.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintCoordinator(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } if m.Permissions != 0 { i = encodeVarintCoordinator(dAtA, i, uint64(m.Permissions)) i-- @@ -2737,20 +2846,20 @@ func (m *Node) MarshalToSizedBuffer(dAtA []byte) (int, error) { var l int _ = l if len(m.Types) > 0 { - dAtA5 := make([]byte, len(m.Types)*10) - var j4 int + dAtA6 := make([]byte, len(m.Types)*10) + var j5 int for _, num := range m.Types { for num >= 1<<7 { - dAtA5[j4] = uint8(uint64(num)&0x7f | 0x80) + dAtA6[j5] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 - j4++ + j5++ } - dAtA5[j4] = uint8(num) - j4++ + dAtA6[j5] = uint8(num) + j5++ } - i -= j4 - copy(dAtA[i:], dAtA5[:j4]) - i = encodeVarintCoordinator(dAtA, i, uint64(j4)) + i -= j5 + copy(dAtA[i:], dAtA6[:j5]) + i = encodeVarintCoordinator(dAtA, i, uint64(j5)) i-- dAtA[i] = 0x1a } @@ -3496,6 +3605,21 @@ func (m *SpaceSignRequest) Size() (n int) { return n } +func (m *SpaceLimits) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.ReadMembers != 0 { + n += 1 + sovCoordinator(uint64(m.ReadMembers)) + } + if m.WriteMembers != 0 { + n += 1 + sovCoordinator(uint64(m.WriteMembers)) + } + return n +} + func (m *SpaceStatusPayload) Size() (n int) { if m == nil { return 0 @@ -3511,6 +3635,10 @@ func (m *SpaceStatusPayload) Size() (n int) { if m.Permissions != 0 { n += 1 + sovCoordinator(uint64(m.Permissions)) } + if m.Limits != nil { + l = m.Limits.Size() + n += 1 + l + sovCoordinator(uint64(l)) + } return n } @@ -4254,6 +4382,94 @@ func (m *SpaceSignRequest) Unmarshal(dAtA []byte) error { } return nil } +func (m *SpaceLimits) 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 ErrIntOverflowCoordinator + } + 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: SpaceLimits: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SpaceLimits: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ReadMembers", wireType) + } + m.ReadMembers = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCoordinator + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ReadMembers |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field WriteMembers", wireType) + } + m.WriteMembers = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCoordinator + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.WriteMembers |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipCoordinator(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthCoordinator + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *SpaceStatusPayload) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -4340,6 +4556,42 @@ func (m *SpaceStatusPayload) Unmarshal(dAtA []byte) error { break } } + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Limits", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCoordinator + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthCoordinator + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthCoordinator + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Limits == nil { + m.Limits = &SpaceLimits{} + } + if err := m.Limits.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipCoordinator(dAtA[iNdEx:]) diff --git a/coordinator/coordinatorproto/protos/coordinator.proto b/coordinator/coordinatorproto/protos/coordinator.proto index 3981314f..e585785f 100644 --- a/coordinator/coordinatorproto/protos/coordinator.proto +++ b/coordinator/coordinatorproto/protos/coordinator.proto @@ -77,10 +77,16 @@ enum SpacePermissions { SpacePermissionsOwner = 1; } +message SpaceLimits { + uint32 readMembers = 1; + uint32 writeMembers = 2; +} + message SpaceStatusPayload { SpaceStatus status = 1; int64 deletionTimestamp = 2; SpacePermissions permissions = 3; + SpaceLimits limits = 4; } message SpaceSignResponse { From 68f1826db5025e8b31375937e33d0b3ffca8f329 Mon Sep 17 00:00:00 2001 From: Anton Akentev Date: Mon, 18 Mar 2024 14:23:32 +0000 Subject: [PATCH 045/140] acl: mock regenerate --- acl/mock_acl/mock_acl.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/acl/mock_acl/mock_acl.go b/acl/mock_acl/mock_acl.go index de7b8fe3..fb151161 100644 --- a/acl/mock_acl/mock_acl.go +++ b/acl/mock_acl/mock_acl.go @@ -5,7 +5,6 @@ // // mockgen -destination mock_acl/mock_acl.go github.com/anyproto/any-sync/acl AclService // - // Package mock_acl is a generated GoMock package. package mock_acl @@ -13,6 +12,7 @@ import ( context "context" reflect "reflect" + acl "github.com/anyproto/any-sync/acl" app "github.com/anyproto/any-sync/app" list "github.com/anyproto/any-sync/commonspace/object/acl/list" consensusproto "github.com/anyproto/any-sync/consensus/consensusproto" @@ -44,18 +44,18 @@ func (m *MockAclService) EXPECT() *MockAclServiceMockRecorder { } // AddRecord mocks base method. -func (m *MockAclService) AddRecord(arg0 context.Context, arg1 string, arg2 *consensusproto.RawRecord) (*consensusproto.RawRecordWithId, error) { +func (m *MockAclService) AddRecord(arg0 context.Context, arg1 string, arg2 *consensusproto.RawRecord, arg3 acl.Limits) (*consensusproto.RawRecordWithId, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AddRecord", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "AddRecord", arg0, arg1, arg2, arg3) ret0, _ := ret[0].(*consensusproto.RawRecordWithId) ret1, _ := ret[1].(error) return ret0, ret1 } // AddRecord indicates an expected call of AddRecord. -func (mr *MockAclServiceMockRecorder) AddRecord(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockAclServiceMockRecorder) AddRecord(arg0, arg1, arg2, arg3 any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddRecord", reflect.TypeOf((*MockAclService)(nil).AddRecord), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddRecord", reflect.TypeOf((*MockAclService)(nil).AddRecord), arg0, arg1, arg2, arg3) } // Close mocks base method. From 21ed73bf4227bc8ac42d5a5a1a590798ad080b04 Mon Sep 17 00:00:00 2001 From: Anton Akentev Date: Mon, 18 Mar 2024 14:29:06 +0000 Subject: [PATCH 046/140] pp/ns clients: reuse connection + round robbin --- nameservice/nameserviceclient/nameserviceclient.go | 2 +- paymentservice/paymentserviceclient/paymentserviceclient.go | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/nameservice/nameserviceclient/nameserviceclient.go b/nameservice/nameserviceclient/nameserviceclient.go index 9d0cba24..e0e07cf2 100644 --- a/nameservice/nameserviceclient/nameserviceclient.go +++ b/nameservice/nameserviceclient/nameserviceclient.go @@ -76,7 +76,7 @@ func (s *service) doClient(ctx context.Context, fn func(cl nsp.DRPCAnynsClient) // it will try to connect to the Naming Node // please enable "namingNode" type of node in the config (in the network.nodes array) - peer, err := s.pool.Get(ctx, s.nodeconf.NamingNodePeers()[0]) + peer, err := s.pool.GetOneOf(ctx, s.nodeconf.NamingNodePeers()) log.Info("trying to connect to namingNode peer: ", zap.Any("peer", peer)) if err != nil { diff --git a/paymentservice/paymentserviceclient/paymentserviceclient.go b/paymentservice/paymentserviceclient/paymentserviceclient.go index 26c2aaef..262a2eb0 100644 --- a/paymentservice/paymentserviceclient/paymentserviceclient.go +++ b/paymentservice/paymentserviceclient/paymentserviceclient.go @@ -61,8 +61,7 @@ func (s *service) doClient(ctx context.Context, fn func(cl pp.DRPCAnyPaymentProc // it will try to connect to the Payment Node // please use "paymentProcessingNode" type of node in the config (in the network.nodes array) - peer, err := s.pool.Get(ctx, s.nodeconf.PaymentProcessingNodePeers()[0]) - + peer, err := s.pool.GetOneOf(ctx, s.nodeconf.PaymentProcessingNodePeers()) if err != nil { return err } From 7a939526ca679c313dbd109ab0b2844c8c2e1054 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 18 Mar 2024 15:32:18 +0000 Subject: [PATCH 047/140] Bump github.com/stretchr/testify from 1.8.4 to 1.9.0 Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.8.4 to 1.9.0. - [Release notes](https://github.com/stretchr/testify/releases) - [Commits](https://github.com/stretchr/testify/compare/v1.8.4...v1.9.0) --- updated-dependencies: - dependency-name: github.com/stretchr/testify dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 9cb9b0f1..b3a0da6f 100644 --- a/go.mod +++ b/go.mod @@ -27,7 +27,7 @@ require ( github.com/multiformats/go-multihash v0.2.3 github.com/prometheus/client_golang v1.19.0 github.com/quic-go/quic-go v0.40.1 - github.com/stretchr/testify v1.8.4 + github.com/stretchr/testify v1.9.0 github.com/tyler-smith/go-bip39 v1.1.0 github.com/zeebo/blake3 v0.2.3 go.uber.org/atomic v1.11.0 diff --git a/go.sum b/go.sum index 9064ac79..93a6ec74 100644 --- a/go.sum +++ b/go.sum @@ -274,8 +274,8 @@ github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UV github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/supranational/blst v0.3.11 h1:LyU6FolezeWAhvQk0k6O/d49jqgO52MSDDfYgbeoEm4= github.com/supranational/blst v0.3.11/go.mod h1:jZJtfjgudtNl4en1tzwPIV3KjUnQUvG3/j+w+fVonLw= github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 h1:epCh84lMvA70Z7CTTCmYQn2CKbY8j86K7/FAIr141uY= From 04fa47e979d65793951407a4ffe424a370d1072b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 18 Mar 2024 15:32:24 +0000 Subject: [PATCH 048/140] Bump storj.io/drpc from 0.0.33 to 0.0.34 Bumps [storj.io/drpc](https://github.com/storj/drpc) from 0.0.33 to 0.0.34. - [Release notes](https://github.com/storj/drpc/releases) - [Commits](https://github.com/storj/drpc/compare/v0.0.33...v0.0.34) --- updated-dependencies: - dependency-name: storj.io/drpc dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 9cb9b0f1..c8bc6070 100644 --- a/go.mod +++ b/go.mod @@ -37,7 +37,7 @@ require ( golang.org/x/exp v0.0.0-20240205201215-2c58cdc269a3 golang.org/x/net v0.22.0 gopkg.in/yaml.v3 v3.0.1 - storj.io/drpc v0.0.33 + storj.io/drpc v0.0.34 ) require ( diff --git a/go.sum b/go.sum index 9064ac79..3717de03 100644 --- a/go.sum +++ b/go.sum @@ -401,5 +401,5 @@ lukechampine.com/blake3 v1.2.1 h1:YuqqRuaqsGV71BV/nm9xlI0MKUv4QC54jQnBChWbGnI= lukechampine.com/blake3 v1.2.1/go.mod h1:0OFRp7fBtAylGVCO40o87sbupkyIGgbpv1+M1k1LM6k= rsc.io/tmplfunc v0.0.3 h1:53XFQh69AfOa8Tw0Jm7t+GV7KZhOi6jzsCzTtKbMvzU= rsc.io/tmplfunc v0.0.3/go.mod h1:AG3sTPzElb1Io3Yg4voV9AGZJuleGAwaVRxL9M49PhA= -storj.io/drpc v0.0.33 h1:yCGZ26r66ZdMP0IcTYsj7WDAUIIjzXk6DJhbhvt9FHI= -storj.io/drpc v0.0.33/go.mod h1:vR804UNzhBa49NOJ6HeLjd2H3MakC1j5Gv8bsOQT6N4= +storj.io/drpc v0.0.34 h1:q9zlQKfJ5A7x8NQNFk8x7eKUF78FMhmAbZLnFK+og7I= +storj.io/drpc v0.0.34/go.mod h1:Y9LZaa8esL1PW2IDMqJE7CFSNq7d5bQ3RI7mGPtmKMg= From 14cbcd82a0f296752b51cd1c6650fbcf0e203d82 Mon Sep 17 00:00:00 2001 From: Anton Akentev Date: Wed, 20 Mar 2024 19:06:31 +0000 Subject: [PATCH 049/140] Add IsNameValid method --- .../mock/mock_paymentserviceclient.go | 37 +- .../paymentserviceclient.go | 11 + .../paymentserviceproto/paymentservice.pb.go | 587 ++++++++++++++++-- .../paymentservice_drpc.pb.go | 54 +- .../protos/paymentservice.proto | 25 + 5 files changed, 629 insertions(+), 85 deletions(-) diff --git a/paymentservice/paymentserviceclient/mock/mock_paymentserviceclient.go b/paymentservice/paymentserviceclient/mock/mock_paymentserviceclient.go index 395add4d..e1528cea 100644 --- a/paymentservice/paymentserviceclient/mock/mock_paymentserviceclient.go +++ b/paymentservice/paymentserviceclient/mock/mock_paymentserviceclient.go @@ -1,10 +1,6 @@ // Code generated by MockGen. DO NOT EDIT. // Source: paymentservice/paymentserviceclient/paymentserviceclient.go -// -// Generated by this command: -// -// mockgen -source paymentservice/paymentserviceclient/paymentserviceclient.go -// + // Package mock_paymentserviceclient is a generated GoMock package. package mock_paymentserviceclient @@ -50,7 +46,7 @@ func (m *MockAnyPpClientService) BuySubscription(ctx context.Context, in *paymen } // BuySubscription indicates an expected call of BuySubscription. -func (mr *MockAnyPpClientServiceMockRecorder) BuySubscription(ctx, in any) *gomock.Call { +func (mr *MockAnyPpClientServiceMockRecorder) BuySubscription(ctx, in interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BuySubscription", reflect.TypeOf((*MockAnyPpClientService)(nil).BuySubscription), ctx, in) } @@ -65,7 +61,7 @@ func (m *MockAnyPpClientService) FinalizeSubscription(ctx context.Context, in *p } // FinalizeSubscription indicates an expected call of FinalizeSubscription. -func (mr *MockAnyPpClientServiceMockRecorder) FinalizeSubscription(ctx, in any) *gomock.Call { +func (mr *MockAnyPpClientServiceMockRecorder) FinalizeSubscription(ctx, in interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FinalizeSubscription", reflect.TypeOf((*MockAnyPpClientService)(nil).FinalizeSubscription), ctx, in) } @@ -80,7 +76,7 @@ func (m *MockAnyPpClientService) GetAllTiers(ctx context.Context, in *paymentser } // GetAllTiers indicates an expected call of GetAllTiers. -func (mr *MockAnyPpClientServiceMockRecorder) GetAllTiers(ctx, in any) *gomock.Call { +func (mr *MockAnyPpClientServiceMockRecorder) GetAllTiers(ctx, in interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAllTiers", reflect.TypeOf((*MockAnyPpClientService)(nil).GetAllTiers), ctx, in) } @@ -95,7 +91,7 @@ func (m *MockAnyPpClientService) GetSubscriptionPortalLink(ctx context.Context, } // GetSubscriptionPortalLink indicates an expected call of GetSubscriptionPortalLink. -func (mr *MockAnyPpClientServiceMockRecorder) GetSubscriptionPortalLink(ctx, in any) *gomock.Call { +func (mr *MockAnyPpClientServiceMockRecorder) GetSubscriptionPortalLink(ctx, in interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSubscriptionPortalLink", reflect.TypeOf((*MockAnyPpClientService)(nil).GetSubscriptionPortalLink), ctx, in) } @@ -110,7 +106,7 @@ func (m *MockAnyPpClientService) GetSubscriptionStatus(ctx context.Context, in * } // GetSubscriptionStatus indicates an expected call of GetSubscriptionStatus. -func (mr *MockAnyPpClientServiceMockRecorder) GetSubscriptionStatus(ctx, in any) *gomock.Call { +func (mr *MockAnyPpClientServiceMockRecorder) GetSubscriptionStatus(ctx, in interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSubscriptionStatus", reflect.TypeOf((*MockAnyPpClientService)(nil).GetSubscriptionStatus), ctx, in) } @@ -125,7 +121,7 @@ func (m *MockAnyPpClientService) GetVerificationEmail(ctx context.Context, in *p } // GetVerificationEmail indicates an expected call of GetVerificationEmail. -func (mr *MockAnyPpClientServiceMockRecorder) GetVerificationEmail(ctx, in any) *gomock.Call { +func (mr *MockAnyPpClientServiceMockRecorder) GetVerificationEmail(ctx, in interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetVerificationEmail", reflect.TypeOf((*MockAnyPpClientService)(nil).GetVerificationEmail), ctx, in) } @@ -139,11 +135,26 @@ func (m *MockAnyPpClientService) Init(a *app.App) error { } // Init indicates an expected call of Init. -func (mr *MockAnyPpClientServiceMockRecorder) Init(a any) *gomock.Call { +func (mr *MockAnyPpClientServiceMockRecorder) Init(a interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Init", reflect.TypeOf((*MockAnyPpClientService)(nil).Init), a) } +// IsNameValid mocks base method. +func (m *MockAnyPpClientService) IsNameValid(ctx context.Context, in *paymentserviceproto.IsNameValidRequest) (*paymentserviceproto.IsNameValidResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "IsNameValid", ctx, in) + ret0, _ := ret[0].(*paymentserviceproto.IsNameValidResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// IsNameValid indicates an expected call of IsNameValid. +func (mr *MockAnyPpClientServiceMockRecorder) IsNameValid(ctx, in interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsNameValid", reflect.TypeOf((*MockAnyPpClientService)(nil).IsNameValid), ctx, in) +} + // Name mocks base method. func (m *MockAnyPpClientService) Name() string { m.ctrl.T.Helper() @@ -168,7 +179,7 @@ func (m *MockAnyPpClientService) VerifyEmail(ctx context.Context, in *paymentser } // VerifyEmail indicates an expected call of VerifyEmail. -func (mr *MockAnyPpClientServiceMockRecorder) VerifyEmail(ctx, in any) *gomock.Call { +func (mr *MockAnyPpClientServiceMockRecorder) VerifyEmail(ctx, in interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "VerifyEmail", reflect.TypeOf((*MockAnyPpClientService)(nil).VerifyEmail), ctx, in) } diff --git a/paymentservice/paymentserviceclient/paymentserviceclient.go b/paymentservice/paymentserviceclient/paymentserviceclient.go index 262a2eb0..57aa2bb5 100644 --- a/paymentservice/paymentserviceclient/paymentserviceclient.go +++ b/paymentservice/paymentserviceclient/paymentserviceclient.go @@ -23,6 +23,7 @@ var log = logger.NewNamed(CName) */ type AnyPpClientService interface { GetSubscriptionStatus(ctx context.Context, in *pp.GetSubscriptionRequestSigned) (out *pp.GetSubscriptionResponse, err error) + IsNameValid(ctx context.Context, in *pp.IsNameValidRequest) (out *pp.IsNameValidResponse, err error) BuySubscription(ctx context.Context, in *pp.BuySubscriptionRequestSigned) (out *pp.BuySubscriptionResponse, err error) GetSubscriptionPortalLink(ctx context.Context, in *pp.GetSubscriptionPortalLinkRequestSigned) (out *pp.GetSubscriptionPortalLinkResponse, err error) GetVerificationEmail(ctx context.Context, in *pp.GetVerificationEmailRequestSigned) (out *pp.GetVerificationEmailResponse, err error) @@ -144,3 +145,13 @@ func (s *service) GetAllTiers(ctx context.Context, in *pp.GetTiersRequestSigned) }) return } + +func (s *service) IsNameValid(ctx context.Context, in *pp.IsNameValidRequest) (out *pp.IsNameValidResponse, err error) { + err = s.doClient(ctx, func(cl pp.DRPCAnyPaymentProcessingClient) error { + if out, err = cl.IsNameValid(ctx, in); err != nil { + return rpcerr.Unwrap(err) + } + return nil + }) + return +} diff --git a/paymentservice/paymentserviceproto/paymentservice.pb.go b/paymentservice/paymentserviceproto/paymentservice.pb.go index 92a984ea..5dfc7a51 100644 --- a/paymentservice/paymentserviceproto/paymentservice.pb.go +++ b/paymentservice/paymentserviceproto/paymentservice.pb.go @@ -146,6 +146,43 @@ func (PaymentMethod) EnumDescriptor() ([]byte, []int) { return fileDescriptor_4feb29dcc5ba50f6, []int{2} } +type IsNameValidResponse_Code int32 + +const ( + IsNameValidResponse_Valid IsNameValidResponse_Code = 0 + IsNameValidResponse_NoDotAny IsNameValidResponse_Code = 1 + IsNameValidResponse_TooShort IsNameValidResponse_Code = 2 + IsNameValidResponse_TooLong IsNameValidResponse_Code = 3 + IsNameValidResponse_HasInvalidChars IsNameValidResponse_Code = 4 + IsNameValidResponse_TierFeatureNoName IsNameValidResponse_Code = 5 +) + +var IsNameValidResponse_Code_name = map[int32]string{ + 0: "Valid", + 1: "NoDotAny", + 2: "TooShort", + 3: "TooLong", + 4: "HasInvalidChars", + 5: "TierFeatureNoName", +} + +var IsNameValidResponse_Code_value = map[string]int32{ + "Valid": 0, + "NoDotAny": 1, + "TooShort": 2, + "TooLong": 3, + "HasInvalidChars": 4, + "TierFeatureNoName": 5, +} + +func (x IsNameValidResponse_Code) String() string { + return proto.EnumName(IsNameValidResponse_Code_name, int32(x)) +} + +func (IsNameValidResponse_Code) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_4feb29dcc5ba50f6, []int{19, 0} +} + type GetSubscriptionRequest struct { // in the following format: "A5k2d9sFZw84yisTxRnz2bPRd1YPfVfhxqymZ6yESprFTG65" // you can get it with Account().SignKey.GetPublic().Account() @@ -1161,10 +1198,115 @@ func (m *VerifyEmailRequestSigned) GetSignature() []byte { return nil } +type IsNameValidRequest struct { + RequestedTier int32 `protobuf:"varint,1,opt,name=requestedTier,proto3" json:"requestedTier,omitempty"` + RequestedAnyName string `protobuf:"bytes,2,opt,name=requestedAnyName,proto3" json:"requestedAnyName,omitempty"` +} + +func (m *IsNameValidRequest) Reset() { *m = IsNameValidRequest{} } +func (m *IsNameValidRequest) String() string { return proto.CompactTextString(m) } +func (*IsNameValidRequest) ProtoMessage() {} +func (*IsNameValidRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_4feb29dcc5ba50f6, []int{18} +} +func (m *IsNameValidRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *IsNameValidRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_IsNameValidRequest.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 *IsNameValidRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_IsNameValidRequest.Merge(m, src) +} +func (m *IsNameValidRequest) XXX_Size() int { + return m.Size() +} +func (m *IsNameValidRequest) XXX_DiscardUnknown() { + xxx_messageInfo_IsNameValidRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_IsNameValidRequest proto.InternalMessageInfo + +func (m *IsNameValidRequest) GetRequestedTier() int32 { + if m != nil { + return m.RequestedTier + } + return 0 +} + +func (m *IsNameValidRequest) GetRequestedAnyName() string { + if m != nil { + return m.RequestedAnyName + } + return "" +} + +type IsNameValidResponse struct { + Code IsNameValidResponse_Code `protobuf:"varint,1,opt,name=code,proto3,enum=IsNameValidResponse_Code" json:"code,omitempty"` + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` +} + +func (m *IsNameValidResponse) Reset() { *m = IsNameValidResponse{} } +func (m *IsNameValidResponse) String() string { return proto.CompactTextString(m) } +func (*IsNameValidResponse) ProtoMessage() {} +func (*IsNameValidResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_4feb29dcc5ba50f6, []int{19} +} +func (m *IsNameValidResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *IsNameValidResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_IsNameValidResponse.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 *IsNameValidResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_IsNameValidResponse.Merge(m, src) +} +func (m *IsNameValidResponse) XXX_Size() int { + return m.Size() +} +func (m *IsNameValidResponse) XXX_DiscardUnknown() { + xxx_messageInfo_IsNameValidResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_IsNameValidResponse proto.InternalMessageInfo + +func (m *IsNameValidResponse) GetCode() IsNameValidResponse_Code { + if m != nil { + return m.Code + } + return IsNameValidResponse_Valid +} + +func (m *IsNameValidResponse) GetDescription() string { + if m != nil { + return m.Description + } + return "" +} + func init() { proto.RegisterEnum("SubscriptionTier", SubscriptionTier_name, SubscriptionTier_value) proto.RegisterEnum("SubscriptionStatus", SubscriptionStatus_name, SubscriptionStatus_value) proto.RegisterEnum("PaymentMethod", PaymentMethod_name, PaymentMethod_value) + proto.RegisterEnum("IsNameValidResponse_Code", IsNameValidResponse_Code_name, IsNameValidResponse_Code_value) proto.RegisterType((*GetSubscriptionRequest)(nil), "GetSubscriptionRequest") proto.RegisterType((*GetSubscriptionRequestSigned)(nil), "GetSubscriptionRequestSigned") proto.RegisterType((*GetSubscriptionResponse)(nil), "GetSubscriptionResponse") @@ -1183,6 +1325,8 @@ func init() { proto.RegisterType((*VerifyEmailRequest)(nil), "VerifyEmailRequest") proto.RegisterType((*VerifyEmailResponse)(nil), "VerifyEmailResponse") proto.RegisterType((*VerifyEmailRequestSigned)(nil), "VerifyEmailRequestSigned") + proto.RegisterType((*IsNameValidRequest)(nil), "IsNameValidRequest") + proto.RegisterType((*IsNameValidResponse)(nil), "IsNameValidResponse") } func init() { @@ -1190,71 +1334,80 @@ func init() { } var fileDescriptor_4feb29dcc5ba50f6 = []byte{ - // 1018 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x57, 0xcf, 0x6e, 0xe4, 0xc4, - 0x13, 0x1e, 0x67, 0x66, 0xf2, 0xa7, 0xb2, 0x49, 0x9c, 0xca, 0x24, 0xeb, 0x9d, 0x4d, 0xac, 0xc4, - 0xfa, 0xfd, 0x20, 0x0a, 0x92, 0x23, 0x96, 0x3d, 0x00, 0x42, 0x08, 0x27, 0x1b, 0xa2, 0x95, 0x96, - 0xd5, 0xc8, 0xc9, 0x2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 0x83, 0xee, 0x8b, 0x25, 0xbc, 0xe7, 0xbb, 0xf3, 0xd1, 0x6f, 0xe7, 0xa6, 0xf6, 0xfa, - 0xdc, 0xd4, 0xfe, 0x3c, 0x37, 0xb5, 0x9f, 0x2f, 0xcc, 0xda, 0xeb, 0x0b, 0xb3, 0xf6, 0xfb, 0x85, - 0x59, 0xfb, 0xd2, 0xba, 0xfe, 0xdf, 0x80, 0xa3, 0x49, 0xf5, 0xf3, 0xde, 0x3f, 0x01, 0x00, 0x00, - 0xff, 0xff, 0xe8, 0xfe, 0xa0, 0x90, 0x73, 0x0c, 0x00, 0x00, + // 1157 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x57, 0x4f, 0x6f, 0x1b, 0x45, + 0x14, 0xf7, 0xfa, 0x4f, 0x12, 0xbf, 0x34, 0xc9, 0xf6, 0xc5, 0x4d, 0xb7, 0x6e, 0x62, 0xa5, 0x2b, + 0xfe, 0x44, 0x41, 0x6c, 0x45, 0xe9, 0x01, 0x10, 0x42, 0x38, 0x69, 0x1a, 0x22, 0x95, 0xc8, 0x5a, + 0xbb, 0x45, 0xd0, 0x03, 0x6c, 0xbd, 0x53, 0x67, 0xc9, 0x66, 0x66, 0x99, 0x19, 0x27, 0x2c, 0x5f, + 0x00, 0x71, 0x43, 0xe2, 0xc2, 0xf7, 0xe1, 0xc2, 0x09, 0xf5, 0xc8, 0x11, 0x25, 0x37, 0x4e, 0x7c, + 0x04, 0x34, 0xb3, 0xeb, 0x78, 0x1d, 0xaf, 0x9d, 0xd0, 0x88, 0x4b, 0xbc, 0xf3, 0x9b, 0x79, 0x6f, + 0xde, 0xfb, 0xbd, 0x7f, 0x13, 0xf8, 0x24, 0xf2, 0xe2, 0x23, 0x42, 0xa5, 0x20, 0xfc, 0x38, 0xe8, + 0x92, 0xfb, 0xa3, 0xcb, 0x88, 0x33, 0xc9, 0xee, 0xeb, 0xbf, 0xe2, 0xc2, 0x96, 0xa3, 0xd1, 0xfa, + 0xa3, 0xd7, 0x95, 0xff, 0x5a, 0x06, 0x84, 0x8b, 0x44, 0x8b, 0xfd, 0x01, 0xac, 0xec, 0x12, 0xd9, + 0xee, 0xbf, 0x10, 0x5d, 0x1e, 0x44, 0x32, 0x60, 0xd4, 0x25, 0xdf, 0xf5, 0x89, 0x90, 0xd8, 0x00, + 0x60, 0x27, 0x94, 0xf0, 0x26, 0x8d, 0xf7, 0x1e, 0x59, 0xc6, 0xba, 0xb1, 0x51, 0x75, 0x33, 0x88, + 0xfd, 0x0c, 0x56, 0xf3, 0x25, 0xdb, 0x41, 0x8f, 0x12, 0x1f, 0x2d, 0x98, 0x8d, 0xbc, 0x38, 0x64, + 0x9e, 0xaf, 0x85, 0x6f, 0xb8, 0x83, 0x25, 0xae, 0x42, 0x55, 0x04, 0x3d, 0xea, 0xc9, 0x3e, 0x27, + 0x56, 0x51, 0xef, 0x0d, 0x01, 0xfb, 0x9f, 0x22, 0xdc, 0x1e, 0x53, 0x2c, 0x22, 0x46, 0x05, 0x41, + 0x84, 0xb2, 0x32, 0x5e, 0x2b, 0xac, 0xb8, 0xfa, 0x1b, 0xdf, 0x81, 0x19, 0x21, 0x3d, 0xd9, 0x17, + 0x5a, 0xd5, 0xe2, 0x83, 0x65, 0x27, 0x2b, 0xda, 0xd6, 0x5b, 0x6e, 0x7a, 0x04, 0xd7, 0x61, 0xde, + 0xf7, 0x24, 0x69, 0x4b, 0x8f, 0x4b, 0xe2, 0x5b, 0xa5, 0x75, 0x63, 0xa3, 0xec, 0x66, 0x21, 0xac, + 0xc3, 0x9c, 0x5a, 0xee, 0x50, 0x5f, 0x58, 0x65, 0xbd, 0x7d, 0xbe, 0x56, 0xd2, 0x81, 0x68, 0xf6, + 0x25, 0x73, 0x09, 0x25, 0x27, 0x56, 0x65, 0xdd, 0xd8, 0x98, 0x73, 0xb3, 0x10, 0x3e, 0x84, 0x85, + 0x94, 0xec, 0x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xc2, + 0x9d, 0x89, 0x63, 0x09, 0xdf, 0x76, 0xae, 0x36, 0x14, 0xeb, 0xb6, 0x73, 0xe9, 0x6c, 0x4b, 0x1c, + 0xc9, 0x9b, 0x09, 0xa8, 0xa5, 0xa7, 0x8f, 0x8a, 0xfa, 0x9a, 0x33, 0x75, 0xdc, 0x14, 0xf0, 0x53, + 0x98, 0xcf, 0xb4, 0x5b, 0xbc, 0xe3, 0x4c, 0x6a, 0xbe, 0xf5, 0x9a, 0x93, 0xd3, 0xc8, 0x93, 0x88, + 0xef, 0x12, 0xd9, 0x0c, 0x43, 0x55, 0x78, 0x02, 0x57, 0xd4, 0x8d, 0xfa, 0x73, 0x54, 0xfc, 0x66, + 0x06, 0x1f, 0xc8, 0x6e, 0x7d, 0xfc, 0xfb, 0x69, 0xc3, 0x78, 0x75, 0xda, 0x30, 0xfe, 0x3a, 0x6d, + 0x18, 0x3f, 0x9f, 0x35, 0x0a, 0xaf, 0xce, 0x1a, 0x85, 0x3f, 0xcf, 0x1a, 0x85, 0xaf, 0xec, 0xcb, + 0xff, 0xf7, 0x7a, 0x31, 0xa3, 0x7f, 0xde, 0xff, 0x37, 0x00, 0x00, 0xff, 0xff, 0x95, 0xf9, 0xbc, + 0xe2, 0xe8, 0x0d, 0x00, 0x00, } func (m *GetSubscriptionRequest) Marshal() (dAtA []byte, err error) { @@ -1949,6 +2102,76 @@ func (m *VerifyEmailRequestSigned) MarshalToSizedBuffer(dAtA []byte) (int, error return len(dAtA) - i, nil } +func (m *IsNameValidRequest) 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 *IsNameValidRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *IsNameValidRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.RequestedAnyName) > 0 { + i -= len(m.RequestedAnyName) + copy(dAtA[i:], m.RequestedAnyName) + i = encodeVarintPaymentservice(dAtA, i, uint64(len(m.RequestedAnyName))) + i-- + dAtA[i] = 0x12 + } + if m.RequestedTier != 0 { + i = encodeVarintPaymentservice(dAtA, i, uint64(m.RequestedTier)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *IsNameValidResponse) 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 *IsNameValidResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *IsNameValidResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Description) > 0 { + i -= len(m.Description) + copy(dAtA[i:], m.Description) + i = encodeVarintPaymentservice(dAtA, i, uint64(len(m.Description))) + i-- + dAtA[i] = 0x12 + } + if m.Code != 0 { + i = encodeVarintPaymentservice(dAtA, i, uint64(m.Code)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + func encodeVarintPaymentservice(dAtA []byte, offset int, v uint64) int { offset -= sovPaymentservice(v) base := offset @@ -2271,6 +2494,38 @@ func (m *VerifyEmailRequestSigned) Size() (n int) { return n } +func (m *IsNameValidRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.RequestedTier != 0 { + n += 1 + sovPaymentservice(uint64(m.RequestedTier)) + } + l = len(m.RequestedAnyName) + if l > 0 { + n += 1 + l + sovPaymentservice(uint64(l)) + } + return n +} + +func (m *IsNameValidResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Code != 0 { + n += 1 + sovPaymentservice(uint64(m.Code)) + } + l = len(m.Description) + if l > 0 { + n += 1 + l + sovPaymentservice(uint64(l)) + } + return n +} + func sovPaymentservice(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -4342,6 +4597,208 @@ func (m *VerifyEmailRequestSigned) Unmarshal(dAtA []byte) error { } return nil } +func (m *IsNameValidRequest) 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 ErrIntOverflowPaymentservice + } + 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: IsNameValidRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: IsNameValidRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field RequestedTier", wireType) + } + m.RequestedTier = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPaymentservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.RequestedTier |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RequestedAnyName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPaymentservice + } + 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 ErrInvalidLengthPaymentservice + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPaymentservice + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RequestedAnyName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipPaymentservice(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthPaymentservice + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *IsNameValidResponse) 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 ErrIntOverflowPaymentservice + } + 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: IsNameValidResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: IsNameValidResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) + } + m.Code = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPaymentservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Code |= IsNameValidResponse_Code(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPaymentservice + } + 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 ErrInvalidLengthPaymentservice + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPaymentservice + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Description = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipPaymentservice(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthPaymentservice + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipPaymentservice(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/paymentservice/paymentserviceproto/paymentservice_drpc.pb.go b/paymentservice/paymentserviceproto/paymentservice_drpc.pb.go index 96e1e32f..f491ffca 100644 --- a/paymentservice/paymentserviceproto/paymentservice_drpc.pb.go +++ b/paymentservice/paymentserviceproto/paymentservice_drpc.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-go-drpc. DO NOT EDIT. -// protoc-gen-go-drpc version: v0.0.33 +// protoc-gen-go-drpc version: v0.0.34 // source: paymentservice/paymentserviceproto/protos/paymentservice.proto package paymentserviceproto @@ -41,6 +41,7 @@ type DRPCAnyPaymentProcessingClient interface { DRPCConn() drpc.Conn GetSubscriptionStatus(ctx context.Context, in *GetSubscriptionRequestSigned) (*GetSubscriptionResponse, error) + IsNameValid(ctx context.Context, in *IsNameValidRequest) (*IsNameValidResponse, error) BuySubscription(ctx context.Context, in *BuySubscriptionRequestSigned) (*BuySubscriptionResponse, error) FinalizeSubscription(ctx context.Context, in *FinalizeSubscriptionRequestSigned) (*FinalizeSubscriptionResponse, error) GetSubscriptionPortalLink(ctx context.Context, in *GetSubscriptionPortalLinkRequestSigned) (*GetSubscriptionPortalLinkResponse, error) @@ -68,6 +69,15 @@ func (c *drpcAnyPaymentProcessingClient) GetSubscriptionStatus(ctx context.Conte return out, nil } +func (c *drpcAnyPaymentProcessingClient) IsNameValid(ctx context.Context, in *IsNameValidRequest) (*IsNameValidResponse, error) { + out := new(IsNameValidResponse) + err := c.cc.Invoke(ctx, "/AnyPaymentProcessing/IsNameValid", drpcEncoding_File_paymentservice_paymentserviceproto_protos_paymentservice_proto{}, in, out) + if err != nil { + return nil, err + } + return out, nil +} + func (c *drpcAnyPaymentProcessingClient) BuySubscription(ctx context.Context, in *BuySubscriptionRequestSigned) (*BuySubscriptionResponse, error) { out := new(BuySubscriptionResponse) err := c.cc.Invoke(ctx, "/AnyPaymentProcessing/BuySubscription", drpcEncoding_File_paymentservice_paymentserviceproto_protos_paymentservice_proto{}, in, out) @@ -124,6 +134,7 @@ func (c *drpcAnyPaymentProcessingClient) GetAllTiers(ctx context.Context, in *Ge type DRPCAnyPaymentProcessingServer interface { GetSubscriptionStatus(context.Context, *GetSubscriptionRequestSigned) (*GetSubscriptionResponse, error) + IsNameValid(context.Context, *IsNameValidRequest) (*IsNameValidResponse, error) BuySubscription(context.Context, *BuySubscriptionRequestSigned) (*BuySubscriptionResponse, error) FinalizeSubscription(context.Context, *FinalizeSubscriptionRequestSigned) (*FinalizeSubscriptionResponse, error) GetSubscriptionPortalLink(context.Context, *GetSubscriptionPortalLinkRequestSigned) (*GetSubscriptionPortalLinkResponse, error) @@ -138,6 +149,10 @@ func (s *DRPCAnyPaymentProcessingUnimplementedServer) GetSubscriptionStatus(cont return nil, drpcerr.WithCode(errors.New("Unimplemented"), drpcerr.Unimplemented) } +func (s *DRPCAnyPaymentProcessingUnimplementedServer) IsNameValid(context.Context, *IsNameValidRequest) (*IsNameValidResponse, error) { + return nil, drpcerr.WithCode(errors.New("Unimplemented"), drpcerr.Unimplemented) +} + func (s *DRPCAnyPaymentProcessingUnimplementedServer) BuySubscription(context.Context, *BuySubscriptionRequestSigned) (*BuySubscriptionResponse, error) { return nil, drpcerr.WithCode(errors.New("Unimplemented"), drpcerr.Unimplemented) } @@ -164,7 +179,7 @@ func (s *DRPCAnyPaymentProcessingUnimplementedServer) GetAllTiers(context.Contex type DRPCAnyPaymentProcessingDescription struct{} -func (DRPCAnyPaymentProcessingDescription) NumMethods() int { return 7 } +func (DRPCAnyPaymentProcessingDescription) NumMethods() int { return 8 } func (DRPCAnyPaymentProcessingDescription) Method(n int) (string, drpc.Encoding, drpc.Receiver, interface{}, bool) { switch n { @@ -178,6 +193,15 @@ func (DRPCAnyPaymentProcessingDescription) Method(n int) (string, drpc.Encoding, ) }, DRPCAnyPaymentProcessingServer.GetSubscriptionStatus, true case 1: + return "/AnyPaymentProcessing/IsNameValid", drpcEncoding_File_paymentservice_paymentserviceproto_protos_paymentservice_proto{}, + func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) { + return srv.(DRPCAnyPaymentProcessingServer). + IsNameValid( + ctx, + in1.(*IsNameValidRequest), + ) + }, DRPCAnyPaymentProcessingServer.IsNameValid, true + case 2: return "/AnyPaymentProcessing/BuySubscription", drpcEncoding_File_paymentservice_paymentserviceproto_protos_paymentservice_proto{}, func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) { return srv.(DRPCAnyPaymentProcessingServer). @@ -186,7 +210,7 @@ func (DRPCAnyPaymentProcessingDescription) Method(n int) (string, drpc.Encoding, in1.(*BuySubscriptionRequestSigned), ) }, DRPCAnyPaymentProcessingServer.BuySubscription, true - case 2: + case 3: return "/AnyPaymentProcessing/FinalizeSubscription", drpcEncoding_File_paymentservice_paymentserviceproto_protos_paymentservice_proto{}, func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) { return srv.(DRPCAnyPaymentProcessingServer). @@ -195,7 +219,7 @@ func (DRPCAnyPaymentProcessingDescription) Method(n int) (string, drpc.Encoding, in1.(*FinalizeSubscriptionRequestSigned), ) }, DRPCAnyPaymentProcessingServer.FinalizeSubscription, true - case 3: + case 4: return "/AnyPaymentProcessing/GetSubscriptionPortalLink", drpcEncoding_File_paymentservice_paymentserviceproto_protos_paymentservice_proto{}, func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) { return srv.(DRPCAnyPaymentProcessingServer). @@ -204,7 +228,7 @@ func (DRPCAnyPaymentProcessingDescription) Method(n int) (string, drpc.Encoding, in1.(*GetSubscriptionPortalLinkRequestSigned), ) }, DRPCAnyPaymentProcessingServer.GetSubscriptionPortalLink, true - case 4: + case 5: return "/AnyPaymentProcessing/GetVerificationEmail", drpcEncoding_File_paymentservice_paymentserviceproto_protos_paymentservice_proto{}, func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) { return srv.(DRPCAnyPaymentProcessingServer). @@ -213,7 +237,7 @@ func (DRPCAnyPaymentProcessingDescription) Method(n int) (string, drpc.Encoding, in1.(*GetVerificationEmailRequestSigned), ) }, DRPCAnyPaymentProcessingServer.GetVerificationEmail, true - case 5: + case 6: return "/AnyPaymentProcessing/VerifyEmail", drpcEncoding_File_paymentservice_paymentserviceproto_protos_paymentservice_proto{}, func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) { return srv.(DRPCAnyPaymentProcessingServer). @@ -222,7 +246,7 @@ func (DRPCAnyPaymentProcessingDescription) Method(n int) (string, drpc.Encoding, in1.(*VerifyEmailRequestSigned), ) }, DRPCAnyPaymentProcessingServer.VerifyEmail, true - case 6: + case 7: return "/AnyPaymentProcessing/GetAllTiers", drpcEncoding_File_paymentservice_paymentserviceproto_protos_paymentservice_proto{}, func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) { return srv.(DRPCAnyPaymentProcessingServer). @@ -256,6 +280,22 @@ func (x *drpcAnyPaymentProcessing_GetSubscriptionStatusStream) SendAndClose(m *G return x.CloseSend() } +type DRPCAnyPaymentProcessing_IsNameValidStream interface { + drpc.Stream + SendAndClose(*IsNameValidResponse) error +} + +type drpcAnyPaymentProcessing_IsNameValidStream struct { + drpc.Stream +} + +func (x *drpcAnyPaymentProcessing_IsNameValidStream) SendAndClose(m *IsNameValidResponse) error { + if err := x.MsgSend(m, drpcEncoding_File_paymentservice_paymentserviceproto_protos_paymentservice_proto{}); err != nil { + return err + } + return x.CloseSend() +} + type DRPCAnyPaymentProcessing_BuySubscriptionStream interface { drpc.Stream SendAndClose(*BuySubscriptionResponse) error diff --git a/paymentservice/paymentserviceproto/protos/paymentservice.proto b/paymentservice/paymentserviceproto/protos/paymentservice.proto index 16ba461a..94a4d62b 100644 --- a/paymentservice/paymentserviceproto/protos/paymentservice.proto +++ b/paymentservice/paymentserviceproto/protos/paymentservice.proto @@ -187,12 +187,37 @@ message VerifyEmailRequestSigned { bytes signature = 2; } +message IsNameValidRequest { + int32 requestedTier = 1; + string requestedAnyName = 2; +} + +message IsNameValidResponse { + Code code = 1; + string description = 2; + + enum Code { + Valid = 0; + NoDotAny = 1; + TooShort = 2; + TooLong = 3; + HasInvalidChars = 4; + TierFeatureNoName = 5; + // if everything is fine - "name is already taken" check should be done in the NS + // see IsNameAvailable() + } +} + // NOTICE: // 1 - User can not ask for a payment/other links on behalf of another user (a signature is required) // 2 - Admin can do that on behalf of any user service AnyPaymentProcessing { rpc GetSubscriptionStatus(GetSubscriptionRequestSigned) returns (GetSubscriptionResponse) {} + // Check if the requested name is valid for the requested tier + // before requesting a payment link and paying + rpc IsNameValid(IsNameValidRequest) returns (IsNameValidResponse) {} + // Save a new BillingID to DB, and return a payment link. // You can call BuySubscription multiple times even if current payment is not processed yet // (to get new payment link). From f00fe1f046db289be11c7da9ae9761d21ffd5f1d Mon Sep 17 00:00:00 2001 From: Sergey Cherepanov Date: Thu, 21 Mar 2024 16:40:42 +0100 Subject: [PATCH 050/140] fix limit checking --- acl/acl.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/acl/acl.go b/acl/acl.go index 3c9e053c..54eb165e 100644 --- a/acl/acl.go +++ b/acl/acl.go @@ -97,6 +97,9 @@ func (as *aclService) AddRecord(ctx context.Context, spaceId string, rec *consen err = acl.ValidateRawRecord(rec, func(state *list.AclState) error { var readers, writers int for _, acc := range state.CurrentAccounts() { + if acc.Permissions.NoPermissions() { + continue + } readers++ if acc.Permissions.CanWrite() { writers++ From b11552ad0f6615f6588377daf08b99a2d60d668e Mon Sep 17 00:00:00 2001 From: Sergey Cherepanov Date: Mon, 25 Mar 2024 19:04:56 +0100 Subject: [PATCH 051/140] coordinator proto --- .../coordinatorproto/coordinator.pb.go | 921 +++++++++++++++--- .../coordinatorproto/coordinator_drpc.pb.go | 96 +- .../coordinatorproto/protos/coordinator.proto | 20 + 3 files changed, 899 insertions(+), 138 deletions(-) diff --git a/coordinator/coordinatorproto/coordinator.pb.go b/coordinator/coordinatorproto/coordinator.pb.go index 932be480..4198f16e 100644 --- a/coordinator/coordinatorproto/coordinator.pb.go +++ b/coordinator/coordinatorproto/coordinator.pb.go @@ -371,6 +371,7 @@ type SpaceStatusPayload struct { DeletionTimestamp int64 `protobuf:"varint,2,opt,name=deletionTimestamp,proto3" json:"deletionTimestamp,omitempty"` Permissions SpacePermissions `protobuf:"varint,3,opt,name=permissions,proto3,enum=coordinator.SpacePermissions" json:"permissions,omitempty"` Limits *SpaceLimits `protobuf:"bytes,4,opt,name=limits,proto3" json:"limits,omitempty"` + IsShared bool `protobuf:"varint,5,opt,name=isShared,proto3" json:"isShared,omitempty"` } func (m *SpaceStatusPayload) Reset() { *m = SpaceStatusPayload{} } @@ -434,6 +435,13 @@ func (m *SpaceStatusPayload) GetLimits() *SpaceLimits { return nil } +func (m *SpaceStatusPayload) GetIsShared() bool { + if m != nil { + return m.IsShared + } + return false +} + type SpaceSignResponse struct { Receipt *SpaceReceiptWithSignature `protobuf:"bytes,1,opt,name=receipt,proto3" json:"receipt,omitempty"` } @@ -907,6 +915,166 @@ func (m *SpaceStatusChangeResponse) GetPayload() *SpaceStatusPayload { return nil } +type SpaceMakeShareableRequest struct { + SpaceId string `protobuf:"bytes,1,opt,name=spaceId,proto3" json:"spaceId,omitempty"` +} + +func (m *SpaceMakeShareableRequest) Reset() { *m = SpaceMakeShareableRequest{} } +func (m *SpaceMakeShareableRequest) String() string { return proto.CompactTextString(m) } +func (*SpaceMakeShareableRequest) ProtoMessage() {} +func (*SpaceMakeShareableRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_d94f6f99586adae2, []int{12} +} +func (m *SpaceMakeShareableRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SpaceMakeShareableRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SpaceMakeShareableRequest.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 *SpaceMakeShareableRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_SpaceMakeShareableRequest.Merge(m, src) +} +func (m *SpaceMakeShareableRequest) XXX_Size() int { + return m.Size() +} +func (m *SpaceMakeShareableRequest) XXX_DiscardUnknown() { + xxx_messageInfo_SpaceMakeShareableRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_SpaceMakeShareableRequest proto.InternalMessageInfo + +func (m *SpaceMakeShareableRequest) GetSpaceId() string { + if m != nil { + return m.SpaceId + } + return "" +} + +type SpaceMakeShareableResponse struct { +} + +func (m *SpaceMakeShareableResponse) Reset() { *m = SpaceMakeShareableResponse{} } +func (m *SpaceMakeShareableResponse) String() string { return proto.CompactTextString(m) } +func (*SpaceMakeShareableResponse) ProtoMessage() {} +func (*SpaceMakeShareableResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_d94f6f99586adae2, []int{13} +} +func (m *SpaceMakeShareableResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SpaceMakeShareableResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SpaceMakeShareableResponse.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 *SpaceMakeShareableResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_SpaceMakeShareableResponse.Merge(m, src) +} +func (m *SpaceMakeShareableResponse) XXX_Size() int { + return m.Size() +} +func (m *SpaceMakeShareableResponse) XXX_DiscardUnknown() { + xxx_messageInfo_SpaceMakeShareableResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_SpaceMakeShareableResponse proto.InternalMessageInfo + +type SpaceMakeUnshareableRequest struct { + SpaceId string `protobuf:"bytes,1,opt,name=spaceId,proto3" json:"spaceId,omitempty"` +} + +func (m *SpaceMakeUnshareableRequest) Reset() { *m = SpaceMakeUnshareableRequest{} } +func (m *SpaceMakeUnshareableRequest) String() string { return proto.CompactTextString(m) } +func (*SpaceMakeUnshareableRequest) ProtoMessage() {} +func (*SpaceMakeUnshareableRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_d94f6f99586adae2, []int{14} +} +func (m *SpaceMakeUnshareableRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SpaceMakeUnshareableRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SpaceMakeUnshareableRequest.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 *SpaceMakeUnshareableRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_SpaceMakeUnshareableRequest.Merge(m, src) +} +func (m *SpaceMakeUnshareableRequest) XXX_Size() int { + return m.Size() +} +func (m *SpaceMakeUnshareableRequest) XXX_DiscardUnknown() { + xxx_messageInfo_SpaceMakeUnshareableRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_SpaceMakeUnshareableRequest proto.InternalMessageInfo + +func (m *SpaceMakeUnshareableRequest) GetSpaceId() string { + if m != nil { + return m.SpaceId + } + return "" +} + +type SpaceMakeUnshareableResponse struct { +} + +func (m *SpaceMakeUnshareableResponse) Reset() { *m = SpaceMakeUnshareableResponse{} } +func (m *SpaceMakeUnshareableResponse) String() string { return proto.CompactTextString(m) } +func (*SpaceMakeUnshareableResponse) ProtoMessage() {} +func (*SpaceMakeUnshareableResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_d94f6f99586adae2, []int{15} +} +func (m *SpaceMakeUnshareableResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SpaceMakeUnshareableResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SpaceMakeUnshareableResponse.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 *SpaceMakeUnshareableResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_SpaceMakeUnshareableResponse.Merge(m, src) +} +func (m *SpaceMakeUnshareableResponse) XXX_Size() int { + return m.Size() +} +func (m *SpaceMakeUnshareableResponse) XXX_DiscardUnknown() { + xxx_messageInfo_SpaceMakeUnshareableResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_SpaceMakeUnshareableResponse proto.InternalMessageInfo + // NetworkConfigurationRequest contains currenId of the client configuration, it can be empty type NetworkConfigurationRequest struct { // currenId of the client configuration @@ -918,7 +1086,7 @@ func (m *NetworkConfigurationRequest) Reset() { *m = NetworkConfiguratio func (m *NetworkConfigurationRequest) String() string { return proto.CompactTextString(m) } func (*NetworkConfigurationRequest) ProtoMessage() {} func (*NetworkConfigurationRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{12} + return fileDescriptor_d94f6f99586adae2, []int{16} } func (m *NetworkConfigurationRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -970,7 +1138,7 @@ func (m *NetworkConfigurationResponse) Reset() { *m = NetworkConfigurati func (m *NetworkConfigurationResponse) String() string { return proto.CompactTextString(m) } func (*NetworkConfigurationResponse) ProtoMessage() {} func (*NetworkConfigurationResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{13} + return fileDescriptor_d94f6f99586adae2, []int{17} } func (m *NetworkConfigurationResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1041,7 +1209,7 @@ func (m *Node) Reset() { *m = Node{} } func (m *Node) String() string { return proto.CompactTextString(m) } func (*Node) ProtoMessage() {} func (*Node) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{14} + return fileDescriptor_d94f6f99586adae2, []int{18} } func (m *Node) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1101,7 +1269,7 @@ func (m *DeletionConfirmPayloadWithSignature) Reset() { *m = DeletionCon func (m *DeletionConfirmPayloadWithSignature) String() string { return proto.CompactTextString(m) } func (*DeletionConfirmPayloadWithSignature) ProtoMessage() {} func (*DeletionConfirmPayloadWithSignature) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{15} + return fileDescriptor_d94f6f99586adae2, []int{19} } func (m *DeletionConfirmPayloadWithSignature) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1162,7 +1330,7 @@ func (m *DeletionConfirmPayload) Reset() { *m = DeletionConfirmPayload{} func (m *DeletionConfirmPayload) String() string { return proto.CompactTextString(m) } func (*DeletionConfirmPayload) ProtoMessage() {} func (*DeletionConfirmPayload) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{16} + return fileDescriptor_d94f6f99586adae2, []int{20} } func (m *DeletionConfirmPayload) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1237,7 +1405,7 @@ func (m *DeletionLogRequest) Reset() { *m = DeletionLogRequest{} } func (m *DeletionLogRequest) String() string { return proto.CompactTextString(m) } func (*DeletionLogRequest) ProtoMessage() {} func (*DeletionLogRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{17} + return fileDescriptor_d94f6f99586adae2, []int{21} } func (m *DeletionLogRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1291,7 +1459,7 @@ func (m *DeletionLogResponse) Reset() { *m = DeletionLogResponse{} } func (m *DeletionLogResponse) String() string { return proto.CompactTextString(m) } func (*DeletionLogResponse) ProtoMessage() {} func (*DeletionLogResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{18} + return fileDescriptor_d94f6f99586adae2, []int{22} } func (m *DeletionLogResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1351,7 +1519,7 @@ func (m *DeletionLogRecord) Reset() { *m = DeletionLogRecord{} } func (m *DeletionLogRecord) String() string { return proto.CompactTextString(m) } func (*DeletionLogRecord) ProtoMessage() {} func (*DeletionLogRecord) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{19} + return fileDescriptor_d94f6f99586adae2, []int{23} } func (m *DeletionLogRecord) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1427,7 +1595,7 @@ func (m *SpaceDeleteRequest) Reset() { *m = SpaceDeleteRequest{} } func (m *SpaceDeleteRequest) String() string { return proto.CompactTextString(m) } func (*SpaceDeleteRequest) ProtoMessage() {} func (*SpaceDeleteRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{20} + return fileDescriptor_d94f6f99586adae2, []int{24} } func (m *SpaceDeleteRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1493,7 +1661,7 @@ func (m *SpaceDeleteResponse) Reset() { *m = SpaceDeleteResponse{} } func (m *SpaceDeleteResponse) String() string { return proto.CompactTextString(m) } func (*SpaceDeleteResponse) ProtoMessage() {} func (*SpaceDeleteResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{21} + return fileDescriptor_d94f6f99586adae2, []int{25} } func (m *SpaceDeleteResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1539,7 +1707,7 @@ func (m *AccountDeleteRequest) Reset() { *m = AccountDeleteRequest{} } func (m *AccountDeleteRequest) String() string { return proto.CompactTextString(m) } func (*AccountDeleteRequest) ProtoMessage() {} func (*AccountDeleteRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{22} + return fileDescriptor_d94f6f99586adae2, []int{26} } func (m *AccountDeleteRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1598,7 +1766,7 @@ func (m *AccountDeletionConfirmPayload) Reset() { *m = AccountDeletionCo func (m *AccountDeletionConfirmPayload) String() string { return proto.CompactTextString(m) } func (*AccountDeletionConfirmPayload) ProtoMessage() {} func (*AccountDeletionConfirmPayload) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{23} + return fileDescriptor_d94f6f99586adae2, []int{27} } func (m *AccountDeletionConfirmPayload) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1664,7 +1832,7 @@ func (m *AccountDeleteResponse) Reset() { *m = AccountDeleteResponse{} } func (m *AccountDeleteResponse) String() string { return proto.CompactTextString(m) } func (*AccountDeleteResponse) ProtoMessage() {} func (*AccountDeleteResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{24} + return fileDescriptor_d94f6f99586adae2, []int{28} } func (m *AccountDeleteResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1708,7 +1876,7 @@ func (m *AccountRevertDeletionRequest) Reset() { *m = AccountRevertDelet func (m *AccountRevertDeletionRequest) String() string { return proto.CompactTextString(m) } func (*AccountRevertDeletionRequest) ProtoMessage() {} func (*AccountRevertDeletionRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{25} + return fileDescriptor_d94f6f99586adae2, []int{29} } func (m *AccountRevertDeletionRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1745,7 +1913,7 @@ func (m *AccountRevertDeletionResponse) Reset() { *m = AccountRevertDele func (m *AccountRevertDeletionResponse) String() string { return proto.CompactTextString(m) } func (*AccountRevertDeletionResponse) ProtoMessage() {} func (*AccountRevertDeletionResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{26} + return fileDescriptor_d94f6f99586adae2, []int{30} } func (m *AccountRevertDeletionResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1784,7 +1952,7 @@ func (m *AclAddRecordRequest) Reset() { *m = AclAddRecordRequest{} } func (m *AclAddRecordRequest) String() string { return proto.CompactTextString(m) } func (*AclAddRecordRequest) ProtoMessage() {} func (*AclAddRecordRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{27} + return fileDescriptor_d94f6f99586adae2, []int{31} } func (m *AclAddRecordRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1837,7 +2005,7 @@ func (m *AclAddRecordResponse) Reset() { *m = AclAddRecordResponse{} } func (m *AclAddRecordResponse) String() string { return proto.CompactTextString(m) } func (*AclAddRecordResponse) ProtoMessage() {} func (*AclAddRecordResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{28} + return fileDescriptor_d94f6f99586adae2, []int{32} } func (m *AclAddRecordResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1891,7 +2059,7 @@ func (m *AclGetRecordsRequest) Reset() { *m = AclGetRecordsRequest{} } func (m *AclGetRecordsRequest) String() string { return proto.CompactTextString(m) } func (*AclGetRecordsRequest) ProtoMessage() {} func (*AclGetRecordsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{29} + return fileDescriptor_d94f6f99586adae2, []int{33} } func (m *AclGetRecordsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1943,7 +2111,7 @@ func (m *AclGetRecordsResponse) Reset() { *m = AclGetRecordsResponse{} } func (m *AclGetRecordsResponse) String() string { return proto.CompactTextString(m) } func (*AclGetRecordsResponse) ProtoMessage() {} func (*AclGetRecordsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{30} + return fileDescriptor_d94f6f99586adae2, []int{34} } func (m *AclGetRecordsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1985,13 +2153,14 @@ type AccountLimitsSetRequest struct { FileStorageLimitBytes uint64 `protobuf:"varint,3,opt,name=fileStorageLimitBytes,proto3" json:"fileStorageLimitBytes,omitempty"` SpaceMembersRead uint32 `protobuf:"varint,4,opt,name=spaceMembersRead,proto3" json:"spaceMembersRead,omitempty"` SpaceMembersWrite uint32 `protobuf:"varint,5,opt,name=spaceMembersWrite,proto3" json:"spaceMembersWrite,omitempty"` + SharedSpacesLimit uint32 `protobuf:"varint,6,opt,name=sharedSpacesLimit,proto3" json:"sharedSpacesLimit,omitempty"` } func (m *AccountLimitsSetRequest) Reset() { *m = AccountLimitsSetRequest{} } func (m *AccountLimitsSetRequest) String() string { return proto.CompactTextString(m) } func (*AccountLimitsSetRequest) ProtoMessage() {} func (*AccountLimitsSetRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{31} + return fileDescriptor_d94f6f99586adae2, []int{35} } func (m *AccountLimitsSetRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2055,6 +2224,13 @@ func (m *AccountLimitsSetRequest) GetSpaceMembersWrite() uint32 { return 0 } +func (m *AccountLimitsSetRequest) GetSharedSpacesLimit() uint32 { + if m != nil { + return m.SharedSpacesLimit + } + return 0 +} + type AccountLimitsSetResponse struct { } @@ -2062,7 +2238,7 @@ func (m *AccountLimitsSetResponse) Reset() { *m = AccountLimitsSetRespon func (m *AccountLimitsSetResponse) String() string { return proto.CompactTextString(m) } func (*AccountLimitsSetResponse) ProtoMessage() {} func (*AccountLimitsSetResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{32} + return fileDescriptor_d94f6f99586adae2, []int{36} } func (m *AccountLimitsSetResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2110,6 +2286,10 @@ func init() { proto.RegisterType((*SpaceStatusCheckManyResponse)(nil), "coordinator.SpaceStatusCheckManyResponse") proto.RegisterType((*SpaceStatusChangeRequest)(nil), "coordinator.SpaceStatusChangeRequest") proto.RegisterType((*SpaceStatusChangeResponse)(nil), "coordinator.SpaceStatusChangeResponse") + proto.RegisterType((*SpaceMakeShareableRequest)(nil), "coordinator.SpaceMakeShareableRequest") + proto.RegisterType((*SpaceMakeShareableResponse)(nil), "coordinator.SpaceMakeShareableResponse") + proto.RegisterType((*SpaceMakeUnshareableRequest)(nil), "coordinator.SpaceMakeUnshareableRequest") + proto.RegisterType((*SpaceMakeUnshareableResponse)(nil), "coordinator.SpaceMakeUnshareableResponse") proto.RegisterType((*NetworkConfigurationRequest)(nil), "coordinator.NetworkConfigurationRequest") proto.RegisterType((*NetworkConfigurationResponse)(nil), "coordinator.NetworkConfigurationResponse") proto.RegisterType((*Node)(nil), "coordinator.Node") @@ -2138,115 +2318,122 @@ func init() { } var fileDescriptor_d94f6f99586adae2 = []byte{ - // 1721 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x18, 0xcd, 0x6f, 0x13, 0xc7, - 0xd7, 0xeb, 0x38, 0x89, 0xfd, 0x9c, 0x84, 0xcd, 0x24, 0x01, 0x63, 0x8c, 0x09, 0xfb, 0xe3, 0x47, - 0x83, 0x5b, 0x01, 0x35, 0x6d, 0x55, 0x44, 0xa5, 0x12, 0xc2, 0x47, 0x43, 0x21, 0x44, 0x13, 0x02, - 0x52, 0x7b, 0x40, 0x1b, 0xef, 0xc4, 0x59, 0xc5, 0x9e, 0x75, 0x67, 0xc7, 0x84, 0xfc, 0x17, 0xbd, - 0xf5, 0xd4, 0x7b, 0x0f, 0x3d, 0x54, 0xbd, 0x54, 0x6a, 0xa5, 0x9e, 0x7b, 0xe4, 0xd8, 0x4b, 0x25, - 0x04, 0x87, 0xde, 0xfb, 0x17, 0x54, 0x33, 0x3b, 0xbb, 0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x3f, 0xf0, 0xd8, 0xfe, 0xba, 0x23, 0xbd, 0x5c, 0xc1, - 0x31, 0x00, 0x35, 0x01, 0x9e, 0xdb, 0x3d, 0xd7, 0xd9, 0xa6, 0xdc, 0xed, 0xc9, 0x78, 0x2d, 0x61, - 0x0d, 0x62, 0x5d, 0x83, 0x53, 0x5a, 0x98, 0xac, 0xed, 0x91, 0xce, 0xfe, 0x91, 0x49, 0x67, 0x6d, - 0x43, 0x2d, 0xcb, 0xa4, 0x9e, 0xea, 0x3a, 0x4c, 0x0f, 0x34, 0xff, 0x55, 0xdb, 0xe7, 0x46, 0xc5, - 0xa4, 0xf2, 0x25, 0x0e, 0xe9, 0xad, 0xeb, 0x70, 0x26, 0x2d, 0xf6, 0xa1, 0x4d, 0x0f, 0x43, 0x7d, - 0xea, 0x50, 0x56, 0x0a, 0x88, 0x70, 0x9f, 0x58, 0xa9, 0xe0, 0xe8, 0x6c, 0x7d, 0x0d, 0x8d, 0x7c, - 0x56, 0xa5, 0xd5, 0x0d, 0x28, 0xab, 0x5b, 0x02, 0xde, 0x63, 0xa8, 0x15, 0x31, 0x58, 0xaf, 0x8c, - 0x94, 0xbd, 0x36, 0xed, 0x92, 0xa3, 0x4b, 0x93, 0x96, 0x6a, 0x4a, 0x66, 0xf4, 0xca, 0x59, 0x84, - 0x78, 0xf0, 0x14, 0x30, 0x7c, 0xf0, 0x14, 0x18, 0x61, 0x58, 0x48, 0x81, 0x1e, 0x1f, 0x0e, 0x82, - 0xba, 0x35, 0xd7, 0x5e, 0x4e, 0x98, 0x75, 0x3b, 0x4b, 0x87, 0xf3, 0x98, 0xad, 0x27, 0x2a, 0x3d, - 0x92, 0x16, 0xbe, 0xfd, 0x93, 0xde, 0x80, 0x33, 0x1b, 0x41, 0x2c, 0xae, 0x79, 0x74, 0xd7, 0xed, - 0x0e, 0x99, 0x2d, 0xae, 0x0e, 0x9d, 0xd7, 0x80, 0x4a, 0x67, 0xc8, 0x18, 0x11, 0xe1, 0xac, 0x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 0xb5, 0xd3, 0x5b, - 0x75, 0x1c, 0x95, 0x8a, 0x47, 0x46, 0x67, 0x2d, 0x6e, 0x7e, 0x81, 0x73, 0xa2, 0xde, 0xf6, 0x40, - 0x3c, 0xb4, 0x2e, 0x4a, 0xd9, 0x55, 0x87, 0x72, 0x90, 0xdf, 0x91, 0xb0, 0xe8, 0x3c, 0x46, 0xda, - 0x7d, 0x29, 0xed, 0x1e, 0xe1, 0x81, 0x34, 0xff, 0x58, 0x9a, 0xd9, 0x9d, 0xde, 0x17, 0xc4, 0x8e, - 0x92, 0x5f, 0x1d, 0xad, 0x0f, 0x85, 0xcb, 0x13, 0xb2, 0x94, 0x6a, 0xb5, 0x64, 0xa5, 0x9a, 0x89, - 0x2a, 0x91, 0xf5, 0x97, 0x01, 0xa7, 0x94, 0xe7, 0x82, 0x81, 0x7c, 0x4b, 0x70, 0x47, 0x83, 0x97, - 0x1b, 0x06, 0x88, 0x32, 0x28, 0x3c, 0x8b, 0xd8, 0x62, 0xc4, 0xf6, 0x3d, 0x1a, 0x96, 0xf5, 0xe0, - 0x84, 0x3e, 0x82, 0x25, 0x51, 0x12, 0xb6, 0xb8, 0xc7, 0xec, 0x6e, 0x30, 0xe3, 0xdf, 0x3a, 0xe4, - 0x24, 0x28, 0x47, 0x25, 0x9c, 0x8f, 0x14, 0x29, 0x2b, 0xad, 0x53, 0x6b, 0x0f, 0x16, 0xb6, 0x95, - 0x64, 0x05, 0xce, 0xc0, 0x45, 0x3e, 0xe9, 0xb0, 0xa7, 0x62, 0x5d, 0x92, 0xd5, 0x68, 0x16, 0x67, - 0x11, 0x56, 0x1d, 0x6a, 0x59, 0xf3, 0x02, 0xaf, 0xb4, 0x7e, 0x35, 0x00, 0xee, 0x30, 0xe6, 0xb1, - 0x35, 0xd9, 0xe4, 0xe7, 0x00, 0xb6, 0x29, 0x79, 0x31, 0x20, 0x1d, 0x4e, 0x1c, 0xb3, 0x80, 0x4c, - 0x35, 0xcc, 0xab, 0x60, 0x34, 0x0d, 0x54, 0x83, 0xc5, 0x18, 0x22, 0x52, 0x91, 0x50, 0xc7, 0xa5, - 0x5d, 0xb3, 0x18, 0xd1, 0xae, 0x89, 0x69, 0x80, 0x38, 0xe6, 0x04, 0x42, 0x30, 0x27, 0x21, 0x1b, - 0x1e, 0xbf, 0xf3, 0xc2, 0xf5, 0xb9, 0x6f, 0x96, 0xd0, 0x92, 0xda, 0x71, 0xa4, 0x2a, 0x98, 0xd8, - 0x9d, 0x3d, 0xe2, 0x98, 0x93, 0x82, 0x34, 0x91, 0x29, 0x8e, 0x39, 0x85, 0x66, 0xa1, 0x72, 0xd7, - 0x63, 0x3b, 0xae, 0xe3, 0x10, 0x6a, 0x4e, 0x23, 0x13, 0xaa, 0x52, 0xd3, 0x47, 0xbb, 0xbb, 0x3e, - 0xe1, 0xe6, 0x8f, 0xc5, 0xd6, 0x77, 0x86, 0xda, 0x37, 0x83, 0x12, 0x8e, 0x4e, 0x26, 0x16, 0xc5, - 0x50, 0x8f, 0x02, 0x6a, 0x42, 0x5d, 0x1f, 0xd4, 0x02, 0x8d, 0x43, 0x03, 0x4c, 0x23, 0x85, 0x0f, - 0x11, 0x5b, 0xdc, 0x66, 0x82, 0xbf, 0x98, 0x92, 0x1b, 0x2a, 0x38, 0x11, 0xf9, 0x22, 0x80, 0x6b, - 0x56, 0xb6, 0xee, 0xab, 0x45, 0x5e, 0x5b, 0x0e, 0xd1, 0x19, 0xb5, 0x6e, 0x68, 0xb0, 0x6d, 0xba, - 0x4f, 0xbd, 0x03, 0x6a, 0x16, 0xd0, 0x69, 0x58, 0x4a, 0x23, 0x1f, 0x1d, 0x50, 0xc2, 0x4c, 0xa3, - 0x75, 0x00, 0xe5, 0x70, 0xe8, 0x41, 0x55, 0x98, 0x7e, 0xcc, 0x08, 0x59, 0xdd, 0x5c, 0x37, 0x0b, - 0xe2, 0x70, 0xd7, 0xed, 0xc9, 0x83, 0x21, 0x1c, 0xb8, 0x16, 0x77, 0x39, 0x01, 0x93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, 0x3b, 0x29, 0x83, 0xc6, 0xae, 0x36, 0x9b, 0x50, 0xd5, 0x82, 0x07, 0x9d, - 0x1b, 0x3d, 0xbe, 0x05, 0xa2, 0x97, 0x47, 0x13, 0xc4, 0x12, 0xb5, 0x32, 0x86, 0x72, 0x76, 0xb8, - 0xc4, 0xbc, 0x92, 0x92, 0x98, 0x37, 0x1d, 0x3d, 0x81, 0xd9, 0x44, 0xbd, 0x42, 0xe7, 0x13, 0x2c, - 0x79, 0x53, 0x50, 0xdd, 0x1a, 0x47, 0xa2, 0xe4, 0xd2, 0x68, 0x62, 0x48, 0x36, 0x71, 0x74, 0x29, - 0x8f, 0x39, 0x77, 0x10, 0xa8, 0xb7, 0x8e, 0x43, 0xaa, 0xee, 0xdb, 0x82, 0x19, 0xbd, 0x91, 0xa3, - 0xe5, 0x14, 0x6f, 0x66, 0x5c, 0xa8, 0x9f, 0x1f, 0x43, 0xa1, 0x3b, 0x47, 0xeb, 0xc1, 0x19, 0xe7, - 0x64, 0x7b, 0x7d, 0xc6, 0x39, 0x79, 0x2d, 0xfc, 0x19, 0x98, 0xe9, 0x46, 0x96, 0xca, 0xdb, 0x11, - 0x6d, 0x3c, 0x95, 0xb7, 0xa3, 0xba, 0xe1, 0xad, 0x4f, 0xfe, 0x78, 0xdd, 0x34, 0x5e, 0xbe, 0x6e, - 0x1a, 0xaf, 0x5e, 0x37, 0x8d, 0x6f, 0xdf, 0x34, 0x0b, 0x2f, 0xdf, 0x34, 0x0b, 0x7f, 0xbe, 0x69, - 0x16, 0xbe, 0x6a, 0x8c, 0xfb, 0xbc, 0xbb, 0x33, 0x25, 0xff, 0x5d, 0xfb, 0x37, 0x00, 0x00, 0xff, - 0xff, 0x82, 0x38, 0x48, 0x4a, 0x05, 0x16, 0x00, 0x00, + // 1825 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x58, 0xcd, 0x73, 0x13, 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cc, 0xc0, 0x97, 0xda, 0x6c, 0xec, 0x70, + 0xb7, 0x05, 0x15, 0x25, 0x21, 0xd0, 0xb9, 0xd1, 0x0d, 0x6c, 0x68, 0x7a, 0x79, 0xb4, 0xc0, 0xd0, + 0xa2, 0x52, 0x9a, 0x51, 0xce, 0xcc, 0x9d, 0xe8, 0xd8, 0x52, 0x16, 0xf3, 0xfa, 0xc3, 0xa7, 0x30, + 0x9b, 0xa8, 0xc1, 0xe8, 0x7c, 0x42, 0x25, 0xaf, 0x0f, 0xac, 0x99, 0xe3, 0x44, 0xa4, 0x5d, 0x12, + 0xf7, 0x4c, 0xc9, 0x36, 0x06, 0x5d, 0xce, 0x53, 0xce, 0x6d, 0x85, 0x6a, 0xcd, 0xe3, 0x88, 0xca, + 0xfd, 0xda, 0x30, 0xa3, 0xb6, 0x32, 0x68, 0x39, 0xa5, 0x9b, 0x69, 0x98, 0x6a, 0xe7, 0xc7, 0x48, + 0xa8, 0xe0, 0x28, 0x5d, 0x48, 0x06, 0x9c, 0x6c, 0xb7, 0x93, 0x01, 0x27, 0xaf, 0x89, 0x79, 0x0e, + 0x46, 0xfa, 0x71, 0x4e, 0xd5, 0xa2, 0x11, 0x8d, 0x4c, 0xaa, 0x16, 0x8d, 0x7a, 0xe1, 0xef, 0x7c, + 0xf4, 0xd7, 0x9b, 0x86, 0xf6, 0xea, 0x4d, 0x43, 0x7b, 0xfd, 0xa6, 0xa1, 0x7d, 0xf7, 0xb6, 0x51, + 0x78, 0xf5, 0xb6, 0x51, 0xf8, 0xfb, 0x6d, 0xa3, 0xf0, 0x65, 0x7d, 0xdc, 0xa7, 0xfa, 0x9d, 0x29, + 0xf1, 0xef, 0xfa, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x8c, 0x0c, 0xff, 0x82, 0xd1, 0x17, 0x00, + 0x00, } func (m *SpaceSignRequest) Marshal() (dAtA []byte, err error) { @@ -2363,6 +2550,16 @@ func (m *SpaceStatusPayload) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.IsShared { + i-- + if m.IsShared { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x28 + } if m.Limits != nil { { size, err := m.Limits.MarshalToSizedBuffer(dAtA[:i]) @@ -2739,6 +2936,112 @@ func (m *SpaceStatusChangeResponse) MarshalToSizedBuffer(dAtA []byte) (int, erro return len(dAtA) - i, nil } +func (m *SpaceMakeShareableRequest) 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 *SpaceMakeShareableRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SpaceMakeShareableRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.SpaceId) > 0 { + i -= len(m.SpaceId) + copy(dAtA[i:], m.SpaceId) + i = encodeVarintCoordinator(dAtA, i, uint64(len(m.SpaceId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *SpaceMakeShareableResponse) 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 *SpaceMakeShareableResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SpaceMakeShareableResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *SpaceMakeUnshareableRequest) 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 *SpaceMakeUnshareableRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SpaceMakeUnshareableRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.SpaceId) > 0 { + i -= len(m.SpaceId) + copy(dAtA[i:], m.SpaceId) + i = encodeVarintCoordinator(dAtA, i, uint64(len(m.SpaceId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *SpaceMakeUnshareableResponse) 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 *SpaceMakeUnshareableResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SpaceMakeUnshareableResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + func (m *NetworkConfigurationRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -3511,6 +3814,11 @@ func (m *AccountLimitsSetRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) _ = i var l int _ = l + if m.SharedSpacesLimit != 0 { + i = encodeVarintCoordinator(dAtA, i, uint64(m.SharedSpacesLimit)) + i-- + dAtA[i] = 0x30 + } if m.SpaceMembersWrite != 0 { i = encodeVarintCoordinator(dAtA, i, uint64(m.SpaceMembersWrite)) i-- @@ -3639,6 +3947,9 @@ func (m *SpaceStatusPayload) Size() (n int) { l = m.Limits.Size() n += 1 + l + sovCoordinator(uint64(l)) } + if m.IsShared { + n += 2 + } return n } @@ -3793,6 +4104,50 @@ func (m *SpaceStatusChangeResponse) Size() (n int) { return n } +func (m *SpaceMakeShareableRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SpaceId) + if l > 0 { + n += 1 + l + sovCoordinator(uint64(l)) + } + return n +} + +func (m *SpaceMakeShareableResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *SpaceMakeUnshareableRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SpaceId) + if l > 0 { + n += 1 + l + sovCoordinator(uint64(l)) + } + return n +} + +func (m *SpaceMakeUnshareableResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + func (m *NetworkConfigurationRequest) Size() (n int) { if m == nil { return 0 @@ -4160,6 +4515,9 @@ func (m *AccountLimitsSetRequest) Size() (n int) { if m.SpaceMembersWrite != 0 { n += 1 + sovCoordinator(uint64(m.SpaceMembersWrite)) } + if m.SharedSpacesLimit != 0 { + n += 1 + sovCoordinator(uint64(m.SharedSpacesLimit)) + } return n } @@ -4592,6 +4950,26 @@ func (m *SpaceStatusPayload) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsShared", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCoordinator + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsShared = bool(v != 0) default: iNdEx = preIndex skippy, err := skipCoordinator(dAtA[iNdEx:]) @@ -5603,6 +5981,270 @@ func (m *SpaceStatusChangeResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *SpaceMakeShareableRequest) 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 ErrIntOverflowCoordinator + } + 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: SpaceMakeShareableRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SpaceMakeShareableRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SpaceId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCoordinator + } + 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 ErrInvalidLengthCoordinator + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthCoordinator + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SpaceId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipCoordinator(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthCoordinator + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SpaceMakeShareableResponse) 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 ErrIntOverflowCoordinator + } + 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: SpaceMakeShareableResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SpaceMakeShareableResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipCoordinator(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthCoordinator + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SpaceMakeUnshareableRequest) 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 ErrIntOverflowCoordinator + } + 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: SpaceMakeUnshareableRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SpaceMakeUnshareableRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SpaceId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCoordinator + } + 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 ErrInvalidLengthCoordinator + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthCoordinator + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SpaceId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipCoordinator(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthCoordinator + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SpaceMakeUnshareableResponse) 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 ErrIntOverflowCoordinator + } + 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: SpaceMakeUnshareableResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SpaceMakeUnshareableResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipCoordinator(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthCoordinator + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *NetworkConfigurationRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -8007,6 +8649,25 @@ func (m *AccountLimitsSetRequest) Unmarshal(dAtA []byte) error { break } } + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SharedSpacesLimit", wireType) + } + m.SharedSpacesLimit = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCoordinator + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SharedSpacesLimit |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipCoordinator(dAtA[iNdEx:]) diff --git a/coordinator/coordinatorproto/coordinator_drpc.pb.go b/coordinator/coordinatorproto/coordinator_drpc.pb.go index 20723965..3443a788 100644 --- a/coordinator/coordinatorproto/coordinator_drpc.pb.go +++ b/coordinator/coordinatorproto/coordinator_drpc.pb.go @@ -44,6 +44,8 @@ type DRPCCoordinatorClient interface { SpaceStatusCheck(ctx context.Context, in *SpaceStatusCheckRequest) (*SpaceStatusCheckResponse, error) SpaceStatusCheckMany(ctx context.Context, in *SpaceStatusCheckManyRequest) (*SpaceStatusCheckManyResponse, error) SpaceStatusChange(ctx context.Context, in *SpaceStatusChangeRequest) (*SpaceStatusChangeResponse, error) + SpaceMakeShareable(ctx context.Context, in *SpaceMakeShareableRequest) (*SpaceMakeShareableResponse, error) + SpaceMakeUnshareable(ctx context.Context, in *SpaceMakeUnshareableRequest) (*SpaceMakeUnshareableResponse, error) NetworkConfiguration(ctx context.Context, in *NetworkConfigurationRequest) (*NetworkConfigurationResponse, error) DeletionLog(ctx context.Context, in *DeletionLogRequest) (*DeletionLogResponse, error) SpaceDelete(ctx context.Context, in *SpaceDeleteRequest) (*SpaceDeleteResponse, error) @@ -100,6 +102,24 @@ func (c *drpcCoordinatorClient) SpaceStatusChange(ctx context.Context, in *Space return out, nil } +func (c *drpcCoordinatorClient) SpaceMakeShareable(ctx context.Context, in *SpaceMakeShareableRequest) (*SpaceMakeShareableResponse, error) { + out := new(SpaceMakeShareableResponse) + err := c.cc.Invoke(ctx, "/coordinator.Coordinator/SpaceMakeShareable", drpcEncoding_File_coordinator_coordinatorproto_protos_coordinator_proto{}, in, out) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *drpcCoordinatorClient) SpaceMakeUnshareable(ctx context.Context, in *SpaceMakeUnshareableRequest) (*SpaceMakeUnshareableResponse, error) { + out := new(SpaceMakeUnshareableResponse) + err := c.cc.Invoke(ctx, "/coordinator.Coordinator/SpaceMakeUnshareable", drpcEncoding_File_coordinator_coordinatorproto_protos_coordinator_proto{}, in, out) + if err != nil { + return nil, err + } + return out, nil +} + func (c *drpcCoordinatorClient) NetworkConfiguration(ctx context.Context, in *NetworkConfigurationRequest) (*NetworkConfigurationResponse, error) { out := new(NetworkConfigurationResponse) err := c.cc.Invoke(ctx, "/coordinator.Coordinator/NetworkConfiguration", drpcEncoding_File_coordinator_coordinatorproto_protos_coordinator_proto{}, in, out) @@ -177,6 +197,8 @@ type DRPCCoordinatorServer interface { SpaceStatusCheck(context.Context, *SpaceStatusCheckRequest) (*SpaceStatusCheckResponse, error) SpaceStatusCheckMany(context.Context, *SpaceStatusCheckManyRequest) (*SpaceStatusCheckManyResponse, error) SpaceStatusChange(context.Context, *SpaceStatusChangeRequest) (*SpaceStatusChangeResponse, error) + SpaceMakeShareable(context.Context, *SpaceMakeShareableRequest) (*SpaceMakeShareableResponse, error) + SpaceMakeUnshareable(context.Context, *SpaceMakeUnshareableRequest) (*SpaceMakeUnshareableResponse, error) NetworkConfiguration(context.Context, *NetworkConfigurationRequest) (*NetworkConfigurationResponse, error) DeletionLog(context.Context, *DeletionLogRequest) (*DeletionLogResponse, error) SpaceDelete(context.Context, *SpaceDeleteRequest) (*SpaceDeleteResponse, error) @@ -205,6 +227,14 @@ func (s *DRPCCoordinatorUnimplementedServer) SpaceStatusChange(context.Context, return nil, drpcerr.WithCode(errors.New("Unimplemented"), drpcerr.Unimplemented) } +func (s *DRPCCoordinatorUnimplementedServer) SpaceMakeShareable(context.Context, *SpaceMakeShareableRequest) (*SpaceMakeShareableResponse, error) { + return nil, drpcerr.WithCode(errors.New("Unimplemented"), drpcerr.Unimplemented) +} + +func (s *DRPCCoordinatorUnimplementedServer) SpaceMakeUnshareable(context.Context, *SpaceMakeUnshareableRequest) (*SpaceMakeUnshareableResponse, error) { + return nil, drpcerr.WithCode(errors.New("Unimplemented"), drpcerr.Unimplemented) +} + func (s *DRPCCoordinatorUnimplementedServer) NetworkConfiguration(context.Context, *NetworkConfigurationRequest) (*NetworkConfigurationResponse, error) { return nil, drpcerr.WithCode(errors.New("Unimplemented"), drpcerr.Unimplemented) } @@ -239,7 +269,7 @@ func (s *DRPCCoordinatorUnimplementedServer) AccountLimitsSet(context.Context, * type DRPCCoordinatorDescription struct{} -func (DRPCCoordinatorDescription) NumMethods() int { return 12 } +func (DRPCCoordinatorDescription) NumMethods() int { return 14 } func (DRPCCoordinatorDescription) Method(n int) (string, drpc.Encoding, drpc.Receiver, interface{}, bool) { switch n { @@ -280,6 +310,24 @@ func (DRPCCoordinatorDescription) Method(n int) (string, drpc.Encoding, drpc.Rec ) }, DRPCCoordinatorServer.SpaceStatusChange, true case 4: + return "/coordinator.Coordinator/SpaceMakeShareable", drpcEncoding_File_coordinator_coordinatorproto_protos_coordinator_proto{}, + func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) { + return srv.(DRPCCoordinatorServer). + SpaceMakeShareable( + ctx, + in1.(*SpaceMakeShareableRequest), + ) + }, DRPCCoordinatorServer.SpaceMakeShareable, true + case 5: + return "/coordinator.Coordinator/SpaceMakeUnshareable", drpcEncoding_File_coordinator_coordinatorproto_protos_coordinator_proto{}, + func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) { + return srv.(DRPCCoordinatorServer). + SpaceMakeUnshareable( + ctx, + in1.(*SpaceMakeUnshareableRequest), + ) + }, DRPCCoordinatorServer.SpaceMakeUnshareable, true + case 6: return "/coordinator.Coordinator/NetworkConfiguration", drpcEncoding_File_coordinator_coordinatorproto_protos_coordinator_proto{}, func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) { return srv.(DRPCCoordinatorServer). @@ -288,7 +336,7 @@ func (DRPCCoordinatorDescription) Method(n int) (string, drpc.Encoding, drpc.Rec in1.(*NetworkConfigurationRequest), ) }, DRPCCoordinatorServer.NetworkConfiguration, true - case 5: + case 7: return "/coordinator.Coordinator/DeletionLog", drpcEncoding_File_coordinator_coordinatorproto_protos_coordinator_proto{}, func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) { return srv.(DRPCCoordinatorServer). @@ -297,7 +345,7 @@ func (DRPCCoordinatorDescription) Method(n int) (string, drpc.Encoding, drpc.Rec in1.(*DeletionLogRequest), ) }, DRPCCoordinatorServer.DeletionLog, true - case 6: + case 8: return "/coordinator.Coordinator/SpaceDelete", drpcEncoding_File_coordinator_coordinatorproto_protos_coordinator_proto{}, func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) { return srv.(DRPCCoordinatorServer). @@ -306,7 +354,7 @@ func (DRPCCoordinatorDescription) Method(n int) (string, drpc.Encoding, drpc.Rec in1.(*SpaceDeleteRequest), ) }, DRPCCoordinatorServer.SpaceDelete, true - case 7: + case 9: return "/coordinator.Coordinator/AccountDelete", drpcEncoding_File_coordinator_coordinatorproto_protos_coordinator_proto{}, func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) { return srv.(DRPCCoordinatorServer). @@ -315,7 +363,7 @@ func (DRPCCoordinatorDescription) Method(n int) (string, drpc.Encoding, drpc.Rec in1.(*AccountDeleteRequest), ) }, DRPCCoordinatorServer.AccountDelete, true - case 8: + case 10: return "/coordinator.Coordinator/AccountRevertDeletion", drpcEncoding_File_coordinator_coordinatorproto_protos_coordinator_proto{}, func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) { return srv.(DRPCCoordinatorServer). @@ -324,7 +372,7 @@ func (DRPCCoordinatorDescription) Method(n int) (string, drpc.Encoding, drpc.Rec in1.(*AccountRevertDeletionRequest), ) }, DRPCCoordinatorServer.AccountRevertDeletion, true - case 9: + case 11: return "/coordinator.Coordinator/AclAddRecord", drpcEncoding_File_coordinator_coordinatorproto_protos_coordinator_proto{}, func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) { return srv.(DRPCCoordinatorServer). @@ -333,7 +381,7 @@ func (DRPCCoordinatorDescription) Method(n int) (string, drpc.Encoding, drpc.Rec in1.(*AclAddRecordRequest), ) }, DRPCCoordinatorServer.AclAddRecord, true - case 10: + case 12: return "/coordinator.Coordinator/AclGetRecords", drpcEncoding_File_coordinator_coordinatorproto_protos_coordinator_proto{}, func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) { return srv.(DRPCCoordinatorServer). @@ -342,7 +390,7 @@ func (DRPCCoordinatorDescription) Method(n int) (string, drpc.Encoding, drpc.Rec in1.(*AclGetRecordsRequest), ) }, DRPCCoordinatorServer.AclGetRecords, true - case 11: + case 13: return "/coordinator.Coordinator/AccountLimitsSet", drpcEncoding_File_coordinator_coordinatorproto_protos_coordinator_proto{}, func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) { return srv.(DRPCCoordinatorServer). @@ -424,6 +472,38 @@ func (x *drpcCoordinator_SpaceStatusChangeStream) SendAndClose(m *SpaceStatusCha return x.CloseSend() } +type DRPCCoordinator_SpaceMakeShareableStream interface { + drpc.Stream + SendAndClose(*SpaceMakeShareableResponse) error +} + +type drpcCoordinator_SpaceMakeShareableStream struct { + drpc.Stream +} + +func (x *drpcCoordinator_SpaceMakeShareableStream) SendAndClose(m *SpaceMakeShareableResponse) error { + if err := x.MsgSend(m, drpcEncoding_File_coordinator_coordinatorproto_protos_coordinator_proto{}); err != nil { + return err + } + return x.CloseSend() +} + +type DRPCCoordinator_SpaceMakeUnshareableStream interface { + drpc.Stream + SendAndClose(*SpaceMakeUnshareableResponse) error +} + +type drpcCoordinator_SpaceMakeUnshareableStream struct { + drpc.Stream +} + +func (x *drpcCoordinator_SpaceMakeUnshareableStream) SendAndClose(m *SpaceMakeUnshareableResponse) error { + if err := x.MsgSend(m, drpcEncoding_File_coordinator_coordinatorproto_protos_coordinator_proto{}); err != nil { + return err + } + return x.CloseSend() +} + type DRPCCoordinator_NetworkConfigurationStream interface { drpc.Stream SendAndClose(*NetworkConfigurationResponse) error diff --git a/coordinator/coordinatorproto/protos/coordinator.proto b/coordinator/coordinatorproto/protos/coordinator.proto index e585785f..10ae900c 100644 --- a/coordinator/coordinatorproto/protos/coordinator.proto +++ b/coordinator/coordinatorproto/protos/coordinator.proto @@ -16,6 +16,12 @@ service Coordinator { // SpaceStatusChange changes the status of space - Deprecated rpc SpaceStatusChange(SpaceStatusChangeRequest) returns (SpaceStatusChangeResponse); + // SpaceMakeShareable makes space shareable + rpc SpaceMakeShareable(SpaceMakeShareableRequest) returns (SpaceMakeShareableResponse); + + // SpaceMakeUnshareable marks space unshareable + rpc SpaceMakeUnshareable(SpaceMakeUnshareableRequest) returns (SpaceMakeUnshareableResponse); + // NetworkConfiguration retrieves the latest network configuration rpc NetworkConfiguration(NetworkConfigurationRequest) returns (NetworkConfigurationResponse); @@ -87,6 +93,7 @@ message SpaceStatusPayload { int64 deletionTimestamp = 2; SpacePermissions permissions = 3; SpaceLimits limits = 4; + bool isShared = 5; } message SpaceSignResponse { @@ -146,6 +153,18 @@ message SpaceStatusChangeResponse { SpaceStatusPayload payload = 1; } +message SpaceMakeShareableRequest { + string spaceId = 1; +} + +message SpaceMakeShareableResponse {} + +message SpaceMakeUnshareableRequest { + string spaceId = 1; +} + +message SpaceMakeUnshareableResponse {} + // NetworkConfigurationRequest contains currenId of the client configuration, it can be empty message NetworkConfigurationRequest { // currenId of the client configuration @@ -331,6 +350,7 @@ message AccountLimitsSetRequest { uint64 fileStorageLimitBytes = 3; uint32 spaceMembersRead = 4; uint32 spaceMembersWrite = 5; + uint32 sharedSpacesLimit = 6; } From d35337d897fdb706b36fbef337d52c9ac72ffa3c Mon Sep 17 00:00:00 2001 From: mcrakhman Date: Tue, 26 Mar 2024 09:31:27 +0100 Subject: [PATCH 052/140] Add mocks for acl clients --- commonspace/acl/aclclient/acjoiningclient.go | 1 + .../mock_aclclient/mock_aclclient.go | 349 ++++++++++++++++++ 2 files changed, 350 insertions(+) create mode 100644 commonspace/acl/aclclient/mock_aclclient/mock_aclclient.go diff --git a/commonspace/acl/aclclient/acjoiningclient.go b/commonspace/acl/aclclient/acjoiningclient.go index 0a96255e..09b03674 100644 --- a/commonspace/acl/aclclient/acjoiningclient.go +++ b/commonspace/acl/aclclient/acjoiningclient.go @@ -1,3 +1,4 @@ +//go:generate mockgen -destination mock_aclclient/mock_aclclient.go github.com/anyproto/any-sync/commonspace/acl/aclclient AclJoiningClient,AclSpaceClient package aclclient import ( diff --git a/commonspace/acl/aclclient/mock_aclclient/mock_aclclient.go b/commonspace/acl/aclclient/mock_aclclient/mock_aclclient.go new file mode 100644 index 00000000..6cd1b279 --- /dev/null +++ b/commonspace/acl/aclclient/mock_aclclient/mock_aclclient.go @@ -0,0 +1,349 @@ +// Code generated by MockGen. DO NOT EDIT. +// Source: github.com/anyproto/any-sync/commonspace/acl/aclclient (interfaces: AclJoiningClient,AclSpaceClient) +// +// Generated by this command: +// +// mockgen -destination mock_aclclient/mock_aclclient.go github.com/anyproto/any-sync/commonspace/acl/aclclient AclJoiningClient,AclSpaceClient +// +// Package mock_aclclient is a generated GoMock package. +package mock_aclclient + +import ( + context "context" + reflect "reflect" + + app "github.com/anyproto/any-sync/app" + list "github.com/anyproto/any-sync/commonspace/object/acl/list" + consensusproto "github.com/anyproto/any-sync/consensus/consensusproto" + crypto "github.com/anyproto/any-sync/util/crypto" + gomock "go.uber.org/mock/gomock" +) + +// MockAclJoiningClient is a mock of AclJoiningClient interface. +type MockAclJoiningClient struct { + ctrl *gomock.Controller + recorder *MockAclJoiningClientMockRecorder +} + +// MockAclJoiningClientMockRecorder is the mock recorder for MockAclJoiningClient. +type MockAclJoiningClientMockRecorder struct { + mock *MockAclJoiningClient +} + +// NewMockAclJoiningClient creates a new mock instance. +func NewMockAclJoiningClient(ctrl *gomock.Controller) *MockAclJoiningClient { + mock := &MockAclJoiningClient{ctrl: ctrl} + mock.recorder = &MockAclJoiningClientMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockAclJoiningClient) EXPECT() *MockAclJoiningClientMockRecorder { + return m.recorder +} + +// AclGetRecords mocks base method. +func (m *MockAclJoiningClient) AclGetRecords(arg0 context.Context, arg1, arg2 string) ([]*consensusproto.RawRecordWithId, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "AclGetRecords", arg0, arg1, arg2) + ret0, _ := ret[0].([]*consensusproto.RawRecordWithId) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// AclGetRecords indicates an expected call of AclGetRecords. +func (mr *MockAclJoiningClientMockRecorder) AclGetRecords(arg0, arg1, arg2 any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AclGetRecords", reflect.TypeOf((*MockAclJoiningClient)(nil).AclGetRecords), arg0, arg1, arg2) +} + +// CancelJoin mocks base method. +func (m *MockAclJoiningClient) CancelJoin(arg0 context.Context, arg1 string) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "CancelJoin", arg0, arg1) + ret0, _ := ret[0].(error) + return ret0 +} + +// CancelJoin indicates an expected call of CancelJoin. +func (mr *MockAclJoiningClientMockRecorder) CancelJoin(arg0, arg1 any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CancelJoin", reflect.TypeOf((*MockAclJoiningClient)(nil).CancelJoin), arg0, arg1) +} + +// CancelRemoveSelf mocks base method. +func (m *MockAclJoiningClient) CancelRemoveSelf(arg0 context.Context, arg1 string) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "CancelRemoveSelf", arg0, arg1) + ret0, _ := ret[0].(error) + return ret0 +} + +// CancelRemoveSelf indicates an expected call of CancelRemoveSelf. +func (mr *MockAclJoiningClientMockRecorder) CancelRemoveSelf(arg0, arg1 any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CancelRemoveSelf", reflect.TypeOf((*MockAclJoiningClient)(nil).CancelRemoveSelf), arg0, arg1) +} + +// Init mocks base method. +func (m *MockAclJoiningClient) Init(arg0 *app.App) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Init", arg0) + ret0, _ := ret[0].(error) + return ret0 +} + +// Init indicates an expected call of Init. +func (mr *MockAclJoiningClientMockRecorder) Init(arg0 any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Init", reflect.TypeOf((*MockAclJoiningClient)(nil).Init), arg0) +} + +// Name mocks base method. +func (m *MockAclJoiningClient) Name() string { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Name") + ret0, _ := ret[0].(string) + return ret0 +} + +// Name indicates an expected call of Name. +func (mr *MockAclJoiningClientMockRecorder) Name() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockAclJoiningClient)(nil).Name)) +} + +// RequestJoin mocks base method. +func (m *MockAclJoiningClient) RequestJoin(arg0 context.Context, arg1 string, arg2 list.RequestJoinPayload) (string, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "RequestJoin", arg0, arg1, arg2) + ret0, _ := ret[0].(string) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// RequestJoin indicates an expected call of RequestJoin. +func (mr *MockAclJoiningClientMockRecorder) RequestJoin(arg0, arg1, arg2 any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RequestJoin", reflect.TypeOf((*MockAclJoiningClient)(nil).RequestJoin), arg0, arg1, arg2) +} + +// MockAclSpaceClient is a mock of AclSpaceClient interface. +type MockAclSpaceClient struct { + ctrl *gomock.Controller + recorder *MockAclSpaceClientMockRecorder +} + +// MockAclSpaceClientMockRecorder is the mock recorder for MockAclSpaceClient. +type MockAclSpaceClientMockRecorder struct { + mock *MockAclSpaceClient +} + +// NewMockAclSpaceClient creates a new mock instance. +func NewMockAclSpaceClient(ctrl *gomock.Controller) *MockAclSpaceClient { + mock := &MockAclSpaceClient{ctrl: ctrl} + mock.recorder = &MockAclSpaceClientMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockAclSpaceClient) EXPECT() *MockAclSpaceClientMockRecorder { + return m.recorder +} + +// AcceptRequest mocks base method. +func (m *MockAclSpaceClient) AcceptRequest(arg0 context.Context, arg1 list.RequestAcceptPayload) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "AcceptRequest", arg0, arg1) + ret0, _ := ret[0].(error) + return ret0 +} + +// AcceptRequest indicates an expected call of AcceptRequest. +func (mr *MockAclSpaceClientMockRecorder) AcceptRequest(arg0, arg1 any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AcceptRequest", reflect.TypeOf((*MockAclSpaceClient)(nil).AcceptRequest), arg0, arg1) +} + +// AddAccounts mocks base method. +func (m *MockAclSpaceClient) AddAccounts(arg0 context.Context, arg1 list.AccountsAddPayload) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "AddAccounts", arg0, arg1) + ret0, _ := ret[0].(error) + return ret0 +} + +// AddAccounts indicates an expected call of AddAccounts. +func (mr *MockAclSpaceClientMockRecorder) AddAccounts(arg0, arg1 any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddAccounts", reflect.TypeOf((*MockAclSpaceClient)(nil).AddAccounts), arg0, arg1) +} + +// AddRecord mocks base method. +func (m *MockAclSpaceClient) AddRecord(arg0 context.Context, arg1 *consensusproto.RawRecord) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "AddRecord", arg0, arg1) + ret0, _ := ret[0].(error) + return ret0 +} + +// AddRecord indicates an expected call of AddRecord. +func (mr *MockAclSpaceClientMockRecorder) AddRecord(arg0, arg1 any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddRecord", reflect.TypeOf((*MockAclSpaceClient)(nil).AddRecord), arg0, arg1) +} + +// CancelRequest mocks base method. +func (m *MockAclSpaceClient) CancelRequest(arg0 context.Context) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "CancelRequest", arg0) + ret0, _ := ret[0].(error) + return ret0 +} + +// CancelRequest indicates an expected call of CancelRequest. +func (mr *MockAclSpaceClientMockRecorder) CancelRequest(arg0 any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CancelRequest", reflect.TypeOf((*MockAclSpaceClient)(nil).CancelRequest), arg0) +} + +// ChangePermissions mocks base method. +func (m *MockAclSpaceClient) ChangePermissions(arg0 context.Context, arg1 list.PermissionChangesPayload) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "ChangePermissions", arg0, arg1) + ret0, _ := ret[0].(error) + return ret0 +} + +// ChangePermissions indicates an expected call of ChangePermissions. +func (mr *MockAclSpaceClientMockRecorder) ChangePermissions(arg0, arg1 any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChangePermissions", reflect.TypeOf((*MockAclSpaceClient)(nil).ChangePermissions), arg0, arg1) +} + +// DeclineRequest mocks base method. +func (m *MockAclSpaceClient) DeclineRequest(arg0 context.Context, arg1 crypto.PubKey) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "DeclineRequest", arg0, arg1) + ret0, _ := ret[0].(error) + return ret0 +} + +// DeclineRequest indicates an expected call of DeclineRequest. +func (mr *MockAclSpaceClientMockRecorder) DeclineRequest(arg0, arg1 any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeclineRequest", reflect.TypeOf((*MockAclSpaceClient)(nil).DeclineRequest), arg0, arg1) +} + +// GenerateInvite mocks base method. +func (m *MockAclSpaceClient) GenerateInvite() (list.InviteResult, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GenerateInvite") + ret0, _ := ret[0].(list.InviteResult) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GenerateInvite indicates an expected call of GenerateInvite. +func (mr *MockAclSpaceClientMockRecorder) GenerateInvite() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GenerateInvite", reflect.TypeOf((*MockAclSpaceClient)(nil).GenerateInvite)) +} + +// Init mocks base method. +func (m *MockAclSpaceClient) Init(arg0 *app.App) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Init", arg0) + ret0, _ := ret[0].(error) + return ret0 +} + +// Init indicates an expected call of Init. +func (mr *MockAclSpaceClientMockRecorder) Init(arg0 any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Init", reflect.TypeOf((*MockAclSpaceClient)(nil).Init), arg0) +} + +// Name mocks base method. +func (m *MockAclSpaceClient) Name() string { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Name") + ret0, _ := ret[0].(string) + return ret0 +} + +// Name indicates an expected call of Name. +func (mr *MockAclSpaceClientMockRecorder) Name() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockAclSpaceClient)(nil).Name)) +} + +// RemoveAccounts mocks base method. +func (m *MockAclSpaceClient) RemoveAccounts(arg0 context.Context, arg1 list.AccountRemovePayload) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "RemoveAccounts", arg0, arg1) + ret0, _ := ret[0].(error) + return ret0 +} + +// RemoveAccounts indicates an expected call of RemoveAccounts. +func (mr *MockAclSpaceClientMockRecorder) RemoveAccounts(arg0, arg1 any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveAccounts", reflect.TypeOf((*MockAclSpaceClient)(nil).RemoveAccounts), arg0, arg1) +} + +// RequestSelfRemove mocks base method. +func (m *MockAclSpaceClient) RequestSelfRemove(arg0 context.Context) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "RequestSelfRemove", arg0) + ret0, _ := ret[0].(error) + return ret0 +} + +// RequestSelfRemove indicates an expected call of RequestSelfRemove. +func (mr *MockAclSpaceClientMockRecorder) RequestSelfRemove(arg0 any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RequestSelfRemove", reflect.TypeOf((*MockAclSpaceClient)(nil).RequestSelfRemove), arg0) +} + +// RevokeAllInvites mocks base method. +func (m *MockAclSpaceClient) RevokeAllInvites(arg0 context.Context) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "RevokeAllInvites", arg0) + ret0, _ := ret[0].(error) + return ret0 +} + +// RevokeAllInvites indicates an expected call of RevokeAllInvites. +func (mr *MockAclSpaceClientMockRecorder) RevokeAllInvites(arg0 any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RevokeAllInvites", reflect.TypeOf((*MockAclSpaceClient)(nil).RevokeAllInvites), arg0) +} + +// RevokeInvite mocks base method. +func (m *MockAclSpaceClient) RevokeInvite(arg0 context.Context, arg1 string) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "RevokeInvite", arg0, arg1) + ret0, _ := ret[0].(error) + return ret0 +} + +// RevokeInvite indicates an expected call of RevokeInvite. +func (mr *MockAclSpaceClientMockRecorder) RevokeInvite(arg0, arg1 any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RevokeInvite", reflect.TypeOf((*MockAclSpaceClient)(nil).RevokeInvite), arg0, arg1) +} + +// StopSharing mocks base method. +func (m *MockAclSpaceClient) StopSharing(arg0 context.Context, arg1 list.ReadKeyChangePayload) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "StopSharing", arg0, arg1) + ret0, _ := ret[0].(error) + return ret0 +} + +// StopSharing indicates an expected call of StopSharing. +func (mr *MockAclSpaceClientMockRecorder) StopSharing(arg0, arg1 any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StopSharing", reflect.TypeOf((*MockAclSpaceClient)(nil).StopSharing), arg0, arg1) +} From 672ce56987df549a8ed5ff22142c5761a355d902 Mon Sep 17 00:00:00 2001 From: Sergey Cherepanov Date: Tue, 26 Mar 2024 12:52:30 +0100 Subject: [PATCH 053/140] consensus client: rpcerr unwrap --- coordinator/coordinatorclient/coordinatorclient.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/coordinator/coordinatorclient/coordinatorclient.go b/coordinator/coordinatorclient/coordinatorclient.go index 9662d7cc..807805cf 100644 --- a/coordinator/coordinatorclient/coordinatorclient.go +++ b/coordinator/coordinatorclient/coordinatorclient.go @@ -261,7 +261,7 @@ func (c *coordinatorClient) AclAddRecord(ctx context.Context, spaceId string, re Payload: recordData, }) if err != nil { - return err + return rpcerr.Unwrap(err) } res = &consensusproto.RawRecordWithId{ Payload: resp.Payload, @@ -279,7 +279,7 @@ func (c *coordinatorClient) AclGetRecords(ctx context.Context, spaceId, aclHead AclHead: aclHead, }) if err != nil { - return err + return rpcerr.Unwrap(err) } res = make([]*consensusproto.RawRecordWithId, len(resp.Records)) for i, rec := range resp.Records { @@ -295,8 +295,10 @@ func (c *coordinatorClient) AclGetRecords(ctx context.Context, spaceId, aclHead func (c *coordinatorClient) AccountLimitsSet(ctx context.Context, req *coordinatorproto.AccountLimitsSetRequest) error { return c.doClient(ctx, func(cl coordinatorproto.DRPCCoordinatorClient) error { - _, err := cl.AccountLimitsSet(ctx, req) - return err + if _, err := cl.AccountLimitsSet(ctx, req); err != nil { + return rpcerr.Unwrap(err) + } + return nil }) } From 45bd5be0e7ca372f4eafdbec03cf92c5f6fa51c1 Mon Sep 17 00:00:00 2001 From: Sergey Cherepanov Date: Tue, 26 Mar 2024 14:30:15 +0100 Subject: [PATCH 054/140] coordinator client: shareable/unshareable space methods --- .../coordinatorclient/coordinatorclient.go | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/coordinator/coordinatorclient/coordinatorclient.go b/coordinator/coordinatorclient/coordinatorclient.go index 807805cf..eede202e 100644 --- a/coordinator/coordinatorclient/coordinatorclient.go +++ b/coordinator/coordinatorclient/coordinatorclient.go @@ -302,6 +302,28 @@ func (c *coordinatorClient) AccountLimitsSet(ctx context.Context, req *coordinat }) } +func (c *coordinatorClient) SpaceMakeShareable(ctx context.Context, spaceId string) (err error) { + return c.doClient(ctx, func(cl coordinatorproto.DRPCCoordinatorClient) error { + if _, err := cl.SpaceMakeShareable(ctx, &coordinatorproto.SpaceMakeShareableRequest{ + SpaceId: spaceId, + }); err != nil { + return rpcerr.Unwrap(err) + } + return nil + }) +} + +func (c *coordinatorClient) SpaceMakeUnshareable(ctx context.Context, spaceId string) (err error) { + return c.doClient(ctx, func(cl coordinatorproto.DRPCCoordinatorClient) error { + if _, err := cl.SpaceMakeUnshareable(ctx, &coordinatorproto.SpaceMakeUnshareableRequest{ + SpaceId: spaceId, + }); err != nil { + return rpcerr.Unwrap(err) + } + return nil + }) +} + func (c *coordinatorClient) doClient(ctx context.Context, f func(cl coordinatorproto.DRPCCoordinatorClient) error) error { p, err := c.getPeer(ctx) if err != nil { From 3f625dc87457f355d2aeca160dc9ccb634f1ee18 Mon Sep 17 00:00:00 2001 From: mcrakhman Date: Tue, 26 Mar 2024 15:55:12 +0100 Subject: [PATCH 055/140] Add nodeclient --- commonspace/acl/aclclient/acjoiningclient.go | 16 ++-- commonspace/acl/aclclient/aclspaceclient.go | 12 +-- node/nodeclient/nodeclient.go | 91 ++++++++++++++++++++ 3 files changed, 105 insertions(+), 14 deletions(-) create mode 100644 node/nodeclient/nodeclient.go diff --git a/commonspace/acl/aclclient/acjoiningclient.go b/commonspace/acl/aclclient/acjoiningclient.go index 09b03674..b273fac8 100644 --- a/commonspace/acl/aclclient/acjoiningclient.go +++ b/commonspace/acl/aclclient/acjoiningclient.go @@ -11,7 +11,7 @@ import ( "github.com/anyproto/any-sync/commonspace/object/acl/list" "github.com/anyproto/any-sync/commonspace/object/acl/liststorage" "github.com/anyproto/any-sync/consensus/consensusproto" - "github.com/anyproto/any-sync/coordinator/coordinatorclient" + "github.com/anyproto/any-sync/node/nodeclient" ) const CName = "common.acl.aclclient" @@ -25,8 +25,8 @@ type AclJoiningClient interface { } type aclJoiningClient struct { - coordinatorClient coordinatorclient.CoordinatorClient - keys *accountdata.AccountKeys + nodeClient nodeclient.NodeClient + keys *accountdata.AccountKeys } func NewAclJoiningClient() AclJoiningClient { @@ -38,13 +38,13 @@ func (c *aclJoiningClient) Name() (name string) { } func (c *aclJoiningClient) Init(a *app.App) (err error) { - c.coordinatorClient = a.MustComponent(coordinatorclient.CName).(coordinatorclient.CoordinatorClient) + c.nodeClient = a.MustComponent(nodeclient.CName).(nodeclient.NodeClient) c.keys = a.MustComponent(accountservice.CName).(accountservice.Service).Account() return nil } func (c *aclJoiningClient) AclGetRecords(ctx context.Context, spaceId, aclHead string) (recs []*consensusproto.RawRecordWithId, err error) { - return c.coordinatorClient.AclGetRecords(ctx, spaceId, aclHead) + return c.nodeClient.AclGetRecords(ctx, spaceId, aclHead) } func (c *aclJoiningClient) getAcl(ctx context.Context, spaceId string) (l list.AclList, err error) { @@ -76,7 +76,7 @@ func (c *aclJoiningClient) CancelJoin(ctx context.Context, spaceId string) (err if err != nil { return } - _, err = c.coordinatorClient.AclAddRecord(ctx, spaceId, res) + _, err = c.nodeClient.AclAddRecord(ctx, spaceId, res) return } @@ -99,7 +99,7 @@ func (c *aclJoiningClient) RequestJoin(ctx context.Context, spaceId string, payl if err != nil { return } - recWithId, err := c.coordinatorClient.AclAddRecord(ctx, spaceId, rec) + recWithId, err := c.nodeClient.AclAddRecord(ctx, spaceId, rec) if err != nil { return } @@ -126,6 +126,6 @@ func (c *aclJoiningClient) CancelRemoveSelf(ctx context.Context, spaceId string) if err != nil { return } - _, err = c.coordinatorClient.AclAddRecord(ctx, spaceId, newRec) + _, err = c.nodeClient.AclAddRecord(ctx, spaceId, newRec) return } diff --git a/commonspace/acl/aclclient/aclspaceclient.go b/commonspace/acl/aclclient/aclspaceclient.go index 61182d42..412e6595 100644 --- a/commonspace/acl/aclclient/aclspaceclient.go +++ b/commonspace/acl/aclclient/aclspaceclient.go @@ -9,7 +9,7 @@ import ( "github.com/anyproto/any-sync/commonspace/object/acl/syncacl" "github.com/anyproto/any-sync/commonspace/spacestate" "github.com/anyproto/any-sync/consensus/consensusproto" - "github.com/anyproto/any-sync/coordinator/coordinatorclient" + "github.com/anyproto/any-sync/node/nodeclient" "github.com/anyproto/any-sync/util/crypto" ) @@ -45,13 +45,13 @@ func NewAclSpaceClient() AclSpaceClient { } type aclSpaceClient struct { - coordinatorClient coordinatorclient.CoordinatorClient - acl list.AclList - spaceId string + nodeClient nodeclient.NodeClient + acl list.AclList + spaceId string } func (c *aclSpaceClient) Init(a *app.App) (err error) { - c.coordinatorClient = a.MustComponent(coordinatorclient.CName).(coordinatorclient.CoordinatorClient) + c.nodeClient = a.MustComponent(nodeclient.CName).(nodeclient.NodeClient) c.acl = a.MustComponent(syncacl.CName).(list.AclList) c.spaceId = a.MustComponent(spacestate.CName).(*spacestate.SpaceState).SpaceId return nil @@ -217,7 +217,7 @@ func (c *aclSpaceClient) AddRecord(ctx context.Context, consRec *consensusproto. } func (c *aclSpaceClient) sendRecordAndUpdate(ctx context.Context, spaceId string, rec *consensusproto.RawRecord) (err error) { - res, err := c.coordinatorClient.AclAddRecord(ctx, spaceId, rec) + res, err := c.nodeClient.AclAddRecord(ctx, spaceId, rec) if err != nil { return } diff --git a/node/nodeclient/nodeclient.go b/node/nodeclient/nodeclient.go new file mode 100644 index 00000000..d1177d35 --- /dev/null +++ b/node/nodeclient/nodeclient.go @@ -0,0 +1,91 @@ +package nodeclient + +import ( + "context" + + "storj.io/drpc" + + "github.com/anyproto/any-sync/app" + "github.com/anyproto/any-sync/commonspace/spacesyncproto" + "github.com/anyproto/any-sync/consensus/consensusproto" + "github.com/anyproto/any-sync/net/pool" + "github.com/anyproto/any-sync/net/rpc/rpcerr" + "github.com/anyproto/any-sync/nodeconf" +) + +const CName = "common.node.nodeclient" + +type NodeClient interface { + app.Component + AclGetRecords(ctx context.Context, spaceId, aclHead string) (recs []*consensusproto.RawRecordWithId, err error) + AclAddRecord(ctx context.Context, spaceId string, rec *consensusproto.RawRecord) (recWithId *consensusproto.RawRecordWithId, err error) +} + +type nodeClient struct { + pool pool.Service + nodeConf nodeconf.Service +} + +func (c *nodeClient) Init(a *app.App) (err error) { + c.pool = a.MustComponent(pool.CName).(pool.Service) + c.nodeConf = a.MustComponent(nodeconf.CName).(nodeconf.Service) + return +} + +func (c *nodeClient) Name() (name string) { + return CName +} + +func (c *nodeClient) AclGetRecords(ctx context.Context, spaceId, aclHead string) (recs []*consensusproto.RawRecordWithId, err error) { + err = c.doClient(ctx, spaceId, func(cl spacesyncproto.DRPCSpaceSyncClient) error { + resp, err := cl.AclGetRecords(ctx, &spacesyncproto.AclGetRecordsRequest{ + SpaceId: spaceId, + AclHead: aclHead, + }) + if err != nil { + return err + } + recs = make([]*consensusproto.RawRecordWithId, len(resp.Records)) + for i, rec := range resp.Records { + recs[i] = &consensusproto.RawRecordWithId{} + if err = recs[i].Unmarshal(rec); err != nil { + return err + } + } + return nil + }) + return +} + +func (c *nodeClient) AclAddRecord(ctx context.Context, spaceId string, rec *consensusproto.RawRecord) (recWithId *consensusproto.RawRecordWithId, err error) { + data, err := rec.Marshal() + if err != nil { + return + } + err = c.doClient(ctx, spaceId, func(cl spacesyncproto.DRPCSpaceSyncClient) error { + res, err := cl.AclAddRecord(ctx, &spacesyncproto.AclAddRecordRequest{ + SpaceId: spaceId, + Payload: data, + }) + if err != nil { + return err + } + recWithId = &consensusproto.RawRecordWithId{ + Payload: res.Payload, + Id: res.RecordId, + } + return nil + }) + return +} + +func (c *nodeClient) doClient(ctx context.Context, spaceId string, f func(cl spacesyncproto.DRPCSpaceSyncClient) error) error { + p, err := c.pool.GetOneOf(ctx, c.nodeConf.NodeIds(spaceId)) + if err != nil { + return err + } + return p.DoDrpc(ctx, func(conn drpc.Conn) error { + err := f(spacesyncproto.NewDRPCSpaceSyncClient(conn)) + return rpcerr.Unwrap(err) + }) +} From 9aa748662378459affcf8f3bdfe04ceaacd907a0 Mon Sep 17 00:00:00 2001 From: mcrakhman Date: Tue, 26 Mar 2024 16:16:27 +0100 Subject: [PATCH 056/140] Add tests for nodeclient --- node/nodeclient/nodeclient.go | 10 +++- node/nodeclient/nodeclient_test.go | 92 ++++++++++++++++++++++++++++++ 2 files changed, 100 insertions(+), 2 deletions(-) create mode 100644 node/nodeclient/nodeclient_test.go diff --git a/node/nodeclient/nodeclient.go b/node/nodeclient/nodeclient.go index d1177d35..1351fbd3 100644 --- a/node/nodeclient/nodeclient.go +++ b/node/nodeclient/nodeclient.go @@ -15,6 +15,10 @@ import ( const CName = "common.node.nodeclient" +func New() NodeClient { + return &nodeClient{} +} + type NodeClient interface { app.Component AclGetRecords(ctx context.Context, spaceId, aclHead string) (recs []*consensusproto.RawRecordWithId, err error) @@ -37,7 +41,7 @@ func (c *nodeClient) Name() (name string) { } func (c *nodeClient) AclGetRecords(ctx context.Context, spaceId, aclHead string) (recs []*consensusproto.RawRecordWithId, err error) { - err = c.doClient(ctx, spaceId, func(cl spacesyncproto.DRPCSpaceSyncClient) error { + err = clientDo(c, ctx, spaceId, func(cl spacesyncproto.DRPCSpaceSyncClient) error { resp, err := cl.AclGetRecords(ctx, &spacesyncproto.AclGetRecordsRequest{ SpaceId: spaceId, AclHead: aclHead, @@ -62,7 +66,7 @@ func (c *nodeClient) AclAddRecord(ctx context.Context, spaceId string, rec *cons if err != nil { return } - err = c.doClient(ctx, spaceId, func(cl spacesyncproto.DRPCSpaceSyncClient) error { + err = clientDo(c, ctx, spaceId, func(cl spacesyncproto.DRPCSpaceSyncClient) error { res, err := cl.AclAddRecord(ctx, &spacesyncproto.AclAddRecordRequest{ SpaceId: spaceId, Payload: data, @@ -79,6 +83,8 @@ func (c *nodeClient) AclAddRecord(ctx context.Context, spaceId string, rec *cons return } +var clientDo = (*nodeClient).doClient + func (c *nodeClient) doClient(ctx context.Context, spaceId string, f func(cl spacesyncproto.DRPCSpaceSyncClient) error) error { p, err := c.pool.GetOneOf(ctx, c.nodeConf.NodeIds(spaceId)) if err != nil { diff --git a/node/nodeclient/nodeclient_test.go b/node/nodeclient/nodeclient_test.go new file mode 100644 index 00000000..408dc4e5 --- /dev/null +++ b/node/nodeclient/nodeclient_test.go @@ -0,0 +1,92 @@ +package nodeclient + +import ( + "context" + "fmt" + "testing" + + "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" + + "github.com/anyproto/any-sync/commonspace/spacesyncproto" + "github.com/anyproto/any-sync/commonspace/spacesyncproto/mock_spacesyncproto" + "github.com/anyproto/any-sync/consensus/consensusproto" +) + +var ctx = context.Background() + +type fixture struct { + *nodeClient + ctrl *gomock.Controller +} + +func (f *fixture) finish() { + f.ctrl.Finish() +} + +func newFixture(t *testing.T) *fixture { + ctrl := gomock.NewController(t) + return &fixture{ + nodeClient: New().(*nodeClient), + ctrl: ctrl, + } +} + +func TestNodeClient_AclGetRecords(t *testing.T) { + f := newFixture(t) + defer f.finish() + + spaceId := "spaceId" + aclHead := "aclHead" + cl := mock_spacesyncproto.NewMockDRPCSpaceSyncClient(f.ctrl) + clientDo = func(client *nodeClient, ctx context.Context, s string, f func(cl spacesyncproto.DRPCSpaceSyncClient) error) error { + return f(cl) + } + var ( + expectedRecs []*consensusproto.RawRecordWithId + expectedByteRecs [][]byte + total = 5 + ) + for i := 0; i < total; i++ { + expectedRecs = append(expectedRecs, &consensusproto.RawRecordWithId{ + Id: fmt.Sprint(i), + }) + marshalled, err := expectedRecs[i].Marshal() + require.NoError(t, err) + expectedByteRecs = append(expectedByteRecs, marshalled) + } + cl.EXPECT().AclGetRecords(ctx, &spacesyncproto.AclGetRecordsRequest{ + SpaceId: spaceId, + AclHead: aclHead, + }).Return(&spacesyncproto.AclGetRecordsResponse{Records: expectedByteRecs}, nil) + recs, err := f.AclGetRecords(ctx, spaceId, aclHead) + require.NoError(t, err) + require.Equal(t, expectedRecs, recs) +} + +func TestNodeClient_AclAddRecords(t *testing.T) { + f := newFixture(t) + defer f.finish() + + spaceId := "spaceId" + cl := mock_spacesyncproto.NewMockDRPCSpaceSyncClient(f.ctrl) + clientDo = func(client *nodeClient, ctx context.Context, s string, f func(cl spacesyncproto.DRPCSpaceSyncClient) error) error { + return f(cl) + } + sendRec := &consensusproto.RawRecord{ + AcceptorTimestamp: 10, + } + data, err := sendRec.Marshal() + require.NoError(t, err) + expectedRec := &consensusproto.RawRecordWithId{ + Id: "recId", + Payload: data, + } + cl.EXPECT().AclAddRecord(ctx, &spacesyncproto.AclAddRecordRequest{ + SpaceId: spaceId, + Payload: data, + }).Return(&spacesyncproto.AclAddRecordResponse{RecordId: expectedRec.Id, Payload: expectedRec.Payload}, nil) + rec, err := f.AclAddRecord(ctx, spaceId, sendRec) + require.NoError(t, err) + require.Equal(t, expectedRec, rec) +} From 8bc8477f6d68f9075ccefed10091d45ed10590c2 Mon Sep 17 00:00:00 2001 From: mcrakhman Date: Tue, 26 Mar 2024 16:24:35 +0100 Subject: [PATCH 057/140] Add mock nodeclient and fix tests --- commonspace/spaceutils_test.go | 23 +++++ .../mock_nodeclient/mock_nodeclient.go | 99 +++++++++++++++++++ node/nodeclient/nodeclient.go | 1 + 3 files changed, 123 insertions(+) create mode 100644 node/nodeclient/mock_nodeclient/mock_nodeclient.go diff --git a/commonspace/spaceutils_test.go b/commonspace/spaceutils_test.go index 00cd374f..f17aee4d 100644 --- a/commonspace/spaceutils_test.go +++ b/commonspace/spaceutils_test.go @@ -28,6 +28,7 @@ import ( "github.com/anyproto/any-sync/identityrepo/identityrepoproto" "github.com/anyproto/any-sync/net/peer" "github.com/anyproto/any-sync/net/pool" + "github.com/anyproto/any-sync/node/nodeclient" "github.com/anyproto/any-sync/nodeconf" "github.com/anyproto/any-sync/testutil/accounttest" ) @@ -439,6 +440,27 @@ func (m mockCoordinatorClient) Name() (name string) { return coordinatorclient.CName } +var _ nodeclient.NodeClient = (*mockNodeClient)(nil) + +type mockNodeClient struct { +} + +func (m mockNodeClient) Init(a *app.App) (err error) { + return +} + +func (m mockNodeClient) Name() (name string) { + return nodeclient.CName +} + +func (m mockNodeClient) AclGetRecords(ctx context.Context, spaceId, aclHead string) (recs []*consensusproto.RawRecordWithId, err error) { + return +} + +func (m mockNodeClient) AclAddRecord(ctx context.Context, spaceId string, rec *consensusproto.RawRecord) (recWithId *consensusproto.RawRecordWithId, err error) { + return +} + // // Space fixture // @@ -476,6 +498,7 @@ func newFixture(t *testing.T) *spaceFixture { Register(credentialprovider.NewNoOp()). Register(&mockStatusServiceProvider{}). Register(mockCoordinatorClient{}). + Register(mockNodeClient{}). Register(fx.configurationService). Register(fx.storageProvider). Register(fx.peermanagerProvider). diff --git a/node/nodeclient/mock_nodeclient/mock_nodeclient.go b/node/nodeclient/mock_nodeclient/mock_nodeclient.go new file mode 100644 index 00000000..b908059f --- /dev/null +++ b/node/nodeclient/mock_nodeclient/mock_nodeclient.go @@ -0,0 +1,99 @@ +// Code generated by MockGen. DO NOT EDIT. +// Source: github.com/anyproto/any-sync/node/nodeclient (interfaces: NodeClient) +// +// Generated by this command: +// +// mockgen -destination mock_nodeclient/mock_nodeclient.go github.com/anyproto/any-sync/node/nodeclient NodeClient +// +// Package mock_nodeclient is a generated GoMock package. +package mock_nodeclient + +import ( + context "context" + reflect "reflect" + + app "github.com/anyproto/any-sync/app" + consensusproto "github.com/anyproto/any-sync/consensus/consensusproto" + gomock "go.uber.org/mock/gomock" +) + +// MockNodeClient is a mock of NodeClient interface. +type MockNodeClient struct { + ctrl *gomock.Controller + recorder *MockNodeClientMockRecorder +} + +// MockNodeClientMockRecorder is the mock recorder for MockNodeClient. +type MockNodeClientMockRecorder struct { + mock *MockNodeClient +} + +// NewMockNodeClient creates a new mock instance. +func NewMockNodeClient(ctrl *gomock.Controller) *MockNodeClient { + mock := &MockNodeClient{ctrl: ctrl} + mock.recorder = &MockNodeClientMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockNodeClient) EXPECT() *MockNodeClientMockRecorder { + return m.recorder +} + +// AclAddRecord mocks base method. +func (m *MockNodeClient) AclAddRecord(arg0 context.Context, arg1 string, arg2 *consensusproto.RawRecord) (*consensusproto.RawRecordWithId, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "AclAddRecord", arg0, arg1, arg2) + ret0, _ := ret[0].(*consensusproto.RawRecordWithId) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// AclAddRecord indicates an expected call of AclAddRecord. +func (mr *MockNodeClientMockRecorder) AclAddRecord(arg0, arg1, arg2 any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AclAddRecord", reflect.TypeOf((*MockNodeClient)(nil).AclAddRecord), arg0, arg1, arg2) +} + +// AclGetRecords mocks base method. +func (m *MockNodeClient) AclGetRecords(arg0 context.Context, arg1, arg2 string) ([]*consensusproto.RawRecordWithId, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "AclGetRecords", arg0, arg1, arg2) + ret0, _ := ret[0].([]*consensusproto.RawRecordWithId) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// AclGetRecords indicates an expected call of AclGetRecords. +func (mr *MockNodeClientMockRecorder) AclGetRecords(arg0, arg1, arg2 any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AclGetRecords", reflect.TypeOf((*MockNodeClient)(nil).AclGetRecords), arg0, arg1, arg2) +} + +// Init mocks base method. +func (m *MockNodeClient) Init(arg0 *app.App) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Init", arg0) + ret0, _ := ret[0].(error) + return ret0 +} + +// Init indicates an expected call of Init. +func (mr *MockNodeClientMockRecorder) Init(arg0 any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Init", reflect.TypeOf((*MockNodeClient)(nil).Init), arg0) +} + +// Name mocks base method. +func (m *MockNodeClient) Name() string { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Name") + ret0, _ := ret[0].(string) + return ret0 +} + +// Name indicates an expected call of Name. +func (mr *MockNodeClientMockRecorder) Name() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockNodeClient)(nil).Name)) +} diff --git a/node/nodeclient/nodeclient.go b/node/nodeclient/nodeclient.go index 1351fbd3..72bdca87 100644 --- a/node/nodeclient/nodeclient.go +++ b/node/nodeclient/nodeclient.go @@ -1,3 +1,4 @@ +//go:generate mockgen -destination mock_nodeclient/mock_nodeclient.go github.com/anyproto/any-sync/node/nodeclient NodeClient package nodeclient import ( From deaecca6db051440456f8196faae6e65686cf910 Mon Sep 17 00:00:00 2001 From: Sergey Cherepanov Date: Tue, 26 Mar 2024 16:37:21 +0100 Subject: [PATCH 058/140] mock gen --- acl/mock_acl/mock_acl.go | 1 + .../mock_aclclient/mock_aclclient.go | 1 + .../coordinatorclient/coordinatorclient.go | 2 ++ .../mock_coordinatorclient.go | 28 +++++++++++++++++++ 4 files changed, 32 insertions(+) diff --git a/acl/mock_acl/mock_acl.go b/acl/mock_acl/mock_acl.go index fb151161..a70ab70c 100644 --- a/acl/mock_acl/mock_acl.go +++ b/acl/mock_acl/mock_acl.go @@ -5,6 +5,7 @@ // // mockgen -destination mock_acl/mock_acl.go github.com/anyproto/any-sync/acl AclService // + // Package mock_acl is a generated GoMock package. package mock_acl diff --git a/commonspace/acl/aclclient/mock_aclclient/mock_aclclient.go b/commonspace/acl/aclclient/mock_aclclient/mock_aclclient.go index 6cd1b279..3994a66d 100644 --- a/commonspace/acl/aclclient/mock_aclclient/mock_aclclient.go +++ b/commonspace/acl/aclclient/mock_aclclient/mock_aclclient.go @@ -5,6 +5,7 @@ // // mockgen -destination mock_aclclient/mock_aclclient.go github.com/anyproto/any-sync/commonspace/acl/aclclient AclJoiningClient,AclSpaceClient // + // Package mock_aclclient is a generated GoMock package. package mock_aclclient diff --git a/coordinator/coordinatorclient/coordinatorclient.go b/coordinator/coordinatorclient/coordinatorclient.go index eede202e..29a06217 100644 --- a/coordinator/coordinatorclient/coordinatorclient.go +++ b/coordinator/coordinatorclient/coordinatorclient.go @@ -37,6 +37,8 @@ type CoordinatorClient interface { StatusCheckMany(ctx context.Context, spaceIds []string) (statuses []*coordinatorproto.SpaceStatusPayload, err error) StatusCheck(ctx context.Context, spaceId string) (status *coordinatorproto.SpaceStatusPayload, err error) SpaceSign(ctx context.Context, payload SpaceSignPayload) (receipt *coordinatorproto.SpaceReceiptWithSignature, err error) + SpaceMakeShareable(ctx context.Context, spaceId string) (err error) + SpaceMakeUnshareable(ctx context.Context, spaceId string) (err error) NetworkConfiguration(ctx context.Context, currentId string) (*coordinatorproto.NetworkConfigurationResponse, error) DeletionLog(ctx context.Context, lastRecordId string, limit int) (records []*coordinatorproto.DeletionLogRecord, err error) diff --git a/coordinator/coordinatorclient/mock_coordinatorclient/mock_coordinatorclient.go b/coordinator/coordinatorclient/mock_coordinatorclient/mock_coordinatorclient.go index bb38971b..762ce53b 100644 --- a/coordinator/coordinatorclient/mock_coordinatorclient/mock_coordinatorclient.go +++ b/coordinator/coordinatorclient/mock_coordinatorclient/mock_coordinatorclient.go @@ -218,6 +218,34 @@ func (mr *MockCoordinatorClientMockRecorder) SpaceDelete(arg0, arg1, arg2 any) * return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SpaceDelete", reflect.TypeOf((*MockCoordinatorClient)(nil).SpaceDelete), arg0, arg1, arg2) } +// SpaceMakeShareable mocks base method. +func (m *MockCoordinatorClient) SpaceMakeShareable(arg0 context.Context, arg1 string) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "SpaceMakeShareable", arg0, arg1) + ret0, _ := ret[0].(error) + return ret0 +} + +// SpaceMakeShareable indicates an expected call of SpaceMakeShareable. +func (mr *MockCoordinatorClientMockRecorder) SpaceMakeShareable(arg0, arg1 any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SpaceMakeShareable", reflect.TypeOf((*MockCoordinatorClient)(nil).SpaceMakeShareable), arg0, arg1) +} + +// SpaceMakeUnshareable mocks base method. +func (m *MockCoordinatorClient) SpaceMakeUnshareable(arg0 context.Context, arg1 string) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "SpaceMakeUnshareable", arg0, arg1) + ret0, _ := ret[0].(error) + return ret0 +} + +// SpaceMakeUnshareable indicates an expected call of SpaceMakeUnshareable. +func (mr *MockCoordinatorClientMockRecorder) SpaceMakeUnshareable(arg0, arg1 any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SpaceMakeUnshareable", reflect.TypeOf((*MockCoordinatorClient)(nil).SpaceMakeUnshareable), arg0, arg1) +} + // SpaceSign mocks base method. func (m *MockCoordinatorClient) SpaceSign(arg0 context.Context, arg1 coordinatorclient.SpaceSignPayload) (*coordinatorproto.SpaceReceiptWithSignature, error) { m.ctrl.T.Helper() From ed3b8ff03fa81ab65a9c3c52cf111025e9183ab2 Mon Sep 17 00:00:00 2001 From: Sergey Cherepanov Date: Tue, 26 Mar 2024 16:52:25 +0100 Subject: [PATCH 059/140] fix test --- commonspace/spaceutils_test.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/commonspace/spaceutils_test.go b/commonspace/spaceutils_test.go index 00cd374f..5cd0ac3f 100644 --- a/commonspace/spaceutils_test.go +++ b/commonspace/spaceutils_test.go @@ -379,6 +379,14 @@ var _ coordinatorclient.CoordinatorClient = (*mockCoordinatorClient)(nil) type mockCoordinatorClient struct { } +func (m mockCoordinatorClient) SpaceMakeShareable(ctx context.Context, spaceId string) (err error) { + return nil +} + +func (m mockCoordinatorClient) SpaceMakeUnshareable(ctx context.Context, spaceId string) (err error) { + return nil +} + func (m mockCoordinatorClient) AccountLimitsSet(ctx context.Context, req *coordinatorproto.AccountLimitsSetRequest) error { return nil } From 19a18f76452f4a18090d5da266eb4993f64238e0 Mon Sep 17 00:00:00 2001 From: Anton Akentev Date: Wed, 27 Mar 2024 20:47:32 +0000 Subject: [PATCH 060/140] paymentsserviceproto: add error codes --- paymentservice/paymentserviceproto/errors.go | 29 +++ .../paymentserviceproto/paymentservice.pb.go | 237 ++++++++++++------ .../protos/paymentservice.proto | 26 ++ 3 files changed, 218 insertions(+), 74 deletions(-) create mode 100644 paymentservice/paymentserviceproto/errors.go diff --git a/paymentservice/paymentserviceproto/errors.go b/paymentservice/paymentserviceproto/errors.go new file mode 100644 index 00000000..2ce67b2a --- /dev/null +++ b/paymentservice/paymentserviceproto/errors.go @@ -0,0 +1,29 @@ +package paymentserviceproto + +import ( + "errors" + + "github.com/anyproto/any-sync/net/rpc/rpcerr" +) + +var ( + errGroup = rpcerr.ErrGroup(ErrorCodes_ErrorOffset) + + ErrEthAddressEmpty = errGroup.Register(errors.New("owner eth address is empty"), uint64(ErrorCodes_EthAddressEmpty)) + ErrInvalidSignature = errGroup.Register(errors.New("invalid signature"), uint64(ErrorCodes_InvalidSignature)) + ErrTierWrong = errGroup.Register(errors.New("wrong tier specified"), uint64(ErrorCodes_TierWrong)) + ErrTierNotFound = errGroup.Register(errors.New("requested tier not found"), uint64(ErrorCodes_TierNotFound)) + ErrTierInactive = errGroup.Register(errors.New("requested tier is not active"), uint64(ErrorCodes_TierInactive)) + ErrPaymentMethodWrong = errGroup.Register(errors.New("wrong payment method specified"), uint64(ErrorCodes_PaymentMethodWrong)) + ErrBadAnyName = errGroup.Register(errors.New("bad any name specified"), uint64(ErrorCodes_BadAnyName)) + ErrUnknown = errGroup.Register(errors.New("unknown error"), uint64(ErrorCodes_Unknown)) + ErrSubsAlreadyActive = errGroup.Register(errors.New("user already has an active subscription"), uint64(ErrorCodes_SubsAlreadyActive)) + ErrSubsNotFound = errGroup.Register(errors.New("no subscription for user"), uint64(ErrorCodes_SubsNotFound)) + ErrSubsWrongState = errGroup.Register(errors.New("subscription is not in PendingRequiresFinalization state"), uint64(ErrorCodes_SubsWrongState)) + ErrEmailWrongFormat = errGroup.Register(errors.New("wrong email format"), uint64(ErrorCodes_EmailWrongFormat)) + ErrEmailAlreadyVerified = errGroup.Register(errors.New("email already verified"), uint64(ErrorCodes_EmailAlreadyVerified)) + ErrEmailAlreadySent = errGroup.Register(errors.New("email verification request already sent. wait for the email or try again later"), uint64(ErrorCodes_EmailAlreadySent)) + ErrEmailFailedToSend = errGroup.Register(errors.New("failed to send email"), uint64(ErrorCodes_EmailFailedToSend)) + ErrEmailExpired = errGroup.Register(errors.New("email verification request expired. try getting new code"), uint64(ErrorCodes_EmailExpired)) + ErrEmailWrongCode = errGroup.Register(errors.New("wrong verification code"), uint64(ErrorCodes_EmailWrongCode)) +) diff --git a/paymentservice/paymentserviceproto/paymentservice.pb.go b/paymentservice/paymentserviceproto/paymentservice.pb.go index 5dfc7a51..285361ce 100644 --- a/paymentservice/paymentserviceproto/paymentservice.pb.go +++ b/paymentservice/paymentserviceproto/paymentservice.pb.go @@ -146,6 +146,82 @@ func (PaymentMethod) EnumDescriptor() ([]byte, []int) { return fileDescriptor_4feb29dcc5ba50f6, []int{2} } +type ErrorCodes int32 + +const ( + ErrorCodes_Unexpected ErrorCodes = 0 + ErrorCodes_EthAddressEmpty ErrorCodes = 1 + ErrorCodes_InvalidSignature ErrorCodes = 2 + ErrorCodes_TierWrong ErrorCodes = 3 + ErrorCodes_TierNotFound ErrorCodes = 4 + ErrorCodes_TierInactive ErrorCodes = 5 + ErrorCodes_PaymentMethodWrong ErrorCodes = 6 + ErrorCodes_BadAnyName ErrorCodes = 7 + ErrorCodes_Unknown ErrorCodes = 8 + ErrorCodes_SubsAlreadyActive ErrorCodes = 9 + ErrorCodes_SubsNotFound ErrorCodes = 10 + ErrorCodes_SubsWrongState ErrorCodes = 11 + ErrorCodes_EmailWrongFormat ErrorCodes = 12 + ErrorCodes_EmailAlreadyVerified ErrorCodes = 13 + ErrorCodes_EmailAlreadySent ErrorCodes = 14 + ErrorCodes_EmailFailedToSend ErrorCodes = 15 + ErrorCodes_EmailExpired ErrorCodes = 16 + ErrorCodes_EmailWrongCode ErrorCodes = 17 + ErrorCodes_ErrorOffset ErrorCodes = 600 +) + +var ErrorCodes_name = map[int32]string{ + 0: "Unexpected", + 1: "EthAddressEmpty", + 2: "InvalidSignature", + 3: "TierWrong", + 4: "TierNotFound", + 5: "TierInactive", + 6: "PaymentMethodWrong", + 7: "BadAnyName", + 8: "Unknown", + 9: "SubsAlreadyActive", + 10: "SubsNotFound", + 11: "SubsWrongState", + 12: "EmailWrongFormat", + 13: "EmailAlreadyVerified", + 14: "EmailAlreadySent", + 15: "EmailFailedToSend", + 16: "EmailExpired", + 17: "EmailWrongCode", + 600: "ErrorOffset", +} + +var ErrorCodes_value = map[string]int32{ + "Unexpected": 0, + "EthAddressEmpty": 1, + "InvalidSignature": 2, + "TierWrong": 3, + "TierNotFound": 4, + "TierInactive": 5, + "PaymentMethodWrong": 6, + "BadAnyName": 7, + "Unknown": 8, + "SubsAlreadyActive": 9, + "SubsNotFound": 10, + "SubsWrongState": 11, + "EmailWrongFormat": 12, + "EmailAlreadyVerified": 13, + "EmailAlreadySent": 14, + "EmailFailedToSend": 15, + "EmailExpired": 16, + "EmailWrongCode": 17, + "ErrorOffset": 600, +} + +func (x ErrorCodes) String() string { + return proto.EnumName(ErrorCodes_name, int32(x)) +} + +func (ErrorCodes) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_4feb29dcc5ba50f6, []int{3} +} + type IsNameValidResponse_Code int32 const ( @@ -1306,6 +1382,7 @@ func init() { proto.RegisterEnum("SubscriptionTier", SubscriptionTier_name, SubscriptionTier_value) proto.RegisterEnum("SubscriptionStatus", SubscriptionStatus_name, SubscriptionStatus_value) proto.RegisterEnum("PaymentMethod", PaymentMethod_name, PaymentMethod_value) + proto.RegisterEnum("ErrorCodes", ErrorCodes_name, ErrorCodes_value) proto.RegisterEnum("IsNameValidResponse_Code", IsNameValidResponse_Code_name, IsNameValidResponse_Code_value) proto.RegisterType((*GetSubscriptionRequest)(nil), "GetSubscriptionRequest") proto.RegisterType((*GetSubscriptionRequestSigned)(nil), "GetSubscriptionRequestSigned") @@ -1334,80 +1411,92 @@ func init() { } var fileDescriptor_4feb29dcc5ba50f6 = []byte{ - // 1157 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x57, 0x4f, 0x6f, 0x1b, 0x45, - 0x14, 0xf7, 0xfa, 0x4f, 0x12, 0xbf, 0x34, 0xc9, 0xf6, 0xc5, 0x4d, 0xb7, 0x6e, 0x62, 0xa5, 0x2b, - 0xfe, 0x44, 0x41, 0x6c, 0x45, 0xe9, 0x01, 0x10, 0x42, 0x38, 0x69, 0x1a, 0x22, 0x95, 0xc8, 0x5a, - 0xbb, 0x45, 0xd0, 0x03, 0x6c, 0xbd, 0x53, 0x67, 0xc9, 0x66, 0x66, 0x99, 0x19, 0x27, 0x2c, 0x5f, - 0x00, 0x71, 0x43, 0xe2, 0xc2, 0xf7, 0xe1, 0xc2, 0x09, 0xf5, 0xc8, 0x11, 0x25, 0x37, 0x4e, 0x7c, - 0x04, 0x34, 0xb3, 0xeb, 0x78, 0x1d, 0xaf, 0x9d, 0xd0, 0x88, 0x4b, 0xbc, 0xf3, 0x9b, 0x79, 0x6f, - 0xde, 0xfb, 0xbd, 0x7f, 0x13, 0xf8, 0x24, 0xf2, 0xe2, 0x23, 0x42, 0xa5, 0x20, 0xfc, 0x38, 0xe8, - 0x92, 0xfb, 0xa3, 0xcb, 0x88, 0x33, 0xc9, 0xee, 0xeb, 0xbf, 0xe2, 0xc2, 0x96, 0xa3, 0xd1, 0xfa, - 0xa3, 0xd7, 0x95, 0xff, 0x5a, 0x06, 0x84, 0x8b, 0x44, 0x8b, 0xfd, 0x01, 0xac, 0xec, 0x12, 0xd9, - 0xee, 0xbf, 0x10, 0x5d, 0x1e, 0x44, 0x32, 0x60, 0xd4, 0x25, 0xdf, 0xf5, 0x89, 0x90, 0xd8, 0x00, - 0x60, 0x27, 0x94, 0xf0, 0x26, 0x8d, 0xf7, 0x1e, 0x59, 0xc6, 0xba, 0xb1, 0x51, 0x75, 0x33, 0x88, - 0xfd, 0x0c, 0x56, 0xf3, 0x25, 0xdb, 0x41, 0x8f, 0x12, 0x1f, 0x2d, 0x98, 0x8d, 0xbc, 0x38, 0x64, - 0x9e, 0xaf, 0x85, 0x6f, 0xb8, 0x83, 0x25, 0xae, 0x42, 0x55, 0x04, 0x3d, 0xea, 0xc9, 0x3e, 0x27, - 0x56, 0x51, 0xef, 0x0d, 0x01, 0xfb, 0x9f, 0x22, 0xdc, 0x1e, 0x53, 0x2c, 0x22, 0x46, 0x05, 0x41, - 0x84, 0xb2, 0x32, 0x5e, 0x2b, 0xac, 0xb8, 0xfa, 0x1b, 0xdf, 0x81, 0x19, 0x21, 0x3d, 0xd9, 0x17, - 0x5a, 0xd5, 0xe2, 0x83, 0x65, 0x27, 0x2b, 0xda, 0xd6, 0x5b, 0x6e, 0x7a, 0x04, 0xd7, 0x61, 0xde, - 0xf7, 0x24, 0x69, 0x4b, 0x8f, 0x4b, 0xe2, 0x5b, 0xa5, 0x75, 0x63, 0xa3, 0xec, 0x66, 0x21, 0xac, - 0xc3, 0x9c, 0x5a, 0xee, 0x50, 0x5f, 0x58, 0x65, 0xbd, 0x7d, 0xbe, 0x56, 0xd2, 0x81, 0x68, 0xf6, - 0x25, 0x73, 0x09, 0x25, 0x27, 0x56, 0x65, 0xdd, 0xd8, 0x98, 0x73, 0xb3, 0x10, 0x3e, 0x84, 0x85, - 0x94, 0xec, 0xcf, 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- 0x9d, 0x89, 0x63, 0x09, 0xdf, 0x76, 0xae, 0x36, 0x14, 0xeb, 0xb6, 0x73, 0xe9, 0x6c, 0x4b, 0x1c, - 0xc9, 0x9b, 0x09, 0xa8, 0xa5, 0xa7, 0x8f, 0x8a, 0xfa, 0x9a, 0x33, 0x75, 0xdc, 0x14, 0xf0, 0x53, - 0x98, 0xcf, 0xb4, 0x5b, 0xbc, 0xe3, 0x4c, 0x6a, 0xbe, 0xf5, 0x9a, 0x93, 0xd3, 0xc8, 0x93, 0x88, - 0xef, 0x12, 0xd9, 0x0c, 0x43, 0x55, 0x78, 0x02, 0x57, 0xd4, 0x8d, 0xfa, 0x73, 0x54, 0xfc, 0x66, - 0x06, 0x1f, 0xc8, 0x6e, 0x7d, 0xfc, 0xfb, 0x69, 0xc3, 0x78, 0x75, 0xda, 0x30, 0xfe, 0x3a, 0x6d, - 0x18, 0x3f, 0x9f, 0x35, 0x0a, 0xaf, 0xce, 0x1a, 0x85, 0x3f, 0xcf, 0x1a, 0x85, 0xaf, 0xec, 0xcb, - 0xff, 0xf7, 0x7a, 0x31, 0xa3, 0x7f, 0xde, 0xff, 0x37, 0x00, 0x00, 0xff, 0xff, 0x95, 0xf9, 0xbc, - 0xe2, 0xe8, 0x0d, 0x00, 0x00, + // 1351 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x57, 0xcf, 0x6f, 0x1b, 0xc5, + 0x17, 0xf7, 0xfa, 0x47, 0x12, 0xbf, 0xfc, 0x9a, 0x4c, 0xdc, 0x74, 0xeb, 0x26, 0x56, 0xba, 0xfa, + 0xfe, 0x88, 0xf2, 0xd5, 0x77, 0x2b, 0x4a, 0x0f, 0x80, 0x10, 0xc2, 0x49, 0x9d, 0x10, 0xa9, 0x84, + 0xc8, 0x76, 0x5b, 0x41, 0x0f, 0xb0, 0xf1, 0xbe, 0x24, 0x4b, 0x37, 0x33, 0xcb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fe, 0x15, 0x00, 0x00, 0xff, 0xff, 0x04, + 0x47, 0xb2, 0xa9, 0x6c, 0x0f, 0x00, 0x00, } func (m *GetSubscriptionRequest) Marshal() (dAtA []byte, err error) { diff --git a/paymentservice/paymentserviceproto/protos/paymentservice.proto b/paymentservice/paymentserviceproto/protos/paymentservice.proto index 94a4d62b..8a4dabb4 100644 --- a/paymentservice/paymentserviceproto/protos/paymentservice.proto +++ b/paymentservice/paymentserviceproto/protos/paymentservice.proto @@ -208,6 +208,32 @@ message IsNameValidResponse { } } +enum ErrorCodes { + Unexpected = 0; + + EthAddressEmpty = 1; + InvalidSignature = 2; + TierWrong = 3; + TierNotFound = 4; + TierInactive = 5; + PaymentMethodWrong = 6; + BadAnyName = 7; + Unknown = 8; + + SubsAlreadyActive = 9; + SubsNotFound = 10; + SubsWrongState = 11; + + EmailWrongFormat = 12; + EmailAlreadyVerified = 13; + EmailAlreadySent = 14; + EmailFailedToSend = 15; + EmailExpired = 16; + EmailWrongCode = 17; + + ErrorOffset = 600; +} + // NOTICE: // 1 - User can not ask for a payment/other links on behalf of another user (a signature is required) // 2 - Admin can do that on behalf of any user From 807fe408e336007dc011e1c58d6b676d5e182b92 Mon Sep 17 00:00:00 2001 From: Anton Akentev Date: Wed, 27 Mar 2024 22:46:35 +0000 Subject: [PATCH 061/140] paymentsserviceproto: type fix --- .../paymentserviceproto/paymentservice.pb.go | 164 +++++++++--------- .../protos/paymentservice.proto | 10 +- 2 files changed, 87 insertions(+), 87 deletions(-) diff --git a/paymentservice/paymentserviceproto/paymentservice.pb.go b/paymentservice/paymentserviceproto/paymentservice.pb.go index 285361ce..71b9dd5f 100644 --- a/paymentservice/paymentserviceproto/paymentservice.pb.go +++ b/paymentservice/paymentserviceproto/paymentservice.pb.go @@ -360,8 +360,8 @@ func (m *GetSubscriptionRequestSigned) GetSignature() []byte { } type GetSubscriptionResponse struct { - // was SubscriptionTier before, changed to int32 to allow us to use dynamic tiers - Tier int32 `protobuf:"varint,1,opt,name=tier,proto3" json:"tier,omitempty"` + // was SubscriptionTier before, changed to uint32 to allow us to use dynamic tiers + Tier uint32 `protobuf:"varint,1,opt,name=tier,proto3" json:"tier,omitempty"` Status SubscriptionStatus `protobuf:"varint,2,opt,name=status,proto3,enum=SubscriptionStatus" json:"status,omitempty"` DateStarted uint64 `protobuf:"varint,3,opt,name=dateStarted,proto3" json:"dateStarted,omitempty"` DateEnds uint64 `protobuf:"varint,4,opt,name=dateEnds,proto3" json:"dateEnds,omitempty"` @@ -406,7 +406,7 @@ func (m *GetSubscriptionResponse) XXX_DiscardUnknown() { var xxx_messageInfo_GetSubscriptionResponse proto.InternalMessageInfo -func (m *GetSubscriptionResponse) GetTier() int32 { +func (m *GetSubscriptionResponse) GetTier() uint32 { if m != nil { return m.Tier } @@ -478,8 +478,8 @@ type BuySubscriptionRequest struct { // this is required to reserve a name for the owner (later that is done by user) // in the following format: "0x7a250d5630b4cf539739df2c5dacb4c659f2488d" OwnerEthAddress string `protobuf:"bytes,2,opt,name=ownerEthAddress,proto3" json:"ownerEthAddress,omitempty"` - // was SubscriptionTier before, changed to int32 to allow us to use dynamic tiers - RequestedTier int32 `protobuf:"varint,3,opt,name=requestedTier,proto3" json:"requestedTier,omitempty"` + // was SubscriptionTier before, changed to uint32 to allow us to use dynamic tiers + RequestedTier uint32 `protobuf:"varint,3,opt,name=requestedTier,proto3" json:"requestedTier,omitempty"` PaymentMethod PaymentMethod `protobuf:"varint,4,opt,name=paymentMethod,proto3,enum=PaymentMethod" json:"paymentMethod,omitempty"` // if empty - then no name requested // if non-empty - PP node will register that name on behalf of the user @@ -533,7 +533,7 @@ func (m *BuySubscriptionRequest) GetOwnerEthAddress() string { return "" } -func (m *BuySubscriptionRequest) GetRequestedTier() int32 { +func (m *BuySubscriptionRequest) GetRequestedTier() uint32 { if m != nil { return m.RequestedTier } @@ -1275,7 +1275,7 @@ func (m *VerifyEmailRequestSigned) GetSignature() []byte { } type IsNameValidRequest struct { - RequestedTier int32 `protobuf:"varint,1,opt,name=requestedTier,proto3" json:"requestedTier,omitempty"` + RequestedTier uint32 `protobuf:"varint,1,opt,name=requestedTier,proto3" json:"requestedTier,omitempty"` RequestedAnyName string `protobuf:"bytes,2,opt,name=requestedAnyName,proto3" json:"requestedAnyName,omitempty"` } @@ -1312,7 +1312,7 @@ func (m *IsNameValidRequest) XXX_DiscardUnknown() { var xxx_messageInfo_IsNameValidRequest proto.InternalMessageInfo -func (m *IsNameValidRequest) GetRequestedTier() int32 { +func (m *IsNameValidRequest) GetRequestedTier() uint32 { if m != nil { return m.RequestedTier } @@ -1426,77 +1426,77 @@ var fileDescriptor_4feb29dcc5ba50f6 = []byte{ 0x99, 0x42, 0x9c, 0xc7, 0xb0, 0x9a, 0x2d, 0xd9, 0x0a, 0x8e, 0x19, 0xfa, 0xd4, 0x86, 0xe9, 0xc8, 0xeb, 0x85, 0xdc, 0xf3, 0x8d, 0xf0, 0x5c, 0xb3, 0xbf, 0xa4, 0xab, 0x50, 0x96, 0xc1, 0x31, 0xf3, 0x54, 0x57, 0xa0, 0x9d, 0x37, 0x7b, 0x03, 0xc0, 0xf9, 0x33, 0x0f, 0x37, 0x47, 0x14, 0xcb, 0x88, - 0x33, 0x89, 0x94, 0x42, 0x51, 0x1b, 0x6f, 0x14, 0x96, 0x9a, 0xe6, 0x9b, 0xfe, 0x0f, 0xa6, 0xa4, - 0xf2, 0x54, 0x57, 0x1a, 0x55, 0x0b, 0xf7, 0x96, 0xdd, 0xb4, 0x68, 0xcb, 0x6c, 0x35, 0x93, 0x23, - 0x74, 0x1d, 0x66, 0x7d, 0x4f, 0x61, 0x4b, 0x79, 0x42, 0xa1, 0x6f, 0x17, 0xd6, 0xad, 0x8d, 0x62, - 0x33, 0x0d, 0xd1, 0x2a, 0xcc, 0xe8, 0x65, 0x83, 0xf9, 0xd2, 0x2e, 0x9a, 0xed, 0xf3, 0xb5, 0x96, - 0x0e, 0x64, 0xbd, 0xab, 0x78, 0x13, 0x19, 0x9e, 0xd9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0x9d, 0x1c, 0xfd, 0x00, 0x66, 0x53, 0x1d, 0x86, 0x2e, + 0xbb, 0xa3, 0xcd, 0xaf, 0x5a, 0xc9, 0x6a, 0x42, 0x4e, 0x8e, 0x3e, 0x84, 0xc5, 0x0b, 0x33, 0x16, + 0x5d, 0x73, 0x27, 0x4d, 0x73, 0x55, 0xdb, 0x1d, 0x33, 0x94, 0x39, 0x39, 0xfa, 0x14, 0x2a, 0x59, + 0x03, 0x0c, 0x75, 0xdc, 0x4b, 0xe7, 0x9a, 0xea, 0x9a, 0x3b, 0x71, 0x36, 0xca, 0xd1, 0xaf, 0xe1, + 0xd6, 0xd8, 0xd1, 0x80, 0xfe, 0xd7, 0xbd, 0xda, 0x60, 0x52, 0x75, 0xdc, 0x4b, 0xe7, 0x8b, 0xd8, + 0x91, 0xac, 0x77, 0x99, 0x1a, 0xe9, 0xc9, 0xcf, 0x75, 0x75, 0xcd, 0x9d, 0xf8, 0xe4, 0xe7, 0xe8, + 0xc7, 0x30, 0x9b, 0x7a, 0xf2, 0xe8, 0x2d, 0x77, 0xdc, 0x03, 0x58, 0xad, 0xb8, 0x19, 0x8f, 0x69, + 0x1c, 0xf1, 0x5d, 0x54, 0xf5, 0x30, 0xd4, 0xd5, 0x27, 0xe9, 0x8a, 0xbe, 0xd1, 0x7c, 0x0e, 0x8b, + 0x2f, 0xa5, 0xf0, 0xbe, 0xec, 0xd6, 0x87, 0xbf, 0xbe, 0xae, 0x59, 0x2f, 0x5f, 0xd7, 0xac, 0xdf, + 0x5f, 0xd7, 0xac, 0x1f, 0xdf, 0xd4, 0x72, 0x2f, 0xdf, 0xd4, 0x72, 0xaf, 0xde, 0xd4, 0x72, 0x5f, + 0x38, 0x97, 0xff, 0xff, 0x7b, 0x38, 0x65, 0x7e, 0xde, 0xfd, 0x2b, 0x00, 0x00, 0xff, 0xff, 0xc0, + 0xe1, 0x3b, 0x9e, 0x6c, 0x0f, 0x00, 0x00, } func (m *GetSubscriptionRequest) Marshal() (dAtA []byte, err error) { @@ -2864,7 +2864,7 @@ func (m *GetSubscriptionResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Tier |= int32(b&0x7F) << shift + m.Tier |= uint32(b&0x7F) << shift if b < 0x80 { break } @@ -3177,7 +3177,7 @@ func (m *BuySubscriptionRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.RequestedTier |= int32(b&0x7F) << shift + m.RequestedTier |= uint32(b&0x7F) << shift if b < 0x80 { break } @@ -4729,7 +4729,7 @@ func (m *IsNameValidRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.RequestedTier |= int32(b&0x7F) << shift + m.RequestedTier |= uint32(b&0x7F) << shift if b < 0x80 { break } diff --git a/paymentservice/paymentserviceproto/protos/paymentservice.proto b/paymentservice/paymentserviceproto/protos/paymentservice.proto index 8a4dabb4..fdd27567 100644 --- a/paymentservice/paymentserviceproto/protos/paymentservice.proto +++ b/paymentservice/paymentserviceproto/protos/paymentservice.proto @@ -60,8 +60,8 @@ message GetSubscriptionRequestSigned { } message GetSubscriptionResponse { - // was SubscriptionTier before, changed to int32 to allow us to use dynamic tiers - int32 tier = 1; + // was SubscriptionTier before, changed to uint32 to allow us to use dynamic tiers + uint32 tier = 1; SubscriptionStatus status = 2; uint64 dateStarted = 3; uint64 dateEnds = 4; @@ -82,8 +82,8 @@ message BuySubscriptionRequest { // this is required to reserve a name for the owner (later that is done by user) // in the following format: "0x7a250d5630b4cf539739df2c5dacb4c659f2488d" string ownerEthAddress = 2; - // was SubscriptionTier before, changed to int32 to allow us to use dynamic tiers - int32 requestedTier = 3; + // was SubscriptionTier before, changed to uint32 to allow us to use dynamic tiers + uint32 requestedTier = 3; PaymentMethod paymentMethod = 4; // if empty - then no name requested // if non-empty - PP node will register that name on behalf of the user @@ -188,7 +188,7 @@ message VerifyEmailRequestSigned { } message IsNameValidRequest { - int32 requestedTier = 1; + uint32 requestedTier = 1; string requestedAnyName = 2; } From fcfd58d3f40a5e1464b846030aa737dfc52068ac Mon Sep 17 00:00:00 2001 From: mcrakhman Date: Thu, 28 Mar 2024 16:28:00 +0100 Subject: [PATCH 062/140] Add rate limiter --- app/app.go | 10 ++- go.mod | 1 + go.sum | 2 + net/rpc/limiter/config.go | 15 ++++ net/rpc/limiter/limiter.go | 135 ++++++++++++++++++++++++++++++ net/rpc/limiter/limiter_test.go | 94 +++++++++++++++++++++ net/rpc/server/drpcserver.go | 14 +++- util/periodicsync/periodicsync.go | 47 ++++++----- 8 files changed, 290 insertions(+), 28 deletions(-) create mode 100644 net/rpc/limiter/config.go create mode 100644 net/rpc/limiter/limiter.go create mode 100644 net/rpc/limiter/limiter_test.go diff --git a/app/app.go b/app/app.go index 5aeda7f3..0269be7d 100644 --- a/app/app.go +++ b/app/app.go @@ -4,14 +4,16 @@ import ( "context" "errors" "fmt" - "github.com/anyproto/any-sync/app/logger" - "go.uber.org/zap" "os" "runtime" "runtime/debug" "strings" "sync" "time" + + "go.uber.org/zap" + + "github.com/anyproto/any-sync/app/logger" ) var ( @@ -227,7 +229,7 @@ func (app *App) Start(ctx context.Context) (err error) { for i := idx; i >= 0; i-- { if serviceClose, ok := app.components[i].(ComponentRunnable); ok { if e := serviceClose.Close(ctx); e != nil { - log.Info("close error", zap.String("component", serviceClose.Name()), zap.Error(e)) + log.Error("close error", zap.String("component", serviceClose.Name()), zap.Error(e)) } } } @@ -235,6 +237,7 @@ func (app *App) Start(ctx context.Context) (err error) { for i, s := range app.components { if err = s.Init(app); err != nil { + log.Error("can't init service", zap.String("service", s.Name()), zap.Error(err)) closeServices(i) return fmt.Errorf("can't init service '%s': %w", s.Name(), err) } @@ -244,6 +247,7 @@ func (app *App) Start(ctx context.Context) (err error) { if serviceRun, ok := s.(ComponentRunnable); ok { start := time.Now() if err = serviceRun.Run(ctx); err != nil { + log.Error("can't run service", zap.String("service", serviceRun.Name()), zap.Error(err)) closeServices(i) return fmt.Errorf("can't run service '%s': %w", serviceRun.Name(), err) } diff --git a/go.mod b/go.mod index afb770b5..45eac9ab 100644 --- a/go.mod +++ b/go.mod @@ -106,6 +106,7 @@ require ( golang.org/x/mod v0.15.0 // indirect golang.org/x/sync v0.6.0 // indirect golang.org/x/sys v0.18.0 // indirect + golang.org/x/time v0.5.0 // indirect golang.org/x/tools v0.17.0 // indirect google.golang.org/protobuf v1.32.0 // indirect lukechampine.com/blake3 v1.2.1 // indirect diff --git a/go.sum b/go.sum index 5f422456..b6ebb267 100644 --- a/go.sum +++ b/go.sum @@ -369,6 +369,8 @@ golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9sn golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= +golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= diff --git a/net/rpc/limiter/config.go b/net/rpc/limiter/config.go new file mode 100644 index 00000000..8d018994 --- /dev/null +++ b/net/rpc/limiter/config.go @@ -0,0 +1,15 @@ +package limiter + +type ConfigGetter interface { + GetLimiterConf() Config +} + +type Tokens struct { + TokensPerSecond int `yaml:"rps"` + MaxTokens int `yaml:"burst"` +} + +type Config struct { + DefaultTokens Tokens `yaml:"default"` + ResponseTokens map[string]Tokens `yaml:"rpc"` +} diff --git a/net/rpc/limiter/limiter.go b/net/rpc/limiter/limiter.go new file mode 100644 index 00000000..8f2dd683 --- /dev/null +++ b/net/rpc/limiter/limiter.go @@ -0,0 +1,135 @@ +package limiter + +import ( + "context" + "errors" + "strings" + "sync" + "time" + + "go.uber.org/atomic" + "golang.org/x/time/rate" + "storj.io/drpc" + + "github.com/anyproto/any-sync/app" + "github.com/anyproto/any-sync/app/logger" + "github.com/anyproto/any-sync/net/peer" + "github.com/anyproto/any-sync/util/periodicsync" +) + +const ( + peerCheckInterval = 10 * time.Second + checkTimeout = 2 * time.Second +) + +var ( + log = logger.NewNamed(CName) + + ErrLimitExceeded = errors.New("rate limit exceeded") +) + +const CName = "common.rpc.limiter" + +type RpcLimiter interface { + app.ComponentRunnable + // WrapDRPCHandler wraps the given drpc.Handler with additional functionality + WrapDRPCHandler(handler drpc.Handler) drpc.Handler +} + +func New() RpcLimiter { + return &limiter{ + limiters: make(map[string]peerLimiter), + peerCheckInterval: peerCheckInterval, + checkTimeout: checkTimeout, + } +} + +type peerLimiter struct { + *rate.Limiter + lastUsage *atomic.Time +} + +type limiter struct { + drpc.Handler + limiters map[string]peerLimiter + periodicLoop periodicsync.PeriodicSync + peerCheckInterval time.Duration + checkTimeout time.Duration + cfg Config + mx sync.Mutex +} + +func (h *limiter) Run(ctx context.Context) (err error) { + h.periodicLoop.Run() + return nil +} + +func (h *limiter) Close(ctx context.Context) (err error) { + h.periodicLoop.Close() + return +} + +func (h *limiter) Init(a *app.App) (err error) { + h.periodicLoop = periodicsync.NewPeriodicSyncDuration(h.peerCheckInterval, h.checkTimeout, h.peerLoop, log) + h.cfg = a.MustComponent("config").(ConfigGetter).GetLimiterConf() + return nil +} + +func (h *limiter) Name() (name string) { + return CName +} + +func (h *limiter) peerLoop(ctx context.Context) error { + h.mx.Lock() + defer h.mx.Unlock() + for rpcPeer, lim := range h.limiters { + if time.Since(lim.lastUsage.Load()) > h.peerCheckInterval { + delete(h.limiters, rpcPeer) + } + } + return nil +} + +func (h *limiter) WrapDRPCHandler(handler drpc.Handler) drpc.Handler { + h.mx.Lock() + defer h.mx.Unlock() + h.Handler = handler + return h +} + +func (h *limiter) HandleRPC(stream drpc.Stream, rpc string) (err error) { + peerId, err := peer.CtxPeerId(stream.Context()) + if err != nil { + return err + } + lim := h.getPeerLimiter(peerId, rpc) + if !lim.Allow() { + return ErrLimitExceeded + } + return h.Handler.HandleRPC(stream, rpc) +} + +func (h *limiter) getLimits(rpc string) Tokens { + if tokens, exists := h.cfg.ResponseTokens[rpc]; exists { + return tokens + } + return h.cfg.DefaultTokens +} + +func (h *limiter) getPeerLimiter(peerId string, rpc string) peerLimiter { + // rpc looks like this /anyNodeSync.NodeSync/PartitionSync + h.mx.Lock() + defer h.mx.Unlock() + rpcPeer := strings.Join([]string{peerId, rpc}, "-") + lim, ok := h.limiters[rpcPeer] + if !ok { + limits := h.getLimits(rpc) + lim = peerLimiter{ + Limiter: rate.NewLimiter(rate.Limit(limits.TokensPerSecond), limits.MaxTokens), + } + lim.lastUsage = &atomic.Time{} + h.limiters[rpcPeer] = lim + } + lim.lastUsage.Store(time.Now()) + return lim +} diff --git a/net/rpc/limiter/limiter_test.go b/net/rpc/limiter/limiter_test.go new file mode 100644 index 00000000..1c707fe3 --- /dev/null +++ b/net/rpc/limiter/limiter_test.go @@ -0,0 +1,94 @@ +package limiter + +import ( + "context" + "sync/atomic" + "testing" + "time" + + "github.com/stretchr/testify/require" + "storj.io/drpc" + + "github.com/anyproto/any-sync/net/peer" +) + +var ctx = context.Background() + +type mockHandler struct { + calls atomic.Int32 +} + +type mockStream struct { + ctx context.Context +} + +func (m mockStream) Context() context.Context { + return m.ctx +} + +func (m mockStream) MsgSend(msg drpc.Message, enc drpc.Encoding) error { + return nil +} + +func (m mockStream) MsgRecv(msg drpc.Message, enc drpc.Encoding) error { + return nil +} + +func (m mockStream) CloseSend() error { + return nil +} + +func (m mockStream) Close() error { + return nil +} + +func (m *mockHandler) HandleRPC(stream drpc.Stream, rpc string) (err error) { + m.calls.Add(1) + return nil +} + +func TestLimiter_Single(t *testing.T) { + lim := New().(*limiter) + handler := &mockHandler{} + lim.cfg = Config{ + DefaultTokens: Tokens{ + TokensPerSecond: 100, + MaxTokens: 100, + }, + ResponseTokens: map[string]Tokens{ + "rpc": { + TokensPerSecond: 10, + MaxTokens: 1, + }, + }, + } + lim.peerCheckInterval = 10 * time.Millisecond + wrapped := lim.WrapDRPCHandler(handler) + // rpc call allows only one token max, so it should let only first call + // for second one we should wait 100 ms + firstStream := mockStream{ctx: peer.CtxWithPeerId(ctx, "peer1")} + // check that we are using specific timeout + err := wrapped.HandleRPC(firstStream, "rpc") + require.NoError(t, err) + err = wrapped.HandleRPC(firstStream, "rpc") + require.Equal(t, ErrLimitExceeded, err) + // second stream should not affect the first one + secondStream := mockStream{ctx: peer.CtxWithPeerId(ctx, "peer2")} + err = wrapped.HandleRPC(secondStream, "rpc") + require.NoError(t, err) + // after 100 ms new token has been generated + time.Sleep(100 * time.Millisecond) + err = wrapped.HandleRPC(firstStream, "rpc") + require.NoError(t, err) + time.Sleep(10 * time.Millisecond) + // checking that peer loop cleaned the map + err = lim.peerLoop(ctx) + require.NoError(t, err) + // now we should be able to call again, because we cleared the map + err = wrapped.HandleRPC(firstStream, "rpc") + require.NoError(t, err) + // but limit of 1 sec is not enough + time.Sleep(1 * time.Millisecond) + err = wrapped.HandleRPC(firstStream, "rpc") + require.Equal(t, ErrLimitExceeded, err) +} diff --git a/net/rpc/server/drpcserver.go b/net/rpc/server/drpcserver.go index 8fc112ca..e1fce7c3 100644 --- a/net/rpc/server/drpcserver.go +++ b/net/rpc/server/drpcserver.go @@ -2,12 +2,15 @@ package server import ( "context" + "net" + "github.com/anyproto/any-sync/app" "github.com/anyproto/any-sync/app/logger" "github.com/anyproto/any-sync/metric" "github.com/anyproto/any-sync/net/rpc" + "github.com/anyproto/any-sync/net/rpc/limiter" + "go.uber.org/zap" - "net" "storj.io/drpc" "storj.io/drpc/drpcmanager" "storj.io/drpc/drpcmux" @@ -34,8 +37,9 @@ type DRPCServer interface { type drpcServer struct { drpcServer *drpcserver.Server *drpcmux.Mux - config rpc.Config - metric metric.Metric + config rpc.Config + metric metric.Metric + limiter limiter.RpcLimiter } type DRPCHandlerWrapper func(handler drpc.Handler) drpc.Handler @@ -47,6 +51,7 @@ func (s *drpcServer) Name() (name string) { func (s *drpcServer) Init(a *app.App) (err error) { s.config = a.MustComponent("config").(rpc.ConfigGetter).GetDrpc() s.metric, _ = a.Component(metric.CName).(metric.Metric) + s.limiter, _ = a.Component(limiter.CName).(limiter.RpcLimiter) s.Mux = drpcmux.New() var handler drpc.Handler @@ -54,6 +59,9 @@ func (s *drpcServer) Init(a *app.App) (err error) { if s.metric != nil { handler = s.metric.WrapDRPCHandler(s) } + if s.limiter != nil { + handler = s.limiter.WrapDRPCHandler(handler) + } bufSize := s.config.Stream.MaxMsgSizeMb * (1 << 20) s.drpcServer = drpcserver.NewWithOptions(handler, drpcserver.Options{Manager: drpcmanager.Options{ Reader: drpcwire.ReaderOptions{MaximumBufferSize: bufSize}, diff --git a/util/periodicsync/periodicsync.go b/util/periodicsync/periodicsync.go index aab8b050..f5e9135e 100644 --- a/util/periodicsync/periodicsync.go +++ b/util/periodicsync/periodicsync.go @@ -3,10 +3,12 @@ package periodicsync import ( "context" - "github.com/anyproto/any-sync/app/logger" - "go.uber.org/zap" "sync/atomic" "time" + + "go.uber.org/zap" + + "github.com/anyproto/any-sync/app/logger" ) type PeriodicSync interface { @@ -17,39 +19,40 @@ type PeriodicSync interface { type SyncerFunc func(ctx context.Context) error func NewPeriodicSync(periodSeconds int, timeout time.Duration, caller SyncerFunc, l logger.CtxLogger) PeriodicSync { - // TODO: rename to PeriodicCall (including folders) and do PRs in all repos where we are using this - // https://linear.app/anytype/issue/GO-1241/change-periodicsync-component-to-periodiccall + return NewPeriodicSyncDuration(time.Duration(periodSeconds)*time.Second, timeout, caller, l) +} + +func NewPeriodicSyncDuration(periodicLoopInterval, timeout time.Duration, caller SyncerFunc, l logger.CtxLogger) PeriodicSync { ctx, cancel := context.WithCancel(context.Background()) ctx = logger.CtxWithFields(ctx, zap.String("rootOp", "periodicCall")) return &periodicCall{ - caller: caller, - log: l, - loopCtx: ctx, - loopCancel: cancel, - loopDone: make(chan struct{}), - periodSeconds: periodSeconds, - timeout: timeout, + caller: caller, + log: l, + loopCtx: ctx, + loopCancel: cancel, + loopDone: make(chan struct{}), + period: periodicLoopInterval, + timeout: timeout, } } type periodicCall struct { - log logger.CtxLogger - caller SyncerFunc - loopCtx context.Context - loopCancel context.CancelFunc - loopDone chan struct{} - periodSeconds int - timeout time.Duration - isRunning atomic.Bool + log logger.CtxLogger + caller SyncerFunc + loopCtx context.Context + loopCancel context.CancelFunc + loopDone chan struct{} + period time.Duration + timeout time.Duration + isRunning atomic.Bool } func (p *periodicCall) Run() { p.isRunning.Store(true) - go p.loop(p.periodSeconds) + go p.loop(p.period) } -func (p *periodicCall) loop(periodSeconds int) { - period := time.Duration(periodSeconds) * time.Second +func (p *periodicCall) loop(period time.Duration) { defer close(p.loopDone) doCall := func() { ctx := p.loopCtx From 73e0b8e8fe962afb005870849826663e96fbaad6 Mon Sep 17 00:00:00 2001 From: mcrakhman Date: Thu, 28 Mar 2024 16:58:36 +0100 Subject: [PATCH 063/140] Add limiter concurrent test --- net/rpc/limiter/limiter_test.go | 35 ++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/net/rpc/limiter/limiter_test.go b/net/rpc/limiter/limiter_test.go index 1c707fe3..0ecaf86e 100644 --- a/net/rpc/limiter/limiter_test.go +++ b/net/rpc/limiter/limiter_test.go @@ -47,7 +47,7 @@ func (m *mockHandler) HandleRPC(stream drpc.Stream, rpc string) (err error) { return nil } -func TestLimiter_Single(t *testing.T) { +func TestLimiter_Synchronous(t *testing.T) { lim := New().(*limiter) handler := &mockHandler{} lim.cfg = Config{ @@ -92,3 +92,36 @@ func TestLimiter_Single(t *testing.T) { err = wrapped.HandleRPC(firstStream, "rpc") require.Equal(t, ErrLimitExceeded, err) } + +func TestLimiter_Concurrent(t *testing.T) { + lim := New().(*limiter) + handler := &mockHandler{} + lim.cfg = Config{ + DefaultTokens: Tokens{ + TokensPerSecond: 10, + MaxTokens: 1, + }, + } + wrapped := lim.WrapDRPCHandler(handler) + firstStream := mockStream{ctx: peer.CtxWithPeerId(ctx, "peer1")} + secondStream := mockStream{ctx: peer.CtxWithPeerId(ctx, "peer2")} + waitFirst := make(chan struct{}) + waitSecond := make(chan struct{}) + go func() { + for i := 0; i < 100; i++ { + time.Sleep(10 * time.Millisecond) + _ = wrapped.HandleRPC(firstStream, "rpc") + } + close(waitFirst) + }() + go func() { + for i := 0; i < 100; i++ { + time.Sleep(10 * time.Millisecond) + _ = wrapped.HandleRPC(secondStream, "rpc") + } + close(waitSecond) + }() + <-waitFirst + <-waitSecond + require.Greater(t, 50, int(handler.calls.Load())) +} From e378d05caa3db9bfecfe4eca0a9878fbe804567a Mon Sep 17 00:00:00 2001 From: mcrakhman Date: Thu, 28 Mar 2024 17:01:41 +0100 Subject: [PATCH 064/140] Add less random numbers --- net/rpc/limiter/limiter_test.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/net/rpc/limiter/limiter_test.go b/net/rpc/limiter/limiter_test.go index 0ecaf86e..622729b5 100644 --- a/net/rpc/limiter/limiter_test.go +++ b/net/rpc/limiter/limiter_test.go @@ -96,9 +96,10 @@ func TestLimiter_Synchronous(t *testing.T) { func TestLimiter_Concurrent(t *testing.T) { lim := New().(*limiter) handler := &mockHandler{} + tps := 10 lim.cfg = Config{ DefaultTokens: Tokens{ - TokensPerSecond: 10, + TokensPerSecond: tps, MaxTokens: 1, }, } @@ -123,5 +124,7 @@ func TestLimiter_Concurrent(t *testing.T) { }() <-waitFirst <-waitSecond - require.Greater(t, 50, int(handler.calls.Load())) + // 2 for number of peers and 2 for error margin (delays etc) + maxCalls := 2 * 2 * tps + require.Greater(t, maxCalls, int(handler.calls.Load())) } From 6d9a03f864ed6a9b4099fa9e5e71fe9f0fef554f Mon Sep 17 00:00:00 2001 From: mcrakhman Date: Thu, 28 Mar 2024 17:03:44 +0100 Subject: [PATCH 065/140] Use handler everywhere --- net/rpc/server/drpcserver.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/rpc/server/drpcserver.go b/net/rpc/server/drpcserver.go index e1fce7c3..c455ed5f 100644 --- a/net/rpc/server/drpcserver.go +++ b/net/rpc/server/drpcserver.go @@ -57,7 +57,7 @@ func (s *drpcServer) Init(a *app.App) (err error) { var handler drpc.Handler handler = s if s.metric != nil { - handler = s.metric.WrapDRPCHandler(s) + handler = s.metric.WrapDRPCHandler(handler) } if s.limiter != nil { handler = s.limiter.WrapDRPCHandler(handler) From b37a7d79a38414c8eb487a24e507535ddbb001f6 Mon Sep 17 00:00:00 2001 From: mcrakhman Date: Thu, 28 Mar 2024 17:19:29 +0100 Subject: [PATCH 066/140] Add tests for bursts --- net/rpc/limiter/limiter_test.go | 68 ++++++++++++++++++++++++++++----- 1 file changed, 59 insertions(+), 9 deletions(-) diff --git a/net/rpc/limiter/limiter_test.go b/net/rpc/limiter/limiter_test.go index 622729b5..5f8f7f83 100644 --- a/net/rpc/limiter/limiter_test.go +++ b/net/rpc/limiter/limiter_test.go @@ -87,19 +87,24 @@ func TestLimiter_Synchronous(t *testing.T) { // now we should be able to call again, because we cleared the map err = wrapped.HandleRPC(firstStream, "rpc") require.NoError(t, err) - // but limit of 1 sec is not enough + // but limit of 1 sec is not enough to clean the map time.Sleep(1 * time.Millisecond) err = wrapped.HandleRPC(firstStream, "rpc") require.Equal(t, ErrLimitExceeded, err) } -func TestLimiter_Concurrent(t *testing.T) { +func TestLimiter_Concurrent_NoBursts(t *testing.T) { lim := New().(*limiter) handler := &mockHandler{} - tps := 10 + var ( + targetRps = 10 + // peerRps should be greater than targetRps + peerRps = 100 + reqDelay = time.Duration(1000/peerRps) * time.Millisecond + ) lim.cfg = Config{ DefaultTokens: Tokens{ - TokensPerSecond: tps, + TokensPerSecond: targetRps, MaxTokens: 1, }, } @@ -109,15 +114,15 @@ func TestLimiter_Concurrent(t *testing.T) { waitFirst := make(chan struct{}) waitSecond := make(chan struct{}) go func() { - for i := 0; i < 100; i++ { - time.Sleep(10 * time.Millisecond) + for i := 0; i < peerRps; i++ { + time.Sleep(reqDelay) _ = wrapped.HandleRPC(firstStream, "rpc") } close(waitFirst) }() go func() { - for i := 0; i < 100; i++ { - time.Sleep(10 * time.Millisecond) + for i := 0; i < peerRps; i++ { + time.Sleep(reqDelay) _ = wrapped.HandleRPC(secondStream, "rpc") } close(waitSecond) @@ -125,6 +130,51 @@ func TestLimiter_Concurrent(t *testing.T) { <-waitFirst <-waitSecond // 2 for number of peers and 2 for error margin (delays etc) - maxCalls := 2 * 2 * tps + maxCalls := 2 * 2 * targetRps require.Greater(t, maxCalls, int(handler.calls.Load())) } + +func TestLimiter_Concurrent_Bursts(t *testing.T) { + lim := New().(*limiter) + handler := &mockHandler{} + var ( + targetRps = 10 + // bursts are not affected by rps limit + burst = 10 + // peerRps should be greater than targetRps + burst + peerRps = 100 + reqDelay = time.Duration(1000/peerRps) * time.Millisecond + ) + lim.cfg = Config{ + DefaultTokens: Tokens{ + TokensPerSecond: targetRps, + MaxTokens: burst, + }, + } + wrapped := lim.WrapDRPCHandler(handler) + firstStream := mockStream{ctx: peer.CtxWithPeerId(ctx, "peer1")} + secondStream := mockStream{ctx: peer.CtxWithPeerId(ctx, "peer2")} + waitFirst := make(chan struct{}) + waitSecond := make(chan struct{}) + go func() { + for i := 0; i < peerRps; i++ { + time.Sleep(reqDelay) + _ = wrapped.HandleRPC(firstStream, "rpc") + } + close(waitFirst) + }() + go func() { + for i := 0; i < peerRps; i++ { + time.Sleep(reqDelay) + _ = wrapped.HandleRPC(secondStream, "rpc") + } + close(waitSecond) + }() + <-waitFirst + <-waitSecond + // 2 for number of peers and 2 for error margin (delays etc) + maxCalls := 2 * 2 * (targetRps + burst) + minCalls := 2 * (targetRps + burst) + require.Greater(t, maxCalls, int(handler.calls.Load())) + require.LessOrEqual(t, minCalls, int(handler.calls.Load())) +} From 23a29f0b01ea25a508a9dc83564bd04c23d02606 Mon Sep 17 00:00:00 2001 From: mcrakhman Date: Thu, 28 Mar 2024 18:10:31 +0100 Subject: [PATCH 067/140] Add limiterproto --- Makefile | 1 + net/rpc/limiter/limiter.go | 10 +-- net/rpc/limiter/limiter_test.go | 5 +- net/rpc/limiter/limiterproto/errors.go | 13 ++++ net/rpc/limiter/limiterproto/limiter.pb.go | 68 +++++++++++++++++++ .../limiter/limiterproto/protos/limiter.proto | 8 +++ 6 files changed, 96 insertions(+), 9 deletions(-) create mode 100644 net/rpc/limiter/limiterproto/errors.go create mode 100644 net/rpc/limiter/limiterproto/limiter.pb.go create mode 100644 net/rpc/limiter/limiterproto/protos/limiter.proto diff --git a/Makefile b/Makefile index e3cf2749..1808184a 100644 --- a/Makefile +++ b/Makefile @@ -23,6 +23,7 @@ proto: protoc --gogofaster_out=$(PKGMAP):. --go-drpc_out=protolib=github.com/gogo/protobuf:. commonfile/fileproto/protos/*.proto protoc --gogofaster_out=$(PKGMAP):. --go-drpc_out=protolib=github.com/gogo/protobuf:. net/streampool/testservice/protos/*.proto protoc --gogofaster_out=:. net/secureservice/handshake/handshakeproto/protos/*.proto + protoc --gogofaster_out=:. net/rpc/limiter/limiterproto/protos/*.proto protoc --gogofaster_out=$(PKGMAP):. --go-drpc_out=protolib=github.com/gogo/protobuf:. coordinator/coordinatorproto/protos/*.proto protoc --gogofaster_out=:. --go-drpc_out=protolib=github.com/gogo/protobuf:. consensus/consensusproto/protos/*.proto protoc --gogofaster_out=:. --go-drpc_out=protolib=github.com/gogo/protobuf:. identityrepo/identityrepoproto/protos/*.proto diff --git a/net/rpc/limiter/limiter.go b/net/rpc/limiter/limiter.go index 8f2dd683..14294e08 100644 --- a/net/rpc/limiter/limiter.go +++ b/net/rpc/limiter/limiter.go @@ -2,7 +2,6 @@ package limiter import ( "context" - "errors" "strings" "sync" "time" @@ -14,6 +13,7 @@ import ( "github.com/anyproto/any-sync/app" "github.com/anyproto/any-sync/app/logger" "github.com/anyproto/any-sync/net/peer" + "github.com/anyproto/any-sync/net/rpc/limiter/limiterproto" "github.com/anyproto/any-sync/util/periodicsync" ) @@ -22,11 +22,7 @@ const ( checkTimeout = 2 * time.Second ) -var ( - log = logger.NewNamed(CName) - - ErrLimitExceeded = errors.New("rate limit exceeded") -) +var log = logger.NewNamed(CName) const CName = "common.rpc.limiter" @@ -104,7 +100,7 @@ func (h *limiter) HandleRPC(stream drpc.Stream, rpc string) (err error) { } lim := h.getPeerLimiter(peerId, rpc) if !lim.Allow() { - return ErrLimitExceeded + return limiterproto.ErrLimitExceeded } return h.Handler.HandleRPC(stream, rpc) } diff --git a/net/rpc/limiter/limiter_test.go b/net/rpc/limiter/limiter_test.go index 5f8f7f83..4ffa564b 100644 --- a/net/rpc/limiter/limiter_test.go +++ b/net/rpc/limiter/limiter_test.go @@ -10,6 +10,7 @@ import ( "storj.io/drpc" "github.com/anyproto/any-sync/net/peer" + "github.com/anyproto/any-sync/net/rpc/limiter/limiterproto" ) var ctx = context.Background() @@ -71,7 +72,7 @@ func TestLimiter_Synchronous(t *testing.T) { err := wrapped.HandleRPC(firstStream, "rpc") require.NoError(t, err) err = wrapped.HandleRPC(firstStream, "rpc") - require.Equal(t, ErrLimitExceeded, err) + require.Equal(t, limiterproto.ErrLimitExceeded, err) // second stream should not affect the first one secondStream := mockStream{ctx: peer.CtxWithPeerId(ctx, "peer2")} err = wrapped.HandleRPC(secondStream, "rpc") @@ -90,7 +91,7 @@ func TestLimiter_Synchronous(t *testing.T) { // but limit of 1 sec is not enough to clean the map time.Sleep(1 * time.Millisecond) err = wrapped.HandleRPC(firstStream, "rpc") - require.Equal(t, ErrLimitExceeded, err) + require.Equal(t, limiterproto.ErrLimitExceeded, err) } func TestLimiter_Concurrent_NoBursts(t *testing.T) { diff --git a/net/rpc/limiter/limiterproto/errors.go b/net/rpc/limiter/limiterproto/errors.go new file mode 100644 index 00000000..f15ade2d --- /dev/null +++ b/net/rpc/limiter/limiterproto/errors.go @@ -0,0 +1,13 @@ +package limiterproto + +import ( + "errors" + + "github.com/anyproto/any-sync/net/rpc/rpcerr" +) + +var ( + errGroup = rpcerr.ErrGroup(ErrCodes_ErrorOffset) + + ErrLimitExceeded = errGroup.Register(errors.New("rate limit exceeded"), uint64(ErrCodes_RateLimitExceeded)) +) diff --git a/net/rpc/limiter/limiterproto/limiter.pb.go b/net/rpc/limiter/limiterproto/limiter.pb.go new file mode 100644 index 00000000..fc44a73a --- /dev/null +++ b/net/rpc/limiter/limiterproto/limiter.pb.go @@ -0,0 +1,68 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: net/rpc/limiter/limiterproto/protos/limiter.proto + +package limiterproto + +import ( + fmt "fmt" + proto "github.com/gogo/protobuf/proto" + math "math" +) + +// 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 ErrCodes int32 + +const ( + ErrCodes_RateLimitExceeded ErrCodes = 0 + ErrCodes_ErrorOffset ErrCodes = 600 +) + +var ErrCodes_name = map[int32]string{ + 0: "RateLimitExceeded", + 600: "ErrorOffset", +} + +var ErrCodes_value = map[string]int32{ + "RateLimitExceeded": 0, + "ErrorOffset": 600, +} + +func (x ErrCodes) String() string { + return proto.EnumName(ErrCodes_name, int32(x)) +} + +func (ErrCodes) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_43f29163996a95d8, []int{0} +} + +func init() { + proto.RegisterEnum("limiter.ErrCodes", ErrCodes_name, ErrCodes_value) +} + +func init() { + proto.RegisterFile("net/rpc/limiter/limiterproto/protos/limiter.proto", fileDescriptor_43f29163996a95d8) +} + +var fileDescriptor_43f29163996a95d8 = []byte{ + // 147 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x32, 0xcc, 0x4b, 0x2d, 0xd1, + 0x2f, 0x2a, 0x48, 0xd6, 0xcf, 0xc9, 0xcc, 0xcd, 0x2c, 0x49, 0x2d, 0x82, 0xd1, 0x05, 0x45, 0xf9, + 0x25, 0xf9, 0xfa, 0x60, 0xb2, 0x18, 0x26, 0xa6, 0x07, 0xe6, 0x0a, 0xb1, 0x43, 0xb9, 0x5a, 0xc6, + 0x5c, 0x1c, 0xae, 0x45, 0x45, 0xce, 0xf9, 0x29, 0xa9, 0xc5, 0x42, 0xa2, 0x5c, 0x82, 0x41, 0x89, + 0x25, 0xa9, 0x3e, 0x20, 0x29, 0xd7, 0x8a, 0xe4, 0xd4, 0xd4, 0x94, 0xd4, 0x14, 0x01, 0x06, 0x21, + 0x01, 0x2e, 0x6e, 0xd7, 0xa2, 0xa2, 0xfc, 0x22, 0xff, 0xb4, 0xb4, 0xe2, 0xd4, 0x12, 0x81, 0x1b, + 0x2c, 0x4e, 0x66, 0x27, 0x1e, 0xc9, 0x31, 0x5e, 0x78, 0x24, 0xc7, 0xf8, 0xe0, 0x91, 0x1c, 0xe3, + 0x84, 0xc7, 0x72, 0x0c, 0x17, 0x1e, 0xcb, 0x31, 0xdc, 0x78, 0x2c, 0xc7, 0x10, 0x25, 0x83, 0xcf, + 0x29, 0x49, 0x6c, 0x60, 0xca, 0x18, 0x10, 0x00, 0x00, 0xff, 0xff, 0xb0, 0x14, 0x75, 0x29, 0xb1, + 0x00, 0x00, 0x00, +} diff --git a/net/rpc/limiter/limiterproto/protos/limiter.proto b/net/rpc/limiter/limiterproto/protos/limiter.proto new file mode 100644 index 00000000..d5a758be --- /dev/null +++ b/net/rpc/limiter/limiterproto/protos/limiter.proto @@ -0,0 +1,8 @@ +syntax = "proto3"; +package limiter; +option go_package = "net/rpc/limiter/limiterproto"; + +enum ErrCodes { + RateLimitExceeded = 0; + ErrorOffset = 600; +} From b35ba294121ff0dd04d1a4f19e651a0ae0c86704 Mon Sep 17 00:00:00 2001 From: mcrakhman Date: Thu, 28 Mar 2024 21:21:12 +0100 Subject: [PATCH 068/140] Change error offset --- net/rpc/limiter/limiterproto/limiter.pb.go | 12 ++++++------ net/rpc/limiter/limiterproto/protos/limiter.proto | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/net/rpc/limiter/limiterproto/limiter.pb.go b/net/rpc/limiter/limiterproto/limiter.pb.go index fc44a73a..5e7ae2c8 100644 --- a/net/rpc/limiter/limiterproto/limiter.pb.go +++ b/net/rpc/limiter/limiterproto/limiter.pb.go @@ -24,17 +24,17 @@ type ErrCodes int32 const ( ErrCodes_RateLimitExceeded ErrCodes = 0 - ErrCodes_ErrorOffset ErrCodes = 600 + ErrCodes_ErrorOffset ErrCodes = 700 ) var ErrCodes_name = map[int32]string{ 0: "RateLimitExceeded", - 600: "ErrorOffset", + 700: "ErrorOffset", } var ErrCodes_value = map[string]int32{ "RateLimitExceeded": 0, - "ErrorOffset": 600, + "ErrorOffset": 700, } func (x ErrCodes) String() string { @@ -60,9 +60,9 @@ var fileDescriptor_43f29163996a95d8 = []byte{ 0x25, 0xf9, 0xfa, 0x60, 0xb2, 0x18, 0x26, 0xa6, 0x07, 0xe6, 0x0a, 0xb1, 0x43, 0xb9, 0x5a, 0xc6, 0x5c, 0x1c, 0xae, 0x45, 0x45, 0xce, 0xf9, 0x29, 0xa9, 0xc5, 0x42, 0xa2, 0x5c, 0x82, 0x41, 0x89, 0x25, 0xa9, 0x3e, 0x20, 0x29, 0xd7, 0x8a, 0xe4, 0xd4, 0xd4, 0x94, 0xd4, 0x14, 0x01, 0x06, 0x21, - 0x01, 0x2e, 0x6e, 0xd7, 0xa2, 0xa2, 0xfc, 0x22, 0xff, 0xb4, 0xb4, 0xe2, 0xd4, 0x12, 0x81, 0x1b, - 0x2c, 0x4e, 0x66, 0x27, 0x1e, 0xc9, 0x31, 0x5e, 0x78, 0x24, 0xc7, 0xf8, 0xe0, 0x91, 0x1c, 0xe3, + 0x01, 0x2e, 0x6e, 0xd7, 0xa2, 0xa2, 0xfc, 0x22, 0xff, 0xb4, 0xb4, 0xe2, 0xd4, 0x12, 0x81, 0x3d, + 0xac, 0x4e, 0x66, 0x27, 0x1e, 0xc9, 0x31, 0x5e, 0x78, 0x24, 0xc7, 0xf8, 0xe0, 0x91, 0x1c, 0xe3, 0x84, 0xc7, 0x72, 0x0c, 0x17, 0x1e, 0xcb, 0x31, 0xdc, 0x78, 0x2c, 0xc7, 0x10, 0x25, 0x83, 0xcf, - 0x29, 0x49, 0x6c, 0x60, 0xca, 0x18, 0x10, 0x00, 0x00, 0xff, 0xff, 0xb0, 0x14, 0x75, 0x29, 0xb1, + 0x29, 0x49, 0x6c, 0x60, 0xca, 0x18, 0x10, 0x00, 0x00, 0xff, 0xff, 0x1e, 0x6b, 0xb3, 0x13, 0xb1, 0x00, 0x00, 0x00, } diff --git a/net/rpc/limiter/limiterproto/protos/limiter.proto b/net/rpc/limiter/limiterproto/protos/limiter.proto index d5a758be..1c28b74e 100644 --- a/net/rpc/limiter/limiterproto/protos/limiter.proto +++ b/net/rpc/limiter/limiterproto/protos/limiter.proto @@ -4,5 +4,5 @@ option go_package = "net/rpc/limiter/limiterproto"; enum ErrCodes { RateLimitExceeded = 0; - ErrorOffset = 600; + ErrorOffset = 700; } From 5ee48965370a624ec765565c0814c2142cebd8cc Mon Sep 17 00:00:00 2001 From: mcrakhman Date: Fri, 29 Mar 2024 10:56:26 +0100 Subject: [PATCH 069/140] Remove atomic --- net/rpc/limiter/limiter.go | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/net/rpc/limiter/limiter.go b/net/rpc/limiter/limiter.go index 14294e08..99c9ebc4 100644 --- a/net/rpc/limiter/limiter.go +++ b/net/rpc/limiter/limiter.go @@ -6,7 +6,6 @@ import ( "sync" "time" - "go.uber.org/atomic" "golang.org/x/time/rate" "storj.io/drpc" @@ -34,7 +33,7 @@ type RpcLimiter interface { func New() RpcLimiter { return &limiter{ - limiters: make(map[string]peerLimiter), + limiters: make(map[string]*peerLimiter), peerCheckInterval: peerCheckInterval, checkTimeout: checkTimeout, } @@ -42,12 +41,12 @@ func New() RpcLimiter { type peerLimiter struct { *rate.Limiter - lastUsage *atomic.Time + lastUsage time.Time } type limiter struct { drpc.Handler - limiters map[string]peerLimiter + limiters map[string]*peerLimiter periodicLoop periodicsync.PeriodicSync peerCheckInterval time.Duration checkTimeout time.Duration @@ -79,7 +78,7 @@ func (h *limiter) peerLoop(ctx context.Context) error { h.mx.Lock() defer h.mx.Unlock() for rpcPeer, lim := range h.limiters { - if time.Since(lim.lastUsage.Load()) > h.peerCheckInterval { + if time.Since(lim.lastUsage) > h.peerCheckInterval { delete(h.limiters, rpcPeer) } } @@ -112,20 +111,19 @@ func (h *limiter) getLimits(rpc string) Tokens { return h.cfg.DefaultTokens } -func (h *limiter) getPeerLimiter(peerId string, rpc string) peerLimiter { +func (h *limiter) getPeerLimiter(peerId string, rpc string) *peerLimiter { // rpc looks like this /anyNodeSync.NodeSync/PartitionSync + rpcPeer := strings.Join([]string{peerId, rpc}, "-") h.mx.Lock() defer h.mx.Unlock() - rpcPeer := strings.Join([]string{peerId, rpc}, "-") lim, ok := h.limiters[rpcPeer] if !ok { limits := h.getLimits(rpc) - lim = peerLimiter{ + lim = &peerLimiter{ Limiter: rate.NewLimiter(rate.Limit(limits.TokensPerSecond), limits.MaxTokens), } - lim.lastUsage = &atomic.Time{} h.limiters[rpcPeer] = lim } - lim.lastUsage.Store(time.Now()) + lim.lastUsage = time.Now() return lim } From 84a034daff0dffae88b0ea731b9bb0c58397a489 Mon Sep 17 00:00:00 2001 From: kirillston Date: Fri, 29 Mar 2024 18:55:28 +0100 Subject: [PATCH 070/140] GO-3023 Add billingID to BuySubscription rpc --- .../paymentserviceproto/paymentservice.pb.go | 201 +++++++++++------- .../protos/paymentservice.proto | 2 + 2 files changed, 129 insertions(+), 74 deletions(-) diff --git a/paymentservice/paymentserviceproto/paymentservice.pb.go b/paymentservice/paymentserviceproto/paymentservice.pb.go index 5dfc7a51..5ef91cf6 100644 --- a/paymentservice/paymentserviceproto/paymentservice.pb.go +++ b/paymentservice/paymentserviceproto/paymentservice.pb.go @@ -536,6 +536,8 @@ type BuySubscriptionResponse struct { // will feature current billing ID // stripe.com/?client_reference_id=1234 PaymentUrl string `protobuf:"bytes,1,opt,name=paymentUrl,proto3" json:"paymentUrl,omitempty"` + // billingID is passed via mobile client to payment platform + BillingID string `protobuf:"bytes,2,opt,name=billingID,proto3" json:"billingID,omitempty"` } func (m *BuySubscriptionResponse) Reset() { *m = BuySubscriptionResponse{} } @@ -578,6 +580,13 @@ func (m *BuySubscriptionResponse) GetPaymentUrl() string { return "" } +func (m *BuySubscriptionResponse) GetBillingID() string { + if m != nil { + return m.BillingID + } + return "" +} + type FinalizeSubscriptionRequest struct { // in the following format: "A5k2d9sFZw84yisTxRnz2bPRd1YPfVfhxqymZ6yESprFTG65" // you can get it with Account().SignKey.GetPublic().Account() @@ -1334,80 +1343,81 @@ func init() { } var fileDescriptor_4feb29dcc5ba50f6 = []byte{ - // 1157 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x57, 0x4f, 0x6f, 0x1b, 0x45, - 0x14, 0xf7, 0xfa, 0x4f, 0x12, 0xbf, 0x34, 0xc9, 0xf6, 0xc5, 0x4d, 0xb7, 0x6e, 0x62, 0xa5, 0x2b, - 0xfe, 0x44, 0x41, 0x6c, 0x45, 0xe9, 0x01, 0x10, 0x42, 0x38, 0x69, 0x1a, 0x22, 0x95, 0xc8, 0x5a, - 0xbb, 0x45, 0xd0, 0x03, 0x6c, 0xbd, 0x53, 0x67, 0xc9, 0x66, 0x66, 0x99, 0x19, 0x27, 0x2c, 0x5f, - 0x00, 0x71, 0x43, 0xe2, 0xc2, 0xf7, 0xe1, 0xc2, 0x09, 0xf5, 0xc8, 0x11, 0x25, 0x37, 0x4e, 0x7c, - 0x04, 0x34, 0xb3, 0xeb, 0x78, 0x1d, 0xaf, 0x9d, 0xd0, 0x88, 0x4b, 0xbc, 0xf3, 0x9b, 0x79, 0x6f, - 0xde, 0xfb, 0xbd, 0x7f, 0x13, 0xf8, 0x24, 0xf2, 0xe2, 0x23, 0x42, 0xa5, 0x20, 0xfc, 0x38, 0xe8, - 0x92, 0xfb, 0xa3, 0xcb, 0x88, 0x33, 0xc9, 0xee, 0xeb, 0xbf, 0xe2, 0xc2, 0x96, 0xa3, 0xd1, 0xfa, - 0xa3, 0xd7, 0x95, 0xff, 0x5a, 0x06, 0x84, 0x8b, 0x44, 0x8b, 0xfd, 0x01, 0xac, 0xec, 0x12, 0xd9, - 0xee, 0xbf, 0x10, 0x5d, 0x1e, 0x44, 0x32, 0x60, 0xd4, 0x25, 0xdf, 0xf5, 0x89, 0x90, 0xd8, 0x00, - 0x60, 0x27, 0x94, 0xf0, 0x26, 0x8d, 0xf7, 0x1e, 0x59, 0xc6, 0xba, 0xb1, 0x51, 0x75, 0x33, 0x88, - 0xfd, 0x0c, 0x56, 0xf3, 0x25, 0xdb, 0x41, 0x8f, 0x12, 0x1f, 0x2d, 0x98, 0x8d, 0xbc, 0x38, 0x64, - 0x9e, 0xaf, 0x85, 0x6f, 0xb8, 0x83, 0x25, 0xae, 0x42, 0x55, 0x04, 0x3d, 0xea, 0xc9, 0x3e, 0x27, - 0x56, 0x51, 0xef, 0x0d, 0x01, 0xfb, 0x9f, 0x22, 0xdc, 0x1e, 0x53, 0x2c, 0x22, 0x46, 0x05, 0x41, - 0x84, 0xb2, 0x32, 0x5e, 0x2b, 0xac, 0xb8, 0xfa, 0x1b, 0xdf, 0x81, 0x19, 0x21, 0x3d, 0xd9, 0x17, - 0x5a, 0xd5, 0xe2, 0x83, 0x65, 0x27, 0x2b, 0xda, 0xd6, 0x5b, 0x6e, 0x7a, 0x04, 0xd7, 0x61, 0xde, - 0xf7, 0x24, 0x69, 0x4b, 0x8f, 0x4b, 0xe2, 0x5b, 0xa5, 0x75, 0x63, 0xa3, 0xec, 0x66, 0x21, 0xac, - 0xc3, 0x9c, 0x5a, 0xee, 0x50, 0x5f, 0x58, 0x65, 0xbd, 0x7d, 0xbe, 0x56, 0xd2, 0x81, 0x68, 0xf6, - 0x25, 0x73, 0x09, 0x25, 0x27, 0x56, 0x65, 0xdd, 0xd8, 0x98, 0x73, 0xb3, 0x10, 0x3e, 0x84, 0x85, - 0x94, 0xec, 0xcf, 0x89, 0x3c, 0x60, 0xbe, 0x35, 0xa3, 0x6d, 0x5a, 0x74, 0x5a, 0x59, 0xd4, 0x1d, - 0x3d, 0x84, 0x9b, 0x60, 0xf2, 0x84, 0x3b, 0xe2, 0x37, 0x69, 0xbc, 0xef, 0x1d, 0x11, 0x6b, 0x56, - 0x13, 0x3e, 0x86, 0x2b, 0xf2, 0xfa, 0x82, 0xf0, 0x9d, 0x23, 0x2f, 0x08, 0xad, 0x39, 0x7d, 0x68, - 0x08, 0xe0, 0x43, 0xb8, 0x25, 0x12, 0xef, 0x5f, 0x90, 0x0e, 0xdb, 0x27, 0x27, 0x22, 0x24, 0x52, - 0x12, 0x6e, 0x55, 0xb5, 0xad, 0xf9, 0x9b, 0xf6, 0xdf, 0x06, 0xac, 0x6c, 0xf5, 0xe3, 0xcb, 0xb2, - 0xc0, 0x1f, 0xcb, 0x02, 0x1f, 0x37, 0x60, 0x49, 0xaf, 0x76, 0xe4, 0x41, 0xd3, 0xf7, 0x39, 0x11, - 0x49, 0x18, 0xaa, 0xee, 0x45, 0x18, 0xdf, 0x80, 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 0xa3, 0x90, 0x71, 0xc2, 0x4d, 0x03, 0x2d, 0xa8, 0x29, 0x64, 0xab, - 0x1f, 0x84, 0x3e, 0xe1, 0xef, 0x7d, 0x41, 0xc8, 0x61, 0x67, 0xa7, 0xdd, 0x31, 0x8b, 0x58, 0x87, - 0x15, 0xb5, 0xb3, 0xcd, 0xb6, 0x39, 0xf1, 0x24, 0xcb, 0xec, 0x95, 0xb0, 0x06, 0x66, 0x56, 0xea, - 0x4b, 0xe2, 0x71, 0xb3, 0x8c, 0x2b, 0x80, 0xa3, 0x12, 0x1a, 0xaf, 0x28, 0x3f, 0x32, 0xa7, 0x5b, - 0x61, 0x5f, 0x98, 0x33, 0x03, 0xb0, 0x49, 0x63, 0x19, 0x47, 0xa4, 0x43, 0xbc, 0x23, 0x73, 0x76, - 0x53, 0x00, 0x8e, 0x3f, 0x58, 0xf0, 0x26, 0x2c, 0x24, 0x5f, 0x43, 0x47, 0xce, 0xa1, 0x16, 0xa1, - 0x7e, 0x40, 0x7b, 0xa6, 0xa1, 0x7c, 0x4b, 0xa0, 0x66, 0x57, 0x06, 0xc7, 0xc4, 0x2c, 0xe2, 0x9b, - 0x70, 0x6f, 0xe4, 0x90, 0x4a, 0xa7, 0x80, 0x13, 0x91, 0x76, 0x6a, 0x5d, 0xb4, 0x66, 0x69, 0xf3, - 0x47, 0x03, 0x16, 0x46, 0x26, 0x2a, 0x2e, 0x02, 0x24, 0x5f, 0xdb, 0x1e, 0xf7, 0x13, 0xda, 0xd2, - 0x35, 0x8f, 0x23, 0xc9, 0x4c, 0x03, 0x11, 0x16, 0x13, 0xa4, 0x19, 0x45, 0x21, 0x69, 0x79, 0xb1, - 0x59, 0x54, 0x1e, 0x25, 0xd8, 0x2e, 0x63, 0xbd, 0x04, 0xd4, 0x4c, 0x65, 0x0e, 0xee, 0x51, 0x2f, - 0x8a, 0x92, 0x20, 0x66, 0x8f, 0x26, 0x70, 0xe5, 0xc1, 0xaf, 0x15, 0xa8, 0x35, 0x69,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 0x31, 0xa3, 0x7f, 0xde, 0xff, 0x37, 0x00, 0x00, 0xff, 0xff, 0x95, 0xf9, 0xbc, - 0xe2, 0xe8, 0x0d, 0x00, 0x00, + // 1170 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x57, 0xcd, 0x6f, 0x1b, 0x45, + 0x14, 0xf7, 0xfa, 0x23, 0x89, 0x5f, 0x9a, 0x64, 0xfb, 0xe2, 0xa6, 0x5b, 0x37, 0xb1, 0xd2, 0x15, + 0x1f, 0x51, 0x10, 0x5b, 0x51, 0x7a, 0x40, 0x08, 0x21, 0x9c, 0x8f, 0x86, 0x48, 0x25, 0xb2, 0xd6, + 0x6e, 0x2b, 0xe8, 0x01, 0x36, 0xde, 0xa9, 0xb3, 0x74, 0x33, 0xb3, 0xcc, 0x8c, 0x1b, 0x96, 0x7f, + 0x00, 0x71, 0x43, 0xe2, 0xc2, 0xff, 0xc3, 0x85, 0x13, 0xea, 0x91, 0x23, 0x4a, 0x6e, 0x9c, 0xf8, + 0x13, 0xd0, 0xcc, 0xae, 0xe3, 0x75, 0xbc, 0x76, 0x42, 0x23, 0x2e, 0xf1, 0xce, 0x6f, 0xe6, 0xbd, + 0x79, 0xef, 0xf7, 0xbe, 0x26, 0xf0, 0x69, 0xe4, 0xc5, 0xc7, 0x84, 0x4a, 0x41, 0xf8, 0xab, 0xa0, + 0x4b, 0xee, 0x8f, 0x2e, 0x23, 0xce, 0x24, 0xbb, 0xaf, 0xff, 0x8a, 0x0b, 0x5b, 0x8e, 0x46, 0xeb, + 0x3b, 0x6f, 0x2a, 0xff, 0xb5, 0x0c, 0x08, 0x17, 0x89, 0x16, 0xfb, 0x23, 0x58, 0xd9, 0x23, 0xb2, + 0xdd, 0x3f, 0x14, 0x5d, 0x1e, 0x44, 0x32, 0x60, 0xd4, 0x25, 0xdf, 0xf5, 0x89, 0x90, 0xd8, 0x00, + 0x60, 0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98, 0x6c, 0xd2, 0xd8, 0x34, 0xd4, 0xaa, 0xc3, 0x58, 0xfb, 0x88, 0x71, 0x69, 0x16, + 0x71, 0x1e, 0x66, 0x3b, 0x8c, 0x3d, 0x66, 0xb4, 0x67, 0x96, 0x70, 0x19, 0x96, 0x3e, 0xf7, 0xc4, + 0x3e, 0x7d, 0xa5, 0x04, 0xb7, 0x8f, 0x3c, 0x2e, 0xcc, 0x32, 0xde, 0x82, 0x9b, 0xca, 0xdb, 0x47, + 0x44, 0x13, 0x76, 0xc0, 0x94, 0x7d, 0x66, 0x65, 0xf3, 0x37, 0x03, 0xcc, 0x6c, 0xed, 0x69, 0x46, + 0x96, 0x60, 0x5e, 0xfd, 0x3e, 0xa1, 0x2f, 0x29, 0x3b, 0xa1, 0x66, 0x01, 0x4d, 0xb8, 0xa1, 0x80, + 0xdd, 0xef, 0xa3, 0x90, 0x71, 0xc2, 0x4d, 0x03, 0x2d, 0xa8, 0x29, 0x64, 0xab, 0x1f, 0x84, 0x3e, + 0xe1, 0x1f, 0x3c, 0x23, 0xe4, 0x65, 0x67, 0xb7, 0xdd, 0x31, 0x8b, 0x58, 0x87, 0x15, 0xb5, 0xb3, + 0xcd, 0xb6, 0x39, 0xf1, 0x24, 0xcb, 0xec, 0x95, 0xb0, 0x06, 0x66, 0x56, 0xea, 0x4b, 0xe2, 0x71, + 0xb3, 0x8c, 0x2b, 0x80, 0xa3, 0x12, 0x1a, 0xaf, 0x28, 0x3f, 0x32, 0xa7, 0x5b, 0x61, 0x5f, 0x98, + 0x33, 0x03, 0xb0, 0x49, 0x63, 0x19, 0x47, 0xa4, 0x43, 0xbc, 0x63, 0x73, 0x76, 0x53, 0x00, 0x8e, + 0x3f, 0x67, 0xf0, 0x26, 0x2c, 0x24, 0x5f, 0x43, 0x47, 0xce, 0xa1, 0x16, 0xa1, 0x7e, 0x40, 0x7b, + 0xa6, 0xa1, 0x7c, 0x4b, 0xa0, 0x66, 0x57, 0x06, 0xaf, 0x88, 0x59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13, + 0x50, 0x4b, 0x4f, 0x1f, 0x15, 0xf5, 0x35, 0x67, 0xea, 0xb8, 0x29, 0xe0, 0x67, 0x30, 0x9f, 0x69, + 0xb7, 0x78, 0xc7, 0x99, 0xd4, 0x7c, 0xeb, 0x35, 0x27, 0xa7, 0x91, 0x27, 0x11, 0xdf, 0x23, 0xb2, + 0x19, 0x86, 0xaa, 0xf0, 0x04, 0xae, 0xa8, 0x1b, 0xf5, 0xe7, 0xa8, 0xf8, 0xcd, 0x0c, 0x3e, 0x90, + 0xdd, 0xfa, 0xe4, 0xf7, 0xd3, 0x86, 0xf1, 0xfa, 0xb4, 0x61, 0xfc, 0x75, 0xda, 0x30, 0x7e, 0x3e, + 0x6b, 0x14, 0x5e, 0x9f, 0x35, 0x0a, 0x7f, 0x9e, 0x35, 0x0a, 0x5f, 0xd9, 0x97, 0xff, 0x67, 0x76, + 0x38, 0xa3, 0x7f, 0x3e, 0xfc, 0x37, 0x00, 0x00, 0xff, 0xff, 0x76, 0x07, 0xd1, 0x1b, 0x06, 0x0e, + 0x00, 0x00, } func (m *GetSubscriptionRequest) Marshal() (dAtA []byte, err error) { @@ -1670,6 +1680,13 @@ func (m *BuySubscriptionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) _ = i var l int _ = l + if len(m.BillingID) > 0 { + i -= len(m.BillingID) + copy(dAtA[i:], m.BillingID) + i = encodeVarintPaymentservice(dAtA, i, uint64(len(m.BillingID))) + i-- + dAtA[i] = 0x12 + } if len(m.PaymentUrl) > 0 { i -= len(m.PaymentUrl) copy(dAtA[i:], m.PaymentUrl) @@ -2305,6 +2322,10 @@ func (m *BuySubscriptionResponse) Size() (n int) { if l > 0 { n += 1 + l + sovPaymentservice(uint64(l)) } + l = len(m.BillingID) + if l > 0 { + n += 1 + l + sovPaymentservice(uint64(l)) + } return n } @@ -3344,6 +3365,38 @@ func (m *BuySubscriptionResponse) Unmarshal(dAtA []byte) error { } m.PaymentUrl = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BillingID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPaymentservice + } + 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 ErrInvalidLengthPaymentservice + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPaymentservice + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.BillingID = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipPaymentservice(dAtA[iNdEx:]) diff --git a/paymentservice/paymentserviceproto/protos/paymentservice.proto b/paymentservice/paymentserviceproto/protos/paymentservice.proto index 94a4d62b..df8f17b2 100644 --- a/paymentservice/paymentserviceproto/protos/paymentservice.proto +++ b/paymentservice/paymentserviceproto/protos/paymentservice.proto @@ -101,6 +101,8 @@ message BuySubscriptionResponse { // will feature current billing ID // stripe.com/?client_reference_id=1234 string paymentUrl = 1; + // billingID is passed via mobile client to payment platform + string billingID = 2; } message FinalizeSubscriptionRequest { From 39180d900392e0a106a88e032a3cb1b37596e955 Mon Sep 17 00:00:00 2001 From: mcrakhman Date: Fri, 29 Mar 2024 20:08:51 +0100 Subject: [PATCH 071/140] Add limiter mock --- net/rpc/limiter/limiter.go | 1 + net/rpc/limiter/mock_limiter/mock_limiter.go | 111 +++++++++++++++++++ 2 files changed, 112 insertions(+) create mode 100644 net/rpc/limiter/mock_limiter/mock_limiter.go diff --git a/net/rpc/limiter/limiter.go b/net/rpc/limiter/limiter.go index 99c9ebc4..85c1a051 100644 --- a/net/rpc/limiter/limiter.go +++ b/net/rpc/limiter/limiter.go @@ -1,3 +1,4 @@ +//go:generate mockgen -destination mock_limiter/mock_limiter.go github.com/anyproto/any-sync/net/rpc/limiter RpcLimiter package limiter import ( diff --git a/net/rpc/limiter/mock_limiter/mock_limiter.go b/net/rpc/limiter/mock_limiter/mock_limiter.go new file mode 100644 index 00000000..78b9cc52 --- /dev/null +++ b/net/rpc/limiter/mock_limiter/mock_limiter.go @@ -0,0 +1,111 @@ +// Code generated by MockGen. DO NOT EDIT. +// Source: github.com/anyproto/any-sync/net/rpc/limiter (interfaces: RpcLimiter) +// +// Generated by this command: +// +// mockgen -destination mock_limiter/mock_limiter.go github.com/anyproto/any-sync/net/rpc/limiter RpcLimiter +// +// Package mock_limiter is a generated GoMock package. +package mock_limiter + +import ( + context "context" + reflect "reflect" + + app "github.com/anyproto/any-sync/app" + gomock "go.uber.org/mock/gomock" + drpc "storj.io/drpc" +) + +// MockRpcLimiter is a mock of RpcLimiter interface. +type MockRpcLimiter struct { + ctrl *gomock.Controller + recorder *MockRpcLimiterMockRecorder +} + +// MockRpcLimiterMockRecorder is the mock recorder for MockRpcLimiter. +type MockRpcLimiterMockRecorder struct { + mock *MockRpcLimiter +} + +// NewMockRpcLimiter creates a new mock instance. +func NewMockRpcLimiter(ctrl *gomock.Controller) *MockRpcLimiter { + mock := &MockRpcLimiter{ctrl: ctrl} + mock.recorder = &MockRpcLimiterMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockRpcLimiter) EXPECT() *MockRpcLimiterMockRecorder { + return m.recorder +} + +// Close mocks base method. +func (m *MockRpcLimiter) Close(arg0 context.Context) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Close", arg0) + ret0, _ := ret[0].(error) + return ret0 +} + +// Close indicates an expected call of Close. +func (mr *MockRpcLimiterMockRecorder) Close(arg0 any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockRpcLimiter)(nil).Close), arg0) +} + +// Init mocks base method. +func (m *MockRpcLimiter) Init(arg0 *app.App) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Init", arg0) + ret0, _ := ret[0].(error) + return ret0 +} + +// Init indicates an expected call of Init. +func (mr *MockRpcLimiterMockRecorder) Init(arg0 any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Init", reflect.TypeOf((*MockRpcLimiter)(nil).Init), arg0) +} + +// Name mocks base method. +func (m *MockRpcLimiter) Name() string { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Name") + ret0, _ := ret[0].(string) + return ret0 +} + +// Name indicates an expected call of Name. +func (mr *MockRpcLimiterMockRecorder) Name() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockRpcLimiter)(nil).Name)) +} + +// Run mocks base method. +func (m *MockRpcLimiter) Run(arg0 context.Context) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Run", arg0) + ret0, _ := ret[0].(error) + return ret0 +} + +// Run indicates an expected call of Run. +func (mr *MockRpcLimiterMockRecorder) Run(arg0 any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Run", reflect.TypeOf((*MockRpcLimiter)(nil).Run), arg0) +} + +// WrapDRPCHandler mocks base method. +func (m *MockRpcLimiter) WrapDRPCHandler(arg0 drpc.Handler) drpc.Handler { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "WrapDRPCHandler", arg0) + ret0, _ := ret[0].(drpc.Handler) + return ret0 +} + +// WrapDRPCHandler indicates an expected call of WrapDRPCHandler. +func (mr *MockRpcLimiterMockRecorder) WrapDRPCHandler(arg0 any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WrapDRPCHandler", reflect.TypeOf((*MockRpcLimiter)(nil).WrapDRPCHandler), arg0) +} From fd50ce8978afaaef2a62c10d07e20ad884e6da9a Mon Sep 17 00:00:00 2001 From: kirillston Date: Mon, 1 Apr 2024 22:33:55 +0200 Subject: [PATCH 072/140] Fix rpc error formatting --- net/rpc/rpcerr/registry.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/rpc/rpcerr/registry.go b/net/rpc/rpcerr/registry.go index e8a749e6..9cd088f6 100644 --- a/net/rpc/rpcerr/registry.go +++ b/net/rpc/rpcerr/registry.go @@ -43,7 +43,7 @@ func Unwrap(e error) error { } err, ok := errsMap[code] if !ok { - return drpcerr.WithCode(fmt.Errorf("unexpected error: %v; code: %d", err, code), code) + return drpcerr.WithCode(fmt.Errorf("unexpected error: %v; code: %d", e, code), code) } return err } From dc5a577f23fee1958b97a5632263f34020a88a6f Mon Sep 17 00:00:00 2001 From: kirillston Date: Tue, 2 Apr 2024 11:20:54 +0200 Subject: [PATCH 073/140] Use %w for error formatting --- net/rpc/rpcerr/registry.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/rpc/rpcerr/registry.go b/net/rpc/rpcerr/registry.go index 9cd088f6..0860ee2a 100644 --- a/net/rpc/rpcerr/registry.go +++ b/net/rpc/rpcerr/registry.go @@ -43,7 +43,7 @@ func Unwrap(e error) error { } err, ok := errsMap[code] if !ok { - return drpcerr.WithCode(fmt.Errorf("unexpected error: %v; code: %d", e, code), code) + return drpcerr.WithCode(fmt.Errorf("unexpected error: %w; code: %d", e, code), code) } return err } From 81d1428465094856bd5c4bb0e390477f432cf2f3 Mon Sep 17 00:00:00 2001 From: Sergey Cherepanov Date: Tue, 2 Apr 2024 13:25:44 +0200 Subject: [PATCH 074/140] allow remove users on overlimited space --- acl/acl.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/acl/acl.go b/acl/acl.go index 54eb165e..eba12910 100644 --- a/acl/acl.go +++ b/acl/acl.go @@ -94,6 +94,13 @@ func (as *aclService) AddRecord(ctx context.Context, spaceId string, rec *consen acl.RLock() defer acl.RUnlock() + var beforeReaders int + for _, acc := range acl.AclState().CurrentAccounts() { + if !acc.Permissions.NoPermissions() { + beforeReaders++ + } + } + err = acl.ValidateRawRecord(rec, func(state *list.AclState) error { var readers, writers int for _, acc := range state.CurrentAccounts() { @@ -104,6 +111,8 @@ func (as *aclService) AddRecord(ctx context.Context, spaceId string, rec *consen if acc.Permissions.CanWrite() { writers++ } + } + if readers >= beforeReaders { if uint32(readers) > limits.ReadMembers { return ErrLimitExceed } From 6fb4931afa367d13d38d9e233faf2955122f54ca Mon Sep 17 00:00:00 2001 From: Sergey Cherepanov Date: Tue, 2 Apr 2024 13:33:36 +0200 Subject: [PATCH 075/140] coordinatorproto: makeSpaceShareable add aclHead param --- commonfile/fileproto/file_drpc.pb.go | 2 +- .../spacesyncproto/spacesync_drpc.pb.go | 2 +- consensus/consensusproto/consensus_drpc.pb.go | 2 +- .../coordinatorclient/coordinatorclient.go | 5 +- .../coordinatorproto/coordinator.pb.go | 286 +++++++++++------- .../coordinatorproto/coordinator_drpc.pb.go | 2 +- .../coordinatorproto/protos/coordinator.proto | 2 + .../identityrepoproto/identityrepo_drpc.pb.go | 2 +- .../nameservice_aa_drpc.pb.go | 2 +- .../nameserviceproto/nameservice_drpc.pb.go | 2 +- .../testservice/testservice_drpc.pb.go | 2 +- 11 files changed, 183 insertions(+), 126 deletions(-) diff --git a/commonfile/fileproto/file_drpc.pb.go b/commonfile/fileproto/file_drpc.pb.go index 1f5e4ea0..f649161a 100644 --- a/commonfile/fileproto/file_drpc.pb.go +++ b/commonfile/fileproto/file_drpc.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-go-drpc. DO NOT EDIT. -// protoc-gen-go-drpc version: v0.0.33 +// protoc-gen-go-drpc version: v0.0.34 // source: commonfile/fileproto/protos/file.proto package fileproto diff --git a/commonspace/spacesyncproto/spacesync_drpc.pb.go b/commonspace/spacesyncproto/spacesync_drpc.pb.go index 35109d28..69d15b3f 100644 --- a/commonspace/spacesyncproto/spacesync_drpc.pb.go +++ b/commonspace/spacesyncproto/spacesync_drpc.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-go-drpc. DO NOT EDIT. -// protoc-gen-go-drpc version: v0.0.33 +// protoc-gen-go-drpc version: v0.0.34 // source: commonspace/spacesyncproto/protos/spacesync.proto package spacesyncproto diff --git a/consensus/consensusproto/consensus_drpc.pb.go b/consensus/consensusproto/consensus_drpc.pb.go index 47ce322d..ee08af88 100644 --- a/consensus/consensusproto/consensus_drpc.pb.go +++ b/consensus/consensusproto/consensus_drpc.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-go-drpc. DO NOT EDIT. -// protoc-gen-go-drpc version: v0.0.33 +// protoc-gen-go-drpc version: v0.0.34 // source: consensus/consensusproto/protos/consensus.proto package consensusproto diff --git a/coordinator/coordinatorclient/coordinatorclient.go b/coordinator/coordinatorclient/coordinatorclient.go index 29a06217..db5de6a4 100644 --- a/coordinator/coordinatorclient/coordinatorclient.go +++ b/coordinator/coordinatorclient/coordinatorclient.go @@ -37,7 +37,7 @@ type CoordinatorClient interface { StatusCheckMany(ctx context.Context, spaceIds []string) (statuses []*coordinatorproto.SpaceStatusPayload, err error) StatusCheck(ctx context.Context, spaceId string) (status *coordinatorproto.SpaceStatusPayload, err error) SpaceSign(ctx context.Context, payload SpaceSignPayload) (receipt *coordinatorproto.SpaceReceiptWithSignature, err error) - SpaceMakeShareable(ctx context.Context, spaceId string) (err error) + SpaceMakeShareable(ctx context.Context, spaceId, aclHead string) (err error) SpaceMakeUnshareable(ctx context.Context, spaceId string) (err error) NetworkConfiguration(ctx context.Context, currentId string) (*coordinatorproto.NetworkConfigurationResponse, error) DeletionLog(ctx context.Context, lastRecordId string, limit int) (records []*coordinatorproto.DeletionLogRecord, err error) @@ -304,10 +304,11 @@ func (c *coordinatorClient) AccountLimitsSet(ctx context.Context, req *coordinat }) } -func (c *coordinatorClient) SpaceMakeShareable(ctx context.Context, spaceId string) (err error) { +func (c *coordinatorClient) SpaceMakeShareable(ctx context.Context, spaceId, aclHead string) (err error) { return c.doClient(ctx, func(cl coordinatorproto.DRPCCoordinatorClient) error { if _, err := cl.SpaceMakeShareable(ctx, &coordinatorproto.SpaceMakeShareableRequest{ SpaceId: spaceId, + AclHead: aclHead, }); err != nil { return rpcerr.Unwrap(err) } diff --git a/coordinator/coordinatorproto/coordinator.pb.go b/coordinator/coordinatorproto/coordinator.pb.go index 4198f16e..6bed9f75 100644 --- a/coordinator/coordinatorproto/coordinator.pb.go +++ b/coordinator/coordinatorproto/coordinator.pb.go @@ -33,6 +33,7 @@ const ( ErrorCodes_SpaceLimitReached ErrorCodes = 5 ErrorCodes_AccountDeleted ErrorCodes = 6 ErrorCodes_Forbidden ErrorCodes = 7 + ErrorCodes_AclHeadIsMissing ErrorCodes = 8 ErrorCodes_ErrorOffset ErrorCodes = 300 ) @@ -45,6 +46,7 @@ var ErrorCodes_name = map[int32]string{ 5: "SpaceLimitReached", 6: "AccountDeleted", 7: "Forbidden", + 8: "AclHeadIsMissing", 300: "ErrorOffset", } @@ -57,6 +59,7 @@ var ErrorCodes_value = map[string]int32{ "SpaceLimitReached": 5, "AccountDeleted": 6, "Forbidden": 7, + "AclHeadIsMissing": 8, "ErrorOffset": 300, } @@ -917,6 +920,7 @@ func (m *SpaceStatusChangeResponse) GetPayload() *SpaceStatusPayload { type SpaceMakeShareableRequest struct { SpaceId string `protobuf:"bytes,1,opt,name=spaceId,proto3" json:"spaceId,omitempty"` + AclHead string `protobuf:"bytes,2,opt,name=aclHead,proto3" json:"aclHead,omitempty"` } func (m *SpaceMakeShareableRequest) Reset() { *m = SpaceMakeShareableRequest{} } @@ -959,6 +963,13 @@ func (m *SpaceMakeShareableRequest) GetSpaceId() string { return "" } +func (m *SpaceMakeShareableRequest) GetAclHead() string { + if m != nil { + return m.AclHead + } + return "" +} + type SpaceMakeShareableResponse struct { } @@ -2318,122 +2329,122 @@ func init() { } var fileDescriptor_d94f6f99586adae2 = []byte{ - // 1825 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0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x23, - 0xa6, 0x39, 0xbe, 0x59, 0xde, 0x3c, 0x96, 0xda, 0x6c, 0xcc, 0xc0, 0x97, 0xda, 0x6c, 0xec, 0x70, - 0xb7, 0x05, 0x15, 0x25, 0x21, 0xd0, 0xb9, 0xd1, 0x0d, 0x6c, 0x68, 0x7a, 0x79, 0xb4, 0xc0, 0xd0, - 0xa2, 0x52, 0x9a, 0x51, 0xce, 0xcc, 0x9d, 0xe8, 0xd8, 0x52, 0x16, 0xf3, 0xfa, 0xc3, 0xa7, 0x30, - 0x9b, 0xa8, 0xc1, 0xe8, 0x7c, 0x42, 0x25, 0xaf, 0x0f, 0xac, 0x99, 0xe3, 0x44, 0xa4, 0x5d, 0x12, - 0xf7, 0x4c, 0xc9, 0x36, 0x06, 0x5d, 0xce, 0x53, 0xce, 0x6d, 0x85, 0x6a, 0xcd, 0xe3, 0x88, 0xca, - 0xfd, 0xda, 0x30, 0xa3, 0xb6, 0x32, 0x68, 0x39, 0xa5, 0x9b, 0x69, 0x98, 0x6a, 0xe7, 0xc7, 0x48, - 0xa8, 0xe0, 0x28, 0x5d, 0x48, 0x06, 0x9c, 0x6c, 0xb7, 0x93, 0x01, 0x27, 0xaf, 0x89, 0x79, 0x0e, - 0x46, 0xfa, 0x71, 0x4e, 0xd5, 0xa2, 0x11, 0x8d, 0x4c, 0xaa, 0x16, 0x8d, 0x7a, 0xe1, 0xef, 0x7c, - 0xf4, 0xd7, 0x9b, 0x86, 0xf6, 0xea, 0x4d, 0x43, 0x7b, 0xfd, 0xa6, 0xa1, 0x7d, 0xf7, 0xb6, 0x51, - 0x78, 0xf5, 0xb6, 0x51, 0xf8, 0xfb, 0x6d, 0xa3, 0xf0, 0x65, 0x7d, 0xdc, 0xa7, 0xfa, 0x9d, 0x29, - 0xf1, 0xef, 0xfa, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x8c, 0x0c, 0xff, 0x82, 0xd1, 0x17, 0x00, - 0x00, + // 1840 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x58, 0xcd, 0x73, 0x13, 0x47, + 0x16, 0xd7, 0x8c, 0x65, 0x5b, 0x7a, 0xb2, 0xcd, 0xb8, 0x6d, 0x83, 0x10, 0x42, 0x98, 0x59, 0x16, + 0x8c, 0x76, 0x0b, 0x58, 0xb1, 0x5f, 0x14, 0x5b, 0xb5, 0x18, 0xf3, 0x11, 0x11, 0xfc, 0x51, 0x23, + 0x0c, 0x55, 0xc9, 0x81, 0x1a, 0xcf, 0xb4, 0xe5, 0x29, 0x4b, 0x3d, 0x4a, 0x4f, 0x0b, 0xe3, 0x73, + 0x8e, 0xb9, 0xe4, 0x96, 0x53, 0xee, 0x39, 0xe4, 0x90, 0xca, 0x25, 0x87, 0x54, 0xe5, 0x98, 0xca, + 0x91, 0x63, 0x8e, 0x14, 0xfc, 0x23, 0xa9, 0xee, 0xe9, 0x19, 0xf5, 0x7c, 0x48, 0x76, 0x8a, 0x03, + 0x17, 0x5b, 0xfd, 0xbe, 0xfa, 0xf5, 0xaf, 0xdf, 0x7b, 0xfd, 0xde, 0xc0, 0xbf, 0x1c, 0xdf, 0xa7, + 0xae, 0x47, 0x6c, 0xe6, 0xd3, 0x9b, 0xca, 0xef, 0x01, 0xf5, 0x99, 0x7f, 0x53, 0xfc, 0x0d, 0x54, + 0xfa, 0x0d, 0x41, 0x42, 0x15, 0x85, 0x64, 0xfe, 0xa2, 0x81, 0xd1, 0x19, 0xd8, 0x0e, 0xee, 0x78, + 0x5d, 0x62, 0xe1, 0x2f, 0x86, 0x38, 0x60, 0xa8, 0x0a, 0xb3, 0x01, 0xa7, 0xb5, 0xdd, 0xaa, 0xb6, + 0xaa, 0xad, 0x95, 0xad, 0x68, 0x89, 0xce, 0xc2, 0xcc, 0x01, 0xb6, 0x5d, 0x4c, 0xab, 0xfa, 0xaa, + 0xb6, 0x36, 0x67, 0xc9, 0x15, 0x5a, 0x85,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 0xb7, 0xff, 0x08, 0x00, 0x00, 0xff, 0xff, 0xe2, 0x79, 0x16, 0xfd, 0x01, 0x18, 0x00, 0x00, } func (m *SpaceSignRequest) Marshal() (dAtA []byte, err error) { @@ -2956,6 +2967,13 @@ func (m *SpaceMakeShareableRequest) MarshalToSizedBuffer(dAtA []byte) (int, erro _ = i var l int _ = l + if len(m.AclHead) > 0 { + i -= len(m.AclHead) + copy(dAtA[i:], m.AclHead) + i = encodeVarintCoordinator(dAtA, i, uint64(len(m.AclHead))) + i-- + dAtA[i] = 0x12 + } if len(m.SpaceId) > 0 { i -= len(m.SpaceId) copy(dAtA[i:], m.SpaceId) @@ -4114,6 +4132,10 @@ func (m *SpaceMakeShareableRequest) Size() (n int) { if l > 0 { n += 1 + l + sovCoordinator(uint64(l)) } + l = len(m.AclHead) + if l > 0 { + n += 1 + l + sovCoordinator(uint64(l)) + } return n } @@ -6042,6 +6064,38 @@ func (m *SpaceMakeShareableRequest) Unmarshal(dAtA []byte) error { } m.SpaceId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AclHead", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCoordinator + } + 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 ErrInvalidLengthCoordinator + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthCoordinator + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AclHead = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipCoordinator(dAtA[iNdEx:]) diff --git a/coordinator/coordinatorproto/coordinator_drpc.pb.go b/coordinator/coordinatorproto/coordinator_drpc.pb.go index 3443a788..cb798a19 100644 --- a/coordinator/coordinatorproto/coordinator_drpc.pb.go +++ b/coordinator/coordinatorproto/coordinator_drpc.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-go-drpc. DO NOT EDIT. -// protoc-gen-go-drpc version: v0.0.33 +// protoc-gen-go-drpc version: v0.0.34 // source: coordinator/coordinatorproto/protos/coordinator.proto package coordinatorproto diff --git a/coordinator/coordinatorproto/protos/coordinator.proto b/coordinator/coordinatorproto/protos/coordinator.proto index 10ae900c..2fd9909e 100644 --- a/coordinator/coordinatorproto/protos/coordinator.proto +++ b/coordinator/coordinatorproto/protos/coordinator.proto @@ -67,6 +67,7 @@ enum ErrorCodes { SpaceLimitReached = 5; AccountDeleted = 6; Forbidden = 7; + AclHeadIsMissing = 8; ErrorOffset = 300; } @@ -155,6 +156,7 @@ message SpaceStatusChangeResponse { message SpaceMakeShareableRequest { string spaceId = 1; + string aclHead = 2; } message SpaceMakeShareableResponse {} diff --git a/identityrepo/identityrepoproto/identityrepo_drpc.pb.go b/identityrepo/identityrepoproto/identityrepo_drpc.pb.go index 54b54e42..66e6a621 100644 --- a/identityrepo/identityrepoproto/identityrepo_drpc.pb.go +++ b/identityrepo/identityrepoproto/identityrepo_drpc.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-go-drpc. DO NOT EDIT. -// protoc-gen-go-drpc version: v0.0.33 +// protoc-gen-go-drpc version: v0.0.34 // source: identityrepo/identityrepoproto/protos/identityrepo.proto package identityrepoproto diff --git a/nameservice/nameserviceproto/nameservice_aa_drpc.pb.go b/nameservice/nameserviceproto/nameservice_aa_drpc.pb.go index 3505e1fa..cc3651e2 100644 --- a/nameservice/nameserviceproto/nameservice_aa_drpc.pb.go +++ b/nameservice/nameserviceproto/nameservice_aa_drpc.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-go-drpc. DO NOT EDIT. -// protoc-gen-go-drpc version: v0.0.33 +// protoc-gen-go-drpc version: v0.0.34 // source: nameservice/nameserviceproto/protos/nameservice_aa.proto package nameserviceproto diff --git a/nameservice/nameserviceproto/nameservice_drpc.pb.go b/nameservice/nameserviceproto/nameservice_drpc.pb.go index bc4630bc..e662c7af 100644 --- a/nameservice/nameserviceproto/nameservice_drpc.pb.go +++ b/nameservice/nameserviceproto/nameservice_drpc.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-go-drpc. DO NOT EDIT. -// protoc-gen-go-drpc version: v0.0.33 +// protoc-gen-go-drpc version: v0.0.34 // source: nameservice/nameserviceproto/protos/nameservice.proto package nameserviceproto diff --git a/net/streampool/testservice/testservice_drpc.pb.go b/net/streampool/testservice/testservice_drpc.pb.go index cfe5bce9..61586be4 100644 --- a/net/streampool/testservice/testservice_drpc.pb.go +++ b/net/streampool/testservice/testservice_drpc.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-go-drpc. DO NOT EDIT. -// protoc-gen-go-drpc version: v0.0.33 +// protoc-gen-go-drpc version: v0.0.34 // source: net/streampool/testservice/protos/testservice.proto package testservice From 27b310eb4cf8aaaf1a1c747179ed8062c605ebd1 Mon Sep 17 00:00:00 2001 From: kirillston Date: Tue, 2 Apr 2024 13:38:48 +0200 Subject: [PATCH 076/140] GO-2341 Remove unnecessary alloc of close channel --- app/ocache/ocache.go | 1 - 1 file changed, 1 deletion(-) diff --git a/app/ocache/ocache.go b/app/ocache/ocache.go index c91b3905..18c5c179 100644 --- a/app/ocache/ocache.go +++ b/app/ocache/ocache.go @@ -275,7 +275,6 @@ func (c *oCache) GC() { var toClose []*entry for _, e := range c.data { if e.isActive() && e.lastUsage.Before(deadline) { - e.close = make(chan struct{}) toClose = append(toClose, e) } } From 4b6c18f77ae0035868688142e68ab3f3e7a1d5e2 Mon Sep 17 00:00:00 2001 From: mcrakhman Date: Tue, 2 Apr 2024 13:49:47 +0200 Subject: [PATCH 077/140] Change places limiter and metric --- net/rpc/server/drpcserver.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/net/rpc/server/drpcserver.go b/net/rpc/server/drpcserver.go index c455ed5f..85ec0890 100644 --- a/net/rpc/server/drpcserver.go +++ b/net/rpc/server/drpcserver.go @@ -56,12 +56,12 @@ func (s *drpcServer) Init(a *app.App) (err error) { var handler drpc.Handler handler = s - if s.metric != nil { - handler = s.metric.WrapDRPCHandler(handler) - } if s.limiter != nil { handler = s.limiter.WrapDRPCHandler(handler) } + if s.metric != nil { + handler = s.metric.WrapDRPCHandler(handler) + } bufSize := s.config.Stream.MaxMsgSizeMb * (1 << 20) s.drpcServer = drpcserver.NewWithOptions(handler, drpcserver.Options{Manager: drpcmanager.Options{ Reader: drpcwire.ReaderOptions{MaximumBufferSize: bufSize}, From e2866e9340d65cba764a072ddb697d2b4143749b Mon Sep 17 00:00:00 2001 From: Anthony Akentiev Date: Tue, 2 Apr 2024 13:06:41 +0100 Subject: [PATCH 078/140] Go 3166 (#201) * Change GetTiersResponse * Locale -> Language * Revert locale -> language --- .../paymentservice_tiers.pb.go | 365 ++++++------------ .../protos/paymentservice_tiers.proto | 18 +- 2 files changed, 114 insertions(+), 269 deletions(-) diff --git a/paymentservice/paymentserviceproto/paymentservice_tiers.pb.go b/paymentservice/paymentserviceproto/paymentservice_tiers.pb.go index fb16b9ce..4caaaa37 100644 --- a/paymentservice/paymentserviceproto/paymentservice_tiers.pb.go +++ b/paymentservice/paymentserviceproto/paymentservice_tiers.pb.go @@ -60,13 +60,7 @@ func (PeriodType) EnumDescriptor() ([]byte, []int) { } type Feature struct { - // "invites" - // "GBs" - // "spaces" - // ... - ValueStr string `protobuf:"bytes,1,opt,name=valueStr,proto3" json:"valueStr,omitempty"` - // each uint is a value of the feature - ValueUint uint32 `protobuf:"varint,2,opt,name=valueUint,proto3" json:"valueUint,omitempty"` + Description string `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"` } func (m *Feature) Reset() { *m = Feature{} } @@ -102,27 +96,18 @@ func (m *Feature) XXX_DiscardUnknown() { var xxx_messageInfo_Feature proto.InternalMessageInfo -func (m *Feature) GetValueStr() string { +func (m *Feature) GetDescription() string { if m != nil { - return m.ValueStr + return m.Description } return "" } -func (m *Feature) GetValueUint() uint32 { - if m != nil { - return m.ValueUint - } - return 0 -} - type GetTiersRequest struct { // in the following format: "A5k2d9sFZw84yisTxRnz2bPRd1YPfVfhxqymZ6yESprFTG65" // you can get it with Account().SignKey.GetPublic().Account() OwnerAnyId string `protobuf:"bytes,1,opt,name=ownerAnyId,proto3" json:"ownerAnyId,omitempty"` Locale string `protobuf:"bytes,2,opt,name=locale,proto3" json:"locale,omitempty"` - // see PaymentMethod enum - PaymentMethod uint32 `protobuf:"varint,3,opt,name=paymentMethod,proto3" json:"paymentMethod,omitempty"` } func (m *GetTiersRequest) Reset() { *m = GetTiersRequest{} } @@ -172,13 +157,6 @@ func (m *GetTiersRequest) GetLocale() string { return "" } -func (m *GetTiersRequest) GetPaymentMethod() uint32 { - if m != nil { - return m.PaymentMethod - } - return 0 -} - type GetTiersRequestSigned struct { // GetTiersRequest struct Payload []byte `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"` @@ -261,9 +239,9 @@ type TierData struct { // somename.any - len of 8 AnyNameMinLength uint32 `protobuf:"varint,11,opt,name=anyNameMinLength,proto3" json:"anyNameMinLength,omitempty"` // each tier has a set of features - // each feature has a unique key: "storage", "invites", etc - // not using enum here to provide dynamic feature list - Features map[string]*Feature `protobuf:"bytes,12,rep,name=features,proto3" json:"features,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Features []*Feature `protobuf:"bytes,12,rep,name=features,proto3" json:"features,omitempty"` + // green, blue, red, purple or custom color in string format #ff00ff + ColorStr string `protobuf:"bytes,13,opt,name=colorStr,proto3" json:"colorStr,omitempty"` } func (m *TierData) Reset() { *m = TierData{} } @@ -376,13 +354,20 @@ func (m *TierData) GetAnyNameMinLength() uint32 { return 0 } -func (m *TierData) GetFeatures() map[string]*Feature { +func (m *TierData) GetFeatures() []*Feature { if m != nil { return m.Features } return nil } +func (m *TierData) GetColorStr() string { + if m != nil { + return m.ColorStr + } + return "" +} + type GetTiersResponse struct { // list of all available tiers Tiers []*TierData `protobuf:"bytes,1,rep,name=tiers,proto3" json:"tiers,omitempty"` @@ -434,7 +419,6 @@ func init() { proto.RegisterType((*GetTiersRequest)(nil), "GetTiersRequest") proto.RegisterType((*GetTiersRequestSigned)(nil), "GetTiersRequestSigned") proto.RegisterType((*TierData)(nil), "TierData") - proto.RegisterMapType((map[string]*Feature)(nil), "TierData.FeaturesEntry") proto.RegisterType((*GetTiersResponse)(nil), "GetTiersResponse") } @@ -443,46 +427,42 @@ func init() { } var fileDescriptor_597ac3048c641f44 = []byte{ - // 615 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x94, 0xcf, 0x4f, 0xdb, 0x4a, - 0x10, 0xc7, 0xe3, 0xfc, 0x80, 0x64, 0x92, 0x80, 0xdf, 0xf0, 0x78, 0xac, 0xd0, 0x93, 0x5f, 0x64, - 0xbd, 0x43, 0x44, 0xa5, 0x50, 0x41, 0x0f, 0x55, 0xd5, 0x0b, 0x05, 0xda, 0x22, 0x95, 0xb6, 0x5a, - 0xa0, 0x55, 0x7b, 0xa9, 0xb6, 0xf1, 0x14, 0x56, 0x24, 0xbb, 0xae, 0x77, 0x03, 0xf2, 0x5f, 0xd0, - 0x2b, 0x7f, 0x56, 0x8f, 0x1c, 0x7b, 0xac, 0xe0, 0x1f, 0xa9, 0xbc, 0x71, 0xe2, 0x84, 0x22, 0xf5, - 0x92, 0xec, 0xf7, 0xf3, 0xdd, 0x9d, 0x9d, 0xf1, 0x8c, 0x0d, 0x7b, 0xb1, 0x48, 0x87, 0xa4, 0xac, - 0xa1, 0xe4, 0x42, 0xf6, 0x69, 0x73, 0x5e, 0xc6, 0x89, 0xb6, 0x7a, 0xd3, 0xfd, 0x9a, 0x3b, 0xd6, - 0x27, 0x2b, 0x29, 0x31,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x2f, - 0xdc, 0x06, 0xbf, 0x18, 0x2d, 0x13, 0x6b, 0x65, 0x08, 0xff, 0x83, 0x9a, 0x7b, 0x67, 0x98, 0xe7, - 0x92, 0x69, 0x4c, 0x93, 0xe1, 0x63, 0xbe, 0x71, 0xe5, 0x01, 0x14, 0x1d, 0xc0, 0x55, 0xf8, 0xab, - 0x50, 0x27, 0xea, 0x5c, 0xe9, 0x4b, 0xe5, 0x97, 0x70, 0x0d, 0x56, 0x66, 0xf1, 0x40, 0x0e, 0xa5, - 0xa5, 0xc8, 0xf7, 0x10, 0x61, 0xa9, 0x30, 0xf6, 0x44, 0x6a, 0xfc, 0x32, 0xae, 0xc0, 0x72, 0xc1, - 0xde, 0x13, 0x9d, 0x1b, 0xbf, 0x82, 0x7f, 0x83, 0x5f, 0xc0, 0x43, 0xad, 0xec, 0x99, 0xf1, 0xab, - 0xf3, 0x5b, 0x3f, 0x90, 0x48, 0x8c, 0x5f, 0x7b, 0xf6, 0xf4, 0xfb, 0x4d, 0xe0, 0x5d, 0xdf, 0x04, - 0xde, 0xcf, 0x9b, 0xc0, 0xbb, 0xba, 0x0d, 0x4a, 0xd7, 0xb7, 0x41, 0xe9, 0xc7, 0x6d, 0x50, 0xfa, - 0x18, 0xfe, 0xf9, 0xc3, 0xf1, 0x79, 0xc1, 0xfd, 0x6d, 0xff, 0x0a, 0x00, 0x00, 0xff, 0xff, 0x0a, - 0xee, 0x4f, 0x49, 0x65, 0x04, 0x00, 0x00, + // 549 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x93, 0x4d, 0x6f, 0xd3, 0x4c, + 0x10, 0xc7, 0xe3, 0xa4, 0x2f, 0xce, 0x24, 0x6d, 0xfd, 0x6c, 0x9f, 0xc2, 0x0a, 0x21, 0x13, 0x59, + 0x1c, 0xa2, 0x56, 0x4a, 0x51, 0xcb, 0x91, 0x4b, 0x69, 0x04, 0x44, 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, 0x5b, 0x76, 0xfe, 0x73, 0x1d, 0x1c, 0x83, 0x57, + 0x2c, 0x88, 0x4e, 0xa5, 0xd0, 0x48, 0x9e, 0xc0, 0xba, 0xdd, 0x5d, 0xea, 0xd8, 0x94, 0xd5, 0xd6, + 0xec, 0xc2, 0xc3, 0x89, 0xbf, 0x7f, 0xe3, 0x00, 0x14, 0x73, 0x24, 0x7b, 0xf0, 0x5f, 0xa1, 0xce, + 0xc5, 0xa5, 0x90, 0xd7, 0xc2, 0x2b, 0x91, 0x87, 0xb0, 0xbb, 0x68, 0x27, 0x7c, 0xc0, 0x0d, 0xc6, + 0x9e, 0x43, 0x08, 0x6c, 0x17, 0xa0, 0xcd, 0x32, 0xed, 0x95, 0xc9, 0x2e, 0xec, 0x14, 0xde, 0x27, + 0xc4, 0x4b, 0xed, 0x55, 0xc8, 0xff, 0xe0, 0x15, 0xe6, 0x99, 0x14, 0xe6, 0x42, 0x7b, 0x6b, 0xcb, + 0x47, 0x3f, 0x23, 0x53, 0xda, 0x5b, 0x7f, 0xf9, 0xe2, 0xe7, 0xc8, 0x77, 0x6e, 0x47, 0xbe, 0xf3, + 0x67, 0xe4, 0x3b, 0x37, 0x63, 0xbf, 0x74, 0x3b, 0xf6, 0x4b, 0xbf, 0xc7, 0x7e, 0xe9, 0x4b, 0xf0, + 0xef, 0x1f, 0xf8, 0xdb, 0x86, 0x7d, 0x1d, 0xff, 0x0d, 0x00, 0x00, 0xff, 0xff, 0xfe, 0xc4, 0x11, + 0x59, 0xed, 0x03, 0x00, 0x00, } func (m *Feature) Marshal() (dAtA []byte, err error) { @@ -505,15 +485,10 @@ func (m *Feature) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.ValueUint != 0 { - i = encodeVarintPaymentserviceTiers(dAtA, i, uint64(m.ValueUint)) - i-- - dAtA[i] = 0x10 - } - if len(m.ValueStr) > 0 { - i -= len(m.ValueStr) - copy(dAtA[i:], m.ValueStr) - i = encodeVarintPaymentserviceTiers(dAtA, i, uint64(len(m.ValueStr))) + if len(m.Description) > 0 { + i -= len(m.Description) + copy(dAtA[i:], m.Description) + i = encodeVarintPaymentserviceTiers(dAtA, i, uint64(len(m.Description))) i-- dAtA[i] = 0xa } @@ -540,11 +515,6 @@ func (m *GetTiersRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.PaymentMethod != 0 { - i = encodeVarintPaymentserviceTiers(dAtA, i, uint64(m.PaymentMethod)) - i-- - dAtA[i] = 0x18 - } if len(m.Locale) > 0 { i -= len(m.Locale) copy(dAtA[i:], m.Locale) @@ -619,28 +589,23 @@ func (m *TierData) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.ColorStr) > 0 { + i -= len(m.ColorStr) + copy(dAtA[i:], m.ColorStr) + i = encodeVarintPaymentserviceTiers(dAtA, i, uint64(len(m.ColorStr))) + i-- + dAtA[i] = 0x6a + } if len(m.Features) > 0 { - for k := range m.Features { - v := m.Features[k] - baseI := i - if v != nil { - { - size, err := v.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintPaymentserviceTiers(dAtA, i, uint64(size)) + for iNdEx := len(m.Features) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Features[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x12 + i -= size + i = encodeVarintPaymentserviceTiers(dAtA, i, uint64(size)) } - i -= len(k) - copy(dAtA[i:], k) - i = encodeVarintPaymentserviceTiers(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = encodeVarintPaymentserviceTiers(dAtA, i, uint64(baseI-i)) i-- dAtA[i] = 0x62 } @@ -776,13 +741,10 @@ func (m *Feature) Size() (n int) { } var l int _ = l - l = len(m.ValueStr) + l = len(m.Description) if l > 0 { n += 1 + l + sovPaymentserviceTiers(uint64(l)) } - if m.ValueUint != 0 { - n += 1 + sovPaymentserviceTiers(uint64(m.ValueUint)) - } return n } @@ -800,9 +762,6 @@ func (m *GetTiersRequest) Size() (n int) { if l > 0 { n += 1 + l + sovPaymentserviceTiers(uint64(l)) } - if m.PaymentMethod != 0 { - n += 1 + sovPaymentserviceTiers(uint64(m.PaymentMethod)) - } return n } @@ -865,18 +824,15 @@ func (m *TierData) Size() (n int) { n += 1 + sovPaymentserviceTiers(uint64(m.AnyNameMinLength)) } if len(m.Features) > 0 { - for k, v := range m.Features { - _ = k - _ = v - l = 0 - if v != nil { - l = v.Size() - l += 1 + sovPaymentserviceTiers(uint64(l)) - } - mapEntrySize := 1 + len(k) + sovPaymentserviceTiers(uint64(len(k))) + l - n += mapEntrySize + 1 + sovPaymentserviceTiers(uint64(mapEntrySize)) + for _, e := range m.Features { + l = e.Size() + n += 1 + l + sovPaymentserviceTiers(uint64(l)) } } + l = len(m.ColorStr) + if l > 0 { + n += 1 + l + sovPaymentserviceTiers(uint64(l)) + } return n } @@ -932,7 +888,7 @@ func (m *Feature) Unmarshal(dAtA []byte) error { switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ValueStr", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -960,27 +916,8 @@ func (m *Feature) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.ValueStr = string(dAtA[iNdEx:postIndex]) + m.Description = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ValueUint", wireType) - } - m.ValueUint = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPaymentserviceTiers - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ValueUint |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } default: iNdEx = preIndex skippy, err := skipPaymentserviceTiers(dAtA[iNdEx:]) @@ -1095,25 +1032,6 @@ func (m *GetTiersRequest) Unmarshal(dAtA []byte) error { } m.Locale = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field PaymentMethod", wireType) - } - m.PaymentMethod = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPaymentserviceTiers - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.PaymentMethod |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } default: iNdEx = preIndex skippy, err := skipPaymentserviceTiers(dAtA[iNdEx:]) @@ -1549,105 +1467,42 @@ func (m *TierData) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Features == nil { - m.Features = make(map[string]*Feature) + m.Features = append(m.Features, &Feature{}) + if err := m.Features[len(m.Features)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err } - var mapkey string - var mapvalue *Feature - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPaymentserviceTiers - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } + iNdEx = postIndex + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ColorStr", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPaymentserviceTiers } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPaymentserviceTiers - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthPaymentserviceTiers - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthPaymentserviceTiers - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPaymentserviceTiers - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapmsglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthPaymentserviceTiers - } - postmsgIndex := iNdEx + mapmsglen - if postmsgIndex < 0 { - return ErrInvalidLengthPaymentserviceTiers - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue = &Feature{} - if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - } else { - iNdEx = entryPreIndex - skippy, err := skipPaymentserviceTiers(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthPaymentserviceTiers - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break } } - m.Features[mapkey] = mapvalue + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthPaymentserviceTiers + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPaymentserviceTiers + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ColorStr = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex diff --git a/paymentservice/paymentserviceproto/protos/paymentservice_tiers.proto b/paymentservice/paymentserviceproto/protos/paymentservice_tiers.proto index a4e78a58..b3159ffc 100644 --- a/paymentservice/paymentserviceproto/protos/paymentservice_tiers.proto +++ b/paymentservice/paymentserviceproto/protos/paymentservice_tiers.proto @@ -12,14 +12,7 @@ enum PeriodType { } message Feature { - // "invites" - // "GBs" - // "spaces" - // ... - string valueStr = 1; - - // each uint is a value of the feature - uint32 valueUint = 2; + string description = 1; } message GetTiersRequest { @@ -28,9 +21,6 @@ message GetTiersRequest { string ownerAnyId = 1; string locale = 2; - - // see PaymentMethod enum - uint32 paymentMethod = 3; } message GetTiersRequestSigned { @@ -68,9 +58,9 @@ message TierData { // somename.any - len of 8 uint32 anyNameMinLength = 11; // each tier has a set of features - // each feature has a unique key: "storage", "invites", etc - // not using enum here to provide dynamic feature list - map features = 12; + repeated Feature features = 12; + // green, blue, red, purple or custom color in string format #ff00ff + string colorStr = 13; } message GetTiersResponse { From 36929fc83b62967aa86e0e1cbb0f77d28eb75480 Mon Sep 17 00:00:00 2001 From: Sergey Cherepanov Date: Tue, 2 Apr 2024 14:21:29 +0200 Subject: [PATCH 079/140] coordinatorproto: aclHeads to spaceMakeUnshareable --- commonspace/spaceutils_test.go | 2 +- .../coordinatorclient/coordinatorclient.go | 10 +- .../mock_coordinatorclient.go | 8 +- .../coordinatorproto/coordinator.pb.go | 335 +++++++++--------- .../coordinatorproto/protos/coordinator.proto | 2 +- 5 files changed, 179 insertions(+), 178 deletions(-) diff --git a/commonspace/spaceutils_test.go b/commonspace/spaceutils_test.go index 5cd0ac3f..05dcb012 100644 --- a/commonspace/spaceutils_test.go +++ b/commonspace/spaceutils_test.go @@ -383,7 +383,7 @@ func (m mockCoordinatorClient) SpaceMakeShareable(ctx context.Context, spaceId s return nil } -func (m mockCoordinatorClient) SpaceMakeUnshareable(ctx context.Context, spaceId string) (err error) { +func (m mockCoordinatorClient) SpaceMakeUnshareable(ctx context.Context, spaceId, aclId string) (err error) { return nil } diff --git a/coordinator/coordinatorclient/coordinatorclient.go b/coordinator/coordinatorclient/coordinatorclient.go index db5de6a4..b9b9056b 100644 --- a/coordinator/coordinatorclient/coordinatorclient.go +++ b/coordinator/coordinatorclient/coordinatorclient.go @@ -37,8 +37,8 @@ type CoordinatorClient interface { StatusCheckMany(ctx context.Context, spaceIds []string) (statuses []*coordinatorproto.SpaceStatusPayload, err error) StatusCheck(ctx context.Context, spaceId string) (status *coordinatorproto.SpaceStatusPayload, err error) SpaceSign(ctx context.Context, payload SpaceSignPayload) (receipt *coordinatorproto.SpaceReceiptWithSignature, err error) - SpaceMakeShareable(ctx context.Context, spaceId, aclHead string) (err error) - SpaceMakeUnshareable(ctx context.Context, spaceId string) (err error) + SpaceMakeShareable(ctx context.Context, spaceId string) (err error) + SpaceMakeUnshareable(ctx context.Context, spaceId, aclId string) (err error) NetworkConfiguration(ctx context.Context, currentId string) (*coordinatorproto.NetworkConfigurationResponse, error) DeletionLog(ctx context.Context, lastRecordId string, limit int) (records []*coordinatorproto.DeletionLogRecord, err error) @@ -304,11 +304,10 @@ func (c *coordinatorClient) AccountLimitsSet(ctx context.Context, req *coordinat }) } -func (c *coordinatorClient) SpaceMakeShareable(ctx context.Context, spaceId, aclHead string) (err error) { +func (c *coordinatorClient) SpaceMakeShareable(ctx context.Context, spaceId string) (err error) { return c.doClient(ctx, func(cl coordinatorproto.DRPCCoordinatorClient) error { if _, err := cl.SpaceMakeShareable(ctx, &coordinatorproto.SpaceMakeShareableRequest{ SpaceId: spaceId, - AclHead: aclHead, }); err != nil { return rpcerr.Unwrap(err) } @@ -316,10 +315,11 @@ func (c *coordinatorClient) SpaceMakeShareable(ctx context.Context, spaceId, acl }) } -func (c *coordinatorClient) SpaceMakeUnshareable(ctx context.Context, spaceId string) (err error) { +func (c *coordinatorClient) SpaceMakeUnshareable(ctx context.Context, spaceId, aclHead string) (err error) { return c.doClient(ctx, func(cl coordinatorproto.DRPCCoordinatorClient) error { if _, err := cl.SpaceMakeUnshareable(ctx, &coordinatorproto.SpaceMakeUnshareableRequest{ SpaceId: spaceId, + AclHead: aclHead, }); err != nil { return rpcerr.Unwrap(err) } diff --git a/coordinator/coordinatorclient/mock_coordinatorclient/mock_coordinatorclient.go b/coordinator/coordinatorclient/mock_coordinatorclient/mock_coordinatorclient.go index 762ce53b..0513a362 100644 --- a/coordinator/coordinatorclient/mock_coordinatorclient/mock_coordinatorclient.go +++ b/coordinator/coordinatorclient/mock_coordinatorclient/mock_coordinatorclient.go @@ -233,17 +233,17 @@ func (mr *MockCoordinatorClientMockRecorder) SpaceMakeShareable(arg0, arg1 any) } // SpaceMakeUnshareable mocks base method. -func (m *MockCoordinatorClient) SpaceMakeUnshareable(arg0 context.Context, arg1 string) error { +func (m *MockCoordinatorClient) SpaceMakeUnshareable(arg0 context.Context, arg1, arg2 string) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "SpaceMakeUnshareable", arg0, arg1) + ret := m.ctrl.Call(m, "SpaceMakeUnshareable", arg0, arg1, arg2) ret0, _ := ret[0].(error) return ret0 } // SpaceMakeUnshareable indicates an expected call of SpaceMakeUnshareable. -func (mr *MockCoordinatorClientMockRecorder) SpaceMakeUnshareable(arg0, arg1 any) *gomock.Call { +func (mr *MockCoordinatorClientMockRecorder) SpaceMakeUnshareable(arg0, arg1, arg2 any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SpaceMakeUnshareable", reflect.TypeOf((*MockCoordinatorClient)(nil).SpaceMakeUnshareable), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SpaceMakeUnshareable", reflect.TypeOf((*MockCoordinatorClient)(nil).SpaceMakeUnshareable), arg0, arg1, arg2) } // SpaceSign mocks base method. diff --git a/coordinator/coordinatorproto/coordinator.pb.go b/coordinator/coordinatorproto/coordinator.pb.go index 6bed9f75..0d01c121 100644 --- a/coordinator/coordinatorproto/coordinator.pb.go +++ b/coordinator/coordinatorproto/coordinator.pb.go @@ -920,7 +920,6 @@ func (m *SpaceStatusChangeResponse) GetPayload() *SpaceStatusPayload { type SpaceMakeShareableRequest struct { SpaceId string `protobuf:"bytes,1,opt,name=spaceId,proto3" json:"spaceId,omitempty"` - AclHead string `protobuf:"bytes,2,opt,name=aclHead,proto3" json:"aclHead,omitempty"` } func (m *SpaceMakeShareableRequest) Reset() { *m = SpaceMakeShareableRequest{} } @@ -963,13 +962,6 @@ func (m *SpaceMakeShareableRequest) GetSpaceId() string { return "" } -func (m *SpaceMakeShareableRequest) GetAclHead() string { - if m != nil { - return m.AclHead - } - return "" -} - type SpaceMakeShareableResponse struct { } @@ -1008,6 +1000,7 @@ var xxx_messageInfo_SpaceMakeShareableResponse proto.InternalMessageInfo type SpaceMakeUnshareableRequest struct { SpaceId string `protobuf:"bytes,1,opt,name=spaceId,proto3" json:"spaceId,omitempty"` + AclHead string `protobuf:"bytes,2,opt,name=aclHead,proto3" json:"aclHead,omitempty"` } func (m *SpaceMakeUnshareableRequest) Reset() { *m = SpaceMakeUnshareableRequest{} } @@ -1050,6 +1043,13 @@ func (m *SpaceMakeUnshareableRequest) GetSpaceId() string { return "" } +func (m *SpaceMakeUnshareableRequest) GetAclHead() string { + if m != nil { + return m.AclHead + } + return "" +} + type SpaceMakeUnshareableResponse struct { } @@ -2329,122 +2329,123 @@ func init() { } var fileDescriptor_d94f6f99586adae2 = []byte{ - // 1840 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x58, 0xcd, 0x73, 0x13, 0x47, - 0x16, 0xd7, 0x8c, 0x65, 0x5b, 0x7a, 0xb2, 0xcd, 0xb8, 0x6d, 0x83, 0x10, 0x42, 0x98, 0x59, 0x16, - 0x8c, 0x76, 0x0b, 0x58, 0xb1, 0x5f, 0x14, 0x5b, 0xb5, 0x18, 0xf3, 0x11, 0x11, 0xfc, 0x51, 0x23, - 0x0c, 0x55, 0xc9, 0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, 0x45, 0xa5, - 0x60, 0xa3, 0x9c, 0x19, 0x3d, 0xd1, 0xc7, 0xa5, 0x2c, 0xe6, 0x75, 0x8d, 0xcf, 0x61, 0x3e, 0x51, - 0x99, 0xd1, 0xe5, 0x84, 0x4a, 0x5e, 0x77, 0x58, 0x33, 0x27, 0x89, 0x48, 0xbb, 0x24, 0xee, 0xa4, - 0x92, 0xcd, 0x0d, 0xba, 0x9e, 0xa7, 0x9c, 0xdb, 0x20, 0xd5, 0x9a, 0xa7, 0x11, 0x95, 0xfb, 0x75, - 0x60, 0x4e, 0x6d, 0x70, 0xd0, 0x6a, 0x4a, 0x37, 0xd3, 0x46, 0xd5, 0x2e, 0x4f, 0x90, 0x50, 0xc1, - 0x51, 0x7a, 0x93, 0x0c, 0x38, 0xd9, 0x1e, 0x28, 0x03, 0x4e, 0x5e, 0x6b, 0xf3, 0x92, 0xbf, 0x75, - 0xc9, 0x27, 0x3b, 0x55, 0x8b, 0xc6, 0xb4, 0x37, 0xa9, 0x5a, 0x34, 0xee, 0xdd, 0xbf, 0xff, 0xef, - 0xdf, 0xde, 0x35, 0xb4, 0x37, 0xef, 0x1a, 0xda, 0xdb, 0x77, 0x0d, 0xed, 0xeb, 0xf7, 0x8d, 0xc2, - 0x9b, 0xf7, 0x8d, 0xc2, 0xef, 0xef, 0x1b, 0x85, 0xcf, 0xea, 0x93, 0x3e, 0xed, 0xef, 0xcd, 0x88, - 0x7f, 0xb7, 0xff, 0x08, 0x00, 0x00, 0xff, 0xff, 0xe2, 0x79, 0x16, 0xfd, 0x01, 0x18, 0x00, 0x00, + // 1842 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x58, 0xcd, 0x73, 0x13, 0xc7, + 0x12, 0xd7, 0xae, 0x65, 0x5b, 0x6a, 0xd9, 0x66, 0x3d, 0xb6, 0x41, 0x08, 0x21, 0xcc, 0x3e, 0x1e, + 0x18, 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13, 0xc6, 0xc0, 0x94, 0xb1, 0x89, 0x23, 0xdf, + 0x36, 0x54, 0x94, 0x84, 0x40, 0x17, 0xc6, 0xb7, 0xb5, 0xa1, 0xea, 0xd5, 0xf1, 0x02, 0x23, 0x8d, + 0x4a, 0xc1, 0x46, 0x39, 0x33, 0x7a, 0xa2, 0x8f, 0x4b, 0x69, 0xcc, 0xeb, 0x1a, 0x9f, 0xc3, 0x7c, + 0xa2, 0x32, 0xa3, 0x8b, 0x89, 0x2d, 0x79, 0xdd, 0x61, 0xcd, 0x9c, 0x24, 0x22, 0xf5, 0x92, 0xb8, + 0x93, 0x4a, 0x36, 0x37, 0xe8, 0x6a, 0xde, 0xe6, 0xdc, 0x06, 0xa9, 0xd6, 0x3c, 0x89, 0xa8, 0xb4, + 0xd7, 0x81, 0x39, 0xb5, 0xc1, 0x41, 0xab, 0xa9, 0xbd, 0x99, 0x36, 0xaa, 0x76, 0x71, 0x82, 0x84, + 0x0a, 0x8e, 0xd2, 0x9b, 0x64, 0xc0, 0xc9, 0xf6, 0x40, 0x19, 0x70, 0xf2, 0x5a, 0x9b, 0x97, 0xfc, + 0xad, 0x4b, 0x3e, 0xd9, 0xa9, 0x5a, 0x34, 0xa6, 0xbd, 0x49, 0xd5, 0xa2, 0x71, 0xef, 0xfe, 0xbd, + 0xff, 0xfc, 0xfe, 0xae, 0xa1, 0xbd, 0x79, 0xd7, 0xd0, 0xde, 0xbe, 0x6b, 0x68, 0xdf, 0xbc, 0x6f, + 0x14, 0xde, 0xbc, 0x6f, 0x14, 0xfe, 0x78, 0xdf, 0x28, 0x7c, 0x5e, 0x9f, 0xf4, 0x69, 0x7f, 0x77, + 0x46, 0xfc, 0xbb, 0xf9, 0x67, 0x00, 0x00, 0x00, 0xff, 0xff, 0xa3, 0x7e, 0x5e, 0x31, 0x01, 0x18, + 0x00, 0x00, } func (m *SpaceSignRequest) Marshal() (dAtA []byte, err error) { @@ -2967,13 +2968,6 @@ func (m *SpaceMakeShareableRequest) MarshalToSizedBuffer(dAtA []byte) (int, erro _ = i var l int _ = l - if len(m.AclHead) > 0 { - i -= len(m.AclHead) - copy(dAtA[i:], m.AclHead) - i = encodeVarintCoordinator(dAtA, i, uint64(len(m.AclHead))) - i-- - dAtA[i] = 0x12 - } if len(m.SpaceId) > 0 { i -= len(m.SpaceId) copy(dAtA[i:], m.SpaceId) @@ -3027,6 +3021,13 @@ func (m *SpaceMakeUnshareableRequest) MarshalToSizedBuffer(dAtA []byte) (int, er _ = i var l int _ = l + if len(m.AclHead) > 0 { + i -= len(m.AclHead) + copy(dAtA[i:], m.AclHead) + i = encodeVarintCoordinator(dAtA, i, uint64(len(m.AclHead))) + i-- + dAtA[i] = 0x12 + } if len(m.SpaceId) > 0 { i -= len(m.SpaceId) copy(dAtA[i:], m.SpaceId) @@ -4132,10 +4133,6 @@ func (m *SpaceMakeShareableRequest) Size() (n int) { if l > 0 { n += 1 + l + sovCoordinator(uint64(l)) } - l = len(m.AclHead) - if l > 0 { - n += 1 + l + sovCoordinator(uint64(l)) - } return n } @@ -4158,6 +4155,10 @@ func (m *SpaceMakeUnshareableRequest) Size() (n int) { if l > 0 { n += 1 + l + sovCoordinator(uint64(l)) } + l = len(m.AclHead) + if l > 0 { + n += 1 + l + sovCoordinator(uint64(l)) + } return n } @@ -6064,38 +6065,6 @@ func (m *SpaceMakeShareableRequest) Unmarshal(dAtA []byte) error { } m.SpaceId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AclHead", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCoordinator - } - 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 ErrInvalidLengthCoordinator - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCoordinator - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AclHead = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipCoordinator(dAtA[iNdEx:]) @@ -6228,6 +6197,38 @@ func (m *SpaceMakeUnshareableRequest) Unmarshal(dAtA []byte) error { } m.SpaceId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AclHead", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCoordinator + } + 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 ErrInvalidLengthCoordinator + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthCoordinator + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AclHead = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipCoordinator(dAtA[iNdEx:]) diff --git a/coordinator/coordinatorproto/protos/coordinator.proto b/coordinator/coordinatorproto/protos/coordinator.proto index 2fd9909e..524b0b11 100644 --- a/coordinator/coordinatorproto/protos/coordinator.proto +++ b/coordinator/coordinatorproto/protos/coordinator.proto @@ -156,13 +156,13 @@ message SpaceStatusChangeResponse { message SpaceMakeShareableRequest { string spaceId = 1; - string aclHead = 2; } message SpaceMakeShareableResponse {} message SpaceMakeUnshareableRequest { string spaceId = 1; + string aclHead = 2; } message SpaceMakeUnshareableResponse {} From ad704c85eba989f41a25b8d521554e4e390d5a6f Mon Sep 17 00:00:00 2001 From: Sergey Cherepanov Date: Tue, 2 Apr 2024 14:24:26 +0200 Subject: [PATCH 080/140] coordinatorproto: ErrAclHeadIsMissing --- coordinator/coordinatorproto/errors.go | 1 + 1 file changed, 1 insertion(+) diff --git a/coordinator/coordinatorproto/errors.go b/coordinator/coordinatorproto/errors.go index dba975f4..4af2dcc4 100644 --- a/coordinator/coordinatorproto/errors.go +++ b/coordinator/coordinatorproto/errors.go @@ -17,4 +17,5 @@ var ( ErrSpaceLimitReached = errGroup.Register(errors.New("space limit reached"), uint64(ErrorCodes_SpaceLimitReached)) ErrAccountIsDeleted = errGroup.Register(errors.New("account is deleted"), uint64(ErrorCodes_AccountDeleted)) ErrForbidden = errGroup.Register(errors.New("forbidden"), uint64(ErrorCodes_Forbidden)) + ErrAclHeadIsMissing = errGroup.Register(errors.New("acl head is missing"), uint64(ErrorCodes_AclHeadIsMissing)) ) From ccbb8caecd6e3a6b5ace7f3a042363f752943cec Mon Sep 17 00:00:00 2001 From: Sergey Cherepanov Date: Tue, 2 Apr 2024 14:36:17 +0200 Subject: [PATCH 081/140] aclService: readState method --- acl/acl.go | 11 +++++++++++ acl/acl_test.go | 26 ++++++++++++++++++++++++++ acl/mock_acl/mock_acl.go | 14 ++++++++++++++ 3 files changed, 51 insertions(+) diff --git a/acl/acl.go b/acl/acl.go index eba12910..e0de0a9d 100644 --- a/acl/acl.go +++ b/acl/acl.go @@ -39,6 +39,7 @@ type AclService interface { RecordsAfter(ctx context.Context, spaceId, aclHead string) (result []*consensusproto.RawRecordWithId, err error) Permissions(ctx context.Context, identity crypto.PubKey, spaceId string) (res list.AclPermissions, err error) OwnerPubKey(ctx context.Context, spaceId string) (ownerIdentity crypto.PubKey, err error) + ReadState(ctx context.Context, spaceId string, f func(s *list.AclState) error) (err error) app.ComponentRunnable } @@ -159,6 +160,16 @@ func (as *aclService) Permissions(ctx context.Context, identity crypto.PubKey, s return acl.AclState().Permissions(identity), nil } +func (as *aclService) ReadState(ctx context.Context, spaceId string, f func(s *list.AclState) error) (err error) { + acl, err := as.get(ctx, spaceId) + if err != nil { + return + } + acl.RLock() + defer acl.RUnlock() + return f(acl.AclState()) +} + func (as *aclService) Run(ctx context.Context) (err error) { return } diff --git a/acl/acl_test.go b/acl/acl_test.go index 3e835a98..0ff4fb81 100644 --- a/acl/acl_test.go +++ b/acl/acl_test.go @@ -149,6 +149,32 @@ func TestAclService(t *testing.T) { }) } +func TestAclService_ReadState(t *testing.T) { + ownerKeys, err := accountdata.NewRandom() + require.NoError(t, err) + spaceId := "spaceId" + ownerAcl, err := list.NewTestDerivedAcl(spaceId, ownerKeys) + require.NoError(t, err) + + fx := newFixture(t) + defer fx.finish(t) + + fx.consCl.EXPECT().Watch(spaceId, gomock.Any()).DoAndReturn(func(spaceId string, w consensusclient.Watcher) error { + go func() { + w.AddConsensusRecords([]*consensusproto.RawRecordWithId{ + ownerAcl.Root(), + }) + }() + return nil + }) + fx.consCl.EXPECT().UnWatch(spaceId) + + require.NoError(t, fx.ReadState(ctx, spaceId, func(s *list.AclState) error { + assert.NotNil(t, s) + return nil + })) +} + func newFixture(t *testing.T) *fixture { ctrl := gomock.NewController(t) fx := &fixture{ diff --git a/acl/mock_acl/mock_acl.go b/acl/mock_acl/mock_acl.go index a70ab70c..8051e62e 100644 --- a/acl/mock_acl/mock_acl.go +++ b/acl/mock_acl/mock_acl.go @@ -131,6 +131,20 @@ func (mr *MockAclServiceMockRecorder) Permissions(arg0, arg1, arg2 any) *gomock. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Permissions", reflect.TypeOf((*MockAclService)(nil).Permissions), arg0, arg1, arg2) } +// ReadState mocks base method. +func (m *MockAclService) ReadState(arg0 context.Context, arg1 string, arg2 func(*list.AclState) error) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "ReadState", arg0, arg1, arg2) + ret0, _ := ret[0].(error) + return ret0 +} + +// ReadState indicates an expected call of ReadState. +func (mr *MockAclServiceMockRecorder) ReadState(arg0, arg1, arg2 any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReadState", reflect.TypeOf((*MockAclService)(nil).ReadState), arg0, arg1, arg2) +} + // RecordsAfter mocks base method. func (m *MockAclService) RecordsAfter(arg0 context.Context, arg1, arg2 string) ([]*consensusproto.RawRecordWithId, error) { m.ctrl.T.Helper() From b731b57ed9a5be3f40298f0be11e9bbc9fcbf0c4 Mon Sep 17 00:00:00 2001 From: Sergey Cherepanov Date: Tue, 2 Apr 2024 14:46:18 +0200 Subject: [PATCH 082/140] aclService: hasRecord method --- acl/acl.go | 18 ++++++++++++++++++ acl/acl_test.go | 29 +++++++++++++++++++++++++++++ acl/mock_acl/mock_acl.go | 15 +++++++++++++++ 3 files changed, 62 insertions(+) diff --git a/acl/acl.go b/acl/acl.go index e0de0a9d..c6ab1bae 100644 --- a/acl/acl.go +++ b/acl/acl.go @@ -40,6 +40,7 @@ type AclService interface { Permissions(ctx context.Context, identity crypto.PubKey, spaceId string) (res list.AclPermissions, err error) OwnerPubKey(ctx context.Context, spaceId string) (ownerIdentity crypto.PubKey, err error) ReadState(ctx context.Context, spaceId string, f func(s *list.AclState) error) (err error) + HasRecord(ctx context.Context, spaceId, recordId string) (has bool, err error) app.ComponentRunnable } @@ -170,6 +171,23 @@ func (as *aclService) ReadState(ctx context.Context, spaceId string, f func(s *l return f(acl.AclState()) } +func (as *aclService) HasRecord(ctx context.Context, spaceId, recordId string) (has bool, err error) { + acl, err := as.get(ctx, spaceId) + if err != nil { + return + } + acl.RLock() + defer acl.RUnlock() + acl.Iterate(func(record *list.AclRecord) (isContinue bool) { + if record.Id == recordId { + has = true + return false + } + return true + }) + return +} + func (as *aclService) Run(ctx context.Context) (err error) { return } diff --git a/acl/acl_test.go b/acl/acl_test.go index 0ff4fb81..e1764b3b 100644 --- a/acl/acl_test.go +++ b/acl/acl_test.go @@ -175,6 +175,35 @@ func TestAclService_ReadState(t *testing.T) { })) } +func TestAclService_HasRecord(t *testing.T) { + ownerKeys, err := accountdata.NewRandom() + require.NoError(t, err) + spaceId := "spaceId" + ownerAcl, err := list.NewTestDerivedAcl(spaceId, ownerKeys) + require.NoError(t, err) + + fx := newFixture(t) + defer fx.finish(t) + + fx.consCl.EXPECT().Watch(spaceId, gomock.Any()).DoAndReturn(func(spaceId string, w consensusclient.Watcher) error { + go func() { + w.AddConsensusRecords([]*consensusproto.RawRecordWithId{ + ownerAcl.Root(), + }) + }() + return nil + }) + fx.consCl.EXPECT().UnWatch(spaceId) + + has, err := fx.HasRecord(ctx, spaceId, ownerAcl.Root().Id) + require.NoError(t, err) + assert.True(t, has) + + has, err = fx.HasRecord(ctx, spaceId, "non-exists") + require.NoError(t, err) + assert.False(t, has) +} + func newFixture(t *testing.T) *fixture { ctrl := gomock.NewController(t) fx := &fixture{ diff --git a/acl/mock_acl/mock_acl.go b/acl/mock_acl/mock_acl.go index 8051e62e..14db24ca 100644 --- a/acl/mock_acl/mock_acl.go +++ b/acl/mock_acl/mock_acl.go @@ -73,6 +73,21 @@ func (mr *MockAclServiceMockRecorder) Close(arg0 any) *gomock.Call { return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockAclService)(nil).Close), arg0) } +// HasRecord mocks base method. +func (m *MockAclService) HasRecord(arg0 context.Context, arg1, arg2 string) (bool, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "HasRecord", arg0, arg1, arg2) + ret0, _ := ret[0].(bool) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// HasRecord indicates an expected call of HasRecord. +func (mr *MockAclServiceMockRecorder) HasRecord(arg0, arg1, arg2 any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HasRecord", reflect.TypeOf((*MockAclService)(nil).HasRecord), arg0, arg1, arg2) +} + // Init mocks base method. func (m *MockAclService) Init(arg0 *app.App) error { m.ctrl.T.Helper() From 53d7e3d745ac3059494c9579c5e649a8d402b26f Mon Sep 17 00:00:00 2001 From: Sergey Cherepanov Date: Tue, 2 Apr 2024 15:11:54 +0200 Subject: [PATCH 083/140] coordinatorproto: ErrAclNonEmpty --- .../coordinatorproto/coordinator.pb.go | 238 +++++++++--------- coordinator/coordinatorproto/errors.go | 1 + .../coordinatorproto/protos/coordinator.proto | 1 + 3 files changed, 123 insertions(+), 117 deletions(-) diff --git a/coordinator/coordinatorproto/coordinator.pb.go b/coordinator/coordinatorproto/coordinator.pb.go index 0d01c121..e496a358 100644 --- a/coordinator/coordinatorproto/coordinator.pb.go +++ b/coordinator/coordinatorproto/coordinator.pb.go @@ -34,6 +34,7 @@ const ( ErrorCodes_AccountDeleted ErrorCodes = 6 ErrorCodes_Forbidden ErrorCodes = 7 ErrorCodes_AclHeadIsMissing ErrorCodes = 8 + ErrorCodes_AclNonEmpty ErrorCodes = 9 ErrorCodes_ErrorOffset ErrorCodes = 300 ) @@ -47,6 +48,7 @@ var ErrorCodes_name = map[int32]string{ 6: "AccountDeleted", 7: "Forbidden", 8: "AclHeadIsMissing", + 9: "AclNonEmpty", 300: "ErrorOffset", } @@ -60,6 +62,7 @@ var ErrorCodes_value = map[string]int32{ "AccountDeleted": 6, "Forbidden": 7, "AclHeadIsMissing": 8, + "AclNonEmpty": 9, "ErrorOffset": 300, } @@ -2329,123 +2332,124 @@ func init() { } var fileDescriptor_d94f6f99586adae2 = []byte{ - // 1842 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x58, 0xcd, 0x73, 0x13, 0xc7, - 0x12, 0xd7, 0xae, 0x65, 0x5b, 0x6a, 0xd9, 0x66, 0x3d, 0xb6, 0x41, 0x08, 0x21, 0xcc, 0x3e, 0x1e, - 0x18, 0xbd, 0x57, 0xc0, 0x13, 0x8f, 0x57, 0x8f, 0xe2, 0x55, 0x3d, 0x8c, 0xf9, 0x88, 0x08, 0x36, - 0xce, 0x0a, 0x43, 0x55, 0x72, 0xa0, 0xd6, 0xbb, 0x63, 0x79, 0xcb, 0xd2, 0xac, 0x32, 0x3b, 0xc2, - 0xf8, 0x9c, 0x63, 0x2e, 0xb9, 0xe5,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9f, 0xc3, 0x7c, - 0xa2, 0x32, 0xa3, 0x8b, 0x89, 0x2d, 0x79, 0xdd, 0x61, 0xcd, 0x9c, 0x24, 0x22, 0xf5, 0x92, 0xb8, - 0x93, 0x4a, 0x36, 0x37, 0xe8, 0x6a, 0xde, 0xe6, 0xdc, 0x06, 0xa9, 0xd6, 0x3c, 0x89, 0xa8, 0xb4, - 0xd7, 0x81, 0x39, 0xb5, 0xc1, 0x41, 0xab, 0xa9, 0xbd, 0x99, 0x36, 0xaa, 0x76, 0x71, 0x82, 0x84, - 0x0a, 0x8e, 0xd2, 0x9b, 0x64, 0xc0, 0xc9, 0xf6, 0x40, 0x19, 0x70, 0xf2, 0x5a, 0x9b, 0x97, 0xfc, - 0xad, 0x4b, 0x3e, 0xd9, 0xa9, 0x5a, 0x34, 0xa6, 0xbd, 0x49, 0xd5, 0xa2, 0x71, 0xef, 0xfe, 0xbd, - 0xff, 0xfc, 0xfe, 0xae, 0xa1, 0xbd, 0x79, 0xd7, 0xd0, 0xde, 0xbe, 0x6b, 0x68, 0xdf, 0xbc, 0x6f, - 0x14, 0xde, 0xbc, 0x6f, 0x14, 0xfe, 0x78, 0xdf, 0x28, 0x7c, 0x5e, 0x9f, 0xf4, 0x69, 0x7f, 0x77, - 0x46, 0xfc, 0xbb, 0xf9, 0x67, 0x00, 0x00, 0x00, 0xff, 0xff, 0xa3, 0x7e, 0x5e, 0x31, 0x01, 0x18, - 0x00, 0x00, + // 1857 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x58, 0xcd, 0x73, 0x13, 0xc9, + 0x15, 0xd7, 0x8c, 0x65, 0x5b, 0x7a, 0xb2, 0xcd, 0xb8, 0x6d, 0x83, 0x10, 0x42, 0x98, 0x09, 0x01, + 0xa3, 0xa4, 0x80, 0x88, 0x90, 0x0a, 0x45, 0xaa, 0x82, 0x31, 0x1f, 0x11, 0xc1, 0xc6,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 0xce, 0x4f, 0x94, 0x42, + 0xb7, 0x60, 0x25, 0x50, 0x98, 0x12, 0x79, 0x61, 0x6a, 0xc1, 0xca, 0x63, 0xa1, 0x3a, 0x94, 0x83, + 0x38, 0x9a, 0xc2, 0xa8, 0x1c, 0x13, 0xcc, 0x2f, 0x35, 0x58, 0x50, 0xad, 0x4d, 0x8f, 0xed, 0x01, + 0xc6, 0xb4, 0xed, 0x0a, 0x2d, 0x65, 0x4b, 0xae, 0xd0, 0x06, 0x9c, 0xb1, 0x1d, 0xc7, 0x1f, 0x12, + 0x96, 0x8a, 0xef, 0x34, 0x99, 0xbb, 0x42, 0x30, 0x3b, 0xf6, 0xe9, 0x51, 0xdb, 0x15, 0x37, 0x50, + 0xb6, 0xc6, 0x04, 0xd4, 0x00, 0x78, 0x63, 0xf7, 0x3c, 0x77, 0x8f, 0x30, 0xaf, 0x27, 0xc0, 0x2e, + 0x5a, 0x0a, 0xc5, 0xbc, 0x0d, 0xe7, 0x94, 0x10, 0xda, 0x3a, 0xc4, 0xce, 0xd1, 0x89, 0x09, 0x69, + 0xee, 0x41, 0x35, 0xbb, 0x49, 0x5e, 0xd5, 0x5d, 0x98, 0x1f, 0x28, 0xf8, 0x55, 0x5a, 0x97, 0x26, + 0xc5, 0xab, 0xc4, 0xd2, 0x8a, 0xe4, 0xcd, 0xbb, 0x70, 0x21, 0xad, 0x76, 0xdb, 0x26, 0xa3, 0xc8, + 0x9f, 0x1a, 0x94, 0xa4, 0x03, 0x3c, 0x15, 0x66, 0x36, 0xca, 0x56, 0xbc, 0x36, 0xff, 0x05, 0xf5, + 0xfc, 0xad, 0xd2, 0xab, 0x7b, 0x50, 0x92, 0x56, 0xc2, 0xbd, 0xa7, 0x70, 0x2b, 0xde, 0x60, 0xbe, + 0xd7, 0x52, 0xe7, 0xb5, 0x49, 0x17, 0x9f, 0x5c, 0xb6, 0x94, 0x34, 0x94, 0x3a, 0xe3, 0x5b, 0xce, + 0x32, 0xf8, 0x85, 0xa7, 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62, 0xcc, + 0xa3, 0x55, 0x30, 0x36, 0xc3, 0x90, 0x68, 0x07, 0xdb, 0x7c, 0xec, 0x24, 0x5d, 0xa3, 0x84, 0xce, + 0x40, 0x65, 0xd3, 0xe9, 0xed, 0xf8, 0xe4, 0x51, 0x7f, 0xc0, 0x46, 0x46, 0x19, 0x19, 0x50, 0x11, + 0x07, 0x7a, 0x7e, 0x70, 0x10, 0x60, 0x66, 0x7c, 0xa5, 0x37, 0xff, 0xaf, 0xc9, 0x41, 0x3d, 0x7c, + 0x17, 0xd0, 0xd9, 0xc4, 0x84, 0x1d, 0xb9, 0x5b, 0x40, 0x0d, 0xd9, 0x6f, 0xca, 0x2e, 0x36, 0x3c, + 0x58, 0x74, 0x4e, 0x43, 0x4b, 0xf1, 0x23, 0x46, 0x87, 0xd9, 0x94, 0xef, 0xd7, 0x53, 0x7a, 0xa3, + 0x73, 0xcc, 0xc4, 0x90, 0x85, 0x74, 0x05, 0x8c, 0xe6, 0x53, 0xf9, 0x05, 0x44, 0x99, 0xaa, 0xd1, + 0x05, 0x39, 0x8b, 0x29, 0xb4, 0x3d, 0x72, 0x44, 0xfc, 0x63, 0x62, 0x14, 0xd0, 0x79, 0x58, 0x4b, + 0x33, 0x9f, 0x1f, 0x13, 0x4c, 0x0d, 0xad, 0x79, 0x0c, 0xa5, 0xa8, 0x93, 0x42, 0x15, 0x98, 0x7f, + 0x41, 0x31, 0xde, 0xdc, 0x6d, 0x1b, 0x05, 0xbe, 0x78, 0xec, 0xf5, 0xc4, 0x42, 0xe3, 0x38, 0x6f, + 0x8d, 0x9f, 0x4e, 0x4e, 0x13, 0x17, 0xb7, 0xc5, 0x83, 0x81, 0x04, 0xc3, 0x80, 0x53, 0x66, 0xd0, + 0x32, 0x2c, 0xee, 0xd8, 0x7d, 0x8f, 0x74, 0xb9, 0x46, 0x4e, 0x2a, 0xf2, 0x43, 0xec, 0xda, 0xa3, + 0x3e, 0x26, 0x6c, 0x97, 0xfa, 0x0e, 0x16, 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 0x5d, + 0xa8, 0x28, 0x09, 0x81, 0x2e, 0x4d, 0xee, 0x73, 0x43, 0xd5, 0xeb, 0x93, 0x05, 0xc6, 0x1a, 0x95, + 0x0a, 0x8e, 0x72, 0x86, 0xf6, 0x44, 0x63, 0x97, 0xd2, 0x98, 0xd7, 0x46, 0xbe, 0x84, 0xc5, 0x44, + 0xa9, 0x46, 0x97, 0x13, 0x5b, 0xf2, 0xda, 0xc5, 0x9a, 0x39, 0x4d, 0x44, 0xea, 0x25, 0x71, 0x6b, + 0x95, 0xec, 0x76, 0xd0, 0xf5, 0xbc, 0xcd, 0xb9, 0x1d, 0x53, 0xad, 0x79, 0x1a, 0x51, 0x69, 0xaf, + 0x03, 0x0b, 0x6a, 0xc7, 0x83, 0xd6, 0x53, 0x7b, 0x33, 0x7d, 0x55, 0xed, 0xf2, 0x14, 0x09, 0x15, + 0x1c, 0xa5, 0x59, 0xc9, 0x80, 0x93, 0x6d, 0x8a, 0x32, 0xe0, 0xe4, 0xf5, 0x3a, 0xaf, 0xf9, 0xe3, + 0x97, 0x7c, 0xc3, 0x53, 0xb5, 0x68, 0x42, 0xbf, 0x93, 0xaa, 0x45, 0x93, 0x1a, 0x81, 0x07, 0x7f, + 0xfa, 0xf1, 0x43, 0x43, 0x7b, 0xf7, 0xa1, 0xa1, 0xbd, 0xff, 0xd0, 0xd0, 0xfe, 0xf7, 0xb1, 0x51, + 0x78, 0xf7, 0xb1, 0x51, 0xf8, 0xe9, 0x63, 0xa3, 0xf0, 0xcf, 0xfa, 0xb4, 0x6f, 0xfd, 0xfb, 0x73, + 0xe2, 0xdf, 0xed, 0x5f, 0x02, 0x00, 0x00, 0xff, 0xff, 0x1b, 0x43, 0x5b, 0x47, 0x12, 0x18, 0x00, + 0x00, } func (m *SpaceSignRequest) Marshal() (dAtA []byte, err error) { diff --git a/coordinator/coordinatorproto/errors.go b/coordinator/coordinatorproto/errors.go index 4af2dcc4..ccf3397f 100644 --- a/coordinator/coordinatorproto/errors.go +++ b/coordinator/coordinatorproto/errors.go @@ -18,4 +18,5 @@ var ( ErrAccountIsDeleted = errGroup.Register(errors.New("account is deleted"), uint64(ErrorCodes_AccountDeleted)) ErrForbidden = errGroup.Register(errors.New("forbidden"), uint64(ErrorCodes_Forbidden)) ErrAclHeadIsMissing = errGroup.Register(errors.New("acl head is missing"), uint64(ErrorCodes_AclHeadIsMissing)) + ErrAclNonEmpty = errGroup.Register(errors.New("acl is not empty"), uint64(ErrorCodes_AclNonEmpty)) ) diff --git a/coordinator/coordinatorproto/protos/coordinator.proto b/coordinator/coordinatorproto/protos/coordinator.proto index 524b0b11..32ff3ee2 100644 --- a/coordinator/coordinatorproto/protos/coordinator.proto +++ b/coordinator/coordinatorproto/protos/coordinator.proto @@ -68,6 +68,7 @@ enum ErrorCodes { AccountDeleted = 6; Forbidden = 7; AclHeadIsMissing = 8; + AclNonEmpty = 9; ErrorOffset = 300; } From c6ac38edb3da749442796959b9aca9837fc0782a Mon Sep 17 00:00:00 2001 From: Sergey Cherepanov Date: Wed, 3 Apr 2024 12:36:18 +0200 Subject: [PATCH 084/140] anymock helper --- testutil/anymock/anymock.go | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 testutil/anymock/anymock.go diff --git a/testutil/anymock/anymock.go b/testutil/anymock/anymock.go new file mode 100644 index 00000000..0a6f7922 --- /dev/null +++ b/testutil/anymock/anymock.go @@ -0,0 +1,22 @@ +package anymock + +import "go.uber.org/mock/gomock" + +type MockComp interface { + Name() *gomock.Call + Init(x any) *gomock.Call +} + +type MockCompRunnable interface { + Run(x any) *gomock.Call + Close(x any) *gomock.Call +} + +func ExpectComp(c MockComp, name string) { + c.Name().Return(name).AnyTimes() + c.Init(gomock.Any()).AnyTimes() + if cr, ok := c.(MockCompRunnable); ok { + cr.Run(gomock.Any()).AnyTimes() + cr.Close(gomock.Any()).AnyTimes() + } +} From 036e4f85f737acb5101355e423f9afef31cd7401 Mon Sep 17 00:00:00 2001 From: Sergey Cherepanov Date: Wed, 3 Apr 2024 14:04:36 +0200 Subject: [PATCH 085/140] testAclState --- commonspace/object/acl/list/listutils.go | 29 ++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/commonspace/object/acl/list/listutils.go b/commonspace/object/acl/list/listutils.go index 77fe2084..397653c5 100644 --- a/commonspace/object/acl/list/listutils.go +++ b/commonspace/object/acl/list/listutils.go @@ -1,6 +1,8 @@ package list import ( + "fmt" + "github.com/anyproto/any-sync/commonspace/object/accountdata" "github.com/anyproto/any-sync/commonspace/object/acl/liststorage" "github.com/anyproto/any-sync/consensus/consensusproto" @@ -53,3 +55,30 @@ func NewTestAclWithRoot(keys *accountdata.AccountKeys, root *consensusproto.RawR } return BuildAclListWithIdentity(keys, st, NoOpAcceptorVerifier{}) } + +func NewTestAclStateWithUsers(numWriters, numReaders, numInvites int) *AclState { + st := &AclState{ + keys: make(map[string]AclKeys), + accountStates: make(map[string]AccountState), + inviteKeys: make(map[string]crypto.PubKey), + requestRecords: make(map[string]RequestRecord), + pendingRequests: make(map[string]string), + keyStore: crypto.NewKeyStorage(), + } + for i := 0; i < numWriters; i++ { + st.accountStates[fmt.Sprint("w", i)] = AccountState{ + Permissions: AclPermissionsWriter, + Status: StatusActive, + } + } + for i := 0; i < numReaders; i++ { + st.accountStates[fmt.Sprint("r", i)] = AccountState{ + Permissions: AclPermissionsReader, + Status: StatusActive, + } + } + for i := 0; i < numInvites; i++ { + st.inviteKeys[fmt.Sprint("r", i)] = nil + } + return st +} From e658cff20918fed4f2bc7d5bff2856d5845b7b7c Mon Sep 17 00:00:00 2001 From: Sergey Cherepanov Date: Wed, 3 Apr 2024 14:23:16 +0200 Subject: [PATCH 086/140] coordinatorproto: ErrSpaceNotShareable --- .../coordinatorproto/coordinator.pb.go | 231 +++++++++--------- coordinator/coordinatorproto/errors.go | 1 + .../coordinatorproto/protos/coordinator.proto | 1 + 3 files changed, 119 insertions(+), 114 deletions(-) diff --git a/coordinator/coordinatorproto/coordinator.pb.go b/coordinator/coordinatorproto/coordinator.pb.go index e496a358..1ac60600 100644 --- a/coordinator/coordinatorproto/coordinator.pb.go +++ b/coordinator/coordinatorproto/coordinator.pb.go @@ -35,6 +35,7 @@ const ( ErrorCodes_Forbidden ErrorCodes = 7 ErrorCodes_AclHeadIsMissing ErrorCodes = 8 ErrorCodes_AclNonEmpty ErrorCodes = 9 + ErrorCodes_SpaceNotShareable ErrorCodes = 10 ErrorCodes_ErrorOffset ErrorCodes = 300 ) @@ -49,6 +50,7 @@ var ErrorCodes_name = map[int32]string{ 7: "Forbidden", 8: "AclHeadIsMissing", 9: "AclNonEmpty", + 10: "SpaceNotShareable", 300: "ErrorOffset", } @@ -63,6 +65,7 @@ var ErrorCodes_value = map[string]int32{ "Forbidden": 7, "AclHeadIsMissing": 8, "AclNonEmpty": 9, + "SpaceNotShareable": 10, "ErrorOffset": 300, } @@ -2332,124 +2335,124 @@ func init() { } var fileDescriptor_d94f6f99586adae2 = []byte{ - // 1857 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x58, 0xcd, 0x73, 0x13, 0xc9, + // 1867 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x59, 0xcd, 0x73, 0x13, 0xc9, 0x15, 0xd7, 0x8c, 0x65, 0x5b, 0x7a, 0xb2, 0xcd, 0xb8, 0x6d, 0x83, 0x10, 0x42, 0x98, 0x09, 0x01, 0xa3, 0xa4, 0x80, 0x88, 0x90, 0x0a, 0x45, 0xaa, 0x82, 0x31, 0x1f, 0x11, 0xc1, 0xc6, 0x19, 0x61, 0xa8, 0x4a, 0x0e, 0xd4, 0x78, 0xa6, 0x2d, 0x4f, 0x59, 0xea, 0x51, 0x7a, 0x5a, 0x18, 0x9d, 0x73, 0xcc, 0x25, 0xb7, 0x9c, 0xf6, 0xbe, 0x87, 0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, 0xfd, 0x45, - 0x4b, 0x25, 0x71, 0xa5, 0xc7, 0xd4, 0x63, 0x38, 0x12, 0xd1, 0x85, 0x48, 0x82, 0x66, 0xfe, 0x47, - 0x07, 0x14, 0xa2, 0xc2, 0x6c, 0x36, 0x0c, 0x76, 0xed, 0x51, 0xcf, 0xb7, 0x5d, 0x74, 0x0b, 0xe6, - 0x02, 0x41, 0x10, 0x7a, 0x97, 0x5a, 0xd5, 0x1b, 0x2a, 0xba, 0xca, 0x06, 0x4b, 0xca, 0xa1, 0xdf, - 0xc3, 0xb2, 0x8b, 0x7b, 0x98, 0x79, 0x3e, 0x79, 0xe1, 0xf5, 0x71, 0xc0, 0xec, 0xfe, 0x40, 0x58, - 0x9c, 0xb1, 0xb2, 0x0c, 0xf4, 0x57, 0xa8, 0x0c, 0x30, 0xed, 0x7b, 0x41, 0xe0, 0xf9, 0x24, 0x10, - 0x28, 0x2e, 0xb5, 0x2e, 0x66, 0x8d, 0xec, 0x8e, 0x85, 0x2c, 0x75, 0x07, 0x77, 0xb0, 0x27, 0x70, - 0x10, 0xb0, 0x56, 0xf2, 0x1c, 0x0c, 0x71, 0xb2, 0xa4, 0x1c, 0xaa, 0x41, 0xc9, 0x0b, 0x3a, 0x87, - 0x36, 0xc5, 0xae, 0x84, 0x37, 0x5e, 0x9b, 0x7b, 0xb0, 0xac, 0x84, 0x46, 0x30, 0xf0, 0x49, 0x80, - 0xd1, 0x7d, 0x98, 0xa7, 0xd8, 0xc1, 0xde, 0x80, 0x09, 0x10, 0x2a, 0xad, 0xab, 0x59, 0x1b, 0x56, - 0x28, 0xf0, 0xca, 0x63, 0x87, 0xf1, 0x65, 0x5a, 0xd1, 0x36, 0xf3, 0x08, 0xce, 0x4f, 0x94, 0x42, - 0xb7, 0x60, 0x25, 0x50, 0x98, 0x12, 0x79, 0x61, 0x6a, 0xc1, 0xca, 0x63, 0xa1, 0x3a, 0x94, 0x83, - 0x38, 0x9a, 0xc2, 0xa8, 0x1c, 0x13, 0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x09, 0x1d, 0xe6, 0x53, 0xbb, 0x1b, 0xce, 0x31, 0x0f, 0x46, 0x0c, 0x87, 0xe5, 0xa8, 0x68, 0xe5, - 0x33, 0x79, 0xca, 0x8a, 0xd3, 0xc9, 0xd1, 0xce, 0xe2, 0x67, 0x2b, 0x8a, 0x0a, 0x9c, 0xa1, 0xf3, - 0x7c, 0x52, 0x69, 0xaf, 0xf8, 0x48, 0x28, 0xaa, 0xd1, 0xa2, 0x95, 0x65, 0x08, 0x69, 0x31, 0x28, - 0x89, 0x34, 0x0f, 0x84, 0xcd, 0xea, 0x9c, 0x94, 0x4e, 0x33, 0xcc, 0x1a, 0x54, 0xb3, 0x60, 0x84, - 0x18, 0x36, 0x7f, 0xd6, 0x00, 0x1e, 0x51, 0xea, 0xd3, 0x2d, 0xd1, 0x12, 0x2c, 0x01, 0xec, 0x11, - 0xfc, 0x76, 0x80, 0x1d, 0x86, 0x5d, 0xa3, 0x80, 0x0c, 0x39, 0xc2, 0xc8, 0xd0, 0x35, 0x34, 0x54, - 0x85, 0xd5, 0x31, 0x85, 0x27, 0x2e, 0x26, 0xae, 0x47, 0xba, 0x86, 0x1e, 0xcb, 0x6e, 0xf1, 0xde, - 0x01, 0xbb, 0xc6, 0x0c, 0x42, 0xb0, 0x24, 0x28, 0x3b, 0x3e, 0x7b, 0xf4, 0xd6, 0x0b, 0x58, 0x60, - 0x14, 0xd1, 0x9a, 0x9c, 0xec, 0x84, 0x2b, 0x16, 0xb6, 0x9d, 0x43, 0xec, 0x1a, 0xb3, 0x5c, 0x34, - 0x91, 0x57, 0xae, 0x31, 0x87, 0x16, 0xa1, 0xfc, 0xd8, 0xa7, 0xfb, 0x9e, 0xeb, 0x62, 0x62, 0xcc, - 0xa3, 0x55, 0x30, 0x36, 0xc3, 0x90, 0x68, 0x07, 0xdb, 0x7c, 0xec, 0x24, 0x5d, 0xa3, 0x84, 0xce, - 0x40, 0x65, 0xd3, 0xe9, 0xed, 0xf8, 0xe4, 0x51, 0x7f, 0xc0, 0x46, 0x46, 0x19, 0x19, 0x50, 0x11, - 0x07, 0x7a, 0x7e, 0x70, 0x10, 0x60, 0x66, 0x7c, 0xa5, 0x37, 0xff, 0xaf, 0xc9, 0x41, 0x3d, 0x7c, - 0x17, 0xd0, 0xd9, 0xc4, 0x84, 0x1d, 0xb9, 0x5b, 0x40, 0x0d, 0xd9, 0x6f, 0xca, 0x2e, 0x36, 0x3c, - 0x58, 0x74, 0x4e, 0x43, 0x4b, 0xf1, 0x23, 0x46, 0x87, 0xd9, 0x94, 0xef, 0xd7, 0x53, 0x7a, 0xa3, - 0x73, 0xcc, 0xc4, 0x90, 0x85, 0x74, 0x05, 0x8c, 0xe6, 0x53, 0xf9, 0x05, 0x44, 0x99, 0xaa, 0xd1, - 0x05, 0x39, 0x8b, 0x29, 0xb4, 0x3d, 0x72, 0x44, 0xfc, 0x63, 0x62, 0x14, 0xd0, 0x79, 0x58, 0x4b, - 0x33, 0x9f, 0x1f, 0x13, 0x4c, 0x0d, 0xad, 0x79, 0x0c, 0xa5, 0xa8, 0x93, 0x42, 0x15, 0x98, 0x7f, - 0x41, 0x31, 0xde, 0xdc, 0x6d, 0x1b, 0x05, 0xbe, 0x78, 0xec, 0xf5, 0xc4, 0x42, 0xe3, 0x38, 0x6f, - 0x8d, 0x9f, 0x4e, 0x4e, 0x13, 0x17, 0xb7, 0xc5, 0x83, 0x81, 0x04, 0xc3, 0x80, 0x53, 0x66, 0xd0, - 0x32, 0x2c, 0xee, 0xd8, 0x7d, 0x8f, 0x74, 0xb9, 0x46, 0x4e, 0x2a, 0xf2, 0x43, 0xec, 0xda, 0xa3, - 0x3e, 0x26, 0x6c, 0x97, 0xfa, 0x0e, 0x16, 0xf0, 0x73, 0xce, 0x6c, 0xf3, 0xee, 0xb8, 0x8f, 0x50, - 0x86, 0x09, 0x54, 0x82, 0x22, 0xf7, 0x21, 0x74, 0x40, 0xd6, 0x70, 0x43, 0xe3, 0x0b, 0x79, 0xd1, - 0x86, 0x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ea, 0x33, 0xff, + 0xa6, 0xf8, 0x19, 0xa8, 0xf4, 0x1b, 0x82, 0x84, 0x2a, 0x0a, 0xc9, 0xfc, 0x5e, 0x03, 0xa3, 0x33, + 0xb0, 0x1d, 0xdc, 0xf1, 0xba, 0xc4, 0xc2, 0xff, 0x1e, 0xe2, 0x80, 0xa1, 0x2a, 0xcc, 0x07, 0x9c, + 0xd6, 0x76, 0xab, 0xda, 0xba, 0xb6, 0x51, 0xb6, 0xa2, 0x25, 0x3a, 0x0b, 0x73, 0x87, 0xd8, 0x76, + 0x31, 0xad, 0xea, 0xeb, 0xda, 0xc6, 0x82, 0x25, 0x57, 0x68, 0x1d, 0x2a, 0x7e, 0xcf, 0x6d, 0xbb, + 0x98, 0x30, 0x8f, 0x8d, 0xaa, 0x33, 0x82, 0xa9, 0x92, 0x50, 0x0b, 0x56, 0x09, 0x3e, 0x8e, 0x96, + 0xdc, 0x9a, 0xcd, 0x86, 0x14, 0x57, 0x8b, 0x42, 0x34, 0x97, 0x87, 0x4c, 0x58, 0x38, 0xf0, 0xa9, + 0x83, 0xa5, 0x5f, 0xd5, 0xd9, 0x75, 0x6d, 0xa3, 0x64, 0x25, 0x68, 0x66, 0x07, 0x2a, 0xc2, 0xff, + 0x67, 0x5e, 0xdf, 0x63, 0x01, 0x77, 0x84, 0x62, 0xdb, 0xdd, 0xc6, 0xfd, 0x7d, 0x4c, 0x03, 0xe1, + 0xfe, 0xa2, 0xa5, 0x92, 0xb8, 0xd2, 0x63, 0xea, 0x31, 0x1c, 0x89, 0xe8, 0x42, 0x24, 0x41, 0x33, + 0xff, 0xa3, 0x03, 0x0a, 0x51, 0x61, 0x36, 0x1b, 0x06, 0xbb, 0xf6, 0xa8, 0xe7, 0xdb, 0x2e, 0xba, + 0x05, 0x73, 0x81, 0x20, 0x08, 0xbd, 0x4b, 0xad, 0xea, 0x0d, 0x15, 0x5d, 0x65, 0x83, 0x25, 0xe5, + 0xd0, 0xef, 0x61, 0xd9, 0xc5, 0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0xbd, 0x0e, 0x2c, 0xa8, 0x8d, 0x10, 0x5a, + 0x4f, 0xed, 0xcd, 0xb4, 0x5b, 0xb5, 0xcb, 0x53, 0x24, 0x54, 0x70, 0x94, 0x1e, 0x26, 0x03, 0x4e, + 0xb6, 0x57, 0xca, 0x80, 0x93, 0xd7, 0x02, 0xbd, 0xe6, 0x6f, 0x62, 0xf2, 0x69, 0x4f, 0xd5, 0xa2, + 0x09, 0x6d, 0x50, 0xaa, 0x16, 0x4d, 0xea, 0x0f, 0x1e, 0xfc, 0xe9, 0xc7, 0x0f, 0x0d, 0xed, 0xdd, + 0x87, 0x86, 0xf6, 0xfe, 0x43, 0x43, 0xfb, 0xdf, 0xc7, 0x46, 0xe1, 0xdd, 0xc7, 0x46, 0xe1, 0xa7, + 0x8f, 0x8d, 0xc2, 0x3f, 0xeb, 0xd3, 0xfe, 0x05, 0xb0, 0x3f, 0x27, 0x7e, 0xdd, 0xfe, 0x25, 0x00, + 0x00, 0xff, 0xff, 0xc7, 0x84, 0xe0, 0x45, 0x29, 0x18, 0x00, 0x00, } func (m *SpaceSignRequest) Marshal() (dAtA []byte, err error) { diff --git a/coordinator/coordinatorproto/errors.go b/coordinator/coordinatorproto/errors.go index ccf3397f..713dd0cc 100644 --- a/coordinator/coordinatorproto/errors.go +++ b/coordinator/coordinatorproto/errors.go @@ -19,4 +19,5 @@ var ( ErrForbidden = errGroup.Register(errors.New("forbidden"), uint64(ErrorCodes_Forbidden)) ErrAclHeadIsMissing = errGroup.Register(errors.New("acl head is missing"), uint64(ErrorCodes_AclHeadIsMissing)) ErrAclNonEmpty = errGroup.Register(errors.New("acl is not empty"), uint64(ErrorCodes_AclNonEmpty)) + ErrSpaceNotShareable = errGroup.Register(errors.New("space not shareable"), uint64(ErrorCodes_SpaceNotShareable)) ) diff --git a/coordinator/coordinatorproto/protos/coordinator.proto b/coordinator/coordinatorproto/protos/coordinator.proto index 32ff3ee2..a4c5bbc6 100644 --- a/coordinator/coordinatorproto/protos/coordinator.proto +++ b/coordinator/coordinatorproto/protos/coordinator.proto @@ -69,6 +69,7 @@ enum ErrorCodes { Forbidden = 7; AclHeadIsMissing = 8; AclNonEmpty = 9; + SpaceNotShareable = 10; ErrorOffset = 300; } From 2d8abe72e730451b6177d60e0a3f5c155a01bfc3 Mon Sep 17 00:00:00 2001 From: Sergey Cherepanov Date: Wed, 3 Apr 2024 15:11:00 +0200 Subject: [PATCH 087/140] update quic and go1.22 --- go.mod | 19 ++++++------ go.sum | 97 ++++++++++++++++++++++++++++++++++++++++++++++++---------- 2 files changed, 90 insertions(+), 26 deletions(-) diff --git a/go.mod b/go.mod index 45eac9ab..facc2d1b 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/anyproto/any-sync -go 1.19 +go 1.22 require ( filippo.io/edwards25519 v1.1.0 @@ -26,7 +26,7 @@ require ( github.com/multiformats/go-multibase v0.2.0 github.com/multiformats/go-multihash v0.2.3 github.com/prometheus/client_golang v1.19.0 - github.com/quic-go/quic-go v0.40.1 + github.com/quic-go/quic-go v0.42.0 github.com/stretchr/testify v1.9.0 github.com/tyler-smith/go-bip39 v1.1.0 github.com/zeebo/blake3 v0.2.3 @@ -34,8 +34,9 @@ require ( go.uber.org/mock v0.4.0 go.uber.org/zap v1.27.0 golang.org/x/crypto v0.21.0 - golang.org/x/exp v0.0.0-20240205201215-2c58cdc269a3 + golang.org/x/exp v0.0.0-20240325151524-a685a6edb6d8 golang.org/x/net v0.22.0 + golang.org/x/time v0.5.0 gopkg.in/yaml.v3 v3.0.1 storj.io/drpc v0.0.34 ) @@ -58,11 +59,11 @@ require ( github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect github.com/ethereum/c-kzg-4844 v0.4.0 // indirect github.com/fogleman/gg v1.3.0 // indirect - github.com/go-logr/logr v1.3.0 // indirect + github.com/go-logr/logr v1.4.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 // indirect - github.com/google/pprof v0.0.0-20240207164012-fb44976bdcd5 // indirect + github.com/google/pprof v0.0.0-20240402174815-29b9bb013b0f // indirect github.com/hashicorp/golang-lru/v2 v2.0.5 // indirect github.com/holiman/uint256 v1.2.4 // indirect github.com/ipfs/bbloom v0.0.4 // indirect @@ -87,14 +88,13 @@ require ( github.com/multiformats/go-multicodec v0.9.0 // indirect github.com/multiformats/go-multistream v0.5.0 // indirect github.com/multiformats/go-varint v0.0.7 // indirect - github.com/onsi/ginkgo/v2 v2.15.0 // indirect + github.com/onsi/ginkgo/v2 v2.17.1 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/polydawn/refmt v0.89.0 // indirect github.com/prometheus/client_model v0.5.0 // indirect github.com/prometheus/common v0.48.0 // indirect github.com/prometheus/procfs v0.12.0 // indirect - github.com/quic-go/qtls-go1-20 v0.4.1 // indirect github.com/spaolacci/murmur3 v1.1.0 // indirect github.com/supranational/blst v0.3.11 // indirect github.com/whyrusleeping/chunker v0.0.0-20181014151217-fe64bd25879f // indirect @@ -103,11 +103,10 @@ require ( go.opentelemetry.io/otel/trace v1.14.0 // indirect go.uber.org/multierr v1.11.0 // indirect golang.org/x/image v0.14.0 // indirect - golang.org/x/mod v0.15.0 // indirect + golang.org/x/mod v0.16.0 // indirect golang.org/x/sync v0.6.0 // indirect golang.org/x/sys v0.18.0 // indirect - golang.org/x/time v0.5.0 // indirect - golang.org/x/tools v0.17.0 // indirect + golang.org/x/tools v0.19.0 // indirect google.golang.org/protobuf v1.32.0 // indirect lukechampine.com/blake3 v1.2.1 // indirect rsc.io/tmplfunc v0.0.3 // indirect diff --git a/go.sum b/go.sum index b6ebb267..f4bba2b3 100644 --- a/go.sum +++ b/go.sum @@ -2,10 +2,13 @@ filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA= filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/DataDog/zstd v1.4.5 h1:EndNeuB0l9syBZhut0wns3gV1hL8zX8LIu6ZiVHWLIQ= +github.com/DataDog/zstd v1.4.5/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo= github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/StackExchange/wmi v1.2.1 h1:VIkavFPXSjcnS+O8yTq7NI32k0R5Aj+v39y29VYDOSA= +github.com/StackExchange/wmi v1.2.1/go.mod h1:rcmrprowKIVzvc+NUiLncP2uuArMWLCbu9SBzvHz7e8= github.com/VictoriaMetrics/fastcache v1.12.1 h1:i0mICQuojGDL3KblA7wUNlY5lOK6a4bwt3uRKnkZU40= +github.com/VictoriaMetrics/fastcache v1.12.1/go.mod h1:tX04vaqcNoQeGLD+ra5pU5sWkuxnzWhEzLwhP9w653o= github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII= github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 h1:s6gZFSlWYmbqAuRjVTiNNhvNRfY2Wxp9nhfyel4rklc= github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE= @@ -17,6 +20,7 @@ github.com/anyproto/go-slip21 v1.0.0 h1:CI7lUqTIwmPOEGVAj4jyNLoICvueh++0U2HoAi3m github.com/anyproto/go-slip21 v1.0.0/go.mod h1:gbIJt7HAdr5DuT4f2pFTKCBSUWYsm/fysHBNqgsuxT0= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/benbjohnson/clock v1.3.5 h1:VvXlSJBzZpA/zum6Sj74hxwYI2DIxRWuNIoXAzHZz5o= +github.com/benbjohnson/clock v1.3.5/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bits-and-blooms/bitset v1.10.0 h1:ePXTeiPEazB5+opbv5fr8umg2R/1NlzgDsyepwsSr88= @@ -44,23 +48,32 @@ github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XL github.com/cheggaaa/mb/v3 v3.0.2 h1:jd1Xx0zzihZlXL6HmnRXVCI1BHuXz/kY+VzX9WbvNDU= github.com/cheggaaa/mb/v3 v3.0.2/go.mod h1:zCt2QeYukhd/g0bIdNqF+b/kKz1hnLFNDkP49qN5kqI= github.com/cockroachdb/errors v1.8.1 h1:A5+txlVZfOqFBDa4mGz2bUWSp0aHElvHX2bKkdbQu+Y= +github.com/cockroachdb/errors v1.8.1/go.mod h1:qGwQn6JmZ+oMjuLwjWzUNqblqk0xl4CVV3SQbGwK7Ac= github.com/cockroachdb/logtags v0.0.0-20190617123548-eb05cc24525f h1:o/kfcElHqOiXqcou5a3rIlMc7oJbMQkeLk0VQJ7zgqY= +github.com/cockroachdb/logtags v0.0.0-20190617123548-eb05cc24525f/go.mod h1:i/u985jwjWRlyHXQbwatDASoW0RMlZ/3i9yJHE2xLkI= github.com/cockroachdb/pebble v0.0.0-20230928194634-aa077af62593 h1:aPEJyR4rPBvDmeyi+l/FS/VtA00IWvjeFvjen1m1l1A= +github.com/cockroachdb/pebble v0.0.0-20230928194634-aa077af62593/go.mod h1:6hk1eMY/u5t+Cf18q5lFMUA1Rc+Sm5I6Ra1QuPyxXCo= github.com/cockroachdb/redact v1.0.8 h1:8QG/764wK+vmEYoOlfobpe12EQcS81ukx/a4hdVMxNw= +github.com/cockroachdb/redact v1.0.8/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= github.com/cockroachdb/sentry-go v0.6.1-cockroachdb.2 h1:IKgmqgMQlVJIZj19CdocBeSfSaiCbEBZGKODaixqtHM= +github.com/cockroachdb/sentry-go v0.6.1-cockroachdb.2/go.mod h1:8BT+cPK6xvFOcRlk0R8eg+OTkcqI6baNH4xAkpiYVvQ= github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 h1:zuQyyAKVxetITBuuhv3BI9cMrmStnpT18zmgmTxunpo= +github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06/go.mod h1:7nc4anLGjupUW/PeY5qiNYsdNXj7zopG+eqsS7To5IQ= github.com/consensys/bavard v0.1.13 h1:oLhMLOFGTLdlda/kma4VOJazblc7IM5y5QPd2A/YjhQ= github.com/consensys/bavard v0.1.13/go.mod h1:9ItSMtA/dXMAiL7BG6bqW2m3NdSEObYWoH223nGHukI= github.com/consensys/gnark-crypto v0.12.1 h1:lHH39WuuFgVHONRl3J0LRBtuYdQTumFSDtJF7HpyG8M= github.com/consensys/gnark-crypto v0.12.1/go.mod h1:v2Gy7L/4ZRosZ7Ivs+9SfUDr0f5UlG+EM5t7MPHiLuY= github.com/corona10/goimagehash v1.0.2 h1:pUfB0LnsJASMPGEZLj7tGY251vF+qLGqOgEP4rUs6kA= +github.com/corona10/goimagehash v1.0.2/go.mod h1:/l9umBhvcHQXVtQO1V6Gp1yD20STawkhRnnX0D1bvVI= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/crackcomm/go-gitignore v0.0.0-20170627025303-887ab5e44cc3 h1:HVTnpeuvF6Owjd5mniCL8DEXo7uYXdQEmOP4FJbV5tg= github.com/crackcomm/go-gitignore v0.0.0-20170627025303-887ab5e44cc3/go.mod h1:p1d6YEZWvFzEh4KLyvBcVSnrfNDDvK2zfK/4x2v/4pE= github.com/crate-crypto/go-ipa v0.0.0-20231025140028-3c0104f4b233 h1:d28BXYi+wUpz1KBmiF9bWrjEMacUEREV6MBi2ODnrfQ= +github.com/crate-crypto/go-ipa v0.0.0-20231025140028-3c0104f4b233/go.mod h1:geZJZH3SzKCqnz5VT0q/DyIG/tvu/dZk+VIfXicupJs= github.com/crate-crypto/go-kzg-4844 v0.7.0 h1:C0vgZRk4q4EZ/JgPfzuSoxdCq3C3mOZMBShovmncxvA= github.com/crate-crypto/go-kzg-4844 v0.7.0/go.mod h1:1kMhvPgI0Ky3yIa+9lFySEBUBXkYxeOi8ZF1sYioxhc= github.com/cskr/pubsub v1.0.2 h1:vlOzMhl6PFn60gRlTQQsIfVwaPB/B/8MziK8FhEPt/0= +github.com/cskr/pubsub v1.0.2/go.mod h1:/8MzYXk/NJAz782G8RPkFzXTZVu63VotefPnR9TIRis= github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= @@ -68,6 +81,7 @@ github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/davidlazar/go-crypto v0.0.0-20200604182044-b73af7476f6c h1:pFUpOrbxDR6AkioZ1ySsx5yxlDQZ8stG2b88gTPxgJU= github.com/davidlazar/go-crypto v0.0.0-20200604182044-b73af7476f6c/go.mod h1:6UhI8N9EjYm1c2odKpFpAYeR8dsBeM7PtzQhRgxRr9U= github.com/decred/dcrd/crypto/blake256 v1.0.1 h1:7PltbUIQB7u/FfZ39+DGa/ShuMyJ5ilcvdfma9wOH6Y= +github.com/decred/dcrd/crypto/blake256 v1.0.1/go.mod h1:2OfgNZ5wDpcsFmHmCK5gZTPcCXqlm2ArzUIkw9czNJo= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 h1:8UrgZ3GkP4i/CLijOJx79Yu+etlyjdBU4sfcs2WYQMs= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0/go.mod h1:v57UDF4pDQJcEfFUCRop3lJL149eHGSe9Jvczhzjo/0= github.com/ethereum/c-kzg-4844 v0.4.0 h1:3MS1s4JtA868KpJxroZoepdV0ZKBp3u/O5HcZ7R3nlY= @@ -75,18 +89,23 @@ github.com/ethereum/c-kzg-4844 v0.4.0/go.mod h1:VewdlzQmpT5QSrVhbBuGoCdFJkpaJlO1 github.com/ethereum/go-ethereum v1.13.12 h1:iDr9UM2JWkngBHGovRJEQn4Kor7mT4gt9rUZqB5M29Y= github.com/ethereum/go-ethereum v1.13.12/go.mod h1:hKL2Qcj1OvStXNSEDbucexqnEt1Wh4Cz329XsjAalZY= github.com/flynn/noise v1.0.0 h1:DlTHqmzmvcEiKj+4RYo/imoswx/4r6iBlCMfVtrMXpQ= +github.com/flynn/noise v1.0.0/go.mod h1:xbMo+0i6+IGbYdJhF31t2eR1BIU0CYc12+BNAKwUTag= github.com/fogleman/gg v1.3.0 h1:/7zJX8F6AaYQc57WQCyN9cAIz+4bCJGO9B+dyW29am8= github.com/fogleman/gg v1.3.0/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= github.com/francoispqt/gojay v1.2.13 h1:d2m3sFjloqoIUQU3TsHBgj6qg/BVGlTBeHDUmyJnXKk= +github.com/francoispqt/gojay v1.2.13/go.mod h1:ehT5mTG4ua4581f1++1WLG0vPdaA9HaiDsoyrBGkyDY= github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= +github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/gballet/go-verkle v0.1.1-0.20231031103413-a67434b50f46 h1:BAIP2GihuqhwdILrV+7GJel5lyPV3u1+PgzrWLc0TkE= +github.com/gballet/go-verkle v0.1.1-0.20231031103413-a67434b50f46/go.mod h1:QNpY22eby74jVhqH4WhDLDwxc/vqsern6pW+u2kbkpc= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= -github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= +github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-ole/go-ole v1.3.0 h1:Dt6ye7+vXGIKZ7Xtk4s6/xVdGDQynvom7xCFEdWr6uE= +github.com/go-ole/go-ole v1.3.0/go.mod h1:5LS6F96DhAwUc7C+1HLexzMXY1xGRSryjyPPKW6zv78= github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls= github.com/go-yaml/yaml v2.1.0+incompatible/go.mod h1:w2MrLa16VYP0jy6N7M5kHaCkaLENm+P+Tv+MfurjSw0= @@ -95,22 +114,28 @@ github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJA github.com/goccy/go-graphviz v0.1.2 h1:sWSJ6w13BCm/ZOUTHDVrdvbsxqN8yyzaFcHrH/hQ9Yg= github.com/goccy/go-graphviz v0.1.2/go.mod h1:pMYpbAqJT10V8dzV1JN/g/wUlG/0imKPzn3ZsrchGCI= github.com/gofrs/flock v0.8.1 h1:+gYjHKf32LDeiEEFhQaotPbLuUXjY5ZqxKgXy7n59aw= +github.com/gofrs/flock v0.8.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 h1:DACJavvAHhabrF08vX0COfcOBJRhZ8lUbR+ZWIs0Y5g= github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= +github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb h1:PBC98N2aIaM3XXiurYmW7fx4GZkL8feAMVq7nEjURHk= +github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gopacket v1.1.19 h1:ves8RnFZPGiFnTS0uPQStjwru6uO6h+nlr9j6fL7kF8= -github.com/google/pprof v0.0.0-20240207164012-fb44976bdcd5 h1:E/LAvt58di64hlYjx7AsNS6C/ysHWYo+2qPCZKTQhRo= -github.com/google/pprof v0.0.0-20240207164012-fb44976bdcd5/go.mod h1:czg5+yv1E0ZGTi6S6vVK1mke0fV+FaUhNGcd6VRS9Ik= +github.com/google/gopacket v1.1.19/go.mod h1:iJ8V8n6KS+z2U1A8pUwu8bW5SyEMkXJB8Yo/Vo+TKTo= +github.com/google/pprof v0.0.0-20240402174815-29b9bb013b0f h1:f00RU+zOX+B3rLAmMMkzHUF2h1z4DeYR9tTCvEq2REY= +github.com/google/pprof v0.0.0-20240402174815-29b9bb013b0f/go.mod h1:kf6iHlnVGwgKolg33glAes7Yg/8iWP8ukqeldJSO7jw= github.com/google/subcommands v1.2.0/go.mod h1:ZjhPrFU+Olkh9WazFPsl27BQ4UPiG37m3yTrtFlrHVk= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gopherjs/gopherjs v0.0.0-20190430165422-3e4dfb77656c h1:7lF+Vz0LqiRidnzC1Oq86fpX1q/iEv2KJdrCtttYjT4= +github.com/gopherjs/gopherjs v0.0.0-20190430165422-3e4dfb77656c/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/hashicorp/golang-lru/v2 v2.0.5 h1:wW7h1TG88eUIJ2i69gaE3uNVtEPIagzhGvHgwfx2Vm4= github.com/hashicorp/golang-lru/v2 v2.0.5/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= github.com/hashicorp/yamux v0.1.1 h1:yrQxtgseBDrq9Y652vSRDvsKCJKOUD+GzTS4Y0Y8pvE= @@ -123,6 +148,7 @@ github.com/huandu/go-assert v1.1.5/go.mod h1:yOLvuqZwmcHIC5rIzrBhT7D3Q9c3GFnd0Jr github.com/huandu/skiplist v1.2.0 h1:gox56QD77HzSC0w+Ws3MH3iie755GBJU1OER3h5VsYw= github.com/huandu/skiplist v1.2.0/go.mod h1:7v3iFjLcSAzO4fN5B8dvebvo/qsfumiLiDXMrPiHF9w= github.com/huin/goupnp v1.3.0 h1:UvLUlWDNpoUdYzb2TCn+MuTWtcjXKSza2n6CBdQ0xXc= +github.com/huin/goupnp v1.3.0/go.mod h1:gnGPsThkYa7bFi/KWmEysQRf48l2dvR5bxr2OFckNX8= github.com/ipfs/bbloom v0.0.4 h1:Gi+8EGJ2y5qiD5FbsbpX/TMNcJw8gSqr7eyjHa4Fhvs= github.com/ipfs/bbloom v0.0.4/go.mod h1:cS9YprKXpoZ9lT0n/Mw/a6/aFV6DTjTLYHeA+gyqMG0= github.com/ipfs/boxo v0.13.1 h1:nQ5oQzcMZR3oL41REJDcTbrvDvuZh3J9ckc9+ILeRQI= @@ -136,9 +162,13 @@ github.com/ipfs/go-cid v0.4.1/go.mod h1:uQHwDeX4c6CtyrFwdqyhpNcxVewur1M7l7fNU7LK github.com/ipfs/go-datastore v0.6.0 h1:JKyz+Gvz1QEZw0LsX1IBn+JFCJQH4SJVFtM4uWU0Myk= github.com/ipfs/go-datastore v0.6.0/go.mod h1:rt5M3nNbSO/8q1t4LNkLyUwRs8HupMeN/8O4Vn9YAT8= github.com/ipfs/go-detect-race v0.0.1 h1:qX/xay2W3E4Q1U7d9lNs1sU9nvguX0a7319XbyQ6cOk= +github.com/ipfs/go-detect-race v0.0.1/go.mod h1:8BNT7shDZPo99Q74BpGMK+4D8Mn4j46UU0LZ723meps= github.com/ipfs/go-ipfs-blocksutil v0.0.1 h1:Eh/H4pc1hsvhzsQoMEP3Bke/aW5P5rVM1IWFJMcGIPQ= +github.com/ipfs/go-ipfs-blocksutil v0.0.1/go.mod h1:Yq4M86uIOmxmGPUHv/uI7uKqZNtLb449gwKqXjIsnRk= github.com/ipfs/go-ipfs-delay v0.0.1 h1:r/UXYyRcddO6thwOnhiznIAiSvxMECGgtv35Xs1IeRQ= +github.com/ipfs/go-ipfs-delay v0.0.1/go.mod h1:8SP1YXK1M1kXuc4KJZINY3TQQ03J2rwBG9QfXmbRPrw= github.com/ipfs/go-ipfs-pq v0.0.3 h1:YpoHVJB+jzK15mr/xsWC574tyDLkezVrDNeaalQBsTE= +github.com/ipfs/go-ipfs-pq v0.0.3/go.mod h1:btNw5hsHBpRcSSgZtiNm/SLj5gYIZ18AKtv3kERkRb4= github.com/ipfs/go-ipfs-util v0.0.2 h1:59Sswnk1MFaiq+VcaknX7aYEyGyGDAA73ilhEK2POp8= github.com/ipfs/go-ipfs-util v0.0.2/go.mod h1:CbPtkWJzjLdEcezDns2XYaehFVNXG9zrdrtMecczcsQ= github.com/ipfs/go-ipld-format v0.6.0 h1:VEJlA2kQ3LqFSIm5Vu6eIlSxD/Ze90xtc4Meten1F5U= @@ -150,11 +180,13 @@ github.com/ipfs/go-log/v2 v2.5.1/go.mod h1:prSpmC1Gpllc9UYWxDiZDreBYw7zp4Iqp1kOL github.com/ipfs/go-metrics-interface v0.0.1 h1:j+cpbjYvu4R8zbleSs36gvB7jR+wsL2fGD6n0jO4kdg= github.com/ipfs/go-metrics-interface v0.0.1/go.mod h1:6s6euYU4zowdslK0GKHmqaIZ3j/b/tL7HTWtJ4VPgWY= github.com/ipfs/go-peertaskqueue v0.8.1 h1:YhxAs1+wxb5jk7RvS0LHdyiILpNmRIRnZVztekOF0pg= +github.com/ipfs/go-peertaskqueue v0.8.1/go.mod h1:Oxxd3eaK279FxeydSPPVGHzbwVeHjatZ2GA8XD+KbPU= github.com/ipld/go-codec-dagpb v1.6.0 h1:9nYazfyu9B1p3NAgfVdpRco3Fs2nFC72DqVsMj6rOcc= github.com/ipld/go-codec-dagpb v1.6.0/go.mod h1:ANzFhfP2uMJxRBr8CE+WQWs5UsNa0pYtmKZ+agnUw9s= github.com/ipld/go-ipld-prime v0.21.0 h1:n4JmcpOlPDIxBcY037SVfpd1G+Sj1nKZah0m6QH9C2E= github.com/ipld/go-ipld-prime v0.21.0/go.mod h1:3RLqy//ERg/y5oShXXdx5YIp50cFGOanyMctpPjsvxQ= github.com/jackpal/go-nat-pmp v1.0.2 h1:KzKSgb7qkJvOUTqYl9/Hg/me3pWgBmERKrTGD7BdWus= +github.com/jackpal/go-nat-pmp v1.0.2/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc= github.com/jbenet/go-cienv v0.1.0/go.mod h1:TqNnHUmJgXau0nCzC7kXWeotg3J9W34CUv5Djy1+FlA= github.com/jbenet/go-temp-err-catcher v0.1.0 h1:zpb3ZH6wIE8Shj2sKS+khgRvf7T7RABoLk/+KKHggpk= github.com/jbenet/go-temp-err-catcher v0.1.0/go.mod h1:0kJRvmDZXNMIiJirNPEYfhpPwbGVtZVWC34vc5WLsDk= @@ -168,34 +200,50 @@ github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4= github.com/klauspost/compress v1.17.2 h1:RlWWUY/Dr4fL8qk9YG7DTZ7PDgME2V4csBXA8L/ixi4= +github.com/klauspost/compress v1.17.2/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= github.com/klauspost/cpuid/v2 v2.0.12/go.mod h1:g2LTdtYhdyuGPqyWyv7qRAmj1WBqxuObKfj5c0PQa7c= github.com/klauspost/cpuid/v2 v2.2.5 h1:0E5MSMDEoAulmXNFquVs//DdoomxaoTY1kUhbc/qbZg= github.com/klauspost/cpuid/v2 v2.2.5/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws= github.com/koron/go-ssdp v0.0.4 h1:1IDwrghSKYM7yLf7XCzbByg2sJ/JcNOZRXS2jczTwz0= +github.com/koron/go-ssdp v0.0.4/go.mod h1:oDXq+E5IL5q0U8uSBcoAXzTzInwy5lEgC91HoKtbmZk= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= +github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= github.com/leanovate/gopter v0.2.9 h1:fQjYxZaynp97ozCzfOyOuAGOU4aU/z37zf/tOujFk7c= +github.com/leanovate/gopter v0.2.9/go.mod h1:U2L/78B+KVFIx2VmW6onHJQzXtFb+p5y3y2Sh+Jxxv8= github.com/libp2p/go-buffer-pool v0.1.0 h1:oK4mSFcQz7cTQIfqbe4MIj9gLW+mnanjyFtc6cdF0Y8= github.com/libp2p/go-buffer-pool v0.1.0/go.mod h1:N+vh8gMqimBzdKkSMVuydVDq+UV5QTWy5HSiZacSbPg= github.com/libp2p/go-cidranger v1.1.0 h1:ewPN8EZ0dd1LSnrtuwd4709PXVcITVeuwbag38yPW7c= +github.com/libp2p/go-cidranger v1.1.0/go.mod h1:KWZTfSr+r9qEo9OkI9/SIEeAtw+NNoU0dXIXt15Okic= github.com/libp2p/go-libp2p v0.32.2 h1:s8GYN4YJzgUoyeYNPdW7JZeZ5Ee31iNaIBfGYMAY4FQ= github.com/libp2p/go-libp2p v0.32.2/go.mod h1:E0LKe+diV/ZVJVnOJby8VC5xzHF0660osg71skcxJvk= github.com/libp2p/go-libp2p-asn-util v0.3.0 h1:gMDcMyYiZKkocGXDQ5nsUQyquC9+H+iLEQHwOCZ7s8s= +github.com/libp2p/go-libp2p-asn-util v0.3.0/go.mod h1:B1mcOrKUE35Xq/ASTmQ4tN3LNzVVaMNmq2NACuqyB9w= github.com/libp2p/go-libp2p-record v0.2.0 h1:oiNUOCWno2BFuxt3my4i1frNrt7PerzB3queqa1NkQ0= +github.com/libp2p/go-libp2p-record v0.2.0/go.mod h1:I+3zMkvvg5m2OcSdoL0KPljyJyvNDFGKX7QdlpYUcwk= github.com/libp2p/go-libp2p-testing v0.12.0 h1:EPvBb4kKMWO29qP4mZGyhVzUyR25dvfUIK5WDu6iPUA= +github.com/libp2p/go-libp2p-testing v0.12.0/go.mod h1:KcGDRXyN7sQCllucn1cOOS+Dmm7ujhfEyXQL5lvkcPg= github.com/libp2p/go-msgio v0.3.0 h1:mf3Z8B1xcFN314sWX+2vOTShIE0Mmn2TXn3YCUQGNj0= +github.com/libp2p/go-msgio v0.3.0/go.mod h1:nyRM819GmVaF9LX3l03RMh10QdOroF++NBbxAb0mmDM= github.com/libp2p/go-nat v0.2.0 h1:Tyz+bUFAYqGyJ/ppPPymMGbIgNRH+WqC5QrT5fKrrGk= +github.com/libp2p/go-nat v0.2.0/go.mod h1:3MJr+GRpRkyT65EpVPBstXLvOlAPzUVlG6Pwg9ohLJk= github.com/libp2p/go-netroute v0.2.1 h1:V8kVrpD8GK0Riv15/7VN6RbUQ3URNZVosw7H2v9tksU= +github.com/libp2p/go-netroute v0.2.1/go.mod h1:hraioZr0fhBjG0ZRXJJ6Zj2IVEVNx6tDTFQfSmcq7mQ= github.com/libp2p/go-yamux/v4 v4.0.1 h1:FfDR4S1wj6Bw2Pqbc8Uz7pCxeRBPbwsBbEdfwiCypkQ= +github.com/libp2p/go-yamux/v4 v4.0.1/go.mod h1:NWjl8ZTLOGlozrXSOZ/HlfG++39iKNnM5wwmtQP1YB4= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-runewidth v0.0.13 h1:lTGmDsbAYt5DmK6OnoV7EuIF1wEIFAcxld6ypU4OSgU= +github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/miekg/dns v1.1.56 h1:5imZaSeoRNvpM9SzWNhEcP9QliKiz20/dA2QabIGVnE= +github.com/miekg/dns v1.1.56/go.mod h1:cRm6Oo2C8TY9ZS/TqsSrseAcncm74lfK5G+ikN2SWWY= github.com/miguelmota/go-ethereum-hdwallet v0.1.2 h1:mz9LO6V7QCRkLYb0AH17t5R8KeqCe3E+hx9YXpmZeXA= github.com/miguelmota/go-ethereum-hdwallet v0.1.2/go.mod h1:fdNwFSoBFVBPnU0xpOd6l2ueqsPSH/Gch5kIvSvTGk8= github.com/minio/blake2b-simd v0.0.0-20160723061019-3f5f724cb5b1/go.mod h1:pD8RvIylQ358TN4wwqatJ8rNavkEINozVn9DtGI3dfQ= @@ -215,7 +263,9 @@ github.com/multiformats/go-base36 v0.2.0/go.mod h1:qvnKE++v+2MWCfePClUEjE78Z7P2a github.com/multiformats/go-multiaddr v0.12.0 h1:1QlibTFkoXJuDjjYsMHhE73TnzJQl8FSWatk/0gxGzE= github.com/multiformats/go-multiaddr v0.12.0/go.mod h1:WmZXgObOQOYp9r3cslLlppkrz1FYSHmE834dfz/lWu8= github.com/multiformats/go-multiaddr-dns v0.3.1 h1:QgQgR+LQVt3NPTjbrLLpsaT2ufAA2y0Mkk+QRVJbW3A= +github.com/multiformats/go-multiaddr-dns v0.3.1/go.mod h1:G/245BRQ6FJGmryJCrOuTdB37AMA5AMOVuO6NY3JwTk= github.com/multiformats/go-multiaddr-fmt v0.1.0 h1:WLEFClPycPkp4fnIzoFoV9FVd49/eQsuaL3/CWe167E= +github.com/multiformats/go-multiaddr-fmt v0.1.0/go.mod h1:hGtDIW4PU4BqJ50gW2quDuPVjyWNZxToGUh/HwTZYJo= github.com/multiformats/go-multibase v0.2.0 h1:isdYCVLvksgWlMW9OZRYJEa9pZETFivncJHmHnnd87g= github.com/multiformats/go-multibase v0.2.0/go.mod h1:bFBZX4lKCA/2lyOFSAoKH5SS6oPyjtnzK/XTFDPkNuk= github.com/multiformats/go-multicodec v0.9.0 h1:pb/dlPnzee/Sxv/j4PmkDRxCOi3hXTz3IbPKOXWJkmg= @@ -229,13 +279,16 @@ github.com/multiformats/go-varint v0.0.5/go.mod h1:3Ls8CIEsrijN6+B7PbrXRPxHRPuXS github.com/multiformats/go-varint v0.0.7 h1:sWSGR+f/eu5ABZA2ZpYKBILXTTs9JWpdEM/nEGOHFS8= github.com/multiformats/go-varint v0.0.7/go.mod h1:r8PUYw/fD/SjBCiKOoDlGF6QawOELpZAu9eioSos/OU= github.com/nfnt/resize v0.0.0-20160724205520-891127d8d1b5 h1:BvoENQQU+fZ9uukda/RzCAL/191HHwJA5b13R6diVlY= +github.com/nfnt/resize v0.0.0-20160724205520-891127d8d1b5/go.mod h1:jpp1/29i3P1S/RLdc7JQKbRpFeM1dOBd8T9ki5s+AY8= github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= +github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo/v2 v2.15.0 h1:79HwNRBAZHOEwrczrgSOPy+eFTTlIGELKy5as+ClttY= -github.com/onsi/ginkgo/v2 v2.15.0/go.mod h1:HlxMHtYF57y6Dpf+mc5529KKmSq9h2FpCF+/ZkwUxKM= +github.com/onsi/ginkgo/v2 v2.17.1 h1:V++EzdbhI4ZV4ev0UTIj0PzhzOcReJFyJaLjtSF55M8= +github.com/onsi/ginkgo/v2 v2.17.1/go.mod h1:llBI3WDLL9Z6taip6f33H76YcWtJv+7R3HigUjbIBOs= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.30.0 h1:hvMK7xYz4D3HapigLTeGdId/NcfQx1VHMJc60ew99+8= +github.com/onsi/gomega v1.30.0/go.mod h1:9sxs+SwGrKI0+PWe4Fxa9tFQQBG5xSsSbMXOI8PPpoQ= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= @@ -252,15 +305,18 @@ github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5E github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= github.com/quic-go/qpack v0.4.0 h1:Cr9BXA1sQS2SmDUWjSofMPNKmvF6IiIfDRmgU0w1ZCo= -github.com/quic-go/qtls-go1-20 v0.4.1 h1:D33340mCNDAIKBqXuAvexTNMUByrYmFYVfKfDN5nfFs= -github.com/quic-go/qtls-go1-20 v0.4.1/go.mod h1:X9Nh97ZL80Z+bX/gUXMbipO6OxdiDi58b/fMC9mAL+k= -github.com/quic-go/quic-go v0.40.1 h1:X3AGzUNFs0jVuO3esAGnTfvdgvL4fq655WaOi1snv1Q= -github.com/quic-go/quic-go v0.40.1/go.mod h1:PeN7kuVJ4xZbxSv/4OX6S1USOX8MJvydwpTx31vx60c= +github.com/quic-go/qpack v0.4.0/go.mod h1:UZVnYIfi5GRk+zI9UMaCPsmZ2xKJP7XBUvVyT1Knj9A= +github.com/quic-go/quic-go v0.42.0 h1:uSfdap0eveIl8KXnipv9K7nlwZ5IqLlYOpJ58u5utpM= +github.com/quic-go/quic-go v0.42.0/go.mod h1:132kz4kL3F9vxhW3CtQJLDVwcFe5wdWeJXXijhsO57M= github.com/quic-go/webtransport-go v0.6.0 h1:CvNsKqc4W2HljHJnoT+rMmbRJybShZ0YPFDD3NxaZLY= +github.com/quic-go/webtransport-go v0.6.0/go.mod h1:9KjU4AEBqEQidGHNDkZrb8CAa1abRaosM2yGOyiikEc= github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY= +github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= +github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible h1:Bn1aCHHRnjv4Bl16T8rcaFjYSrGrIZvpiGO6P3Q4GpU= +github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/smartystreets/assertions v1.2.0 h1:42S6lae5dvLc7BrLu/0ugRtcFVjoJNMC/N3yZFZkDFs= github.com/smartystreets/assertions v1.2.0/go.mod h1:tcbTF8ujkAEcZ8TElKY+i30BzYlVhC/LOxJk7iOWnoo= @@ -279,12 +335,16 @@ github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8 github.com/supranational/blst v0.3.11 h1:LyU6FolezeWAhvQk0k6O/d49jqgO52MSDDfYgbeoEm4= github.com/supranational/blst v0.3.11/go.mod h1:jZJtfjgudtNl4en1tzwPIV3KjUnQUvG3/j+w+fVonLw= github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 h1:epCh84lMvA70Z7CTTCmYQn2CKbY8j86K7/FAIr141uY= +github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7/go.mod h1:q4W45IWZaF22tdD+VEXcAWRA037jwmWEB5VWYORlTpc= github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= +github.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0hSfmBq8nJbHYI= github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk= +github.com/tklauser/numcpus v0.6.1/go.mod h1:1XfjsgE2zo8GVw7POkMbHENHzVg3GzmoZ9fESEdAacY= github.com/tyler-smith/go-bip39 v1.1.0 h1:5eUemwrMargf3BSLRRCalXT93Ns6pQJIjYQN2nyfOP8= github.com/tyler-smith/go-bip39 v1.1.0/go.mod h1:gUYDtqQw1JS3ZJ8UWVcGTGqqr6YIN3CWg+kkNaLt55U= github.com/urfave/cli v1.22.10/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/warpfork/go-testmark v0.12.1 h1:rMgCpJfwy1sJ50x0M0NgyphxYYPMOODIJHhsXyEHU0s= +github.com/warpfork/go-testmark v0.12.1/go.mod h1:kHwy7wfvGSPh1rQJYKayD4AbtNaeyZdcGi9tNJTaa5Y= github.com/warpfork/go-wish v0.0.0-20220906213052-39a1cc7a02d0 h1:GDDkbFiaK8jsSDJfjId/PEGEShv6ugrt4kYsC5UIDaQ= github.com/warpfork/go-wish v0.0.0-20220906213052-39a1cc7a02d0/go.mod h1:x6AKhvSSexNrVSrViXSHUEbICjmGXhtgABaHIySUSGw= github.com/whyrusleeping/chunker v0.0.0-20181014151217-fe64bd25879f h1:jQa4QT2UP9WYv2nzyawpKMOCl+Z/jW7djv2/J50lj9E= @@ -294,6 +354,7 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/zeebo/assert v1.1.0/go.mod h1:Pq9JiuJQpG8JLJdtkwrJESF0Foym2/D9XMU5ciN/wJ0= github.com/zeebo/assert v1.3.0 h1:g7C04CbJuIDKNPFHmsk4hwZDO5O+kntRxzaUoNXj+IQ= +github.com/zeebo/assert v1.3.0/go.mod h1:Pq9JiuJQpG8JLJdtkwrJESF0Foym2/D9XMU5ciN/wJ0= github.com/zeebo/blake3 v0.2.3 h1:TFoLXsjeXqRNFxSbk35Dk4YtszE/MQQGK10BH4ptoTg= github.com/zeebo/blake3 v0.2.3/go.mod h1:mjJjZpnsyIVtVgTOSpJ9vmRE4wgDeyt2HU3qXvvKCaQ= github.com/zeebo/errs v1.3.0 h1:hmiaKqgYZzcVgRL1Vkc1Mn2914BbzB0IBxs+ebeutGs= @@ -309,6 +370,7 @@ go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE= go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= go.uber.org/goleak v1.1.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= +go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/mock v0.4.0 h1:VcM4ZOtdbR4f6VXfiOpwpVJDL6lCReaZ6mw31wqh7KU= go.uber.org/mock v0.4.0/go.mod h1:a6FSlNadKUHUa9IP5Vyt1zh4fC7uAwxMutEAscFbkZc= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= @@ -326,16 +388,16 @@ golang.org/x/crypto v0.0.0-20200602180216-279210d13fed/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.21.0 h1:X31++rzVUdKhX5sWmSOFZxx8UW/ldWx55cbf08iNAMA= golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs= -golang.org/x/exp v0.0.0-20240205201215-2c58cdc269a3 h1:/RIbNt/Zr7rVhIkQhooTxCxFcdWLGIKnZA4IXNFSrvo= -golang.org/x/exp v0.0.0-20240205201215-2c58cdc269a3/go.mod h1:idGWGoKP1toJGkd5/ig9ZLuPcZBC3ewk7SzmH0uou08= +golang.org/x/exp v0.0.0-20240325151524-a685a6edb6d8 h1:aAcj0Da7eBAtrTp03QXWvm88pSyOt+UgdZw2BFZ+lEw= +golang.org/x/exp v0.0.0-20240325151524-a685a6edb6d8/go.mod h1:CQ1k9gNrJ50XIzaKCRR2hssIjF07kZFEiieALBM/ARQ= golang.org/x/image v0.14.0 h1:tNgSxAFe3jC4uYqvZdTr84SZoM1KfwdC9SKIFrLjFn4= golang.org/x/image v0.14.0/go.mod h1:HUYqC05R2ZcZ3ejNQsIHQDQiwWM4JBqmm6MKANTp4LE= golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.15.0 h1:SernR4v+D55NyBH2QiEQrlBAnj1ECL6AGrA5+dPaMY8= -golang.org/x/mod v0.15.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.16.0 h1:QX4fJ0Rr5cPQCF7O9lh9Se4pmwfwskqZfq5moyldzic= +golang.org/x/mod v0.16.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= @@ -369,6 +431,7 @@ golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9sn golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -378,8 +441,8 @@ golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.17.0 h1:FvmRgNOcs3kOa+T20R1uhfP9F6HgG2mfxDv1vrx1Htc= -golang.org/x/tools v0.17.0/go.mod h1:xsh6VxdV005rRVaS6SSAf9oiAqljS7UZUacMZ8Bnsps= +golang.org/x/tools v0.19.0 h1:tfGCXNR1OsFG+sVdLAitlpjAvD/I6dHDKnYrpEZUHkw= +golang.org/x/tools v0.19.0/go.mod h1:qoJWxmGSIBmAeriMx19ogtrEPrGtDbPK634QFIcLAhc= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -389,12 +452,14 @@ google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHh gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= From c6675528501cc15cf9c35e671258fa807d00bab5 Mon Sep 17 00:00:00 2001 From: Grigory Efimov Date: Wed, 3 Apr 2024 13:19:07 +0000 Subject: [PATCH 088/140] .github/workflows/coverage.yml update go-version=1.22 --- .github/workflows/cla.yml | 2 +- .github/workflows/coverage.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cla.yml b/.github/workflows/cla.yml index 96e9acc6..c0d8bbf5 100644 --- a/.github/workflows/cla.yml +++ b/.github/workflows/cla.yml @@ -10,7 +10,7 @@ permissions: contents: write pull-requests: write statuses: write - + jobs: cla-check: uses: anyproto/open/.github/workflows/cla.yml@main diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index db553ef2..08a5c2eb 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -13,7 +13,7 @@ jobs: strategy: matrix: go-version: - - '1.21' + - '1.22' env: GOPRIVATE: github.com/anyproto steps: From 8e24ea25e80709255174acc2d2d778b9c3120713 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 3 Apr 2024 13:31:21 +0000 Subject: [PATCH 089/140] Bump github.com/libp2p/go-libp2p from 0.32.2 to 0.33.2 Bumps [github.com/libp2p/go-libp2p](https://github.com/libp2p/go-libp2p) from 0.32.2 to 0.33.2. - [Release notes](https://github.com/libp2p/go-libp2p/releases) - [Changelog](https://github.com/libp2p/go-libp2p/blob/master/CHANGELOG.md) - [Commits](https://github.com/libp2p/go-libp2p/compare/v0.32.2...v0.33.2) --- updated-dependencies: - dependency-name: github.com/libp2p/go-libp2p dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- go.mod | 8 ++++---- go.sum | 34 ++++++++++++++++------------------ 2 files changed, 20 insertions(+), 22 deletions(-) diff --git a/go.mod b/go.mod index facc2d1b..29480eb9 100644 --- a/go.mod +++ b/go.mod @@ -20,7 +20,7 @@ require ( github.com/ipfs/go-block-format v0.2.0 github.com/ipfs/go-cid v0.4.1 github.com/ipfs/go-ipld-format v0.6.0 - github.com/libp2p/go-libp2p v0.32.2 + github.com/libp2p/go-libp2p v0.33.2 github.com/miguelmota/go-ethereum-hdwallet v0.1.2 github.com/mr-tron/base58 v1.2.0 github.com/multiformats/go-multibase v0.2.0 @@ -77,14 +77,14 @@ require ( github.com/ipld/go-ipld-prime v0.21.0 // indirect github.com/jbenet/go-temp-err-catcher v0.1.0 // indirect github.com/jbenet/goprocess v0.1.4 // indirect - github.com/klauspost/cpuid/v2 v2.2.5 // indirect + github.com/klauspost/cpuid/v2 v2.2.7 // indirect github.com/libp2p/go-buffer-pool v0.1.0 // indirect github.com/mattn/go-isatty v0.0.20 // indirect github.com/minio/sha256-simd v1.0.1 // indirect github.com/mmcloughlin/addchain v0.4.0 // indirect github.com/multiformats/go-base32 v0.1.0 // indirect github.com/multiformats/go-base36 v0.2.0 // indirect - github.com/multiformats/go-multiaddr v0.12.0 // indirect + github.com/multiformats/go-multiaddr v0.12.3 // indirect github.com/multiformats/go-multicodec v0.9.0 // indirect github.com/multiformats/go-multistream v0.5.0 // indirect github.com/multiformats/go-varint v0.0.7 // indirect @@ -92,7 +92,7 @@ require ( github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/polydawn/refmt v0.89.0 // indirect - github.com/prometheus/client_model v0.5.0 // indirect + github.com/prometheus/client_model v0.6.0 // indirect github.com/prometheus/common v0.48.0 // indirect github.com/prometheus/procfs v0.12.0 // indirect github.com/spaolacci/murmur3 v1.1.0 // indirect diff --git a/go.sum b/go.sum index f4bba2b3..ea8c198e 100644 --- a/go.sum +++ b/go.sum @@ -88,8 +88,8 @@ github.com/ethereum/c-kzg-4844 v0.4.0 h1:3MS1s4JtA868KpJxroZoepdV0ZKBp3u/O5HcZ7R github.com/ethereum/c-kzg-4844 v0.4.0/go.mod h1:VewdlzQmpT5QSrVhbBuGoCdFJkpaJlO1aQputP83wc0= github.com/ethereum/go-ethereum v1.13.12 h1:iDr9UM2JWkngBHGovRJEQn4Kor7mT4gt9rUZqB5M29Y= github.com/ethereum/go-ethereum v1.13.12/go.mod h1:hKL2Qcj1OvStXNSEDbucexqnEt1Wh4Cz329XsjAalZY= -github.com/flynn/noise v1.0.0 h1:DlTHqmzmvcEiKj+4RYo/imoswx/4r6iBlCMfVtrMXpQ= -github.com/flynn/noise v1.0.0/go.mod h1:xbMo+0i6+IGbYdJhF31t2eR1BIU0CYc12+BNAKwUTag= +github.com/flynn/noise v1.1.0 h1:KjPQoQCEFdZDiP03phOvGi11+SVVhBG2wOWAorLsstg= +github.com/flynn/noise v1.1.0/go.mod h1:xbMo+0i6+IGbYdJhF31t2eR1BIU0CYc12+BNAKwUTag= github.com/fogleman/gg v1.3.0 h1:/7zJX8F6AaYQc57WQCyN9cAIz+4bCJGO9B+dyW29am8= github.com/fogleman/gg v1.3.0/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= github.com/francoispqt/gojay v1.2.13 h1:d2m3sFjloqoIUQU3TsHBgj6qg/BVGlTBeHDUmyJnXKk= @@ -199,11 +199,11 @@ github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfV github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4= -github.com/klauspost/compress v1.17.2 h1:RlWWUY/Dr4fL8qk9YG7DTZ7PDgME2V4csBXA8L/ixi4= -github.com/klauspost/compress v1.17.2/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= +github.com/klauspost/compress v1.17.6 h1:60eq2E/jlfwQXtvZEeBUYADs+BwKBWURIY+Gj2eRGjI= +github.com/klauspost/compress v1.17.6/go.mod h1:/dCuZOvVtNoHsyb+cuJD3itjs3NbnF6KH9zAO4BDxPM= github.com/klauspost/cpuid/v2 v2.0.12/go.mod h1:g2LTdtYhdyuGPqyWyv7qRAmj1WBqxuObKfj5c0PQa7c= -github.com/klauspost/cpuid/v2 v2.2.5 h1:0E5MSMDEoAulmXNFquVs//DdoomxaoTY1kUhbc/qbZg= -github.com/klauspost/cpuid/v2 v2.2.5/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws= +github.com/klauspost/cpuid/v2 v2.2.7 h1:ZWSB3igEs+d0qvnxR/ZBzXVmxkgt8DdzP6m9pfuVLDM= +github.com/klauspost/cpuid/v2 v2.2.7/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws= github.com/koron/go-ssdp v0.0.4 h1:1IDwrghSKYM7yLf7XCzbByg2sJ/JcNOZRXS2jczTwz0= github.com/koron/go-ssdp v0.0.4/go.mod h1:oDXq+E5IL5q0U8uSBcoAXzTzInwy5lEgC91HoKtbmZk= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= @@ -219,12 +219,10 @@ github.com/leanovate/gopter v0.2.9 h1:fQjYxZaynp97ozCzfOyOuAGOU4aU/z37zf/tOujFk7 github.com/leanovate/gopter v0.2.9/go.mod h1:U2L/78B+KVFIx2VmW6onHJQzXtFb+p5y3y2Sh+Jxxv8= github.com/libp2p/go-buffer-pool v0.1.0 h1:oK4mSFcQz7cTQIfqbe4MIj9gLW+mnanjyFtc6cdF0Y8= github.com/libp2p/go-buffer-pool v0.1.0/go.mod h1:N+vh8gMqimBzdKkSMVuydVDq+UV5QTWy5HSiZacSbPg= -github.com/libp2p/go-cidranger v1.1.0 h1:ewPN8EZ0dd1LSnrtuwd4709PXVcITVeuwbag38yPW7c= -github.com/libp2p/go-cidranger v1.1.0/go.mod h1:KWZTfSr+r9qEo9OkI9/SIEeAtw+NNoU0dXIXt15Okic= -github.com/libp2p/go-libp2p v0.32.2 h1:s8GYN4YJzgUoyeYNPdW7JZeZ5Ee31iNaIBfGYMAY4FQ= -github.com/libp2p/go-libp2p v0.32.2/go.mod h1:E0LKe+diV/ZVJVnOJby8VC5xzHF0660osg71skcxJvk= -github.com/libp2p/go-libp2p-asn-util v0.3.0 h1:gMDcMyYiZKkocGXDQ5nsUQyquC9+H+iLEQHwOCZ7s8s= -github.com/libp2p/go-libp2p-asn-util v0.3.0/go.mod h1:B1mcOrKUE35Xq/ASTmQ4tN3LNzVVaMNmq2NACuqyB9w= +github.com/libp2p/go-libp2p v0.33.2 h1:vCdwnFxoGOXMKmaGHlDSnL4bM3fQeW8pgIa9DECnb40= +github.com/libp2p/go-libp2p v0.33.2/go.mod h1:zTeppLuCvUIkT118pFVzA8xzP/p2dJYOMApCkFh0Yww= +github.com/libp2p/go-libp2p-asn-util v0.4.1 h1:xqL7++IKD9TBFMgnLPZR6/6iYhawHKHl950SO9L6n94= +github.com/libp2p/go-libp2p-asn-util v0.4.1/go.mod h1:d/NI6XZ9qxw67b4e+NgpQexCIiFYJjErASrYW4PFDN8= github.com/libp2p/go-libp2p-record v0.2.0 h1:oiNUOCWno2BFuxt3my4i1frNrt7PerzB3queqa1NkQ0= github.com/libp2p/go-libp2p-record v0.2.0/go.mod h1:I+3zMkvvg5m2OcSdoL0KPljyJyvNDFGKX7QdlpYUcwk= github.com/libp2p/go-libp2p-testing v0.12.0 h1:EPvBb4kKMWO29qP4mZGyhVzUyR25dvfUIK5WDu6iPUA= @@ -242,8 +240,8 @@ github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWE github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-runewidth v0.0.13 h1:lTGmDsbAYt5DmK6OnoV7EuIF1wEIFAcxld6ypU4OSgU= github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= -github.com/miekg/dns v1.1.56 h1:5imZaSeoRNvpM9SzWNhEcP9QliKiz20/dA2QabIGVnE= -github.com/miekg/dns v1.1.56/go.mod h1:cRm6Oo2C8TY9ZS/TqsSrseAcncm74lfK5G+ikN2SWWY= +github.com/miekg/dns v1.1.58 h1:ca2Hdkz+cDg/7eNF6V56jjzuZ4aCAE+DbVkILdQWG/4= +github.com/miekg/dns v1.1.58/go.mod h1:Ypv+3b/KadlvW9vJfXOTf300O4UqaHFzFCuHz+rPkBY= github.com/miguelmota/go-ethereum-hdwallet v0.1.2 h1:mz9LO6V7QCRkLYb0AH17t5R8KeqCe3E+hx9YXpmZeXA= github.com/miguelmota/go-ethereum-hdwallet v0.1.2/go.mod h1:fdNwFSoBFVBPnU0xpOd6l2ueqsPSH/Gch5kIvSvTGk8= github.com/minio/blake2b-simd v0.0.0-20160723061019-3f5f724cb5b1/go.mod h1:pD8RvIylQ358TN4wwqatJ8rNavkEINozVn9DtGI3dfQ= @@ -260,8 +258,8 @@ github.com/multiformats/go-base32 v0.1.0 h1:pVx9xoSPqEIQG8o+UbAe7DNi51oej1NtK+aG github.com/multiformats/go-base32 v0.1.0/go.mod h1:Kj3tFY6zNr+ABYMqeUNeGvkIC/UYgtWibDcT0rExnbI= github.com/multiformats/go-base36 v0.2.0 h1:lFsAbNOGeKtuKozrtBsAkSVhv1p9D0/qedU9rQyccr0= github.com/multiformats/go-base36 v0.2.0/go.mod h1:qvnKE++v+2MWCfePClUEjE78Z7P2a1UV0xHgWc0hkp4= -github.com/multiformats/go-multiaddr v0.12.0 h1:1QlibTFkoXJuDjjYsMHhE73TnzJQl8FSWatk/0gxGzE= -github.com/multiformats/go-multiaddr v0.12.0/go.mod h1:WmZXgObOQOYp9r3cslLlppkrz1FYSHmE834dfz/lWu8= +github.com/multiformats/go-multiaddr v0.12.3 h1:hVBXvPRcKG0w80VinQ23P5t7czWgg65BmIvQKjDydU8= +github.com/multiformats/go-multiaddr v0.12.3/go.mod h1:sBXrNzucqkFJhvKOiwwLyqamGa/P5EIXNPLovyhQCII= github.com/multiformats/go-multiaddr-dns v0.3.1 h1:QgQgR+LQVt3NPTjbrLLpsaT2ufAA2y0Mkk+QRVJbW3A= github.com/multiformats/go-multiaddr-dns v0.3.1/go.mod h1:G/245BRQ6FJGmryJCrOuTdB37AMA5AMOVuO6NY3JwTk= github.com/multiformats/go-multiaddr-fmt v0.1.0 h1:WLEFClPycPkp4fnIzoFoV9FVd49/eQsuaL3/CWe167E= @@ -298,8 +296,8 @@ github.com/polydawn/refmt v0.89.0 h1:ADJTApkvkeBZsN0tBTx8QjpD9JkmxbKp0cxfr9qszm4 github.com/polydawn/refmt v0.89.0/go.mod h1:/zvteZs/GwLtCgZ4BL6CBsk9IKIlexP43ObX9AxTqTw= github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= -github.com/prometheus/client_model v0.5.0 h1:VQw1hfvPvk3Uv6Qf29VrPF32JB6rtbgI6cYPYQjL0Qw= -github.com/prometheus/client_model v0.5.0/go.mod h1:dTiFglRmd66nLR9Pv9f0mZi7B7fk5Pm3gvsjB5tr+kI= +github.com/prometheus/client_model v0.6.0 h1:k1v3CzpSRUTrKMppY35TLwPvxHqBu0bYgxZzqGIgaos= +github.com/prometheus/client_model v0.6.0/go.mod h1:NTQHnmxFpouOD0DpvP4XujX3CdOAGQPoaGhyTchlyt8= github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= From 3d52c4c395f56f1b8cb38038acdd7826ab242fdc Mon Sep 17 00:00:00 2001 From: mcrakhman Date: Sun, 7 Apr 2024 13:37:35 +0200 Subject: [PATCH 090/140] Add isEmpty and stop sharing check --- commonspace/acl/aclclient/aclspaceclient.go | 4 ++++ commonspace/object/acl/list/aclstate.go | 10 ++++++++++ 2 files changed, 14 insertions(+) diff --git a/commonspace/acl/aclclient/aclspaceclient.go b/commonspace/acl/aclclient/aclspaceclient.go index 412e6595..c007fbc0 100644 --- a/commonspace/acl/aclclient/aclspaceclient.go +++ b/commonspace/acl/aclclient/aclspaceclient.go @@ -132,6 +132,10 @@ func (c *aclSpaceClient) RevokeAllInvites(ctx context.Context) (err error) { func (c *aclSpaceClient) StopSharing(ctx context.Context, readKeyChange list.ReadKeyChangePayload) (err error) { c.acl.Lock() + if c.acl.AclState().IsEmpty() { + c.acl.Unlock() + return + } var ( identities []crypto.PubKey recIds []string diff --git a/commonspace/object/acl/list/aclstate.go b/commonspace/object/acl/list/aclstate.go index d5eac20b..0f16f740 100644 --- a/commonspace/object/acl/list/aclstate.go +++ b/commonspace/object/acl/list/aclstate.go @@ -229,6 +229,16 @@ func (st *AclState) ApplyRecord(record *AclRecord) (err error) { return } +func (st *AclState) IsEmpty() bool { + users := 0 + for _, acc := range st.CurrentAccounts() { + if !acc.Permissions.NoPermissions() { + users++ + } + } + return users == 1 && len(st.Invites()) == 0 && len(st.pendingRequests) == 0 +} + func (st *AclState) applyRoot(record *AclRecord) (err error) { root, ok := record.Model.(*aclrecordproto.AclRoot) if !ok { From d771ab6f5b8daea95fcad43ee8848d27ddbfb719 Mon Sep 17 00:00:00 2001 From: mcrakhman Date: Mon, 8 Apr 2024 10:49:15 +0200 Subject: [PATCH 091/140] Add tests --- .../acl/aclclient/aclspaceclient_test.go | 131 ++++++++++++++++++ commonspace/object/acl/list/aclstate_test.go | 70 ++++++++++ 2 files changed, 201 insertions(+) create mode 100644 commonspace/acl/aclclient/aclspaceclient_test.go create mode 100644 commonspace/object/acl/list/aclstate_test.go diff --git a/commonspace/acl/aclclient/aclspaceclient_test.go b/commonspace/acl/aclclient/aclspaceclient_test.go new file mode 100644 index 00000000..bfe94a53 --- /dev/null +++ b/commonspace/acl/aclclient/aclspaceclient_test.go @@ -0,0 +1,131 @@ +package aclclient + +import ( + "context" + "testing" + + "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" + + "github.com/anyproto/any-sync/app" + "github.com/anyproto/any-sync/commonspace/object/acl/list" + "github.com/anyproto/any-sync/commonspace/object/acl/syncacl" + "github.com/anyproto/any-sync/commonspace/spacestate" + "github.com/anyproto/any-sync/consensus/consensusproto" + "github.com/anyproto/any-sync/node/nodeclient" + "github.com/anyproto/any-sync/node/nodeclient/mock_nodeclient" + "github.com/anyproto/any-sync/testutil/anymock" + "github.com/anyproto/any-sync/util/cidutil" + "github.com/anyproto/any-sync/util/crypto" +) + +var ctx = context.Background() + +func TestAclSpaceClient_StopSharing(t *testing.T) { + t.Run("not empty", func(t *testing.T) { + fx := newFixture(t) + defer fx.finish(t) + cmds := []string{ + "a.invite::invId", + "b.join::invId", + "c.join::invId", + "a.approve::c,r", + } + for _, cmd := range cmds { + err := fx.exec.Execute(cmd) + require.NoError(t, err) + } + newPrivKey, _, err := crypto.GenerateRandomEd25519KeyPair() + require.NoError(t, err) + st := fx.acl.AclState() + require.False(t, st.IsEmpty()) + fx.nodeClient.EXPECT().AclAddRecord(ctx, fx.spaceState.SpaceId, gomock.Any()).DoAndReturn( + func(ctx context.Context, spaceId string, rec *consensusproto.RawRecord) (*consensusproto.RawRecordWithId, error) { + return marshallRecord(t, rec), nil + }) + err = fx.StopSharing(ctx, list.ReadKeyChangePayload{ + MetadataKey: newPrivKey, + ReadKey: crypto.NewAES(), + }) + st = fx.acl.AclState() + require.True(t, st.IsEmpty()) + }) + t.Run("already empty", func(t *testing.T) { + fx := newFixture(t) + defer fx.finish(t) + newPrivKey, _, err := crypto.GenerateRandomEd25519KeyPair() + require.NoError(t, err) + st := fx.acl.AclState() + require.True(t, st.IsEmpty()) + err = fx.StopSharing(ctx, list.ReadKeyChangePayload{ + MetadataKey: newPrivKey, + ReadKey: crypto.NewAES(), + }) + st = fx.acl.AclState() + require.True(t, st.IsEmpty()) + }) +} + +type namedAcl struct { + list.AclList +} + +func (a *namedAcl) Name() string { + return syncacl.CName +} + +func (a *namedAcl) Init(app *app.App) error { + return nil +} + +func marshallRecord(t *testing.T, rec *consensusproto.RawRecord) *consensusproto.RawRecordWithId { + data, err := rec.Marshal() + require.NoError(t, err) + recId, err := cidutil.NewCidFromBytes(data) + require.NoError(t, err) + return &consensusproto.RawRecordWithId{ + Payload: data, + Id: recId, + } +} + +type fixture struct { + *aclSpaceClient + a *app.App + ctrl *gomock.Controller + nodeClient *mock_nodeclient.MockNodeClient + acl list.AclList + spaceState *spacestate.SpaceState + exec *list.AclTestExecutor +} + +func newFixture(t *testing.T) *fixture { + ctrl := gomock.NewController(t) + spaceId := "spaceId" + exec := list.NewAclExecutor(spaceId) + err := exec.Execute("a.init::a") + require.NoError(t, err) + acl := exec.ActualAccounts()["a"].Acl + fx := &fixture{ + aclSpaceClient: NewAclSpaceClient().(*aclSpaceClient), + ctrl: ctrl, + acl: acl, + nodeClient: mock_nodeclient.NewMockNodeClient(ctrl), + spaceState: &spacestate.SpaceState{SpaceId: spaceId}, + a: new(app.App), + exec: exec, + } + anymock.ExpectComp(fx.nodeClient.EXPECT(), nodeclient.CName) + fx.a.Register(fx.spaceState). + Register(fx.nodeClient). + Register(&namedAcl{acl}). + Register(fx) + + require.NoError(t, fx.a.Start(ctx)) + return fx +} + +func (fx *fixture) finish(t *testing.T) { + require.NoError(t, fx.a.Close(ctx)) + fx.ctrl.Finish() +} diff --git a/commonspace/object/acl/list/aclstate_test.go b/commonspace/object/acl/list/aclstate_test.go new file mode 100644 index 00000000..cae40dc8 --- /dev/null +++ b/commonspace/object/acl/list/aclstate_test.go @@ -0,0 +1,70 @@ +package list + +import ( + "testing" + + "github.com/stretchr/testify/require" +) + +func TestAclStateIsEmpty(t *testing.T) { + t.Run("not empty when invites", func(t *testing.T) { + a := NewAclExecutor("spaceId") + cmds := []string{ + "a.init::a", + "a.invite::invId", + } + for _, cmd := range cmds { + err := a.Execute(cmd) + require.NoError(t, err) + } + st := a.ActualAccounts()["a"].Acl.AclState() + require.False(t, st.IsEmpty()) + }) + t.Run("not empty when joining requests", func(t *testing.T) { + a := NewAclExecutor("spaceId") + cmds := []string{ + "a.init::a", + "a.invite::invId", + "b.join::invId", + "a.revoke::invId", + } + for _, cmd := range cmds { + err := a.Execute(cmd) + require.NoError(t, err) + } + st := a.ActualAccounts()["a"].Acl.AclState() + require.False(t, st.IsEmpty()) + }) + t.Run("not empty when users", func(t *testing.T) { + a := NewAclExecutor("spaceId") + cmds := []string{ + "a.init::a", + "a.invite::invId", + "b.join::invId", + "a.revoke::invId", + "a.approve::b,r", + } + for _, cmd := range cmds { + err := a.Execute(cmd) + require.NoError(t, err) + } + st := a.ActualAccounts()["a"].Acl.AclState() + require.False(t, st.IsEmpty()) + }) + t.Run("empty when no joining requests, no invites and no users", func(t *testing.T) { + a := NewAclExecutor("spaceId") + cmds := []string{ + "a.init::a", + "a.invite::invId", + "b.join::invId", + "a.decline::b", + "a.revoke::invId", + } + for _, cmd := range cmds { + err := a.Execute(cmd) + require.NoError(t, err) + } + st := a.ActualAccounts()["a"].Acl.AclState() + require.True(t, st.IsEmpty()) + }) +} From c256ade02b4cc29f83d21247ceb8b5ef99141580 Mon Sep 17 00:00:00 2001 From: Sergey Cherepanov Date: Mon, 8 Apr 2024 14:52:39 +0200 Subject: [PATCH 092/140] close spacestore on create/derive --- commonspace/spaceservice.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/commonspace/spaceservice.go b/commonspace/spaceservice.go index aba7daed..8cd15b6c 100644 --- a/commonspace/spaceservice.go +++ b/commonspace/spaceservice.go @@ -114,7 +114,7 @@ func (s *spaceService) CreateSpace(ctx context.Context, payload SpaceCreatePaylo return } - return store.Id(), nil + return store.Id(), store.Close(ctx) } func (s *spaceService) DeriveId(ctx context.Context, payload SpaceDerivePayload) (id string, err error) { @@ -139,7 +139,7 @@ func (s *spaceService) DeriveSpace(ctx context.Context, payload SpaceDerivePaylo return } - return store.Id(), nil + return store.Id(), store.Close(ctx) } func (s *spaceService) NewSpace(ctx context.Context, id string, deps Deps) (Space, error) { From 388539a13d7c421340d9b6cf47338037fe71ccaf Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 8 Apr 2024 15:41:41 +0000 Subject: [PATCH 093/140] build(deps): bump golang.org/x/crypto from 0.21.0 to 0.22.0 Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.21.0 to 0.22.0. - [Commits](https://github.com/golang/crypto/compare/v0.21.0...v0.22.0) --- updated-dependencies: - dependency-name: golang.org/x/crypto dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- go.mod | 4 ++-- go.sum | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index facc2d1b..208f0d50 100644 --- a/go.mod +++ b/go.mod @@ -33,7 +33,7 @@ require ( go.uber.org/atomic v1.11.0 go.uber.org/mock v0.4.0 go.uber.org/zap v1.27.0 - golang.org/x/crypto v0.21.0 + golang.org/x/crypto v0.22.0 golang.org/x/exp v0.0.0-20240325151524-a685a6edb6d8 golang.org/x/net v0.22.0 golang.org/x/time v0.5.0 @@ -105,7 +105,7 @@ require ( golang.org/x/image v0.14.0 // indirect golang.org/x/mod v0.16.0 // indirect golang.org/x/sync v0.6.0 // indirect - golang.org/x/sys v0.18.0 // indirect + golang.org/x/sys v0.19.0 // indirect golang.org/x/tools v0.19.0 // indirect google.golang.org/protobuf v1.32.0 // indirect lukechampine.com/blake3 v1.2.1 // indirect diff --git a/go.sum b/go.sum index f4bba2b3..5ca2971f 100644 --- a/go.sum +++ b/go.sum @@ -386,8 +386,8 @@ golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20200115085410-6d4e4cb37c7d/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200602180216-279210d13fed/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.21.0 h1:X31++rzVUdKhX5sWmSOFZxx8UW/ldWx55cbf08iNAMA= -golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs= +golang.org/x/crypto v0.22.0 h1:g1v0xeRhjcugydODzvb3mEM9SQ0HGp9s/nh3COQ/C30= +golang.org/x/crypto v0.22.0/go.mod h1:vr6Su+7cTlO45qkww3VDJlzDn0ctJvRgYbC2NvXHt+M= golang.org/x/exp v0.0.0-20240325151524-a685a6edb6d8 h1:aAcj0Da7eBAtrTp03QXWvm88pSyOt+UgdZw2BFZ+lEw= golang.org/x/exp v0.0.0-20240325151524-a685a6edb6d8/go.mod h1:CQ1k9gNrJ50XIzaKCRR2hssIjF07kZFEiieALBM/ARQ= golang.org/x/image v0.14.0 h1:tNgSxAFe3jC4uYqvZdTr84SZoM1KfwdC9SKIFrLjFn4= @@ -425,8 +425,8 @@ golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= -golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= +golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= From 9feabccd42c8f72babbd4a839d6ce8b1e36b25c3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 8 Apr 2024 15:41:46 +0000 Subject: [PATCH 094/140] build(deps): bump golang.org/x/net from 0.22.0 to 0.24.0 Bumps [golang.org/x/net](https://github.com/golang/net) from 0.22.0 to 0.24.0. - [Commits](https://github.com/golang/net/compare/v0.22.0...v0.24.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- go.mod | 6 +++--- go.sum | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/go.mod b/go.mod index facc2d1b..961ee40c 100644 --- a/go.mod +++ b/go.mod @@ -33,9 +33,9 @@ require ( go.uber.org/atomic v1.11.0 go.uber.org/mock v0.4.0 go.uber.org/zap v1.27.0 - golang.org/x/crypto v0.21.0 + golang.org/x/crypto v0.22.0 golang.org/x/exp v0.0.0-20240325151524-a685a6edb6d8 - golang.org/x/net v0.22.0 + golang.org/x/net v0.24.0 golang.org/x/time v0.5.0 gopkg.in/yaml.v3 v3.0.1 storj.io/drpc v0.0.34 @@ -105,7 +105,7 @@ require ( golang.org/x/image v0.14.0 // indirect golang.org/x/mod v0.16.0 // indirect golang.org/x/sync v0.6.0 // indirect - golang.org/x/sys v0.18.0 // indirect + golang.org/x/sys v0.19.0 // indirect golang.org/x/tools v0.19.0 // indirect google.golang.org/protobuf v1.32.0 // indirect lukechampine.com/blake3 v1.2.1 // indirect diff --git a/go.sum b/go.sum index f4bba2b3..a5c4552e 100644 --- a/go.sum +++ b/go.sum @@ -386,8 +386,8 @@ golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20200115085410-6d4e4cb37c7d/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200602180216-279210d13fed/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.21.0 h1:X31++rzVUdKhX5sWmSOFZxx8UW/ldWx55cbf08iNAMA= -golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs= +golang.org/x/crypto v0.22.0 h1:g1v0xeRhjcugydODzvb3mEM9SQ0HGp9s/nh3COQ/C30= +golang.org/x/crypto v0.22.0/go.mod h1:vr6Su+7cTlO45qkww3VDJlzDn0ctJvRgYbC2NvXHt+M= golang.org/x/exp v0.0.0-20240325151524-a685a6edb6d8 h1:aAcj0Da7eBAtrTp03QXWvm88pSyOt+UgdZw2BFZ+lEw= golang.org/x/exp v0.0.0-20240325151524-a685a6edb6d8/go.mod h1:CQ1k9gNrJ50XIzaKCRR2hssIjF07kZFEiieALBM/ARQ= golang.org/x/image v0.14.0 h1:tNgSxAFe3jC4uYqvZdTr84SZoM1KfwdC9SKIFrLjFn4= @@ -405,8 +405,8 @@ golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.22.0 h1:9sGLhx7iRIHEiX0oAJ3MRZMUCElJgy7Br1nO+AMN3Tc= -golang.org/x/net v0.22.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= +golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= +golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -425,8 +425,8 @@ golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= -golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= +golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= From 60edfc6008ab52523cb70b98322e2d99d2753e1d Mon Sep 17 00:00:00 2001 From: kirillston Date: Tue, 9 Apr 2024 12:48:22 +0200 Subject: [PATCH 095/140] GO-2981 Add platform-specific tier info --- .../paymentservice_tiers.pb.go | 393 ++++++++++++++++-- .../protos/paymentservice_tiers.proto | 12 + 2 files changed, 369 insertions(+), 36 deletions(-) diff --git a/paymentservice/paymentserviceproto/paymentservice_tiers.pb.go b/paymentservice/paymentserviceproto/paymentservice_tiers.pb.go index 4caaaa37..61461422 100644 --- a/paymentservice/paymentserviceproto/paymentservice_tiers.pb.go +++ b/paymentservice/paymentserviceproto/paymentservice_tiers.pb.go @@ -242,6 +242,15 @@ type TierData struct { Features []*Feature `protobuf:"bytes,12,rep,name=features,proto3" json:"features,omitempty"` // green, blue, red, purple or custom color in string format #ff00ff ColorStr string `protobuf:"bytes,13,opt,name=colorStr,proto3" json:"colorStr,omitempty"` + // Stripe platform-specific data: + StripeProductId string `protobuf:"bytes,14,opt,name=stripeProductId,proto3" json:"stripeProductId,omitempty"` + StripeManageUrl string `protobuf:"bytes,15,opt,name=stripeManageUrl,proto3" json:"stripeManageUrl,omitempty"` + // iOS platform-specific data: + IosProductId string `protobuf:"bytes,16,opt,name=iosProductId,proto3" json:"iosProductId,omitempty"` + IosManageUrl string `protobuf:"bytes,17,opt,name=iosManageUrl,proto3" json:"iosManageUrl,omitempty"` + // Android platform-specific data: + AndroidProductId string `protobuf:"bytes,18,opt,name=androidProductId,proto3" json:"androidProductId,omitempty"` + AndroidManageUrl string `protobuf:"bytes,19,opt,name=androidManageUrl,proto3" json:"androidManageUrl,omitempty"` } func (m *TierData) Reset() { *m = TierData{} } @@ -368,6 +377,48 @@ func (m *TierData) GetColorStr() string { return "" } +func (m *TierData) GetStripeProductId() string { + if m != nil { + return m.StripeProductId + } + return "" +} + +func (m *TierData) GetStripeManageUrl() string { + if m != nil { + return m.StripeManageUrl + } + return "" +} + +func (m *TierData) GetIosProductId() string { + if m != nil { + return m.IosProductId + } + return "" +} + +func (m *TierData) GetIosManageUrl() string { + if m != nil { + return m.IosManageUrl + } + return "" +} + +func (m *TierData) GetAndroidProductId() string { + if m != nil { + return m.AndroidProductId + } + return "" +} + +func (m *TierData) GetAndroidManageUrl() string { + if m != nil { + return m.AndroidManageUrl + } + return "" +} + type GetTiersResponse struct { // list of all available tiers Tiers []*TierData `protobuf:"bytes,1,rep,name=tiers,proto3" json:"tiers,omitempty"` @@ -427,42 +478,46 @@ func init() { } var fileDescriptor_597ac3048c641f44 = []byte{ - // 549 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x93, 0x4d, 0x6f, 0xd3, 0x4c, - 0x10, 0xc7, 0xe3, 0xa4, 0x2f, 0xce, 0x24, 0x6d, 0xfd, 0x6c, 0x9f, 0xc2, 0x0a, 0x21, 0x13, 0x59, - 0x1c, 0xa2, 0x56, 0x4a, 0x51, 0xcb, 0x91, 0x4b, 0x69, 0x04, 0x44, 0xa2, 0x80, 0x9c, 0x14, 0x04, - 0x17, 0xb4, 0xd8, 0x43, 0xba, 0xaa, 0xb3, 0x6b, 0x76, 0x37, 0xad, 0xfc, 0x2d, 0xfa, 0xb1, 0xb8, - 0x20, 0xf5, 0xc8, 0x11, 0x25, 0x5f, 0x04, 0x79, 0xf3, 0xe2, 0x24, 0xad, 0xc4, 0xc5, 0xf6, 0xff, - 0xff, 0xdb, 0x19, 0xcd, 0xcc, 0x8e, 0xa1, 0x9d, 0xb2, 0x6c, 0x80, 0xc2, 0x68, 0x54, 0x57, 0x3c, - 0xc2, 0xc3, 0x65, 0x99, 0x2a, 0x69, 0xe4, 0xa1, 0x7d, 0xea, 0x15, 0xf4, 0xd5, 0x70, 0x54, 0xba, - 0x65, 0x59, 0x70, 0x00, 0x9b, 0xaf, 0x90, 0x99, 0xa1, 0x42, 0xd2, 0x80, 0x5a, 0x8c, 0x3a, 0x52, - 0x3c, 0x35, 0x5c, 0x0a, 0xea, 0x34, 0x9c, 0x66, 0x35, 0x5c, 0xb4, 0x82, 0x0e, 0xec, 0xbc, 0x46, - 0xd3, 0xcb, 0xc3, 0x43, 0xfc, 0x31, 0x44, 0x6d, 0x88, 0x0f, 0x20, 0xaf, 0x05, 0xaa, 0x13, 0x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 0xc7, 0x7e, 0xe9, 0x4b, 0xf0, - 0xef, 0x1f, 0xf8, 0xdb, 0x86, 0x7d, 0x1d, 0xff, 0x0d, 0x00, 0x00, 0xff, 0xff, 0xfe, 0xc4, 0x11, - 0x59, 0xed, 0x03, 0x00, 0x00, + // 618 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x94, 0xc1, 0x4f, 0x13, 0x4f, + 0x14, 0xc7, 0xbb, 0x85, 0x42, 0xfb, 0x5a, 0xda, 0x65, 0xfa, 0xe3, 0xe7, 0xc4, 0x98, 0xda, 0x6c, + 0x3c, 0x34, 0x90, 0x14, 0x03, 0x1e, 0xbd, 0x20, 0x44, 0x6d, 0x22, 0x4a, 0x16, 0xd0, 0xe8, 0xc5, + 0x8c, 0x3b, 0xcf, 0x32, 0x61, 0x3b, 0xb3, 0xce, 0x4c, 0x21, 0xfd, 0x2f, 0xf8, 0x97, 0xbc, 0x79, + 0xe4, 0xe8, 0xd1, 0xc0, 0x3f, 0x62, 0x76, 0x5a, 0x76, 0xb7, 0x85, 0xc4, 0x4b, 0xdb, 0xf7, 0xf9, + 0x7e, 0xdf, 0x37, 0x6f, 0x66, 0xdf, 0x16, 0x0e, 0x12, 0x36, 0x19, 0xa1, 0xb4, 0x06, 0xf5, 0x85, + 0x88, 0x70, 0x7b, 0xbe, 0x4c, 0xb4, 0xb2, 0x6a, 0xdb, 0x7d, 0x9a, 0x05, 0xe9, 0xab, 0x15, 0xa8, + 0x4d, 0xdf, 0x69, 0xc1, 0x16, 0xac, 0xbe, 0x46, 0x66, 0xc7, 0x1a, 0x49, 0x17, 0xea, 0x1c, 0x4d, + 0xa4, 0x45, 0x62, 0x85, 0x92, 0xd4, 0xeb, 0x7a, 0xbd, 0x5a, 0x58, 0x44, 0xc1, 0x00, 0x5a, 0x6f, + 0xd0, 0x9e, 0xa4, 0xed, 0x21, 0xfe, 0x18, 0xa3, 0xb1, 0xa4, 0x03, 0xa0, 0x2e, 0x25, 0xea, 0x3d, + 0x39, 0x19, 0xf0, 0x59, 0x4f, 0x81, 0x90, 0xff, 0x61, 0x25, 0x56, 0x11, 0x8b, 0x91, 0x96, 0x9d, + 0x36, 0xab, 0x82, 0x0f, 0xb0, 0xb1, 0x10, 0x75, 0x2c, 0x86, 0x12, 0x39, 0xa1, 0xb0, 0x9a, 0xb0, + 0x49, 0xac, 0xd8, 0x34, 0xad, 0x11, 0xde, 0x95, 0xe4, 0x09, 0xd4, 0x8c, 0x18, 0x4a, 0x37, 0xac, + 0x4b, 0x6b, 0x84, 0x39, 0x08, 0x7e, 0x56, 0xa0, 0x9a, 0xc6, 0x1d, 0x30, 0xcb, 0x48, 0x13, 0xca, + 0x62, 0xda, 0xbf, 0x16, 0x96, 0x05, 0x27, 0x04, 0x96, 0x25, 0x1b, 0xdd, 0xcd, 0xe0, 0x7e, 0x2f, + 0x1e, 0x77, 0xe9, 0xde, 0x71, 0xc9, 0x63, 0xa8, 0x0a, 0xb3, 0x17, 0x59, 0x71, 0x81, 0x74, 0xb9, + 0xeb, 0xf5, 0xaa, 0x61, 0x56, 0xa7, 0xe7, 0x12, 0xe6, 0x04, 0x8d, 0xa5, 0x15, 0xa7, 0xcc, 0x2a, + 0x12, 0x40, 0x43, 0x98, 0xb7, 0x82, 0x73, 0x94, 0xe9, 0x34, 0x74, 0xc5, 0xa9, 0x73, 0x8c, 0x6c, + 0x01, 0x24, 0xa8, 0x85, 0xe2, 0x27, 0x93, 0x04, 0xe9, 0x6a, 0xd7, 0xeb, 0x35, 0x77, 0xea, 0xfd, + 0xa3, 0x0c, 0x85, 0x05, 0x39, 0x1d, 0x73, 0x5a, 0x7d, 0x64, 0xf1, 0x18, 0x69, 0xd5, 0x9d, 0xa9, + 0x88, 0xc8, 0x73, 0x68, 0x27, 0x5a, 0x44, 0x78, 0x6c, 0xb5, 0x48, 0xf0, 0xd4, 0xf0, 0xfd, 0xf4, + 0x59, 0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 0xb9, 0x54, 0x97, 0xd2, 0x2f, 0x91, 0x47, 0xd0, 0x2e, 0xe2, 0x58, + 0x8c, 0x84, 0x45, 0xee, 0x7b, 0x84, 0x40, 0x33, 0x17, 0x0e, 0xd8, 0xc4, 0xf8, 0x65, 0xd2, 0x86, + 0x56, 0xce, 0x3e, 0x21, 0x9e, 0x1b, 0x7f, 0x89, 0xfc, 0x07, 0x7e, 0x0e, 0x0f, 0x95, 0xb4, 0x67, + 0xc6, 0x5f, 0x9e, 0xb7, 0x7e, 0x46, 0xa6, 0x8d, 0x5f, 0x79, 0xf5, 0xf2, 0xd7, 0x4d, 0xc7, 0xbb, + 0xbe, 0xe9, 0x78, 0x7f, 0x6e, 0x3a, 0xde, 0xd5, 0x6d, 0xa7, 0x74, 0x7d, 0xdb, 0x29, 0xfd, 0xbe, + 0xed, 0x94, 0xbe, 0x04, 0xff, 0xfe, 0xd3, 0xfa, 0xb6, 0xe2, 0xbe, 0x76, 0xff, 0x06, 0x00, 0x00, + 0xff, 0xff, 0xca, 0xfa, 0xda, 0x87, 0xe1, 0x04, 0x00, 0x00, } func (m *Feature) Marshal() (dAtA []byte, err error) { @@ -589,6 +644,56 @@ func (m *TierData) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.AndroidManageUrl) > 0 { + i -= len(m.AndroidManageUrl) + copy(dAtA[i:], m.AndroidManageUrl) + i = encodeVarintPaymentserviceTiers(dAtA, i, uint64(len(m.AndroidManageUrl))) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x9a + } + if len(m.AndroidProductId) > 0 { + i -= len(m.AndroidProductId) + copy(dAtA[i:], m.AndroidProductId) + i = encodeVarintPaymentserviceTiers(dAtA, i, uint64(len(m.AndroidProductId))) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x92 + } + if len(m.IosManageUrl) > 0 { + i -= len(m.IosManageUrl) + copy(dAtA[i:], m.IosManageUrl) + i = encodeVarintPaymentserviceTiers(dAtA, i, uint64(len(m.IosManageUrl))) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x8a + } + if len(m.IosProductId) > 0 { + i -= len(m.IosProductId) + copy(dAtA[i:], m.IosProductId) + i = encodeVarintPaymentserviceTiers(dAtA, i, uint64(len(m.IosProductId))) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x82 + } + if len(m.StripeManageUrl) > 0 { + i -= len(m.StripeManageUrl) + copy(dAtA[i:], m.StripeManageUrl) + i = encodeVarintPaymentserviceTiers(dAtA, i, uint64(len(m.StripeManageUrl))) + i-- + dAtA[i] = 0x7a + } + if len(m.StripeProductId) > 0 { + i -= len(m.StripeProductId) + copy(dAtA[i:], m.StripeProductId) + i = encodeVarintPaymentserviceTiers(dAtA, i, uint64(len(m.StripeProductId))) + i-- + dAtA[i] = 0x72 + } if len(m.ColorStr) > 0 { i -= len(m.ColorStr) copy(dAtA[i:], m.ColorStr) @@ -833,6 +938,30 @@ func (m *TierData) Size() (n int) { if l > 0 { n += 1 + l + sovPaymentserviceTiers(uint64(l)) } + l = len(m.StripeProductId) + if l > 0 { + n += 1 + l + sovPaymentserviceTiers(uint64(l)) + } + l = len(m.StripeManageUrl) + if l > 0 { + n += 1 + l + sovPaymentserviceTiers(uint64(l)) + } + l = len(m.IosProductId) + if l > 0 { + n += 2 + l + sovPaymentserviceTiers(uint64(l)) + } + l = len(m.IosManageUrl) + if l > 0 { + n += 2 + l + sovPaymentserviceTiers(uint64(l)) + } + l = len(m.AndroidProductId) + if l > 0 { + n += 2 + l + sovPaymentserviceTiers(uint64(l)) + } + l = len(m.AndroidManageUrl) + if l > 0 { + n += 2 + l + sovPaymentserviceTiers(uint64(l)) + } return n } @@ -1504,6 +1633,198 @@ func (m *TierData) Unmarshal(dAtA []byte) error { } m.ColorStr = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StripeProductId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPaymentserviceTiers + } + 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 ErrInvalidLengthPaymentserviceTiers + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPaymentserviceTiers + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.StripeProductId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StripeManageUrl", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPaymentserviceTiers + } + 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 ErrInvalidLengthPaymentserviceTiers + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPaymentserviceTiers + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.StripeManageUrl = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 16: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field IosProductId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPaymentserviceTiers + } + 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 ErrInvalidLengthPaymentserviceTiers + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPaymentserviceTiers + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.IosProductId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 17: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field IosManageUrl", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPaymentserviceTiers + } + 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 ErrInvalidLengthPaymentserviceTiers + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPaymentserviceTiers + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.IosManageUrl = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 18: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AndroidProductId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPaymentserviceTiers + } + 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 ErrInvalidLengthPaymentserviceTiers + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPaymentserviceTiers + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AndroidProductId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 19: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AndroidManageUrl", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPaymentserviceTiers + } + 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 ErrInvalidLengthPaymentserviceTiers + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPaymentserviceTiers + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AndroidManageUrl = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipPaymentserviceTiers(dAtA[iNdEx:]) diff --git a/paymentservice/paymentserviceproto/protos/paymentservice_tiers.proto b/paymentservice/paymentserviceproto/protos/paymentservice_tiers.proto index b3159ffc..4369e2fb 100644 --- a/paymentservice/paymentserviceproto/protos/paymentservice_tiers.proto +++ b/paymentservice/paymentserviceproto/protos/paymentservice_tiers.proto @@ -61,6 +61,18 @@ message TierData { repeated Feature features = 12; // green, blue, red, purple or custom color in string format #ff00ff string colorStr = 13; + + // Stripe platform-specific data: + string stripeProductId = 14; + string stripeManageUrl = 15; + + // iOS platform-specific data: + string iosProductId = 16; + string iosManageUrl = 17; + + // Android platform-specific data: + string androidProductId = 18; + string androidManageUrl = 19; } message GetTiersResponse { From f39915d4c6b609a8607713cdb78188cb77a9641e Mon Sep 17 00:00:00 2001 From: Anton Akentev Date: Tue, 9 Apr 2024 18:39:49 +0100 Subject: [PATCH 096/140] payments: add MethodNone --- .../paymentserviceproto/paymentservice.pb.go | 169 +++++++++--------- .../protos/paymentservice.proto | 1 + 2 files changed, 87 insertions(+), 83 deletions(-) diff --git a/paymentservice/paymentserviceproto/paymentservice.pb.go b/paymentservice/paymentserviceproto/paymentservice.pb.go index 1945b6ca..cb554b01 100644 --- a/paymentservice/paymentserviceproto/paymentservice.pb.go +++ b/paymentservice/paymentserviceproto/paymentservice.pb.go @@ -118,6 +118,7 @@ const ( PaymentMethod_MethodGooglePay PaymentMethod = 3 PaymentMethod_MethodAppleInapp PaymentMethod = 4 PaymentMethod_MethodGoogleInapp PaymentMethod = 5 + PaymentMethod_MethodNone PaymentMethod = 6 ) var PaymentMethod_name = map[int32]string{ @@ -127,6 +128,7 @@ var PaymentMethod_name = map[int32]string{ 3: "MethodGooglePay", 4: "MethodAppleInapp", 5: "MethodGoogleInapp", + 6: "MethodNone", } var PaymentMethod_value = map[string]int32{ @@ -136,6 +138,7 @@ var PaymentMethod_value = map[string]int32{ "MethodGooglePay": 3, "MethodAppleInapp": 4, "MethodGoogleInapp": 5, + "MethodNone": 6, } func (x PaymentMethod) String() string { @@ -1420,93 +1423,93 @@ func init() { } var fileDescriptor_4feb29dcc5ba50f6 = []byte{ - // 1363 bytes of a gzipped FileDescriptorProto + // 1369 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x57, 0xcd, 0x6f, 0x1b, 0x45, 0x14, 0xf7, 0xfa, 0x23, 0x89, 0x9f, 0xe3, 0x64, 0x32, 0x71, 0xd3, 0xad, 0x9b, 0x58, 0xe9, 0x8a, 0x8f, 0x28, 0x88, 0xad, 0x28, 0x3d, 0x20, 0x84, 0x10, 0x4e, 0xe2, 0x84, 0x48, 0x25, 0x44, 0xb6, 0xdb, 0x0a, 0x7a, 0x80, 0x8d, 0xf7, 0xc5, 0x59, 0xba, 0x99, 0x59, 0x66, 0xc7, 0x4d, 0xcd, 0x8d, - 0x13, 0xe2, 0x86, 0xc4, 0x85, 0xff, 0x87, 0x0b, 0x27, 0xd4, 0x63, 0x8f, 0xa8, 0xbd, 0x71, 0xe2, - 0x4f, 0x40, 0x33, 0xbb, 0x8e, 0xd7, 0xf1, 0xda, 0x09, 0x8d, 0xb8, 0x24, 0x3b, 0xbf, 0x99, 0xf7, - 0xe6, 0xbd, 0xdf, 0xfb, 0x98, 0x67, 0xf8, 0x34, 0x70, 0xfa, 0xa7, 0xc8, 0x64, 0x88, 0xe2, 0x99, - 0xd7, 0xc1, 0xbb, 0xa3, 0xcb, 0x40, 0x70, 0xc9, 0xef, 0xea, 0xbf, 0xe1, 0x85, 0x2d, 0x5b, 0xa3, - 0xd5, 0x9d, 0x37, 0x95, 0xff, 0x46, 0x7a, 0x28, 0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19, 0xba, 0x04, 0xe5, 0xe8, 0x6b, 0xe8, 0xc8, 0x39, 0x74, 0x88, 0xcc, 0xf5, 0x58, - 0x97, 0x18, 0xca, 0xb7, 0x08, 0xaa, 0x77, 0xa4, 0xf7, 0x0c, 0x49, 0x96, 0xbe, 0x0d, 0x77, 0x46, - 0x0e, 0xa9, 0x74, 0xf2, 0x04, 0x86, 0x71, 0xa7, 0xd6, 0x45, 0x4b, 0x72, 0x9b, 0x3f, 0x19, 0x50, - 0x1e, 0x79, 0x6f, 0xe9, 0x02, 0x40, 0xf4, 0xb5, 0xed, 0x08, 0x37, 0xa2, 0x2d, 0x5e, 0x8b, 0x7e, - 0x20, 0x39, 0x31, 0x28, 0x85, 0x85, 0x08, 0xa9, 0x07, 0x81, 0x8f, 0x87, 0x4e, 0x9f, 0x64, 0x95, - 0x47, 0x11, 0xb6, 0xc7, 0x79, 0x37, 0x02, 0x35, 0x53, 0x89, 0x83, 0xfb, 0xcc, 0x09, 0x82, 0x28, - 0x88, 0xc9, 0xa3, 0x11, 0x5c, 0xd8, 0xfc, 0x31, 0x07, 0xd0, 0x10, 0x82, 0x0b, 0x95, 0x32, 0xa1, - 0x32, 0xe3, 0x21, 0xc3, 0xe7, 0x01, 0x76, 0x24, 0x2a, 0x33, 0x96, 0x61, 0x71, 0x58, 0xc3, 0x8d, - 0xd3, 0x40, 0xaa, 0xfc, 0xa9, 0x00, 0x89, 0x33, 0xa4, 0x35, 0xa8, 0x22, 0x92, 0xa5, 0x65, 0x28, - 0x2a, 0x76, 0x1f, 0x8b, 0x28, 0x93, 0xe2, 0xb8, 0x1f, 0x70, 0xb9, 0xcb, 0x7b, 0xcc, 0x25, 0xf9, - 0x01, 0xb2, 0xcf, 0x9c, 0x88, 0xad, 0x82, 0x8a, 0xde, 0x08, 0x0b, 0x91, 0xec, 0x8c, 0xb2, 0x62, - 0xcb, 0x19, 0x14, 0x0e, 0x99, 0x55, 0x29, 0x3a, 0x88, 0xc3, 0x9c, 0x72, 0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xac, 0x56, 0xd2, 0x9a, 0x92, 0x95, 0xa1, 0x0f, 0x60, 0xf1, 0xc2, + 0x44, 0x46, 0xd7, 0xec, 0x69, 0xb3, 0x5f, 0xd5, 0xb4, 0x27, 0x8c, 0x70, 0x56, 0x86, 0x3e, 0x81, + 0x4a, 0xda, 0x40, 0x43, 0x2d, 0xfb, 0xd2, 0x39, 0xa7, 0xba, 0x66, 0x4f, 0x9d, 0x95, 0x32, 0xf4, + 0x3b, 0xb8, 0x35, 0x71, 0x54, 0xa0, 0xef, 0xda, 0x57, 0x1b, 0x54, 0xaa, 0x96, 0x7d, 0xe9, 0xbc, + 0x11, 0x39, 0x92, 0xf6, 0x4e, 0x53, 0x2d, 0x3d, 0xfd, 0xf9, 0xae, 0xae, 0xd9, 0x53, 0x47, 0x80, + 0x0c, 0xfd, 0x0c, 0x4a, 0x89, 0x27, 0x90, 0xde, 0xb2, 0x27, 0x3d, 0x88, 0xd5, 0x8a, 0x9d, 0xf2, + 0xb8, 0x46, 0x11, 0xdf, 0x43, 0x59, 0xf7, 0x7d, 0x55, 0x7d, 0x21, 0x5d, 0x51, 0x37, 0xea, 0xcf, + 0x51, 0xf1, 0xa5, 0x04, 0x3e, 0x90, 0xdd, 0xfa, 0xe4, 0x8f, 0x57, 0x35, 0xe3, 0xc5, 0xab, 0x9a, + 0xf1, 0xd7, 0xab, 0x9a, 0xf1, 0xf3, 0xeb, 0x5a, 0xe6, 0xc5, 0xeb, 0x5a, 0xe6, 0xe5, 0xeb, 0x5a, + 0xe6, 0x6b, 0xeb, 0xf2, 0x5f, 0xcb, 0x47, 0x33, 0xfa, 0xdf, 0x87, 0xff, 0x06, 0x00, 0x00, 0xff, + 0xff, 0x98, 0x59, 0x07, 0xc0, 0x9a, 0x0f, 0x00, 0x00, } func (m *GetSubscriptionRequest) Marshal() (dAtA []byte, err error) { diff --git a/paymentservice/paymentserviceproto/protos/paymentservice.proto b/paymentservice/paymentserviceproto/protos/paymentservice.proto index 36fee4fa..df54e2f7 100644 --- a/paymentservice/paymentserviceproto/protos/paymentservice.proto +++ b/paymentservice/paymentserviceproto/protos/paymentservice.proto @@ -44,6 +44,7 @@ enum PaymentMethod { MethodGooglePay = 3; MethodAppleInapp = 4; MethodGoogleInapp = 5; + MethodNone = 6; } message GetSubscriptionRequest { From b99598c86bb35c56233a3f7354aba39e3def37b3 Mon Sep 17 00:00:00 2001 From: Sergey Cherepanov Date: Tue, 16 Apr 2024 14:09:44 +0200 Subject: [PATCH 097/140] coordinatorproto: provide account limits --- .../coordinatorclient/coordinatorclient.go | 9 +- .../coordinatorproto/coordinator.pb.go | 523 +++++++++++++----- .../coordinatorproto/protos/coordinator.proto | 7 + 3 files changed, 384 insertions(+), 155 deletions(-) diff --git a/coordinator/coordinatorclient/coordinatorclient.go b/coordinator/coordinatorclient/coordinatorclient.go index b9b9056b..5ff7e25d 100644 --- a/coordinator/coordinatorclient/coordinatorclient.go +++ b/coordinator/coordinatorclient/coordinatorclient.go @@ -34,7 +34,7 @@ type CoordinatorClient interface { SpaceDelete(ctx context.Context, spaceId string, conf *coordinatorproto.DeletionConfirmPayloadWithSignature) (err error) AccountDelete(ctx context.Context, conf *coordinatorproto.DeletionConfirmPayloadWithSignature) (timestamp int64, err error) AccountRevertDeletion(ctx context.Context) (err error) - StatusCheckMany(ctx context.Context, spaceIds []string) (statuses []*coordinatorproto.SpaceStatusPayload, err error) + StatusCheckMany(ctx context.Context, spaceIds []string) (statuses []*coordinatorproto.SpaceStatusPayload, limits *coordinatorproto.AccountLimits, err error) StatusCheck(ctx context.Context, spaceId string) (status *coordinatorproto.SpaceStatusPayload, err error) SpaceSign(ctx context.Context, payload SpaceSignPayload) (receipt *coordinatorproto.SpaceReceiptWithSignature, err error) SpaceMakeShareable(ctx context.Context, spaceId string) (err error) @@ -149,7 +149,11 @@ func (c *coordinatorClient) DeletionLog(ctx context.Context, lastRecordId string return } -func (c *coordinatorClient) StatusCheckMany(ctx context.Context, spaceIds []string) (statuses []*coordinatorproto.SpaceStatusPayload, err error) { +func (c *coordinatorClient) StatusCheckMany(ctx context.Context, spaceIds []string) ( + statuses []*coordinatorproto.SpaceStatusPayload, + limits *coordinatorproto.AccountLimits, + err error, +) { err = c.doClient(ctx, func(cl coordinatorproto.DRPCCoordinatorClient) error { resp, err := cl.SpaceStatusCheckMany(ctx, &coordinatorproto.SpaceStatusCheckManyRequest{ SpaceIds: spaceIds, @@ -158,6 +162,7 @@ func (c *coordinatorClient) StatusCheckMany(ctx context.Context, spaceIds []stri return rpcerr.Unwrap(err) } statuses = resp.Payloads + limits = resp.AccountLimits return nil }) return diff --git a/coordinator/coordinatorproto/coordinator.pb.go b/coordinator/coordinatorproto/coordinator.pb.go index 1ac60600..9fa444f1 100644 --- a/coordinator/coordinatorproto/coordinator.pb.go +++ b/coordinator/coordinatorproto/coordinator.pb.go @@ -767,7 +767,8 @@ func (m *SpaceStatusCheckManyRequest) GetSpaceIds() []string { // SpaceStatusCheckManyResponse contains the current statuses of spaces type SpaceStatusCheckManyResponse struct { - Payloads []*SpaceStatusPayload `protobuf:"bytes,1,rep,name=payloads,proto3" json:"payloads,omitempty"` + Payloads []*SpaceStatusPayload `protobuf:"bytes,1,rep,name=payloads,proto3" json:"payloads,omitempty"` + AccountLimits *AccountLimits `protobuf:"bytes,2,opt,name=accountLimits,proto3" json:"accountLimits,omitempty"` } func (m *SpaceStatusCheckManyResponse) Reset() { *m = SpaceStatusCheckManyResponse{} } @@ -810,6 +811,58 @@ func (m *SpaceStatusCheckManyResponse) GetPayloads() []*SpaceStatusPayload { return nil } +func (m *SpaceStatusCheckManyResponse) GetAccountLimits() *AccountLimits { + if m != nil { + return m.AccountLimits + } + return nil +} + +// AccountLimits describes account level limit +type AccountLimits struct { + SharedSpacesLimit uint32 `protobuf:"varint,1,opt,name=sharedSpacesLimit,proto3" json:"sharedSpacesLimit,omitempty"` +} + +func (m *AccountLimits) Reset() { *m = AccountLimits{} } +func (m *AccountLimits) String() string { return proto.CompactTextString(m) } +func (*AccountLimits) ProtoMessage() {} +func (*AccountLimits) Descriptor() ([]byte, []int) { + return fileDescriptor_d94f6f99586adae2, []int{10} +} +func (m *AccountLimits) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AccountLimits) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_AccountLimits.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 *AccountLimits) XXX_Merge(src proto.Message) { + xxx_messageInfo_AccountLimits.Merge(m, src) +} +func (m *AccountLimits) XXX_Size() int { + return m.Size() +} +func (m *AccountLimits) XXX_DiscardUnknown() { + xxx_messageInfo_AccountLimits.DiscardUnknown(m) +} + +var xxx_messageInfo_AccountLimits proto.InternalMessageInfo + +func (m *AccountLimits) GetSharedSpacesLimit() uint32 { + if m != nil { + return m.SharedSpacesLimit + } + return 0 +} + // SpaceStatusChangeRequest contains the deletionChange if we want to delete space, or it is empty otherwise type SpaceStatusChangeRequest struct { SpaceId string `protobuf:"bytes,1,opt,name=spaceId,proto3" json:"spaceId,omitempty"` @@ -822,7 +875,7 @@ func (m *SpaceStatusChangeRequest) Reset() { *m = SpaceStatusChangeReque func (m *SpaceStatusChangeRequest) String() string { return proto.CompactTextString(m) } func (*SpaceStatusChangeRequest) ProtoMessage() {} func (*SpaceStatusChangeRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{10} + return fileDescriptor_d94f6f99586adae2, []int{11} } func (m *SpaceStatusChangeRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -888,7 +941,7 @@ func (m *SpaceStatusChangeResponse) Reset() { *m = SpaceStatusChangeResp func (m *SpaceStatusChangeResponse) String() string { return proto.CompactTextString(m) } func (*SpaceStatusChangeResponse) ProtoMessage() {} func (*SpaceStatusChangeResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{11} + return fileDescriptor_d94f6f99586adae2, []int{12} } func (m *SpaceStatusChangeResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -932,7 +985,7 @@ func (m *SpaceMakeShareableRequest) Reset() { *m = SpaceMakeShareableReq func (m *SpaceMakeShareableRequest) String() string { return proto.CompactTextString(m) } func (*SpaceMakeShareableRequest) ProtoMessage() {} func (*SpaceMakeShareableRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{12} + return fileDescriptor_d94f6f99586adae2, []int{13} } func (m *SpaceMakeShareableRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -975,7 +1028,7 @@ func (m *SpaceMakeShareableResponse) Reset() { *m = SpaceMakeShareableRe func (m *SpaceMakeShareableResponse) String() string { return proto.CompactTextString(m) } func (*SpaceMakeShareableResponse) ProtoMessage() {} func (*SpaceMakeShareableResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{13} + return fileDescriptor_d94f6f99586adae2, []int{14} } func (m *SpaceMakeShareableResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1013,7 +1066,7 @@ func (m *SpaceMakeUnshareableRequest) Reset() { *m = SpaceMakeUnshareabl func (m *SpaceMakeUnshareableRequest) String() string { return proto.CompactTextString(m) } func (*SpaceMakeUnshareableRequest) ProtoMessage() {} func (*SpaceMakeUnshareableRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{14} + return fileDescriptor_d94f6f99586adae2, []int{15} } func (m *SpaceMakeUnshareableRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1063,7 +1116,7 @@ func (m *SpaceMakeUnshareableResponse) Reset() { *m = SpaceMakeUnshareab func (m *SpaceMakeUnshareableResponse) String() string { return proto.CompactTextString(m) } func (*SpaceMakeUnshareableResponse) ProtoMessage() {} func (*SpaceMakeUnshareableResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{15} + return fileDescriptor_d94f6f99586adae2, []int{16} } func (m *SpaceMakeUnshareableResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1103,7 +1156,7 @@ func (m *NetworkConfigurationRequest) Reset() { *m = NetworkConfiguratio func (m *NetworkConfigurationRequest) String() string { return proto.CompactTextString(m) } func (*NetworkConfigurationRequest) ProtoMessage() {} func (*NetworkConfigurationRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{16} + return fileDescriptor_d94f6f99586adae2, []int{17} } func (m *NetworkConfigurationRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1155,7 +1208,7 @@ func (m *NetworkConfigurationResponse) Reset() { *m = NetworkConfigurati func (m *NetworkConfigurationResponse) String() string { return proto.CompactTextString(m) } func (*NetworkConfigurationResponse) ProtoMessage() {} func (*NetworkConfigurationResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{17} + return fileDescriptor_d94f6f99586adae2, []int{18} } func (m *NetworkConfigurationResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1226,7 +1279,7 @@ func (m *Node) Reset() { *m = Node{} } func (m *Node) String() string { return proto.CompactTextString(m) } func (*Node) ProtoMessage() {} func (*Node) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{18} + return fileDescriptor_d94f6f99586adae2, []int{19} } func (m *Node) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1286,7 +1339,7 @@ func (m *DeletionConfirmPayloadWithSignature) Reset() { *m = DeletionCon func (m *DeletionConfirmPayloadWithSignature) String() string { return proto.CompactTextString(m) } func (*DeletionConfirmPayloadWithSignature) ProtoMessage() {} func (*DeletionConfirmPayloadWithSignature) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{19} + return fileDescriptor_d94f6f99586adae2, []int{20} } func (m *DeletionConfirmPayloadWithSignature) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1347,7 +1400,7 @@ func (m *DeletionConfirmPayload) Reset() { *m = DeletionConfirmPayload{} func (m *DeletionConfirmPayload) String() string { return proto.CompactTextString(m) } func (*DeletionConfirmPayload) ProtoMessage() {} func (*DeletionConfirmPayload) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{20} + return fileDescriptor_d94f6f99586adae2, []int{21} } func (m *DeletionConfirmPayload) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1422,7 +1475,7 @@ func (m *DeletionLogRequest) Reset() { *m = DeletionLogRequest{} } func (m *DeletionLogRequest) String() string { return proto.CompactTextString(m) } func (*DeletionLogRequest) ProtoMessage() {} func (*DeletionLogRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{21} + return fileDescriptor_d94f6f99586adae2, []int{22} } func (m *DeletionLogRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1476,7 +1529,7 @@ func (m *DeletionLogResponse) Reset() { *m = DeletionLogResponse{} } func (m *DeletionLogResponse) String() string { return proto.CompactTextString(m) } func (*DeletionLogResponse) ProtoMessage() {} func (*DeletionLogResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{22} + return fileDescriptor_d94f6f99586adae2, []int{23} } func (m *DeletionLogResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1536,7 +1589,7 @@ func (m *DeletionLogRecord) Reset() { *m = DeletionLogRecord{} } func (m *DeletionLogRecord) String() string { return proto.CompactTextString(m) } func (*DeletionLogRecord) ProtoMessage() {} func (*DeletionLogRecord) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{23} + return fileDescriptor_d94f6f99586adae2, []int{24} } func (m *DeletionLogRecord) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1612,7 +1665,7 @@ func (m *SpaceDeleteRequest) Reset() { *m = SpaceDeleteRequest{} } func (m *SpaceDeleteRequest) String() string { return proto.CompactTextString(m) } func (*SpaceDeleteRequest) ProtoMessage() {} func (*SpaceDeleteRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{24} + return fileDescriptor_d94f6f99586adae2, []int{25} } func (m *SpaceDeleteRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1678,7 +1731,7 @@ func (m *SpaceDeleteResponse) Reset() { *m = SpaceDeleteResponse{} } func (m *SpaceDeleteResponse) String() string { return proto.CompactTextString(m) } func (*SpaceDeleteResponse) ProtoMessage() {} func (*SpaceDeleteResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{25} + return fileDescriptor_d94f6f99586adae2, []int{26} } func (m *SpaceDeleteResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1724,7 +1777,7 @@ func (m *AccountDeleteRequest) Reset() { *m = AccountDeleteRequest{} } func (m *AccountDeleteRequest) String() string { return proto.CompactTextString(m) } func (*AccountDeleteRequest) ProtoMessage() {} func (*AccountDeleteRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{26} + return fileDescriptor_d94f6f99586adae2, []int{27} } func (m *AccountDeleteRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1783,7 +1836,7 @@ func (m *AccountDeletionConfirmPayload) Reset() { *m = AccountDeletionCo func (m *AccountDeletionConfirmPayload) String() string { return proto.CompactTextString(m) } func (*AccountDeletionConfirmPayload) ProtoMessage() {} func (*AccountDeletionConfirmPayload) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{27} + return fileDescriptor_d94f6f99586adae2, []int{28} } func (m *AccountDeletionConfirmPayload) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1849,7 +1902,7 @@ func (m *AccountDeleteResponse) Reset() { *m = AccountDeleteResponse{} } func (m *AccountDeleteResponse) String() string { return proto.CompactTextString(m) } func (*AccountDeleteResponse) ProtoMessage() {} func (*AccountDeleteResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{28} + return fileDescriptor_d94f6f99586adae2, []int{29} } func (m *AccountDeleteResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1893,7 +1946,7 @@ func (m *AccountRevertDeletionRequest) Reset() { *m = AccountRevertDelet func (m *AccountRevertDeletionRequest) String() string { return proto.CompactTextString(m) } func (*AccountRevertDeletionRequest) ProtoMessage() {} func (*AccountRevertDeletionRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{29} + return fileDescriptor_d94f6f99586adae2, []int{30} } func (m *AccountRevertDeletionRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1930,7 +1983,7 @@ func (m *AccountRevertDeletionResponse) Reset() { *m = AccountRevertDele func (m *AccountRevertDeletionResponse) String() string { return proto.CompactTextString(m) } func (*AccountRevertDeletionResponse) ProtoMessage() {} func (*AccountRevertDeletionResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{30} + return fileDescriptor_d94f6f99586adae2, []int{31} } func (m *AccountRevertDeletionResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1969,7 +2022,7 @@ func (m *AclAddRecordRequest) Reset() { *m = AclAddRecordRequest{} } func (m *AclAddRecordRequest) String() string { return proto.CompactTextString(m) } func (*AclAddRecordRequest) ProtoMessage() {} func (*AclAddRecordRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{31} + return fileDescriptor_d94f6f99586adae2, []int{32} } func (m *AclAddRecordRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2022,7 +2075,7 @@ func (m *AclAddRecordResponse) Reset() { *m = AclAddRecordResponse{} } func (m *AclAddRecordResponse) String() string { return proto.CompactTextString(m) } func (*AclAddRecordResponse) ProtoMessage() {} func (*AclAddRecordResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{32} + return fileDescriptor_d94f6f99586adae2, []int{33} } func (m *AclAddRecordResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2076,7 +2129,7 @@ func (m *AclGetRecordsRequest) Reset() { *m = AclGetRecordsRequest{} } func (m *AclGetRecordsRequest) String() string { return proto.CompactTextString(m) } func (*AclGetRecordsRequest) ProtoMessage() {} func (*AclGetRecordsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{33} + return fileDescriptor_d94f6f99586adae2, []int{34} } func (m *AclGetRecordsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2128,7 +2181,7 @@ func (m *AclGetRecordsResponse) Reset() { *m = AclGetRecordsResponse{} } func (m *AclGetRecordsResponse) String() string { return proto.CompactTextString(m) } func (*AclGetRecordsResponse) ProtoMessage() {} func (*AclGetRecordsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{34} + return fileDescriptor_d94f6f99586adae2, []int{35} } func (m *AclGetRecordsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2177,7 +2230,7 @@ func (m *AccountLimitsSetRequest) Reset() { *m = AccountLimitsSetRequest func (m *AccountLimitsSetRequest) String() string { return proto.CompactTextString(m) } func (*AccountLimitsSetRequest) ProtoMessage() {} func (*AccountLimitsSetRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{35} + return fileDescriptor_d94f6f99586adae2, []int{36} } func (m *AccountLimitsSetRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2255,7 +2308,7 @@ func (m *AccountLimitsSetResponse) Reset() { *m = AccountLimitsSetRespon func (m *AccountLimitsSetResponse) String() string { return proto.CompactTextString(m) } func (*AccountLimitsSetResponse) ProtoMessage() {} func (*AccountLimitsSetResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d94f6f99586adae2, []int{36} + return fileDescriptor_d94f6f99586adae2, []int{37} } func (m *AccountLimitsSetResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2301,6 +2354,7 @@ func init() { proto.RegisterType((*SpaceStatusCheckResponse)(nil), "coordinator.SpaceStatusCheckResponse") proto.RegisterType((*SpaceStatusCheckManyRequest)(nil), "coordinator.SpaceStatusCheckManyRequest") proto.RegisterType((*SpaceStatusCheckManyResponse)(nil), "coordinator.SpaceStatusCheckManyResponse") + proto.RegisterType((*AccountLimits)(nil), "coordinator.AccountLimits") proto.RegisterType((*SpaceStatusChangeRequest)(nil), "coordinator.SpaceStatusChangeRequest") proto.RegisterType((*SpaceStatusChangeResponse)(nil), "coordinator.SpaceStatusChangeResponse") proto.RegisterType((*SpaceMakeShareableRequest)(nil), "coordinator.SpaceMakeShareableRequest") @@ -2335,124 +2389,126 @@ func init() { } var fileDescriptor_d94f6f99586adae2 = []byte{ - // 1867 bytes of a gzipped FileDescriptorProto + // 1896 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x59, 0xcd, 0x73, 0x13, 0xc9, 0x15, 0xd7, 0x8c, 0x65, 0x5b, 0x7a, 0xb2, 0xcd, 0xb8, 0x6d, 0x83, 0x10, 0x42, 0x98, 0x09, 0x01, - 0xa3, 0xa4, 0x80, 0x88, 0x90, 0x0a, 0x45, 0xaa, 0x82, 0x31, 0x1f, 0x11, 0xc1, 0xc6, 0x19, 0x61, - 0xa8, 0x4a, 0x0e, 0xd4, 0x78, 0xa6, 0x2d, 0x4f, 0x59, 0xea, 0x51, 0x7a, 0x5a, 0x18, 0x9d, 0x73, - 0xcc, 0x25, 0xb7, 0x9c, 0xf6, 0xbe, 0x87, 0x3d, 0x6c, 0xed, 0x65, 0x0f, 0x5b, 0xb5, 0xc7, 0xad, - 0x3d, 0x72, 0xdc, 0x23, 0x05, 0xff, 0xc4, 0x1e, 0xb7, 0xba, 0xa7, 0x67, 0xd4, 0xf3, 0x21, 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x61, 0x36, 0x1b, 0x06, 0xbb, 0xf6, 0xa8, 0xe7, 0xdb, 0x2e, 0xba, - 0x05, 0x73, 0x81, 0x20, 0x08, 0xbd, 0x4b, 0xad, 0xea, 0x0d, 0x15, 0x5d, 0x65, 0x83, 0x25, 0xe5, - 0xd0, 0xef, 0x61, 0xd9, 0xc5, 0x3d, 0xcc, 0x3c, 0x9f, 0xbc, 0xf0, 0xfa, 0x38, 0x60, 0x76, 0x7f, - 0x20, 0x2c, 0xce, 0x58, 0x59, 0x06, 0xfa, 0x2b, 0x54, 0x06, 0x98, 0xf6, 0xbd, 0x20, 0xf0, 0x7c, - 0x12, 0x08, 0x14, 0x97, 0x5a, 0x17, 0xb3, 0x46, 0x76, 0xc7, 0x42, 0x96, 0xba, 0x83, 0x3b, 0xd8, - 0x13, 0x38, 0x08, 0x58, 0x2b, 0x79, 0x0e, 0x86, 0x38, 0x59, 0x52, 0x0e, 0xd5, 0xa0, 0xe4, 0x05, - 0x9d, 0x43, 0x9b, 0x62, 0x57, 0xc2, 0x1b, 0xaf, 0xcd, 0x3d, 0x58, 0x56, 0x42, 0x23, 0x18, 0xf8, - 0x24, 0xc0, 0xe8, 0x3e, 0xcc, 0x53, 0xec, 0x60, 0x6f, 0xc0, 0x04, 0x08, 0x95, 0xd6, 0xd5, 0xac, - 0x0d, 0x2b, 0x14, 0x78, 0xe5, 0xb1, 0xc3, 0xf8, 0x32, 0xad, 0x68, 0x9b, 0x79, 0x04, 0xe7, 0x27, - 0x4a, 0xa1, 0x5b, 0xb0, 0x12, 0x28, 0x4c, 0x89, 0xbc, 0x30, 0xb5, 0x60, 0xe5, 0xb1, 0x50, 0x1d, - 0xca, 0x41, 0x1c, 0x4d, 0x61, 0x54, 0x8e, 0x09, 0xe6, 0x97, 0x1a, 0x2c, 0xa8, 0xd6, 0xa6, 0xc7, - 0xf6, 0x00, 0x63, 0xda, 0x76, 0x85, 0x96, 0xb2, 0x25, 0x57, 0x68, 0x03, 0xce, 0xd8, 0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, 0x8c, 0x4d, 0x19, + 0x17, 0x53, 0xc6, 0xa6, 0x8e, 0x86, 0xbb, 0x50, 0x51, 0x12, 0x02, 0x5d, 0x9a, 0xdc, 0xfe, 0x86, + 0xaa, 0xd7, 0x27, 0x0b, 0x8c, 0x35, 0x2a, 0x85, 0x1d, 0xe5, 0xcc, 0xf2, 0x89, 0x7e, 0x2f, 0xa5, + 0x31, 0xaf, 0xbb, 0x7c, 0x19, 0x7f, 0x5e, 0x91, 0x3a, 0x2f, 0xe7, 0x7d, 0x9a, 0x49, 0x6a, 0x35, + 0xa7, 0x89, 0x48, 0xbd, 0x24, 0xee, 0xb8, 0x92, 0x4d, 0x10, 0xba, 0x9e, 0xb7, 0x39, 0xb7, 0x91, + 0xaa, 0x35, 0x4f, 0x23, 0x2a, 0xed, 0x75, 0x60, 0x41, 0x6d, 0x84, 0xd0, 0x7a, 0x6a, 0x6f, 0xa6, + 0xdd, 0xaa, 0x5d, 0x9e, 0x22, 0xa1, 0x82, 0xa3, 0xf4, 0x30, 0x19, 0x70, 0xb2, 0xbd, 0x52, 0x06, + 0x9c, 0xbc, 0x16, 0xe8, 0x35, 0x7f, 0x13, 0x93, 0x4f, 0x7b, 0xaa, 0x16, 0x4d, 0x68, 0x83, 0x52, + 0xb5, 0x68, 0x52, 0x7f, 0xf0, 0xe0, 0x4f, 0x3f, 0x7e, 0x68, 0x68, 0xef, 0x3e, 0x34, 0xb4, 0xf7, + 0x1f, 0x1a, 0xda, 0xff, 0x3e, 0x36, 0x0a, 0xef, 0x3e, 0x36, 0x0a, 0x3f, 0x7d, 0x6c, 0x14, 0xfe, + 0x55, 0x9f, 0xf6, 0x4f, 0x88, 0xfd, 0x39, 0xf1, 0xeb, 0xf6, 0x2f, 0x01, 0x00, 0x00, 0xff, 0xff, + 0x44, 0xc8, 0x68, 0xc2, 0xab, 0x18, 0x00, 0x00, } func (m *SpaceSignRequest) Marshal() (dAtA []byte, err error) { @@ -2854,6 +2910,18 @@ func (m *SpaceStatusCheckManyResponse) MarshalToSizedBuffer(dAtA []byte) (int, e _ = i var l int _ = l + if m.AccountLimits != nil { + { + size, err := m.AccountLimits.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintCoordinator(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } if len(m.Payloads) > 0 { for iNdEx := len(m.Payloads) - 1; iNdEx >= 0; iNdEx-- { { @@ -2871,6 +2939,34 @@ func (m *SpaceStatusCheckManyResponse) MarshalToSizedBuffer(dAtA []byte) (int, e return len(dAtA) - i, nil } +func (m *AccountLimits) 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 *AccountLimits) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *AccountLimits) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.SharedSpacesLimit != 0 { + i = encodeVarintCoordinator(dAtA, i, uint64(m.SharedSpacesLimit)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + func (m *SpaceStatusChangeRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -3175,20 +3271,20 @@ func (m *Node) MarshalToSizedBuffer(dAtA []byte) (int, error) { var l int _ = l if len(m.Types) > 0 { - dAtA6 := make([]byte, len(m.Types)*10) - var j5 int + dAtA7 := make([]byte, len(m.Types)*10) + var j6 int for _, num := range m.Types { for num >= 1<<7 { - dAtA6[j5] = uint8(uint64(num)&0x7f | 0x80) + dAtA7[j6] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 - j5++ + j6++ } - dAtA6[j5] = uint8(num) - j5++ + dAtA7[j6] = uint8(num) + j6++ } - i -= j5 - copy(dAtA[i:], dAtA6[:j5]) - i = encodeVarintCoordinator(dAtA, i, uint64(j5)) + i -= j6 + copy(dAtA[i:], dAtA7[:j6]) + i = encodeVarintCoordinator(dAtA, i, uint64(j6)) i-- dAtA[i] = 0x1a } @@ -4090,6 +4186,22 @@ func (m *SpaceStatusCheckManyResponse) Size() (n int) { n += 1 + l + sovCoordinator(uint64(l)) } } + if m.AccountLimits != nil { + l = m.AccountLimits.Size() + n += 1 + l + sovCoordinator(uint64(l)) + } + return n +} + +func (m *AccountLimits) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.SharedSpacesLimit != 0 { + n += 1 + sovCoordinator(uint64(m.SharedSpacesLimit)) + } return n } @@ -5737,6 +5849,111 @@ func (m *SpaceStatusCheckManyResponse) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AccountLimits", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCoordinator + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthCoordinator + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthCoordinator + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.AccountLimits == nil { + m.AccountLimits = &AccountLimits{} + } + if err := m.AccountLimits.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipCoordinator(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthCoordinator + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AccountLimits) 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 ErrIntOverflowCoordinator + } + 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: AccountLimits: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AccountLimits: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SharedSpacesLimit", wireType) + } + m.SharedSpacesLimit = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCoordinator + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SharedSpacesLimit |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipCoordinator(dAtA[iNdEx:]) diff --git a/coordinator/coordinatorproto/protos/coordinator.proto b/coordinator/coordinatorproto/protos/coordinator.proto index a4c5bbc6..67ce6266 100644 --- a/coordinator/coordinatorproto/protos/coordinator.proto +++ b/coordinator/coordinatorproto/protos/coordinator.proto @@ -141,8 +141,15 @@ message SpaceStatusCheckManyRequest { // SpaceStatusCheckManyResponse contains the current statuses of spaces message SpaceStatusCheckManyResponse { repeated SpaceStatusPayload payloads = 1; + AccountLimits accountLimits = 2; } +// AccountLimits describes account level limit +message AccountLimits { + uint32 sharedSpacesLimit = 1; +} + + // SpaceStatusChangeRequest contains the deletionChange if we want to delete space, or it is empty otherwise message SpaceStatusChangeRequest { string spaceId = 1; From 663bc10794af902a8c1231bcb8d837689989a4a6 Mon Sep 17 00:00:00 2001 From: Sergey Cherepanov Date: Tue, 16 Apr 2024 14:33:10 +0200 Subject: [PATCH 098/140] fix coordinatorclient mocks --- commonspace/spaceutils_test.go | 2 +- .../mock_coordinatorclient/mock_coordinatorclient.go | 7 ++++--- net/rpc/limiter/mock_limiter/mock_limiter.go | 1 + node/nodeclient/mock_nodeclient/mock_nodeclient.go | 1 + 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/commonspace/spaceutils_test.go b/commonspace/spaceutils_test.go index bf9cd1b1..39aa7c11 100644 --- a/commonspace/spaceutils_test.go +++ b/commonspace/spaceutils_test.go @@ -404,7 +404,7 @@ func (m mockCoordinatorClient) AccountRevertDeletion(ctx context.Context) (err e return } -func (m mockCoordinatorClient) StatusCheckMany(ctx context.Context, spaceIds []string) (statuses []*coordinatorproto.SpaceStatusPayload, err error) { +func (m mockCoordinatorClient) StatusCheckMany(ctx context.Context, spaceIds []string) (statuses []*coordinatorproto.SpaceStatusPayload, limit *coordinatorproto.AccountLimits, err error) { return } diff --git a/coordinator/coordinatorclient/mock_coordinatorclient/mock_coordinatorclient.go b/coordinator/coordinatorclient/mock_coordinatorclient/mock_coordinatorclient.go index 0513a362..6ecb0d5a 100644 --- a/coordinator/coordinatorclient/mock_coordinatorclient/mock_coordinatorclient.go +++ b/coordinator/coordinatorclient/mock_coordinatorclient/mock_coordinatorclient.go @@ -277,12 +277,13 @@ func (mr *MockCoordinatorClientMockRecorder) StatusCheck(arg0, arg1 any) *gomock } // StatusCheckMany mocks base method. -func (m *MockCoordinatorClient) StatusCheckMany(arg0 context.Context, arg1 []string) ([]*coordinatorproto.SpaceStatusPayload, error) { +func (m *MockCoordinatorClient) StatusCheckMany(arg0 context.Context, arg1 []string) ([]*coordinatorproto.SpaceStatusPayload, *coordinatorproto.AccountLimits, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "StatusCheckMany", arg0, arg1) ret0, _ := ret[0].([]*coordinatorproto.SpaceStatusPayload) - ret1, _ := ret[1].(error) - return ret0, ret1 + ret1, _ := ret[1].(*coordinatorproto.AccountLimits) + ret2, _ := ret[2].(error) + return ret0, ret1, ret2 } // StatusCheckMany indicates an expected call of StatusCheckMany. diff --git a/net/rpc/limiter/mock_limiter/mock_limiter.go b/net/rpc/limiter/mock_limiter/mock_limiter.go index 78b9cc52..99e2ff8c 100644 --- a/net/rpc/limiter/mock_limiter/mock_limiter.go +++ b/net/rpc/limiter/mock_limiter/mock_limiter.go @@ -5,6 +5,7 @@ // // mockgen -destination mock_limiter/mock_limiter.go github.com/anyproto/any-sync/net/rpc/limiter RpcLimiter // + // Package mock_limiter is a generated GoMock package. package mock_limiter diff --git a/node/nodeclient/mock_nodeclient/mock_nodeclient.go b/node/nodeclient/mock_nodeclient/mock_nodeclient.go index b908059f..dc8dea45 100644 --- a/node/nodeclient/mock_nodeclient/mock_nodeclient.go +++ b/node/nodeclient/mock_nodeclient/mock_nodeclient.go @@ -5,6 +5,7 @@ // // mockgen -destination mock_nodeclient/mock_nodeclient.go github.com/anyproto/any-sync/node/nodeclient NodeClient // + // Package mock_nodeclient is a generated GoMock package. package mock_nodeclient From 8514732467b22fdc3b4ba371021b2ab55dfa88c4 Mon Sep 17 00:00:00 2001 From: Anton Akentev Date: Wed, 17 Apr 2024 11:42:47 +0100 Subject: [PATCH 099/140] payments: new error --- .../paymentserviceproto/paymentservice.pb.go | 178 +++++++++--------- .../protos/paymentservice.proto | 1 + 2 files changed, 92 insertions(+), 87 deletions(-) diff --git a/paymentservice/paymentserviceproto/paymentservice.pb.go b/paymentservice/paymentserviceproto/paymentservice.pb.go index cb554b01..b95da444 100644 --- a/paymentservice/paymentserviceproto/paymentservice.pb.go +++ b/paymentservice/paymentserviceproto/paymentservice.pb.go @@ -234,6 +234,7 @@ const ( IsNameValidResponse_TooLong IsNameValidResponse_Code = 3 IsNameValidResponse_HasInvalidChars IsNameValidResponse_Code = 4 IsNameValidResponse_TierFeatureNoName IsNameValidResponse_Code = 5 + IsNameValidResponse_InBlacklist IsNameValidResponse_Code = 6 ) var IsNameValidResponse_Code_name = map[int32]string{ @@ -243,6 +244,7 @@ var IsNameValidResponse_Code_name = map[int32]string{ 3: "TooLong", 4: "HasInvalidChars", 5: "TierFeatureNoName", + 6: "InBlacklist", } var IsNameValidResponse_Code_value = map[string]int32{ @@ -252,6 +254,7 @@ var IsNameValidResponse_Code_value = map[string]int32{ "TooLong": 3, "HasInvalidChars": 4, "TierFeatureNoName": 5, + "InBlacklist": 6, } func (x IsNameValidResponse_Code) String() string { @@ -1423,93 +1426,94 @@ func init() { } var fileDescriptor_4feb29dcc5ba50f6 = []byte{ - // 1369 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x57, 0xcd, 0x6f, 0x1b, 0x45, - 0x14, 0xf7, 0xfa, 0x23, 0x89, 0x9f, 0xe3, 0x64, 0x32, 0x71, 0xd3, 0xad, 0x9b, 0x58, 0xe9, 0x8a, - 0x8f, 0x28, 0x88, 0xad, 0x28, 0x3d, 0x20, 0x84, 0x10, 0x4e, 0xe2, 0x84, 0x48, 0x25, 0x44, 0xb6, - 0xdb, 0x0a, 0x7a, 0x80, 0x8d, 0xf7, 0xc5, 0x59, 0xba, 0x99, 0x59, 0x66, 0xc7, 0x4d, 0xcd, 0x8d, - 0x23, 0x37, 0x24, 0x0e, 0xf0, 0xff, 0x70, 0xe1, 0x84, 0x7a, 0xec, 0x11, 0xb5, 0x37, 0x4e, 0xfc, - 0x09, 0x68, 0x66, 0xd7, 0xf1, 0x3a, 0x5e, 0x3b, 0xa1, 0x11, 0x97, 0x64, 0xe7, 0x37, 0xf3, 0xde, - 0xbc, 0xf7, 0x7b, 0x1f, 0xf3, 0x0c, 0x9f, 0x06, 0x4e, 0xff, 0x14, 0x99, 0x0c, 0x51, 0x3c, 0xf3, - 0x3a, 0x78, 0x77, 0x74, 0x19, 0x08, 0x2e, 0xf9, 0x5d, 0xfd, 0x37, 0xbc, 0xb0, 0x65, 0x6b, 0xb4, - 0xba, 0xf3, 0xa6, 0xf2, 0xdf, 0x48, 0x0f, 0x45, 0x18, 0x69, 0xb1, 0x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 0x3e, 0x81, - 0x4a, 0xda, 0x40, 0x43, 0x2d, 0xfb, 0xd2, 0x39, 0xa7, 0xba, 0x66, 0x4f, 0x9d, 0x95, 0x32, 0xf4, - 0x3b, 0xb8, 0x35, 0x71, 0x54, 0xa0, 0xef, 0xda, 0x57, 0x1b, 0x54, 0xaa, 0x96, 0x7d, 0xe9, 0xbc, - 0x11, 0x39, 0x92, 0xf6, 0x4e, 0x53, 0x2d, 0x3d, 0xfd, 0xf9, 0xae, 0xae, 0xd9, 0x53, 0x47, 0x80, - 0x0c, 0xfd, 0x0c, 0x4a, 0x89, 0x27, 0x90, 0xde, 0xb2, 0x27, 0x3d, 0x88, 0xd5, 0x8a, 0x9d, 0xf2, - 0xb8, 0x46, 0x11, 0xdf, 0x43, 0x59, 0xf7, 0x7d, 0x55, 0x7d, 0x21, 0x5d, 0x51, 0x37, 0xea, 0xcf, - 0x51, 0xf1, 0xa5, 0x04, 0x3e, 0x90, 0xdd, 0xfa, 0xe4, 0x8f, 0x57, 0x35, 0xe3, 0xc5, 0xab, 0x9a, - 0xf1, 0xd7, 0xab, 0x9a, 0xf1, 0xf3, 0xeb, 0x5a, 0xe6, 0xc5, 0xeb, 0x5a, 0xe6, 0xe5, 0xeb, 0x5a, - 0xe6, 0x6b, 0xeb, 0xf2, 0x5f, 0xcb, 0x47, 0x33, 0xfa, 0xdf, 0x87, 0xff, 0x06, 0x00, 0x00, 0xff, - 0xff, 0x98, 0x59, 0x07, 0xc0, 0x9a, 0x0f, 0x00, 0x00, + // 1384 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x57, 0x4b, 0x73, 0x1b, 0xc5, + 0x13, 0xd7, 0xea, 0x61, 0x5b, 0x2d, 0x3f, 0xc6, 0x63, 0xc5, 0xd9, 0x28, 0xb6, 0xca, 0xd9, 0xfa, + 0x3f, 0x5c, 0xa6, 0xd8, 0x14, 0x21, 0x07, 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6b, + 0x1b, 0x47, 0x7c, 0x17, 0x55, 0x2d, 0x0c, 0xf5, 0xed, 0x93, 0x74, 0x59, 0x9f, 0x68, 0x86, 0x83, + 0xe2, 0x8b, 0x29, 0xbc, 0x27, 0xbb, 0xf9, 0xd1, 0x6f, 0xaf, 0xab, 0xd6, 0xcb, 0xd7, 0x55, 0xeb, + 0x8f, 0xd7, 0x55, 0xeb, 0xc7, 0x37, 0xd5, 0xcc, 0xcb, 0x37, 0xd5, 0xcc, 0xab, 0x37, 0xd5, 0xcc, + 0x97, 0xce, 0xd5, 0x9f, 0xcf, 0x87, 0x53, 0xe6, 0xef, 0xfd, 0xbf, 0x03, 0x00, 0x00, 0xff, 0xff, + 0xee, 0xcd, 0x48, 0x0f, 0xab, 0x0f, 0x00, 0x00, } func (m *GetSubscriptionRequest) Marshal() (dAtA []byte, err error) { diff --git a/paymentservice/paymentserviceproto/protos/paymentservice.proto b/paymentservice/paymentserviceproto/protos/paymentservice.proto index df54e2f7..1d0226e5 100644 --- a/paymentservice/paymentserviceproto/protos/paymentservice.proto +++ b/paymentservice/paymentserviceproto/protos/paymentservice.proto @@ -206,6 +206,7 @@ message IsNameValidResponse { TooLong = 3; HasInvalidChars = 4; TierFeatureNoName = 5; + InBlacklist = 6; // if everything is fine - "name is already taken" check should be done in the NS // see IsNameAvailable() } From b3c0461bd09e5badfa735af31e8bef5257dfc4a8 Mon Sep 17 00:00:00 2001 From: Roman Khafizianov Date: Wed, 17 Apr 2024 17:21:35 +0200 Subject: [PATCH 100/140] treeExporter: add datatype field --- commonspace/object/tree/exporter/treeexporter.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/commonspace/object/tree/exporter/treeexporter.go b/commonspace/object/tree/exporter/treeexporter.go index 25723561..36275e93 100644 --- a/commonspace/object/tree/exporter/treeexporter.go +++ b/commonspace/object/tree/exporter/treeexporter.go @@ -9,7 +9,7 @@ import ( ) type DataConverter interface { - Unmarshall(decrypted []byte) (any, error) + Unmarshall(dataType string, decrypted []byte) (any, error) Marshall(model any) ([]byte, error) } @@ -59,7 +59,7 @@ func (t *treeExporter) ExportUnencrypted(tree objecttree.ReadableObjectTree) (er } err = tree.IterateRoot( func(change *objecttree.Change, decrypted []byte) (any, error) { - return t.converter.Unmarshall(decrypted) + return t.converter.Unmarshall(change.DataType, decrypted) }, func(change *objecttree.Change) bool { if change.Id == tree.Id() { From da2e5b7589c7fa34d619ffbfba7d1383eecfee48 Mon Sep 17 00:00:00 2001 From: Roman Khafizianov Date: Wed, 17 Apr 2024 18:44:31 +0200 Subject: [PATCH 101/140] treeexporter: add dataType to Marshall --- commonspace/object/tree/exporter/treeexporter.go | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/commonspace/object/tree/exporter/treeexporter.go b/commonspace/object/tree/exporter/treeexporter.go index 36275e93..be9ead92 100644 --- a/commonspace/object/tree/exporter/treeexporter.go +++ b/commonspace/object/tree/exporter/treeexporter.go @@ -10,7 +10,7 @@ import ( type DataConverter interface { Unmarshall(dataType string, decrypted []byte) (any, error) - Marshall(model any) ([]byte, error) + Marshall(model any) (data []byte, dataType string, err error) } type TreeExporterParams struct { @@ -66,14 +66,18 @@ func (t *treeExporter) ExportUnencrypted(tree objecttree.ReadableObjectTree) (er err = putStorage(change) return err == nil } - var data []byte - data, err = t.converter.Marshall(change.Model) + var ( + data []byte + dataType string + ) + data, dataType, err = t.converter.Marshall(change.Model) if err != nil { return false } // that means that change is unencrypted change.ReadKeyId = "" change.Data = data + change.DataType = dataType err = putStorage(change) return err == nil }) From 7b3f9bd1fda8f151e141f4842ea0251523dc8f6d Mon Sep 17 00:00:00 2001 From: Anton Akentev Date: Thu, 18 Apr 2024 22:06:22 +0100 Subject: [PATCH 102/140] ns: add new field --- .../nameserviceproto/nameservice.pb.go | 113 ++++++++++++------ .../nameserviceproto/protos/nameservice.proto | 3 + 2 files changed, 81 insertions(+), 35 deletions(-) diff --git a/nameservice/nameserviceproto/nameservice.pb.go b/nameservice/nameserviceproto/nameservice.pb.go index 8bdb1fbf..9471bdbb 100644 --- a/nameservice/nameserviceproto/nameservice.pb.go +++ b/nameservice/nameserviceproto/nameservice.pb.go @@ -308,6 +308,8 @@ type NameAvailableResponse struct { // doesn't work with marashalling/unmarshalling //google.protobuf.Timestamp nameExpires = 5 [(gogoproto.stdtime) = true]; NameExpires int64 `protobuf:"varint,6,opt,name=nameExpires,proto3" json:"nameExpires,omitempty"` + // some names are blacklisted until further notice + InBlacklist bool `protobuf:"varint,7,opt,name=inBlacklist,proto3" json:"inBlacklist,omitempty"` } func (m *NameAvailableResponse) Reset() { *m = NameAvailableResponse{} } @@ -385,6 +387,13 @@ func (m *NameAvailableResponse) GetNameExpires() int64 { return 0 } +func (m *NameAvailableResponse) GetInBlacklist() bool { + if m != nil { + return m.InBlacklist + } + return false +} + type BatchNameAvailableResponse struct { Results []*NameAvailableResponse `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"` } @@ -543,42 +552,43 @@ func init() { } var fileDescriptor_06bca2ea4304f305 = []byte{ - // 562 bytes of a gzipped FileDescriptorProto + // 578 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x54, 0x4d, 0x6f, 0xd3, 0x40, - 0x10, 0xb5, 0x49, 0xd2, 0x36, 0x53, 0x44, 0xd1, 0x36, 0xa1, 0xc6, 0xad, 0xac, 0x68, 0x4f, 0x39, - 0x6d, 0x51, 0xf8, 0x10, 0x1c, 0x10, 0x72, 0x50, 0x41, 0x11, 0x52, 0x2a, 0xdc, 0x1b, 0x17, 0xb4, - 0x8d, 0xb7, 0xad, 0xa5, 0x64, 0x1d, 0xbc, 0x4e, 0x4b, 0xfe, 0x05, 0x17, 0xfe, 0x13, 0xc7, 0x1e, - 0x39, 0xa2, 0xe4, 0x37, 0x70, 0x47, 0x5e, 0xdb, 0xf1, 0xfa, 0xab, 0xa8, 0x97, 0xd6, 0xf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xb3, 0x62, 0x58, 0xac, 0x21, 0x07, 0x3a, 0xf2, 0x92, 0x82, 0x92, 0x62, 0xac, 0x20, 0x77, 0x48, + 0xaa, 0x93, 0xc6, 0x1a, 0x7a, 0x0b, 0x0f, 0x73, 0xb9, 0x78, 0xe7, 0xd0, 0x3e, 0x29, 0x6e, 0xe0, + 0x1d, 0xa6, 0x46, 0xb0, 0xbf, 0x61, 0x4a, 0xaa, 0x18, 0xa4, 0x62, 0x99, 0xff, 0x67, 0xe8, 0x23, + 0x1c, 0xd8, 0xee, 0xc4, 0xe3, 0x71, 0xdd, 0x61, 0x97, 0x9e, 0x88, 0x58, 0x78, 0xe6, 0x5d, 0x72, + 0xe6, 0x22, 0x93, 0xa8, 0x60, 0xaa, 0x97, 0xd4, 0x4c, 0x44, 0x4e, 0xa7, 0x2c, 0xa4, 0x91, 0x17, + 0xf0, 0x5c, 0x6c, 0xf0, 0xf2, 0xf7, 0xc2, 0xd2, 0x6f, 0x17, 0x96, 0xfe, 0x77, 0x61, 0xe9, 0x3f, + 0x96, 0x96, 0x76, 0xbb, 0xb4, 0xb4, 0x3f, 0x4b, 0x4b, 0xfb, 0x7c, 0x74, 0xd7, 0xaf, 0xfc, 0xf9, + 0xb6, 0xfc, 0xf7, 0xec, 0x5f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x42, 0x70, 0x8b, 0xb7, 0x43, 0x06, 0x00, 0x00, } @@ -788,6 +798,16 @@ func (m *NameAvailableResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.InBlacklist { + i-- + if m.InBlacklist { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x38 + } if m.NameExpires != 0 { i = encodeVarintNameservice(dAtA, i, uint64(m.NameExpires)) i-- @@ -1071,6 +1091,9 @@ func (m *NameAvailableResponse) Size() (n int) { if m.NameExpires != 0 { n += 1 + sovNameservice(uint64(m.NameExpires)) } + if m.InBlacklist { + n += 2 + } return n } @@ -1814,6 +1837,26 @@ func (m *NameAvailableResponse) Unmarshal(dAtA []byte) error { break } } + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field InBlacklist", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowNameservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.InBlacklist = bool(v != 0) default: iNdEx = preIndex skippy, err := skipNameservice(dAtA[iNdEx:]) diff --git a/nameservice/nameserviceproto/protos/nameservice.proto b/nameservice/nameserviceproto/protos/nameservice.proto index 084daa71..dd94e705 100644 --- a/nameservice/nameserviceproto/protos/nameservice.proto +++ b/nameservice/nameserviceproto/protos/nameservice.proto @@ -55,6 +55,9 @@ message NameAvailableResponse { // doesn't work with marashalling/unmarshalling //google.protobuf.Timestamp nameExpires = 5 [(gogoproto.stdtime) = true]; int64 nameExpires = 6; + + // some names are blacklisted until further notice + bool inBlacklist = 7; } message BatchNameAvailableResponse { From 1599c2514f8458ae575e8a7a68f1fd2ab10ab1b0 Mon Sep 17 00:00:00 2001 From: Anton Akentev Date: Fri, 19 Apr 2024 10:29:38 +0100 Subject: [PATCH 103/140] refactoring: payments/ns - proto renames --- .../nameserviceproto/nameservice.pb.go | 113 ++++------- .../nameserviceproto/protos/nameservice.proto | 3 - .../paymentserviceproto/paymentservice.pb.go | 182 +++++++++--------- .../protos/paymentservice.proto | 2 +- 4 files changed, 127 insertions(+), 173 deletions(-) diff --git a/nameservice/nameserviceproto/nameservice.pb.go b/nameservice/nameserviceproto/nameservice.pb.go index 9471bdbb..8bdb1fbf 100644 --- a/nameservice/nameserviceproto/nameservice.pb.go +++ b/nameservice/nameserviceproto/nameservice.pb.go @@ -308,8 +308,6 @@ type NameAvailableResponse struct { // doesn't work with marashalling/unmarshalling //google.protobuf.Timestamp nameExpires = 5 [(gogoproto.stdtime) = true]; NameExpires int64 `protobuf:"varint,6,opt,name=nameExpires,proto3" json:"nameExpires,omitempty"` - // some names are blacklisted until further notice - InBlacklist bool `protobuf:"varint,7,opt,name=inBlacklist,proto3" json:"inBlacklist,omitempty"` } func (m *NameAvailableResponse) Reset() { *m = NameAvailableResponse{} } @@ -387,13 +385,6 @@ func (m *NameAvailableResponse) GetNameExpires() int64 { return 0 } -func (m *NameAvailableResponse) GetInBlacklist() bool { - if m != nil { - return m.InBlacklist - } - return false -} - type BatchNameAvailableResponse struct { Results []*NameAvailableResponse `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"` } @@ -552,43 +543,42 @@ func init() { } var fileDescriptor_06bca2ea4304f305 = []byte{ - // 578 bytes of a gzipped FileDescriptorProto + // 562 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x54, 0x4d, 0x6f, 0xd3, 0x40, - 0x10, 0xb5, 0x9b, 0xa4, 0x69, 0xa6, 0x88, 0xa2, 0x6d, 0x42, 0x8d, 0x5b, 0x59, 0xd1, 0x9e, 0x72, - 0xda, 0xa2, 0xf0, 0x21, 0x38, 0x20, 0xe4, 0xa0, 0x82, 0x22, 0xa4, 0x54, 0xb8, 0x37, 0x2e, 0x68, - 0x1b, 0x6f, 0x5b, 0x0b, 0x67, 0x1d, 0xbc, 0x4e, 0x4b, 0xfe, 0x05, 0x17, 0xc4, 0x5f, 0xe2, 0xd8, - 0x23, 0x47, 0x94, 0xfc, 0x11, 0xe4, 0xb5, 0x1d, 0x6f, 0x62, 0xbb, 0xa8, 0x97, 0xd6, 0xfb, 0xe6, - 0xcd, 0xdb, 0x37, 0x4f, 0x3b, 0x81, 0x17, 0x9c, 0x4e, 0x98, 0x60, 0xe1, 0xb5, 0x37, 0x66, 0xc7, - 0xca, 0xf7, 0x34, 0x0c, 0xa2, 0xe0, 0x58, 0xfe, 0x15, 0x2a, 0x4e, 0x24, 0x64, 0xbe, 0xba, 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 0x6a, 0x0c, 0xfb, 0x05, 0x53, 0x52, 0xc5, 0x20, 0x35, 0xab, 0xfa, 0x3f, 0x43, 0x9f, + 0xe0, 0xc0, 0x76, 0x67, 0x1e, 0x8f, 0xea, 0x0e, 0xbb, 0xf4, 0x44, 0xc8, 0x82, 0x33, 0xef, 0x92, + 0x33, 0x17, 0x99, 0x44, 0x05, 0x13, 0xbd, 0xb8, 0x66, 0x22, 0x72, 0x3a, 0x67, 0x01, 0x0d, 0x3d, + 0x9f, 0x67, 0x62, 0xc3, 0x57, 0xbf, 0x56, 0x96, 0x7e, 0xbb, 0xb2, 0xf4, 0x3f, 0x2b, 0x4b, 0xff, + 0xb1, 0xb6, 0xb4, 0xdb, 0xb5, 0xa5, 0xfd, 0x5e, 0x5b, 0xda, 0x97, 0xa3, 0xbb, 0x7e, 0xc3, 0xcf, + 0xb7, 0xe4, 0xbf, 0xe7, 0xff, 0x02, 0x00, 0x00, 0xff, 0xff, 0xc3, 0x04, 0xfe, 0x4d, 0x21, 0x06, 0x00, 0x00, } @@ -798,16 +788,6 @@ func (m *NameAvailableResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.InBlacklist { - i-- - if m.InBlacklist { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x38 - } if m.NameExpires != 0 { i = encodeVarintNameservice(dAtA, i, uint64(m.NameExpires)) i-- @@ -1091,9 +1071,6 @@ func (m *NameAvailableResponse) Size() (n int) { if m.NameExpires != 0 { n += 1 + sovNameservice(uint64(m.NameExpires)) } - if m.InBlacklist { - n += 2 - } return n } @@ -1837,26 +1814,6 @@ func (m *NameAvailableResponse) Unmarshal(dAtA []byte) error { break } } - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field InBlacklist", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNameservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.InBlacklist = bool(v != 0) default: iNdEx = preIndex skippy, err := skipNameservice(dAtA[iNdEx:]) diff --git a/nameservice/nameserviceproto/protos/nameservice.proto b/nameservice/nameserviceproto/protos/nameservice.proto index dd94e705..084daa71 100644 --- a/nameservice/nameserviceproto/protos/nameservice.proto +++ b/nameservice/nameserviceproto/protos/nameservice.proto @@ -55,9 +55,6 @@ message NameAvailableResponse { // doesn't work with marashalling/unmarshalling //google.protobuf.Timestamp nameExpires = 5 [(gogoproto.stdtime) = true]; int64 nameExpires = 6; - - // some names are blacklisted until further notice - bool inBlacklist = 7; } message BatchNameAvailableResponse { diff --git a/paymentservice/paymentserviceproto/paymentservice.pb.go b/paymentservice/paymentserviceproto/paymentservice.pb.go index b95da444..0be6c4f4 100644 --- a/paymentservice/paymentserviceproto/paymentservice.pb.go +++ b/paymentservice/paymentserviceproto/paymentservice.pb.go @@ -234,7 +234,7 @@ const ( IsNameValidResponse_TooLong IsNameValidResponse_Code = 3 IsNameValidResponse_HasInvalidChars IsNameValidResponse_Code = 4 IsNameValidResponse_TierFeatureNoName IsNameValidResponse_Code = 5 - IsNameValidResponse_InBlacklist IsNameValidResponse_Code = 6 + IsNameValidResponse_CanNotReserve IsNameValidResponse_Code = 6 ) var IsNameValidResponse_Code_name = map[int32]string{ @@ -244,7 +244,7 @@ var IsNameValidResponse_Code_name = map[int32]string{ 3: "TooLong", 4: "HasInvalidChars", 5: "TierFeatureNoName", - 6: "InBlacklist", + 6: "CanNotReserve", } var IsNameValidResponse_Code_value = map[string]int32{ @@ -254,7 +254,7 @@ var IsNameValidResponse_Code_value = map[string]int32{ "TooLong": 3, "HasInvalidChars": 4, "TierFeatureNoName": 5, - "InBlacklist": 6, + "CanNotReserve": 6, } func (x IsNameValidResponse_Code) String() string { @@ -1426,94 +1426,94 @@ func init() { } var fileDescriptor_4feb29dcc5ba50f6 = []byte{ - // 1384 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x57, 0x4b, 0x73, 0x1b, 0xc5, - 0x13, 0xd7, 0xea, 0x61, 0x5b, 0x2d, 0x3f, 0xc6, 0x63, 0xc5, 0xd9, 0x28, 0xb6, 0xca, 0xd9, 0xfa, - 0x3f, 0x5c, 0xa6, 0xd8, 0x14, 0x21, 0x07, 0x8a, 0xa2, 0x28, 0x64, 0x5b, 0x36, 0xae, 0x0a, 0xc6, - 0x25, 0x29, 0x49, 0x41, 0x0e, 0xb0, 0xd6, 0xb6, 0xed, 0xc5, 0xeb, 0x99, 0x65, 0x66, 0x14, 0x47, - 0xdc, 0x38, 0x72, 0xa3, 0x8a, 0x03, 0x7c, 0x1f, 0x2e, 0x1c, 0x73, 0xcc, 0x0d, 0x2a, 0xb9, 0x71, - 0xe2, 0x23, 0x50, 0x33, 0xbb, 0xb2, 0x56, 0xd6, 0xc3, 0x26, 0x2e, 0x2e, 0xd2, 0xcc, 0x6f, 0xa6, - 0x7b, 0xba, 0x7f, 0xdd, 0xd3, 0xd3, 0x0b, 0x1f, 0x47, 0x5e, 0xf7, 0x0c, 0x99, 0x92, 0x28, 0x9e, - 0x07, 0x6d, 0xbc, 0x3f, 0x38, 0x8d, 0x04, 0x57, 0xfc, 0xbe, 0xf9, 0x95, 0x97, 0x96, 0x5c, 0x83, - 0x56, 0xb6, 0xdf, 0x56, 0xfe, 0x2b, 0x15, 0xa0, 0x90, 0xb1, 0x16, 0xe7, 0x03, 0x58, 0xde, 0x45, - 0xd5, 0xec, 0x1c, 0xca, 0xb6, 0x08, 0x22, 0x15, 0x70, 0xd6, 0xc0, 0x6f, 0x3b, 0x28, 0x15, 0xad, - 0x02, 0xf0, 0x73, 0x86, 0xa2, 0xc6, 0xba, 0x7b, 0xdb, 0xb6, 0xb5, 0x66, 0xad, 0x17, 0x1b, 0x29, - 0xc4, 0x79, 0x02, 0x2b, 0xa3,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b, 0xd7, 0xeb, 0x5c, 0x2a, 0x8e, 0x7b, 0x65, 0x03, 0x12, - 0x3b, 0x32, 0xea, 0xe1, 0xa6, 0x46, 0x7a, 0xf2, 0x7b, 0x5e, 0x59, 0x75, 0x27, 0xf6, 0x04, 0x19, - 0xfa, 0x09, 0x94, 0x52, 0x6f, 0x22, 0xbd, 0xe3, 0x8e, 0x7b, 0x21, 0x2b, 0x65, 0x77, 0xc4, 0x6b, - 0x1b, 0x47, 0x7c, 0x17, 0x55, 0x2d, 0x0c, 0xf5, 0xed, 0x93, 0x74, 0x59, 0x9f, 0x68, 0x86, 0x83, - 0xe2, 0x8b, 0x29, 0xbc, 0x27, 0xbb, 0xf9, 0xd1, 0x6f, 0xaf, 0xab, 0xd6, 0xcb, 0xd7, 0x55, 0xeb, - 0x8f, 0xd7, 0x55, 0xeb, 0xc7, 0x37, 0xd5, 0xcc, 0xcb, 0x37, 0xd5, 0xcc, 0xab, 0x37, 0xd5, 0xcc, - 0x97, 0xce, 0xd5, 0x9f, 0xcf, 0x87, 0x53, 0xe6, 0xef, 0xfd, 0xbf, 0x03, 0x00, 0x00, 0xff, 0xff, - 0xee, 0xcd, 0x48, 0x0f, 0xab, 0x0f, 0x00, 0x00, + // 1380 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x57, 0xcd, 0x6f, 0x1b, 0x45, + 0x14, 0xf7, 0xfa, 0x23, 0x89, 0x5f, 0xbe, 0x26, 0x13, 0x37, 0xdd, 0xba, 0x89, 0x95, 0xae, 0xf8, + 0x88, 0x82, 0xd8, 0x8a, 0xd2, 0x03, 0x42, 0x08, 0xe1, 0x24, 0x4e, 0x88, 0x54, 0x42, 0x64, 0xbb, + 0xad, 0xa0, 0x07, 0xd8, 0x78, 0x5f, 0x9c, 0xa5, 0x9b, 0x99, 0x65, 0x76, 0xdc, 0x74, 0xb9, 0x71, + 0xe4, 0x86, 0x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 0x81, 0x39, 0x05, 0x34, 0x9e, + 0x07, 0x3e, 0x17, 0x28, 0x88, 0x41, 0x4d, 0xa8, 0x28, 0x64, 0xab, 0xe7, 0xf9, 0x2e, 0x8a, 0x0f, + 0x1e, 0x23, 0x3e, 0x6d, 0x37, 0x5a, 0x6d, 0x92, 0xa7, 0x55, 0x58, 0x51, 0x2b, 0xdb, 0x7c, 0x5b, + 0xa0, 0x23, 0x79, 0x6a, 0xad, 0x40, 0x2b, 0x40, 0xd2, 0x52, 0x5f, 0xa1, 0x23, 0x48, 0x91, 0xae, + 0x00, 0x1d, 0x96, 0xd0, 0x78, 0x49, 0xb9, 0x96, 0xda, 0x7d, 0xe8, 0xf7, 0x42, 0x32, 0xd5, 0x07, + 0xeb, 0x2c, 0x92, 0x51, 0x80, 0x6d, 0x74, 0x4e, 0xc9, 0xf4, 0x66, 0x08, 0x74, 0xb4, 0xc3, 0x51, + 0xee, 0xc6, 0xa3, 0x81, 0x23, 0xe7, 0xd0, 0x21, 0x32, 0xd7, 0x63, 0x5d, 0x62, 0x28, 0xdf, 0x62, + 0xa8, 0xde, 0x91, 0xde, 0x33, 0x24, 0x79, 0xfa, 0x36, 0xdc, 0x19, 0xda, 0xa4, 0x32, 0xcc, 0x13, + 0x18, 0x26, 0xc5, 0x5b, 0xdf, 0x63, 0x52, 0xd8, 0xfc, 0xd5, 0x80, 0xf9, 0xa1, 0x27, 0x98, 0x2e, + 0x00, 0xc4, 0xa3, 0x6d, 0x47, 0xb8, 0x31, 0x6d, 0xc9, 0x5c, 0x44, 0x81, 0xe4, 0xc4, 0xa0, 0x14, + 0x16, 0x62, 0xa4, 0x1e, 0x04, 0x3e, 0x1e, 0x3a, 0x11, 0xc9, 0x2b, 0x8f, 0x62, 0x6c, 0x8f, 0xf3, + 0x6e, 0x0c, 0x6a, 0xa6, 0x52, 0x1b, 0xf7, 0x99, 0x13, 0x04, 0x71, 0x5c, 0xd3, 0x5b, 0x63, 0xb8, + 0x34, 0x38, 0xf7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, 0xd5, 0x8c, + 0x9f, 0x5f, 0xd7, 0x72, 0x2f, 0x5e, 0xd7, 0x72, 0x2f, 0x5f, 0xd7, 0x72, 0x5f, 0x5b, 0x97, 0x7f, + 0x40, 0x1f, 0x4d, 0xe9, 0xbf, 0x0f, 0xff, 0x0d, 0x00, 0x00, 0xff, 0xff, 0x39, 0x28, 0xf6, 0xd9, + 0xad, 0x0f, 0x00, 0x00, } func (m *GetSubscriptionRequest) Marshal() (dAtA []byte, err error) { diff --git a/paymentservice/paymentserviceproto/protos/paymentservice.proto b/paymentservice/paymentserviceproto/protos/paymentservice.proto index 1d0226e5..ca3a78da 100644 --- a/paymentservice/paymentserviceproto/protos/paymentservice.proto +++ b/paymentservice/paymentserviceproto/protos/paymentservice.proto @@ -206,7 +206,7 @@ message IsNameValidResponse { TooLong = 3; HasInvalidChars = 4; TierFeatureNoName = 5; - InBlacklist = 6; + CanNotReserve = 6; // if everything is fine - "name is already taken" check should be done in the NS // see IsNameAvailable() } From 89829b63f31dbf839c4ace14a16f3f68549ddce8 Mon Sep 17 00:00:00 2001 From: kirillston Date: Fri, 19 Apr 2024 12:55:25 +0300 Subject: [PATCH 104/140] GO-3022 Add VerifyAppStoreReceipt rpc --- .../paymentserviceclient.go | 11 + .../paymentserviceproto/paymentservice.pb.go | 893 ++++++++++++++++-- .../paymentservice_drpc.pb.go | 42 +- .../protos/paymentservice.proto | 33 + 4 files changed, 891 insertions(+), 88 deletions(-) diff --git a/paymentservice/paymentserviceclient/paymentserviceclient.go b/paymentservice/paymentserviceclient/paymentserviceclient.go index 57aa2bb5..2cc61e6b 100644 --- a/paymentservice/paymentserviceclient/paymentserviceclient.go +++ b/paymentservice/paymentserviceclient/paymentserviceclient.go @@ -30,6 +30,7 @@ type AnyPpClientService interface { VerifyEmail(ctx context.Context, in *pp.VerifyEmailRequestSigned) (out *pp.VerifyEmailResponse, err error) FinalizeSubscription(ctx context.Context, in *pp.FinalizeSubscriptionRequestSigned) (out *pp.FinalizeSubscriptionResponse, err error) GetAllTiers(ctx context.Context, in *pp.GetTiersRequestSigned) (out *pp.GetTiersResponse, err error) + VerifyAppStoreReceipt(ctx context.Context, in *pp.VerifyAppStoreReceiptRequestSigned) (out *pp.VerifyAppStoreReceiptRequestResponse, err error) app.Component } @@ -155,3 +156,13 @@ func (s *service) IsNameValid(ctx context.Context, in *pp.IsNameValidRequest) (o }) return } + +func (s *service) VerifyAppStoreReceipt(ctx context.Context, in *pp.VerifyAppStoreReceiptRequestSigned) (out *pp.VerifyAppStoreReceiptRequestResponse, err error) { + err = s.doClient(ctx, func(cl pp.DRPCAnyPaymentProcessingClient) error { + if out, err = cl.VerifyAppStoreReceipt(ctx, in); err != nil { + return rpcerr.Unwrap(err) + } + return nil + }) + return +} diff --git a/paymentservice/paymentserviceproto/paymentservice.pb.go b/paymentservice/paymentserviceproto/paymentservice.pb.go index cb554b01..9e131bdf 100644 --- a/paymentservice/paymentserviceproto/paymentservice.pb.go +++ b/paymentservice/paymentserviceproto/paymentservice.pb.go @@ -1390,6 +1390,182 @@ func (m *IsNameValidResponse) GetDescription() string { return "" } +type VerifyAppStoreReceiptRequest struct { + // in the following format: "A5k2d9sFZw84yisTxRnz2bPRd1YPfVfhxqymZ6yESprFTG65" + // you can get it with Account().SignKey.GetPublic().Account() + OwnerAnyId string `protobuf:"bytes,1,opt,name=ownerAnyId,proto3" json:"ownerAnyId,omitempty"` + // this is the owner's main EOA (Externally Owned Account) address + // not AccountAbstraction's SCW (Smart Contract Wallet) address! + // this is required to reserve a name for the owner (later that is done by user) + // in the following format: "0x7a250d5630b4cf539739df2c5dacb4c659f2488d" + OwnerEthAddress string `protobuf:"bytes,2,opt,name=ownerEthAddress,proto3" json:"ownerEthAddress,omitempty"` + // was SubscriptionTier before, changed to uint32 to allow us to use dynamic tiers + RequestedTier uint32 `protobuf:"varint,3,opt,name=requestedTier,proto3" json:"requestedTier,omitempty"` + // receipt is a JWT-encoded information about subscription purchase + Receipt string `protobuf:"bytes,4,opt,name=receipt,proto3" json:"receipt,omitempty"` + // if empty - then no name requested + // if non-empty - PP node will register that name on behalf of the user + RequestedAnyName string `protobuf:"bytes,5,opt,name=requestedAnyName,proto3" json:"requestedAnyName,omitempty"` +} + +func (m *VerifyAppStoreReceiptRequest) Reset() { *m = VerifyAppStoreReceiptRequest{} } +func (m *VerifyAppStoreReceiptRequest) String() string { return proto.CompactTextString(m) } +func (*VerifyAppStoreReceiptRequest) ProtoMessage() {} +func (*VerifyAppStoreReceiptRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_4feb29dcc5ba50f6, []int{20} +} +func (m *VerifyAppStoreReceiptRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *VerifyAppStoreReceiptRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_VerifyAppStoreReceiptRequest.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 *VerifyAppStoreReceiptRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_VerifyAppStoreReceiptRequest.Merge(m, src) +} +func (m *VerifyAppStoreReceiptRequest) XXX_Size() int { + return m.Size() +} +func (m *VerifyAppStoreReceiptRequest) XXX_DiscardUnknown() { + xxx_messageInfo_VerifyAppStoreReceiptRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_VerifyAppStoreReceiptRequest proto.InternalMessageInfo + +func (m *VerifyAppStoreReceiptRequest) GetOwnerAnyId() string { + if m != nil { + return m.OwnerAnyId + } + return "" +} + +func (m *VerifyAppStoreReceiptRequest) GetOwnerEthAddress() string { + if m != nil { + return m.OwnerEthAddress + } + return "" +} + +func (m *VerifyAppStoreReceiptRequest) GetRequestedTier() uint32 { + if m != nil { + return m.RequestedTier + } + return 0 +} + +func (m *VerifyAppStoreReceiptRequest) GetReceipt() string { + if m != nil { + return m.Receipt + } + return "" +} + +func (m *VerifyAppStoreReceiptRequest) GetRequestedAnyName() string { + if m != nil { + return m.RequestedAnyName + } + return "" +} + +type VerifyAppStoreReceiptRequestSigned struct { + // VerifyAppStoreReceiptRequest + Payload []byte `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"` + // this is payload signed with payload.ownerAnyID + Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` +} + +func (m *VerifyAppStoreReceiptRequestSigned) Reset() { *m = VerifyAppStoreReceiptRequestSigned{} } +func (m *VerifyAppStoreReceiptRequestSigned) String() string { return proto.CompactTextString(m) } +func (*VerifyAppStoreReceiptRequestSigned) ProtoMessage() {} +func (*VerifyAppStoreReceiptRequestSigned) Descriptor() ([]byte, []int) { + return fileDescriptor_4feb29dcc5ba50f6, []int{21} +} +func (m *VerifyAppStoreReceiptRequestSigned) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *VerifyAppStoreReceiptRequestSigned) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_VerifyAppStoreReceiptRequestSigned.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 *VerifyAppStoreReceiptRequestSigned) XXX_Merge(src proto.Message) { + xxx_messageInfo_VerifyAppStoreReceiptRequestSigned.Merge(m, src) +} +func (m *VerifyAppStoreReceiptRequestSigned) XXX_Size() int { + return m.Size() +} +func (m *VerifyAppStoreReceiptRequestSigned) XXX_DiscardUnknown() { + xxx_messageInfo_VerifyAppStoreReceiptRequestSigned.DiscardUnknown(m) +} + +var xxx_messageInfo_VerifyAppStoreReceiptRequestSigned proto.InternalMessageInfo + +func (m *VerifyAppStoreReceiptRequestSigned) GetPayload() []byte { + if m != nil { + return m.Payload + } + return nil +} + +func (m *VerifyAppStoreReceiptRequestSigned) GetSignature() []byte { + if m != nil { + return m.Signature + } + return nil +} + +type VerifyAppStoreReceiptRequestResponse struct { +} + +func (m *VerifyAppStoreReceiptRequestResponse) Reset() { *m = VerifyAppStoreReceiptRequestResponse{} } +func (m *VerifyAppStoreReceiptRequestResponse) String() string { return proto.CompactTextString(m) } +func (*VerifyAppStoreReceiptRequestResponse) ProtoMessage() {} +func (*VerifyAppStoreReceiptRequestResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_4feb29dcc5ba50f6, []int{22} +} +func (m *VerifyAppStoreReceiptRequestResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *VerifyAppStoreReceiptRequestResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_VerifyAppStoreReceiptRequestResponse.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 *VerifyAppStoreReceiptRequestResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_VerifyAppStoreReceiptRequestResponse.Merge(m, src) +} +func (m *VerifyAppStoreReceiptRequestResponse) XXX_Size() int { + return m.Size() +} +func (m *VerifyAppStoreReceiptRequestResponse) XXX_DiscardUnknown() { + xxx_messageInfo_VerifyAppStoreReceiptRequestResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_VerifyAppStoreReceiptRequestResponse proto.InternalMessageInfo + func init() { proto.RegisterEnum("SubscriptionTier", SubscriptionTier_name, SubscriptionTier_value) proto.RegisterEnum("SubscriptionStatus", SubscriptionStatus_name, SubscriptionStatus_value) @@ -1416,6 +1592,9 @@ func init() { proto.RegisterType((*VerifyEmailRequestSigned)(nil), "VerifyEmailRequestSigned") proto.RegisterType((*IsNameValidRequest)(nil), "IsNameValidRequest") proto.RegisterType((*IsNameValidResponse)(nil), "IsNameValidResponse") + proto.RegisterType((*VerifyAppStoreReceiptRequest)(nil), "VerifyAppStoreReceiptRequest") + proto.RegisterType((*VerifyAppStoreReceiptRequestSigned)(nil), "VerifyAppStoreReceiptRequestSigned") + proto.RegisterType((*VerifyAppStoreReceiptRequestResponse)(nil), "VerifyAppStoreReceiptRequestResponse") } func init() { @@ -1423,93 +1602,98 @@ func init() { } var fileDescriptor_4feb29dcc5ba50f6 = []byte{ - // 1369 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x57, 0xcd, 0x6f, 0x1b, 0x45, - 0x14, 0xf7, 0xfa, 0x23, 0x89, 0x9f, 0xe3, 0x64, 0x32, 0x71, 0xd3, 0xad, 0x9b, 0x58, 0xe9, 0x8a, - 0x8f, 0x28, 0x88, 0xad, 0x28, 0x3d, 0x20, 0x84, 0x10, 0x4e, 0xe2, 0x84, 0x48, 0x25, 0x44, 0xb6, - 0xdb, 0x0a, 0x7a, 0x80, 0x8d, 0xf7, 0xc5, 0x59, 0xba, 0x99, 0x59, 0x66, 0xc7, 0x4d, 0xcd, 0x8d, - 0x23, 0x37, 0x24, 0x0e, 0xf0, 0xff, 0x70, 0xe1, 0x84, 0x7a, 0xec, 0x11, 0xb5, 0x37, 0x4e, 0xfc, - 0x09, 0x68, 0x66, 0xd7, 0xf1, 0x3a, 0x5e, 0x3b, 0xa1, 0x11, 0x97, 0x64, 0xe7, 0x37, 0xf3, 0xde, - 0xbc, 0xf7, 0x7b, 0x1f, 0xf3, 0x0c, 0x9f, 0x06, 0x4e, 0xff, 0x14, 0x99, 0x0c, 0x51, 0x3c, 0xf3, - 0x3a, 0x78, 0x77, 0x74, 0x19, 0x08, 0x2e, 0xf9, 0x5d, 0xfd, 0x37, 0xbc, 0xb0, 0x65, 0x6b, 0xb4, - 0xba, 0xf3, 0xa6, 0xf2, 0xdf, 0x48, 0x0f, 0x45, 0x18, 0x69, 0xb1, 0x3e, 0x82, 0x95, 0x3d, 0x94, - 0xad, 0xde, 0x51, 0xd8, 0x11, 0x5e, 0x20, 0x3d, 0xce, 0x9a, 0xf8, 0x7d, 0x0f, 0x43, 0x49, 0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, 0x16, 0x41, 0xf5, 0x8e, 0xf4, 0x9e, 0x21, 0xc9, 0xd2, 0xb7, 0xe1, 0xce, 0xc8, - 0x21, 0x95, 0x4e, 0x9e, 0xc0, 0x30, 0xee, 0xd4, 0xba, 0x68, 0x49, 0x6e, 0xf3, 0x57, 0x03, 0xca, - 0x23, 0xef, 0x2d, 0x5d, 0x00, 0x88, 0xbe, 0xb6, 0x1d, 0xe1, 0x46, 0xb4, 0xc5, 0x6b, 0xd1, 0x0f, - 0x24, 0x27, 0x06, 0xa5, 0xb0, 0x10, 0x21, 0xf5, 0x20, 0xf0, 0xf1, 0xd0, 0xe9, 0x93, 0xac, 0xf2, - 0x28, 0xc2, 0xf6, 0x38, 0xef, 0x46, 0xa0, 0x66, 0x2a, 0x71, 0x70, 0x9f, 0x39, 0x41, 0x10, 0x05, - 0x31, 0x79, 0x34, 0x82, 0x0b, 0xc3, 0x7b, 0x0f, 0x38, 0x43, 0x32, 0xb3, 0xf9, 0x63, 0x0e, 0xa0, - 0x21, 0x04, 0x17, 0x2a, 0x85, 0x42, 0xb5, 0xfd, 0x90, 0xe1, 0xf3, 0x00, 0x3b, 0x12, 0x95, 0x59, - 0xcb, 0xb0, 0x38, 0xac, 0xe9, 0xc6, 0x69, 0x20, 0x55, 0x3e, 0x55, 0x80, 0xc4, 0x19, 0xd3, 0x1a, - 0x54, 0x15, 0xc9, 0xd2, 0x32, 0x14, 0x15, 0xdb, 0x8f, 0x45, 0x94, 0x59, 0x71, 0x1e, 0x1c, 0x70, - 0xb9, 0xcb, 0x7b, 0xcc, 0x25, 0xf9, 0x01, 0xb2, 0xcf, 0x9c, 0x88, 0xbd, 0x82, 0x8a, 0xe6, 0x08, - 0x2b, 0x91, 0xec, 0x8c, 0xb2, 0x62, 0xcb, 0x19, 0x14, 0x12, 0x99, 0x55, 0x29, 0x3b, 0x88, 0xcb, - 0x9c, 0x72, 0x4c, 0x05, 0xb0, 0xee, 0x0b, 0x74, 0xdc, 0x7e, 0x1c, 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xb8, 0x35, 0x71, 0x54, 0xa0, 0xef, 0xda, 0x57, 0x1b, 0x54, 0xaa, 0x96, 0x7d, 0xe9, 0xbc, - 0x11, 0x39, 0x92, 0xf6, 0x4e, 0x53, 0x2d, 0x3d, 0xfd, 0xf9, 0xae, 0xae, 0xd9, 0x53, 0x47, 0x80, - 0x0c, 0xfd, 0x0c, 0x4a, 0x89, 0x27, 0x90, 0xde, 0xb2, 0x27, 0x3d, 0x88, 0xd5, 0x8a, 0x9d, 0xf2, - 0xb8, 0x46, 0x11, 0xdf, 0x43, 0x59, 0xf7, 0x7d, 0x55, 0x7d, 0x21, 0x5d, 0x51, 0x37, 0xea, 0xcf, - 0x51, 0xf1, 0xa5, 0x04, 0x3e, 0x90, 0xdd, 0xfa, 0xe4, 0x8f, 0x57, 0x35, 0xe3, 0xc5, 0xab, 0x9a, - 0xf1, 0xd7, 0xab, 0x9a, 0xf1, 0xf3, 0xeb, 0x5a, 0xe6, 0xc5, 0xeb, 0x5a, 0xe6, 0xe5, 0xeb, 0x5a, - 0xe6, 0x6b, 0xeb, 0xf2, 0x5f, 0xcb, 0x47, 0x33, 0xfa, 0xdf, 0x87, 0xff, 0x06, 0x00, 0x00, 0xff, - 0xff, 0x98, 0x59, 0x07, 0xc0, 0x9a, 0x0f, 0x00, 0x00, + // 1445 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x58, 0x4f, 0x6f, 0xdb, 0xc6, + 0x12, 0x17, 0xf5, 0xc7, 0xb6, 0xc6, 0xff, 0xd6, 0x6b, 0xd9, 0x61, 0x14, 0x5b, 0x70, 0xf8, 0x92, + 0x3c, 0xc3, 0x0f, 0x8f, 0x41, 0xd3, 0x1c, 0x8a, 0xa2, 0x28, 0x2a, 0xdb, 0xb2, 0x6b, 0x20, 0x75, + 0x0d, 0x4a, 0x49, 0xd0, 0xa6, 0x40, 0x4b, 0x8b, 0x63, 0x9b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xa8, 0xba, 0x6c, 0x8f, 0x9c, 0xaf, 0x72, 0xf4, 0x23, 0x98, 0x4c, 0xcd, 0x17, + 0xf4, 0xba, 0x7d, 0xde, 0xb4, 0x51, 0xad, 0xd8, 0x19, 0x93, 0x4b, 0x1c, 0xf1, 0x6d, 0x94, 0xf5, + 0x20, 0x50, 0xaf, 0x2f, 0xa2, 0x8b, 0xea, 0x46, 0xfd, 0x39, 0x28, 0x3e, 0x97, 0xc2, 0x4f, 0x65, + 0x11, 0x16, 0x32, 0x7b, 0x03, 0xfd, 0x8f, 0x7d, 0x71, 0x47, 0xaa, 0xde, 0xb6, 0x2f, 0xd3, 0x58, + 0xac, 0xdc, 0xfa, 0x07, 0xbf, 0xbc, 0xaa, 0x19, 0x2f, 0x5e, 0xd5, 0x8c, 0xdf, 0x5f, 0xd5, 0x8c, + 0x1f, 0x5e, 0xd7, 0x72, 0x2f, 0x5e, 0xd7, 0x72, 0x2f, 0x5f, 0xd7, 0x72, 0x9f, 0x5b, 0x17, 0xff, + 0x8f, 0xc7, 0xfe, 0x98, 0xfe, 0xf3, 0xee, 0xdf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x1b, 0x1e, 0x43, + 0x70, 0x5e, 0x11, 0x00, 0x00, } func (m *GetSubscriptionRequest) Marshal() (dAtA []byte, err error) { @@ -2281,6 +2465,122 @@ func (m *IsNameValidResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *VerifyAppStoreReceiptRequest) 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 *VerifyAppStoreReceiptRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *VerifyAppStoreReceiptRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.RequestedAnyName) > 0 { + i -= len(m.RequestedAnyName) + copy(dAtA[i:], m.RequestedAnyName) + i = encodeVarintPaymentservice(dAtA, i, uint64(len(m.RequestedAnyName))) + i-- + dAtA[i] = 0x2a + } + if len(m.Receipt) > 0 { + i -= len(m.Receipt) + copy(dAtA[i:], m.Receipt) + i = encodeVarintPaymentservice(dAtA, i, uint64(len(m.Receipt))) + i-- + dAtA[i] = 0x22 + } + if m.RequestedTier != 0 { + i = encodeVarintPaymentservice(dAtA, i, uint64(m.RequestedTier)) + i-- + dAtA[i] = 0x18 + } + if len(m.OwnerEthAddress) > 0 { + i -= len(m.OwnerEthAddress) + copy(dAtA[i:], m.OwnerEthAddress) + i = encodeVarintPaymentservice(dAtA, i, uint64(len(m.OwnerEthAddress))) + i-- + dAtA[i] = 0x12 + } + if len(m.OwnerAnyId) > 0 { + i -= len(m.OwnerAnyId) + copy(dAtA[i:], m.OwnerAnyId) + i = encodeVarintPaymentservice(dAtA, i, uint64(len(m.OwnerAnyId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *VerifyAppStoreReceiptRequestSigned) 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 *VerifyAppStoreReceiptRequestSigned) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *VerifyAppStoreReceiptRequestSigned) 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 = encodeVarintPaymentservice(dAtA, i, uint64(len(m.Signature))) + i-- + dAtA[i] = 0x12 + } + if len(m.Payload) > 0 { + i -= len(m.Payload) + copy(dAtA[i:], m.Payload) + i = encodeVarintPaymentservice(dAtA, i, uint64(len(m.Payload))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *VerifyAppStoreReceiptRequestResponse) 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 *VerifyAppStoreReceiptRequestResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *VerifyAppStoreReceiptRequestResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + func encodeVarintPaymentservice(dAtA []byte, offset int, v uint64) int { offset -= sovPaymentservice(v) base := offset @@ -2639,6 +2939,60 @@ func (m *IsNameValidResponse) Size() (n int) { return n } +func (m *VerifyAppStoreReceiptRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.OwnerAnyId) + if l > 0 { + n += 1 + l + sovPaymentservice(uint64(l)) + } + l = len(m.OwnerEthAddress) + if l > 0 { + n += 1 + l + sovPaymentservice(uint64(l)) + } + if m.RequestedTier != 0 { + n += 1 + sovPaymentservice(uint64(m.RequestedTier)) + } + l = len(m.Receipt) + if l > 0 { + n += 1 + l + sovPaymentservice(uint64(l)) + } + l = len(m.RequestedAnyName) + if l > 0 { + n += 1 + l + sovPaymentservice(uint64(l)) + } + return n +} + +func (m *VerifyAppStoreReceiptRequestSigned) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Payload) + if l > 0 { + n += 1 + l + sovPaymentservice(uint64(l)) + } + l = len(m.Signature) + if l > 0 { + n += 1 + l + sovPaymentservice(uint64(l)) + } + return n +} + +func (m *VerifyAppStoreReceiptRequestResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + func sovPaymentservice(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -4944,6 +5298,371 @@ func (m *IsNameValidResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *VerifyAppStoreReceiptRequest) 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 ErrIntOverflowPaymentservice + } + 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: VerifyAppStoreReceiptRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: VerifyAppStoreReceiptRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OwnerAnyId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPaymentservice + } + 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 ErrInvalidLengthPaymentservice + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPaymentservice + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OwnerAnyId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OwnerEthAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPaymentservice + } + 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 ErrInvalidLengthPaymentservice + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPaymentservice + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OwnerEthAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field RequestedTier", wireType) + } + m.RequestedTier = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPaymentservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.RequestedTier |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Receipt", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPaymentservice + } + 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 ErrInvalidLengthPaymentservice + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPaymentservice + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Receipt = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RequestedAnyName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPaymentservice + } + 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 ErrInvalidLengthPaymentservice + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPaymentservice + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RequestedAnyName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipPaymentservice(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthPaymentservice + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *VerifyAppStoreReceiptRequestSigned) 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 ErrIntOverflowPaymentservice + } + 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: VerifyAppStoreReceiptRequestSigned: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: VerifyAppStoreReceiptRequestSigned: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPaymentservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthPaymentservice + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthPaymentservice + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Payload = append(m.Payload[:0], dAtA[iNdEx:postIndex]...) + if m.Payload == nil { + m.Payload = []byte{} + } + iNdEx = postIndex + case 2: + 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 ErrIntOverflowPaymentservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthPaymentservice + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthPaymentservice + } + 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 := skipPaymentservice(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthPaymentservice + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *VerifyAppStoreReceiptRequestResponse) 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 ErrIntOverflowPaymentservice + } + 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: VerifyAppStoreReceiptRequestResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: VerifyAppStoreReceiptRequestResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipPaymentservice(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthPaymentservice + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipPaymentservice(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/paymentservice/paymentserviceproto/paymentservice_drpc.pb.go b/paymentservice/paymentserviceproto/paymentservice_drpc.pb.go index f491ffca..01236cd2 100644 --- a/paymentservice/paymentserviceproto/paymentservice_drpc.pb.go +++ b/paymentservice/paymentserviceproto/paymentservice_drpc.pb.go @@ -48,6 +48,7 @@ type DRPCAnyPaymentProcessingClient interface { GetVerificationEmail(ctx context.Context, in *GetVerificationEmailRequestSigned) (*GetVerificationEmailResponse, error) VerifyEmail(ctx context.Context, in *VerifyEmailRequestSigned) (*VerifyEmailResponse, error) GetAllTiers(ctx context.Context, in *GetTiersRequestSigned) (*GetTiersResponse, error) + VerifyAppStoreReceipt(ctx context.Context, in *VerifyAppStoreReceiptRequestSigned) (*VerifyAppStoreReceiptRequestResponse, error) } type drpcAnyPaymentProcessingClient struct { @@ -132,6 +133,15 @@ func (c *drpcAnyPaymentProcessingClient) GetAllTiers(ctx context.Context, in *Ge return out, nil } +func (c *drpcAnyPaymentProcessingClient) VerifyAppStoreReceipt(ctx context.Context, in *VerifyAppStoreReceiptRequestSigned) (*VerifyAppStoreReceiptRequestResponse, error) { + out := new(VerifyAppStoreReceiptRequestResponse) + err := c.cc.Invoke(ctx, "/AnyPaymentProcessing/VerifyAppStoreReceipt", drpcEncoding_File_paymentservice_paymentserviceproto_protos_paymentservice_proto{}, in, out) + if err != nil { + return nil, err + } + return out, nil +} + type DRPCAnyPaymentProcessingServer interface { GetSubscriptionStatus(context.Context, *GetSubscriptionRequestSigned) (*GetSubscriptionResponse, error) IsNameValid(context.Context, *IsNameValidRequest) (*IsNameValidResponse, error) @@ -141,6 +151,7 @@ type DRPCAnyPaymentProcessingServer interface { GetVerificationEmail(context.Context, *GetVerificationEmailRequestSigned) (*GetVerificationEmailResponse, error) VerifyEmail(context.Context, *VerifyEmailRequestSigned) (*VerifyEmailResponse, error) GetAllTiers(context.Context, *GetTiersRequestSigned) (*GetTiersResponse, error) + VerifyAppStoreReceipt(context.Context, *VerifyAppStoreReceiptRequestSigned) (*VerifyAppStoreReceiptRequestResponse, error) } type DRPCAnyPaymentProcessingUnimplementedServer struct{} @@ -177,9 +188,13 @@ func (s *DRPCAnyPaymentProcessingUnimplementedServer) GetAllTiers(context.Contex return nil, drpcerr.WithCode(errors.New("Unimplemented"), drpcerr.Unimplemented) } +func (s *DRPCAnyPaymentProcessingUnimplementedServer) VerifyAppStoreReceipt(context.Context, *VerifyAppStoreReceiptRequestSigned) (*VerifyAppStoreReceiptRequestResponse, error) { + return nil, drpcerr.WithCode(errors.New("Unimplemented"), drpcerr.Unimplemented) +} + type DRPCAnyPaymentProcessingDescription struct{} -func (DRPCAnyPaymentProcessingDescription) NumMethods() int { return 8 } +func (DRPCAnyPaymentProcessingDescription) NumMethods() int { return 9 } func (DRPCAnyPaymentProcessingDescription) Method(n int) (string, drpc.Encoding, drpc.Receiver, interface{}, bool) { switch n { @@ -255,6 +270,15 @@ func (DRPCAnyPaymentProcessingDescription) Method(n int) (string, drpc.Encoding, in1.(*GetTiersRequestSigned), ) }, DRPCAnyPaymentProcessingServer.GetAllTiers, true + case 8: + return "/AnyPaymentProcessing/VerifyAppStoreReceipt", drpcEncoding_File_paymentservice_paymentserviceproto_protos_paymentservice_proto{}, + func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) { + return srv.(DRPCAnyPaymentProcessingServer). + VerifyAppStoreReceipt( + ctx, + in1.(*VerifyAppStoreReceiptRequestSigned), + ) + }, DRPCAnyPaymentProcessingServer.VerifyAppStoreReceipt, true default: return "", nil, nil, nil, false } @@ -391,3 +415,19 @@ func (x *drpcAnyPaymentProcessing_GetAllTiersStream) SendAndClose(m *GetTiersRes } return x.CloseSend() } + +type DRPCAnyPaymentProcessing_VerifyAppStoreReceiptStream interface { + drpc.Stream + SendAndClose(*VerifyAppStoreReceiptRequestResponse) error +} + +type drpcAnyPaymentProcessing_VerifyAppStoreReceiptStream struct { + drpc.Stream +} + +func (x *drpcAnyPaymentProcessing_VerifyAppStoreReceiptStream) SendAndClose(m *VerifyAppStoreReceiptRequestResponse) error { + if err := x.MsgSend(m, drpcEncoding_File_paymentservice_paymentserviceproto_protos_paymentservice_proto{}); err != nil { + return err + } + return x.CloseSend() +} diff --git a/paymentservice/paymentserviceproto/protos/paymentservice.proto b/paymentservice/paymentserviceproto/protos/paymentservice.proto index df54e2f7..cf560894 100644 --- a/paymentservice/paymentserviceproto/protos/paymentservice.proto +++ b/paymentservice/paymentserviceproto/protos/paymentservice.proto @@ -211,6 +211,35 @@ message IsNameValidResponse { } } +message VerifyAppStoreReceiptRequest { + // in the following format: "A5k2d9sFZw84yisTxRnz2bPRd1YPfVfhxqymZ6yESprFTG65" + // you can get it with Account().SignKey.GetPublic().Account() + string ownerAnyId = 1; + // this is the owner's main EOA (Externally Owned Account) address + // not AccountAbstraction's SCW (Smart Contract Wallet) address! + // this is required to reserve a name for the owner (later that is done by user) + // in the following format: "0x7a250d5630b4cf539739df2c5dacb4c659f2488d" + string ownerEthAddress = 2; + // was SubscriptionTier before, changed to uint32 to allow us to use dynamic tiers + uint32 requestedTier = 3; + // receipt is a JWT-encoded information about subscription purchase + string receipt = 4; + // if empty - then no name requested + // if non-empty - PP node will register that name on behalf of the user + string requestedAnyName = 5; +} + +message VerifyAppStoreReceiptRequestSigned { + // VerifyAppStoreReceiptRequest + bytes payload = 1; + // this is payload signed with payload.ownerAnyID + bytes signature = 2; +} + +message VerifyAppStoreReceiptRequestResponse { + +} + enum ErrorCodes { Unexpected = 0; @@ -276,4 +305,8 @@ service AnyPaymentProcessing { // 3 - user can not buy stripe // 4 - some tiers are custom () rpc GetAllTiers(GetTiersRequestSigned) returns (GetTiersResponse) {} + + // Verify purchase in case subscription was bought via AppStore + // Incoming receipt contains all information to register purchase on Payment Node + rpc VerifyAppStoreReceipt(VerifyAppStoreReceiptRequestSigned) returns (VerifyAppStoreReceiptRequestResponse) {} } From cd494a5d918ae8dfabcac9df5b23c2239a816d52 Mon Sep 17 00:00:00 2001 From: Anton Akentev Date: Fri, 19 Apr 2024 15:52:17 +0100 Subject: [PATCH 105/140] payments: mock regenerated --- .../mock/mock_paymentserviceclient.go | 38 ++++++++++++++----- 1 file changed, 29 insertions(+), 9 deletions(-) diff --git a/paymentservice/paymentserviceclient/mock/mock_paymentserviceclient.go b/paymentservice/paymentserviceclient/mock/mock_paymentserviceclient.go index e1528cea..10a483bb 100644 --- a/paymentservice/paymentserviceclient/mock/mock_paymentserviceclient.go +++ b/paymentservice/paymentserviceclient/mock/mock_paymentserviceclient.go @@ -1,5 +1,10 @@ // Code generated by MockGen. DO NOT EDIT. // Source: paymentservice/paymentserviceclient/paymentserviceclient.go +// +// Generated by this command: +// +// mockgen -source paymentservice/paymentserviceclient/paymentserviceclient.go +// // Package mock_paymentserviceclient is a generated GoMock package. package mock_paymentserviceclient @@ -46,7 +51,7 @@ func (m *MockAnyPpClientService) BuySubscription(ctx context.Context, in *paymen } // BuySubscription indicates an expected call of BuySubscription. -func (mr *MockAnyPpClientServiceMockRecorder) BuySubscription(ctx, in interface{}) *gomock.Call { +func (mr *MockAnyPpClientServiceMockRecorder) BuySubscription(ctx, in any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BuySubscription", reflect.TypeOf((*MockAnyPpClientService)(nil).BuySubscription), ctx, in) } @@ -61,7 +66,7 @@ func (m *MockAnyPpClientService) FinalizeSubscription(ctx context.Context, in *p } // FinalizeSubscription indicates an expected call of FinalizeSubscription. -func (mr *MockAnyPpClientServiceMockRecorder) FinalizeSubscription(ctx, in interface{}) *gomock.Call { +func (mr *MockAnyPpClientServiceMockRecorder) FinalizeSubscription(ctx, in any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FinalizeSubscription", reflect.TypeOf((*MockAnyPpClientService)(nil).FinalizeSubscription), ctx, in) } @@ -76,7 +81,7 @@ func (m *MockAnyPpClientService) GetAllTiers(ctx context.Context, in *paymentser } // GetAllTiers indicates an expected call of GetAllTiers. -func (mr *MockAnyPpClientServiceMockRecorder) GetAllTiers(ctx, in interface{}) *gomock.Call { +func (mr *MockAnyPpClientServiceMockRecorder) GetAllTiers(ctx, in any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAllTiers", reflect.TypeOf((*MockAnyPpClientService)(nil).GetAllTiers), ctx, in) } @@ -91,7 +96,7 @@ func (m *MockAnyPpClientService) GetSubscriptionPortalLink(ctx context.Context, } // GetSubscriptionPortalLink indicates an expected call of GetSubscriptionPortalLink. -func (mr *MockAnyPpClientServiceMockRecorder) GetSubscriptionPortalLink(ctx, in interface{}) *gomock.Call { +func (mr *MockAnyPpClientServiceMockRecorder) GetSubscriptionPortalLink(ctx, in any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSubscriptionPortalLink", reflect.TypeOf((*MockAnyPpClientService)(nil).GetSubscriptionPortalLink), ctx, in) } @@ -106,7 +111,7 @@ func (m *MockAnyPpClientService) GetSubscriptionStatus(ctx context.Context, in * } // GetSubscriptionStatus indicates an expected call of GetSubscriptionStatus. -func (mr *MockAnyPpClientServiceMockRecorder) GetSubscriptionStatus(ctx, in interface{}) *gomock.Call { +func (mr *MockAnyPpClientServiceMockRecorder) GetSubscriptionStatus(ctx, in any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSubscriptionStatus", reflect.TypeOf((*MockAnyPpClientService)(nil).GetSubscriptionStatus), ctx, in) } @@ -121,7 +126,7 @@ func (m *MockAnyPpClientService) GetVerificationEmail(ctx context.Context, in *p } // GetVerificationEmail indicates an expected call of GetVerificationEmail. -func (mr *MockAnyPpClientServiceMockRecorder) GetVerificationEmail(ctx, in interface{}) *gomock.Call { +func (mr *MockAnyPpClientServiceMockRecorder) GetVerificationEmail(ctx, in any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetVerificationEmail", reflect.TypeOf((*MockAnyPpClientService)(nil).GetVerificationEmail), ctx, in) } @@ -135,7 +140,7 @@ func (m *MockAnyPpClientService) Init(a *app.App) error { } // Init indicates an expected call of Init. -func (mr *MockAnyPpClientServiceMockRecorder) Init(a interface{}) *gomock.Call { +func (mr *MockAnyPpClientServiceMockRecorder) Init(a any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Init", reflect.TypeOf((*MockAnyPpClientService)(nil).Init), a) } @@ -150,7 +155,7 @@ func (m *MockAnyPpClientService) IsNameValid(ctx context.Context, in *paymentser } // IsNameValid indicates an expected call of IsNameValid. -func (mr *MockAnyPpClientServiceMockRecorder) IsNameValid(ctx, in interface{}) *gomock.Call { +func (mr *MockAnyPpClientServiceMockRecorder) IsNameValid(ctx, in any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsNameValid", reflect.TypeOf((*MockAnyPpClientService)(nil).IsNameValid), ctx, in) } @@ -169,6 +174,21 @@ func (mr *MockAnyPpClientServiceMockRecorder) Name() *gomock.Call { return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockAnyPpClientService)(nil).Name)) } +// VerifyAppStoreReceipt mocks base method. +func (m *MockAnyPpClientService) VerifyAppStoreReceipt(ctx context.Context, in *paymentserviceproto.VerifyAppStoreReceiptRequestSigned) (*paymentserviceproto.VerifyAppStoreReceiptRequestResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "VerifyAppStoreReceipt", ctx, in) + ret0, _ := ret[0].(*paymentserviceproto.VerifyAppStoreReceiptRequestResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// VerifyAppStoreReceipt indicates an expected call of VerifyAppStoreReceipt. +func (mr *MockAnyPpClientServiceMockRecorder) VerifyAppStoreReceipt(ctx, in any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "VerifyAppStoreReceipt", reflect.TypeOf((*MockAnyPpClientService)(nil).VerifyAppStoreReceipt), ctx, in) +} + // VerifyEmail mocks base method. func (m *MockAnyPpClientService) VerifyEmail(ctx context.Context, in *paymentserviceproto.VerifyEmailRequestSigned) (*paymentserviceproto.VerifyEmailResponse, error) { m.ctrl.T.Helper() @@ -179,7 +199,7 @@ func (m *MockAnyPpClientService) VerifyEmail(ctx context.Context, in *paymentser } // VerifyEmail indicates an expected call of VerifyEmail. -func (mr *MockAnyPpClientServiceMockRecorder) VerifyEmail(ctx, in interface{}) *gomock.Call { +func (mr *MockAnyPpClientServiceMockRecorder) VerifyEmail(ctx, in any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "VerifyEmail", reflect.TypeOf((*MockAnyPpClientService)(nil).VerifyEmail), ctx, in) } From 3892bf827ccd7b7dc829bf3db5d857f3913520ce Mon Sep 17 00:00:00 2001 From: kirillston Date: Fri, 19 Apr 2024 19:35:06 +0300 Subject: [PATCH 106/140] GO-3022 Shorten incoming params --- .../paymentserviceproto/paymentservice.pb.go | 352 +++++------------- .../protos/paymentservice.proto | 17 +- 2 files changed, 106 insertions(+), 263 deletions(-) diff --git a/paymentservice/paymentserviceproto/paymentservice.pb.go b/paymentservice/paymentserviceproto/paymentservice.pb.go index 7b102b86..11c5be37 100644 --- a/paymentservice/paymentserviceproto/paymentservice.pb.go +++ b/paymentservice/paymentserviceproto/paymentservice.pb.go @@ -1394,21 +1394,10 @@ func (m *IsNameValidResponse) GetDescription() string { } type VerifyAppStoreReceiptRequest struct { - // in the following format: "A5k2d9sFZw84yisTxRnz2bPRd1YPfVfhxqymZ6yESprFTG65" - // you can get it with Account().SignKey.GetPublic().Account() - OwnerAnyId string `protobuf:"bytes,1,opt,name=ownerAnyId,proto3" json:"ownerAnyId,omitempty"` - // this is the owner's main EOA (Externally Owned Account) address - // not AccountAbstraction's SCW (Smart Contract Wallet) address! - // this is required to reserve a name for the owner (later that is done by user) - // in the following format: "0x7a250d5630b4cf539739df2c5dacb4c659f2488d" - OwnerEthAddress string `protobuf:"bytes,2,opt,name=ownerEthAddress,proto3" json:"ownerEthAddress,omitempty"` - // was SubscriptionTier before, changed to uint32 to allow us to use dynamic tiers - RequestedTier uint32 `protobuf:"varint,3,opt,name=requestedTier,proto3" json:"requestedTier,omitempty"` + // billingID is used to identify purchase request registered on payment node + BillingID string `protobuf:"bytes,1,opt,name=billingID,proto3" json:"billingID,omitempty"` // receipt is a JWT-encoded information about subscription purchase - Receipt string `protobuf:"bytes,4,opt,name=receipt,proto3" json:"receipt,omitempty"` - // if empty - then no name requested - // if non-empty - PP node will register that name on behalf of the user - RequestedAnyName string `protobuf:"bytes,5,opt,name=requestedAnyName,proto3" json:"requestedAnyName,omitempty"` + Receipt string `protobuf:"bytes,2,opt,name=receipt,proto3" json:"receipt,omitempty"` } func (m *VerifyAppStoreReceiptRequest) Reset() { *m = VerifyAppStoreReceiptRequest{} } @@ -1444,27 +1433,13 @@ func (m *VerifyAppStoreReceiptRequest) XXX_DiscardUnknown() { var xxx_messageInfo_VerifyAppStoreReceiptRequest proto.InternalMessageInfo -func (m *VerifyAppStoreReceiptRequest) GetOwnerAnyId() string { +func (m *VerifyAppStoreReceiptRequest) GetBillingID() string { if m != nil { - return m.OwnerAnyId + return m.BillingID } return "" } -func (m *VerifyAppStoreReceiptRequest) GetOwnerEthAddress() string { - if m != nil { - return m.OwnerEthAddress - } - return "" -} - -func (m *VerifyAppStoreReceiptRequest) GetRequestedTier() uint32 { - if m != nil { - return m.RequestedTier - } - return 0 -} - func (m *VerifyAppStoreReceiptRequest) GetReceipt() string { if m != nil { return m.Receipt @@ -1472,13 +1447,6 @@ func (m *VerifyAppStoreReceiptRequest) GetReceipt() string { return "" } -func (m *VerifyAppStoreReceiptRequest) GetRequestedAnyName() string { - if m != nil { - return m.RequestedAnyName - } - return "" -} - type VerifyAppStoreReceiptRequestSigned struct { // VerifyAppStoreReceiptRequest Payload []byte `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"` @@ -1605,99 +1573,98 @@ func init() { } var fileDescriptor_4feb29dcc5ba50f6 = []byte{ - // 1457 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x58, 0x4f, 0x6f, 0xdb, 0xc6, + // 1452 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x58, 0x4f, 0x6f, 0xdb, 0xc6, 0x12, 0x17, 0xf5, 0xc7, 0xb6, 0xc6, 0xff, 0xd6, 0x6b, 0xd9, 0x61, 0x14, 0x5b, 0x70, 0xf8, 0x92, - 0x3c, 0xc3, 0x0f, 0x8f, 0x41, 0xd3, 0x1c, 0x8a, 0xa2, 0x28, 0x2a, 0xdb, 0xb2, 0x6b, 0x20, 0x75, - 0x0d, 0x4a, 0x49, 0xd0, 0xa6, 0x40, 0x4b, 0x8b, 0x63, 0x9b, 0x0d, 0xbd, 0xcb, 0x2e, 0x57, 0x71, - 0xd4, 0x5b, 0x8f, 0xbd, 0x15, 0xe8, 0xa1, 0x1f, 0xa8, 0x97, 0x1e, 0x73, 0xe8, 0x21, 0xc7, 0x36, - 0xb9, 0xf5, 0xd4, 0x6f, 0xd0, 0x62, 0x97, 0x94, 0x45, 0x59, 0xb4, 0xec, 0xc4, 0x28, 0x7a, 0x89, - 0xb9, 0xbf, 0xdd, 0x99, 0x9d, 0xf9, 0xcd, 0xec, 0xcc, 0x28, 0xf0, 0x61, 0xe8, 0x76, 0x8f, 0x91, - 0xc9, 0x08,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xad, 0xe5, 0x5e, 0xbd, 0xad, 0xe5, 0x5e, + 0xbf, 0xad, 0xe5, 0x3e, 0xb7, 0x2e, 0xff, 0x5f, 0x88, 0xc3, 0x09, 0xfd, 0xe7, 0xff, 0x7f, 0x05, + 0x00, 0x00, 0xff, 0xff, 0x58, 0xd4, 0x15, 0x7f, 0xf2, 0x10, 0x00, 0x00, } func (m *GetSubscriptionRequest) Marshal() (dAtA []byte, err error) { @@ -2489,36 +2456,17 @@ func (m *VerifyAppStoreReceiptRequest) MarshalToSizedBuffer(dAtA []byte) (int, e _ = i var l int _ = l - if len(m.RequestedAnyName) > 0 { - i -= len(m.RequestedAnyName) - copy(dAtA[i:], m.RequestedAnyName) - i = encodeVarintPaymentservice(dAtA, i, uint64(len(m.RequestedAnyName))) - i-- - dAtA[i] = 0x2a - } if len(m.Receipt) > 0 { i -= len(m.Receipt) copy(dAtA[i:], m.Receipt) i = encodeVarintPaymentservice(dAtA, i, uint64(len(m.Receipt))) i-- - dAtA[i] = 0x22 - } - if m.RequestedTier != 0 { - i = encodeVarintPaymentservice(dAtA, i, uint64(m.RequestedTier)) - i-- - dAtA[i] = 0x18 - } - if len(m.OwnerEthAddress) > 0 { - i -= len(m.OwnerEthAddress) - copy(dAtA[i:], m.OwnerEthAddress) - i = encodeVarintPaymentservice(dAtA, i, uint64(len(m.OwnerEthAddress))) - i-- dAtA[i] = 0x12 } - if len(m.OwnerAnyId) > 0 { - i -= len(m.OwnerAnyId) - copy(dAtA[i:], m.OwnerAnyId) - i = encodeVarintPaymentservice(dAtA, i, uint64(len(m.OwnerAnyId))) + if len(m.BillingID) > 0 { + i -= len(m.BillingID) + copy(dAtA[i:], m.BillingID) + i = encodeVarintPaymentservice(dAtA, i, uint64(len(m.BillingID))) i-- dAtA[i] = 0xa } @@ -2949,25 +2897,14 @@ func (m *VerifyAppStoreReceiptRequest) Size() (n int) { } var l int _ = l - l = len(m.OwnerAnyId) + l = len(m.BillingID) if l > 0 { n += 1 + l + sovPaymentservice(uint64(l)) } - l = len(m.OwnerEthAddress) - if l > 0 { - n += 1 + l + sovPaymentservice(uint64(l)) - } - if m.RequestedTier != 0 { - n += 1 + sovPaymentservice(uint64(m.RequestedTier)) - } l = len(m.Receipt) if l > 0 { n += 1 + l + sovPaymentservice(uint64(l)) } - l = len(m.RequestedAnyName) - if l > 0 { - n += 1 + l + sovPaymentservice(uint64(l)) - } return n } @@ -5333,7 +5270,7 @@ func (m *VerifyAppStoreReceiptRequest) Unmarshal(dAtA []byte) error { switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OwnerAnyId", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field BillingID", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -5361,60 +5298,9 @@ func (m *VerifyAppStoreReceiptRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.OwnerAnyId = string(dAtA[iNdEx:postIndex]) + m.BillingID = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OwnerEthAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPaymentservice - } - 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 ErrInvalidLengthPaymentservice - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPaymentservice - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.OwnerEthAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field RequestedTier", wireType) - } - m.RequestedTier = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPaymentservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.RequestedTier |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Receipt", wireType) } @@ -5446,38 +5332,6 @@ func (m *VerifyAppStoreReceiptRequest) Unmarshal(dAtA []byte) error { } m.Receipt = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RequestedAnyName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPaymentservice - } - 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 ErrInvalidLengthPaymentservice - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPaymentservice - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RequestedAnyName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipPaymentservice(dAtA[iNdEx:]) diff --git a/paymentservice/paymentserviceproto/protos/paymentservice.proto b/paymentservice/paymentserviceproto/protos/paymentservice.proto index 6ea0be73..8e7d5c02 100644 --- a/paymentservice/paymentserviceproto/protos/paymentservice.proto +++ b/paymentservice/paymentserviceproto/protos/paymentservice.proto @@ -213,21 +213,10 @@ message IsNameValidResponse { } message VerifyAppStoreReceiptRequest { - // in the following format: "A5k2d9sFZw84yisTxRnz2bPRd1YPfVfhxqymZ6yESprFTG65" - // you can get it with Account().SignKey.GetPublic().Account() - string ownerAnyId = 1; - // this is the owner's main EOA (Externally Owned Account) address - // not AccountAbstraction's SCW (Smart Contract Wallet) address! - // this is required to reserve a name for the owner (later that is done by user) - // in the following format: "0x7a250d5630b4cf539739df2c5dacb4c659f2488d" - string ownerEthAddress = 2; - // was SubscriptionTier before, changed to uint32 to allow us to use dynamic tiers - uint32 requestedTier = 3; + // billingID is used to identify purchase request registered on payment node + string billingID = 1; // receipt is a JWT-encoded information about subscription purchase - string receipt = 4; - // if empty - then no name requested - // if non-empty - PP node will register that name on behalf of the user - string requestedAnyName = 5; + string receipt = 2; } message VerifyAppStoreReceiptRequestSigned { From 6fd4e51d24bb509e2c8988d39c7acc3522752433 Mon Sep 17 00:00:00 2001 From: kirillston Date: Mon, 22 Apr 2024 11:32:05 +0300 Subject: [PATCH 107/140] GO-3022 Add ownerAnyId for signing payload --- .../paymentserviceproto/paymentservice.pb.go | 245 +++++++++++------- .../protos/paymentservice.proto | 7 +- 2 files changed, 154 insertions(+), 98 deletions(-) diff --git a/paymentservice/paymentserviceproto/paymentservice.pb.go b/paymentservice/paymentserviceproto/paymentservice.pb.go index 11c5be37..d9a3291e 100644 --- a/paymentservice/paymentserviceproto/paymentservice.pb.go +++ b/paymentservice/paymentserviceproto/paymentservice.pb.go @@ -1394,10 +1394,13 @@ func (m *IsNameValidResponse) GetDescription() string { } type VerifyAppStoreReceiptRequest struct { + // in the following format: "A5k2d9sFZw84yisTxRnz2bPRd1YPfVfhxqymZ6yESprFTG65" + // you can get it with Account().SignKey.GetPublic().Account() + OwnerAnyId string `protobuf:"bytes,1,opt,name=ownerAnyId,proto3" json:"ownerAnyId,omitempty"` // billingID is used to identify purchase request registered on payment node - BillingID string `protobuf:"bytes,1,opt,name=billingID,proto3" json:"billingID,omitempty"` + BillingID string `protobuf:"bytes,2,opt,name=billingID,proto3" json:"billingID,omitempty"` // receipt is a JWT-encoded information about subscription purchase - Receipt string `protobuf:"bytes,2,opt,name=receipt,proto3" json:"receipt,omitempty"` + Receipt string `protobuf:"bytes,3,opt,name=receipt,proto3" json:"receipt,omitempty"` } func (m *VerifyAppStoreReceiptRequest) Reset() { *m = VerifyAppStoreReceiptRequest{} } @@ -1433,6 +1436,13 @@ func (m *VerifyAppStoreReceiptRequest) XXX_DiscardUnknown() { var xxx_messageInfo_VerifyAppStoreReceiptRequest proto.InternalMessageInfo +func (m *VerifyAppStoreReceiptRequest) GetOwnerAnyId() string { + if m != nil { + return m.OwnerAnyId + } + return "" +} + func (m *VerifyAppStoreReceiptRequest) GetBillingID() string { if m != nil { return m.BillingID @@ -1573,98 +1583,98 @@ func init() { } var fileDescriptor_4feb29dcc5ba50f6 = []byte{ - // 1452 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x58, 0x4f, 0x6f, 0xdb, 0xc6, - 0x12, 0x17, 0xf5, 0xc7, 0xb6, 0xc6, 0xff, 0xd6, 0x6b, 0xd9, 0x61, 0x14, 0x5b, 0x70, 0xf8, 0x92, - 0x3c, 0xc3, 0x0f, 0x8f, 0xc1, 0xcb, 0xcb, 0xa1, 0x28, 0x8a, 0xa2, 0xb2, 0x2d, 0xbb, 0x06, 0x52, - 0xd7, 0x90, 0x94, 0x04, 0x6d, 0x0a, 0xb4, 0xb4, 0x38, 0xb6, 0xd9, 0xd0, 0xbb, 0xec, 0x72, 0x15, - 0x87, 0xbd, 0xf5, 0xd8, 0x5b, 0x81, 0x1e, 0xfa, 0x81, 0x7a, 0xe9, 0x31, 0xc7, 0x1c, 0xdb, 0xe4, - 0xd6, 0x53, 0xbf, 0x41, 0x8b, 0x5d, 0x52, 0x16, 0x65, 0x51, 0xb2, 0x1b, 0xa3, 0x97, 0x98, 0xfb, - 0xdb, 0x99, 0xd9, 0x99, 0xdf, 0xcc, 0xce, 0x8e, 0x02, 0x1f, 0x06, 0x4e, 0x74, 0x8a, 0x4c, 0x86, - 0x28, 0x5e, 0x78, 0x1d, 0xbc, 0x3f, 0xb8, 0x0c, 0x04, 0x97, 0xfc, 0xbe, 0xfe, 0x37, 0xbc, 0xb0, - 0x65, 0x6b, 0xb4, 0xba, 0xfd, 0xae, 0xfa, 0x5f, 0x4a, 0x0f, 0x45, 0x18, 0x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, 0xbf, 0xbe, 0xa9, 0x19, 0x3f, 0xbc, 0xad, 0xe5, 0x5e, 0xbd, 0xad, 0xe5, 0x5e, - 0xbf, 0xad, 0xe5, 0x3e, 0xb7, 0x2e, 0xff, 0x5f, 0x88, 0xc3, 0x09, 0xfd, 0xe7, 0xff, 0x7f, 0x05, - 0x00, 0x00, 0xff, 0xff, 0x58, 0xd4, 0x15, 0x7f, 0xf2, 0x10, 0x00, 0x00, + // 1450 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x58, 0xcf, 0x4f, 0x1b, 0xc7, + 0x17, 0xf7, 0xfa, 0x07, 0xe0, 0xc7, 0xaf, 0x61, 0x30, 0x64, 0xe3, 0x80, 0x45, 0xf6, 0x9b, 0xe4, + 0x8b, 0xa8, 0xba, 0x51, 0xd3, 0x1c, 0xaa, 0xaa, 0xaa, 0x6a, 0xc0, 0x50, 0xa4, 0x94, 0x22, 0xdb, + 0x49, 0xd4, 0xa6, 0x52, 0xbb, 0x78, 0x1f, 0xb0, 0xcd, 0x32, 0xb3, 0x9d, 0x1d, 0x43, 0xb6, 0xb7, + 0x1e, 0x7b, 0xab, 0xd4, 0x43, 0xff, 0xa0, 0x5e, 0x7a, 0xcc, 0x31, 0xc7, 0x36, 0xb9, 0xf5, 0xd4, + 0xff, 0xa0, 0xd5, 0xcc, 0xae, 0xf1, 0x1a, 0x2f, 0x86, 0x06, 0xf5, 0x82, 0x67, 0x3e, 0x33, 0xef, + 0xcd, 0x7b, 0x9f, 0xf7, 0xe6, 0xcd, 0x5b, 0xe0, 0xe3, 0xc0, 0x89, 0x8e, 0x91, 0xc9, 0x10, 0xc5, + 0x89, 0xd7, 0xc1, 0xfb, 0x83, 0xd3, 0x40, 0x70, 0xc9, 0xef, 0xeb, 0xbf, 0xe1, 0xb9, 0x25, 0x5b, + 0xa3, 0xd5, 0xcd, 0xb7, 0x95, 0xff, 0x5a,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00, 0x3b, 0x12, 0x95, 0x59, 0xf3, 0x30, 0xdb, 0x2f, + 0x72, 0x8d, 0xe3, 0x40, 0xaa, 0x0b, 0x56, 0x01, 0x92, 0x5c, 0xa1, 0x56, 0x2f, 0x89, 0x48, 0x9e, + 0x4e, 0x43, 0x59, 0xb1, 0xfd, 0x54, 0xc4, 0x57, 0x2d, 0xc9, 0x83, 0x5d, 0x2e, 0xb7, 0x78, 0x97, + 0xb9, 0xa4, 0xd8, 0x43, 0x76, 0x98, 0x13, 0xb3, 0x57, 0x52, 0xd1, 0x1c, 0x60, 0x25, 0x96, 0x1d, + 0x53, 0x56, 0xac, 0x3b, 0xbd, 0xca, 0x42, 0xc6, 0xd5, 0x1d, 0xee, 0xc5, 0x65, 0x42, 0x39, 0xa6, + 0x02, 0x58, 0xf7, 0x05, 0x3a, 0x6e, 0x94, 0x44, 0xa2, 0xac, 0x63, 0xd3, 0xdd, 0x0f, 0xcf, 0xce, + 0x03, 0x45, 0xa0, 0x42, 0xb4, 0x52, 0x15, 0x24, 0x24, 0x93, 0xca, 0x74, 0x5d, 0x5b, 0x35, 0xb8, + 0xc5, 0xc5, 0xb1, 0x23, 0xc9, 0x94, 0xca, 0x50, 0x8d, 0x26, 0x3a, 0xe3, 0x27, 0x08, 0x5d, 0x32, + 0x7d, 0xb6, 0x3f, 0x59, 0x69, 0x21, 0x93, 0x64, 0x46, 0x99, 0xa0, 0xd1, 0x2d, 0xc7, 0xf3, 0xd1, + 0x6d, 0xf3, 0x16, 0x32, 0x97, 0xcc, 0x2a, 0x13, 0x34, 0xdc, 0x78, 0x11, 0x78, 0x02, 0x5d, 0x42, + 0x94, 0x09, 0xfd, 0xe3, 0x14, 0xc3, 0x64, 0x8e, 0x12, 0x98, 0xd4, 0x84, 0x7f, 0x7e, 0x70, 0x10, + 0xa2, 0x24, 0xaf, 0x8a, 0x0f, 0xfe, 0x2e, 0x41, 0xa5, 0xce, 0xa2, 0x84, 0x8a, 0x3d, 0xc1, 0xd5, +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3f, 0xbd, 0xa9, 0xe5, 0x5e, 0xbe, 0xa9, 0xe5, 0x5e, 0xbd, 0xa9, + 0xe5, 0xbe, 0xb4, 0x2e, 0xff, 0x2f, 0xc5, 0xfe, 0x98, 0xfe, 0x79, 0xff, 0x9f, 0x00, 0x00, 0x00, + 0xff, 0xff, 0x86, 0x4e, 0xee, 0x53, 0x12, 0x11, 0x00, 0x00, } func (m *GetSubscriptionRequest) Marshal() (dAtA []byte, err error) { @@ -2461,13 +2471,20 @@ func (m *VerifyAppStoreReceiptRequest) MarshalToSizedBuffer(dAtA []byte) (int, e copy(dAtA[i:], m.Receipt) i = encodeVarintPaymentservice(dAtA, i, uint64(len(m.Receipt))) i-- - dAtA[i] = 0x12 + dAtA[i] = 0x1a } if len(m.BillingID) > 0 { i -= len(m.BillingID) copy(dAtA[i:], m.BillingID) i = encodeVarintPaymentservice(dAtA, i, uint64(len(m.BillingID))) i-- + dAtA[i] = 0x12 + } + if len(m.OwnerAnyId) > 0 { + i -= len(m.OwnerAnyId) + copy(dAtA[i:], m.OwnerAnyId) + i = encodeVarintPaymentservice(dAtA, i, uint64(len(m.OwnerAnyId))) + i-- dAtA[i] = 0xa } return len(dAtA) - i, nil @@ -2897,6 +2914,10 @@ func (m *VerifyAppStoreReceiptRequest) Size() (n int) { } var l int _ = l + l = len(m.OwnerAnyId) + if l > 0 { + n += 1 + l + sovPaymentservice(uint64(l)) + } l = len(m.BillingID) if l > 0 { n += 1 + l + sovPaymentservice(uint64(l)) @@ -5269,6 +5290,38 @@ func (m *VerifyAppStoreReceiptRequest) Unmarshal(dAtA []byte) error { } switch fieldNum { case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OwnerAnyId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPaymentservice + } + 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 ErrInvalidLengthPaymentservice + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPaymentservice + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OwnerAnyId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field BillingID", wireType) } @@ -5300,7 +5353,7 @@ func (m *VerifyAppStoreReceiptRequest) Unmarshal(dAtA []byte) error { } m.BillingID = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 2: + case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Receipt", wireType) } diff --git a/paymentservice/paymentserviceproto/protos/paymentservice.proto b/paymentservice/paymentserviceproto/protos/paymentservice.proto index 8e7d5c02..e9a7bf46 100644 --- a/paymentservice/paymentserviceproto/protos/paymentservice.proto +++ b/paymentservice/paymentserviceproto/protos/paymentservice.proto @@ -213,10 +213,13 @@ message IsNameValidResponse { } message VerifyAppStoreReceiptRequest { + // in the following format: "A5k2d9sFZw84yisTxRnz2bPRd1YPfVfhxqymZ6yESprFTG65" + // you can get it with Account().SignKey.GetPublic().Account() + string ownerAnyId = 1; // billingID is used to identify purchase request registered on payment node - string billingID = 1; + string billingID = 2; // receipt is a JWT-encoded information about subscription purchase - string receipt = 2; + string receipt = 3; } message VerifyAppStoreReceiptRequestSigned { From fd8e4cc506c0f44c27d810858d065717408997cf Mon Sep 17 00:00:00 2001 From: kirillston Date: Mon, 22 Apr 2024 12:12:42 +0300 Subject: [PATCH 108/140] GO-3022 Remove redundant Request word --- .../mock/mock_paymentserviceclient.go | 4 +- .../paymentserviceclient.go | 4 +- .../paymentserviceproto/paymentservice.pb.go | 228 +++++++++--------- .../paymentservice_drpc.pb.go | 14 +- .../protos/paymentservice.proto | 4 +- 5 files changed, 127 insertions(+), 127 deletions(-) diff --git a/paymentservice/paymentserviceclient/mock/mock_paymentserviceclient.go b/paymentservice/paymentserviceclient/mock/mock_paymentserviceclient.go index 10a483bb..7a13c97c 100644 --- a/paymentservice/paymentserviceclient/mock/mock_paymentserviceclient.go +++ b/paymentservice/paymentserviceclient/mock/mock_paymentserviceclient.go @@ -175,10 +175,10 @@ func (mr *MockAnyPpClientServiceMockRecorder) Name() *gomock.Call { } // VerifyAppStoreReceipt mocks base method. -func (m *MockAnyPpClientService) VerifyAppStoreReceipt(ctx context.Context, in *paymentserviceproto.VerifyAppStoreReceiptRequestSigned) (*paymentserviceproto.VerifyAppStoreReceiptRequestResponse, error) { +func (m *MockAnyPpClientService) VerifyAppStoreReceipt(ctx context.Context, in *paymentserviceproto.VerifyAppStoreReceiptRequestSigned) (*paymentserviceproto.VerifyAppStoreReceiptResponse, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "VerifyAppStoreReceipt", ctx, in) - ret0, _ := ret[0].(*paymentserviceproto.VerifyAppStoreReceiptRequestResponse) + ret0, _ := ret[0].(*paymentserviceproto.VerifyAppStoreReceiptResponse) ret1, _ := ret[1].(error) return ret0, ret1 } diff --git a/paymentservice/paymentserviceclient/paymentserviceclient.go b/paymentservice/paymentserviceclient/paymentserviceclient.go index 2cc61e6b..e1e63d47 100644 --- a/paymentservice/paymentserviceclient/paymentserviceclient.go +++ b/paymentservice/paymentserviceclient/paymentserviceclient.go @@ -30,7 +30,7 @@ type AnyPpClientService interface { VerifyEmail(ctx context.Context, in *pp.VerifyEmailRequestSigned) (out *pp.VerifyEmailResponse, err error) FinalizeSubscription(ctx context.Context, in *pp.FinalizeSubscriptionRequestSigned) (out *pp.FinalizeSubscriptionResponse, err error) GetAllTiers(ctx context.Context, in *pp.GetTiersRequestSigned) (out *pp.GetTiersResponse, err error) - VerifyAppStoreReceipt(ctx context.Context, in *pp.VerifyAppStoreReceiptRequestSigned) (out *pp.VerifyAppStoreReceiptRequestResponse, err error) + VerifyAppStoreReceipt(ctx context.Context, in *pp.VerifyAppStoreReceiptRequestSigned) (out *pp.VerifyAppStoreReceiptResponse, err error) app.Component } @@ -157,7 +157,7 @@ func (s *service) IsNameValid(ctx context.Context, in *pp.IsNameValidRequest) (o return } -func (s *service) VerifyAppStoreReceipt(ctx context.Context, in *pp.VerifyAppStoreReceiptRequestSigned) (out *pp.VerifyAppStoreReceiptRequestResponse, err error) { +func (s *service) VerifyAppStoreReceipt(ctx context.Context, in *pp.VerifyAppStoreReceiptRequestSigned) (out *pp.VerifyAppStoreReceiptResponse, err error) { err = s.doClient(ctx, func(cl pp.DRPCAnyPaymentProcessingClient) error { if out, err = cl.VerifyAppStoreReceipt(ctx, in); err != nil { return rpcerr.Unwrap(err) diff --git a/paymentservice/paymentserviceproto/paymentservice.pb.go b/paymentservice/paymentserviceproto/paymentservice.pb.go index d9a3291e..1796347e 100644 --- a/paymentservice/paymentserviceproto/paymentservice.pb.go +++ b/paymentservice/paymentserviceproto/paymentservice.pb.go @@ -1511,21 +1511,21 @@ func (m *VerifyAppStoreReceiptRequestSigned) GetSignature() []byte { return nil } -type VerifyAppStoreReceiptRequestResponse struct { +type VerifyAppStoreReceiptResponse struct { } -func (m *VerifyAppStoreReceiptRequestResponse) Reset() { *m = VerifyAppStoreReceiptRequestResponse{} } -func (m *VerifyAppStoreReceiptRequestResponse) String() string { return proto.CompactTextString(m) } -func (*VerifyAppStoreReceiptRequestResponse) ProtoMessage() {} -func (*VerifyAppStoreReceiptRequestResponse) Descriptor() ([]byte, []int) { +func (m *VerifyAppStoreReceiptResponse) Reset() { *m = VerifyAppStoreReceiptResponse{} } +func (m *VerifyAppStoreReceiptResponse) String() string { return proto.CompactTextString(m) } +func (*VerifyAppStoreReceiptResponse) ProtoMessage() {} +func (*VerifyAppStoreReceiptResponse) Descriptor() ([]byte, []int) { return fileDescriptor_4feb29dcc5ba50f6, []int{22} } -func (m *VerifyAppStoreReceiptRequestResponse) XXX_Unmarshal(b []byte) error { +func (m *VerifyAppStoreReceiptResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *VerifyAppStoreReceiptRequestResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *VerifyAppStoreReceiptResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_VerifyAppStoreReceiptRequestResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_VerifyAppStoreReceiptResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -1535,17 +1535,17 @@ func (m *VerifyAppStoreReceiptRequestResponse) XXX_Marshal(b []byte, determinist return b[:n], nil } } -func (m *VerifyAppStoreReceiptRequestResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_VerifyAppStoreReceiptRequestResponse.Merge(m, src) +func (m *VerifyAppStoreReceiptResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_VerifyAppStoreReceiptResponse.Merge(m, src) } -func (m *VerifyAppStoreReceiptRequestResponse) XXX_Size() int { +func (m *VerifyAppStoreReceiptResponse) XXX_Size() int { return m.Size() } -func (m *VerifyAppStoreReceiptRequestResponse) XXX_DiscardUnknown() { - xxx_messageInfo_VerifyAppStoreReceiptRequestResponse.DiscardUnknown(m) +func (m *VerifyAppStoreReceiptResponse) XXX_DiscardUnknown() { + xxx_messageInfo_VerifyAppStoreReceiptResponse.DiscardUnknown(m) } -var xxx_messageInfo_VerifyAppStoreReceiptRequestResponse proto.InternalMessageInfo +var xxx_messageInfo_VerifyAppStoreReceiptResponse proto.InternalMessageInfo func init() { proto.RegisterEnum("SubscriptionTier", SubscriptionTier_name, SubscriptionTier_value) @@ -1575,7 +1575,7 @@ func init() { proto.RegisterType((*IsNameValidResponse)(nil), "IsNameValidResponse") proto.RegisterType((*VerifyAppStoreReceiptRequest)(nil), "VerifyAppStoreReceiptRequest") proto.RegisterType((*VerifyAppStoreReceiptRequestSigned)(nil), "VerifyAppStoreReceiptRequestSigned") - proto.RegisterType((*VerifyAppStoreReceiptRequestResponse)(nil), "VerifyAppStoreReceiptRequestResponse") + proto.RegisterType((*VerifyAppStoreReceiptResponse)(nil), "VerifyAppStoreReceiptResponse") } func init() { @@ -1583,98 +1583,98 @@ func init() { } var fileDescriptor_4feb29dcc5ba50f6 = []byte{ - // 1450 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x58, 0xcf, 0x4f, 0x1b, 0xc7, - 0x17, 0xf7, 0xfa, 0x07, 0xe0, 0xc7, 0xaf, 0x61, 0x30, 0x64, 0xe3, 0x80, 0x45, 0xf6, 0x9b, 0xe4, - 0x8b, 0xa8, 0xba, 0x51, 0xd3, 0x1c, 0xaa, 0xaa, 0xaa, 0x6a, 0xc0, 0x50, 0xa4, 0x94, 0x22, 0xdb, - 0x49, 0xd4, 0xa6, 0x52, 0xbb, 0x78, 0x1f, 0xb0, 0xcd, 0x32, 0xb3, 0x9d, 0x1d, 0x43, 0xb6, 0xb7, - 0x1e, 0x7b, 0xab, 0xd4, 0x43, 0xff, 0xa0, 0x5e, 0x7a, 0xcc, 0x31, 0xc7, 0x36, 0xb9, 0xf5, 0xd4, - 0xff, 0xa0, 0xd5, 0xcc, 0xae, 0xf1, 0x1a, 0x2f, 0x86, 0x06, 0xf5, 0x82, 0x67, 0x3e, 0x33, 0xef, - 0xcd, 0x7b, 0x9f, 0xf7, 0xe6, 0xcd, 0x5b, 0xe0, 0xe3, 0xc0, 0x89, 0x8e, 0x91, 0xc9, 0x10, 0xc5, - 0x89, 0xd7, 0xc1, 0xfb, 0x83, 0xd3, 0x40, 0x70, 0xc9, 0xef, 0xeb, 0xbf, 0xe1, 0xb9, 0x25, 0x5b, - 0xa3, 0xd5, 0xcd, 0xb7, 0x95, 0xff, 0x5a, 0x7a, 0x28, 0xc2, 0x58, 0x8b, 0xf5, 0x01, 0x2c, 0x6e, - 0xa3, 0x6c, 0x75, 0xf7, 0xc3, 0x8e, 0xf0, 0x02, 0xe9, 0x71, 0x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, 0x2f, 0x89, 0x48, 0x9e, - 0x4e, 0x43, 0x59, 0xb1, 0xfd, 0x54, 0xc4, 0x57, 0x2d, 0xc9, 0x83, 0x5d, 0x2e, 0xb7, 0x78, 0x97, - 0xb9, 0xa4, 0xd8, 0x43, 0x76, 0x98, 0x13, 0xb3, 0x57, 0x52, 0xd1, 0x1c, 0x60, 0x25, 0x96, 0x1d, - 0x53, 0x56, 0xac, 0x3b, 0xbd, 0xca, 0x42, 0xc6, 0xd5, 0x1d, 0xee, 0xc5, 0x65, 0x42, 0x39, 0xa6, - 0x02, 0x58, 0xf7, 0x05, 0x3a, 0x6e, 0x94, 0x44, 0xa2, 0xac, 0x63, 0xd3, 0xdd, 0x0f, 0xcf, 0xce, - 0x03, 0x45, 0xa0, 0x42, 0xb4, 0x52, 0x15, 0x24, 0x24, 0x93, 0xca, 0x74, 0x5d, 0x5b, 0x35, 0xb8, - 0xc5, 0xc5, 0xb1, 0x23, 0xc9, 0x94, 0xca, 0x50, 0x8d, 0x26, 0x3a, 0xe3, 0x27, 0x08, 0x5d, 0x32, - 0x7d, 0xb6, 0x3f, 0x59, 0x69, 0x21, 0x93, 0x64, 0x46, 0x99, 0xa0, 0xd1, 0x2d, 0xc7, 0xf3, 0xd1, - 0x6d, 0xf3, 0x16, 0x32, 0x97, 0xcc, 0x2a, 0x13, 0x34, 0xdc, 0x78, 0x11, 0x78, 0x02, 0x5d, 0x42, - 0x94, 0x09, 0xfd, 0xe3, 0x14, 0xc3, 0x64, 0x8e, 0x12, 0x98, 0xd4, 0x84, 0x7f, 0x7e, 0x70, 0x10, - 0xa2, 0x24, 0xaf, 0x8a, 0x0f, 0xfe, 0x2e, 0x41, 0xa5, 0xce, 0xa2, 0x84, 0x8a, 0x3d, 0xc1, 0xd5, - 0x63, 0xe0, 0xb1, 0x43, 0xda, 0x84, 0x85, 0x73, 0x0d, 0x40, 0x92, 0xae, 0xcb, 0xf6, 0xa8, 0x4f, - 0xa7, 0xaa, 0x69, 0x5f, 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0x98, 0xfe, 0x79, 0xff, 0x9f, 0x00, 0x00, 0x00, - 0xff, 0xff, 0x86, 0x4e, 0xee, 0x53, 0x12, 0x11, 0x00, 0x00, + // 1448 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x58, 0xcd, 0x6f, 0x1b, 0x45, + 0x14, 0xf7, 0xfa, 0x23, 0x89, 0x5f, 0xbe, 0x26, 0x13, 0x27, 0xdd, 0xba, 0x89, 0x49, 0x97, 0xaf, + 0x28, 0x88, 0xad, 0x28, 0x3d, 0x20, 0x84, 0x10, 0x4e, 0xe2, 0x84, 0x48, 0x25, 0x44, 0xb6, 0xdb, + 0x0a, 0x8a, 0x80, 0x8d, 0xf7, 0x25, 0x59, 0xba, 0x99, 0x59, 0x66, 0xc7, 0x49, 0xcd, 0x8d, 0x23, + 0x37, 0x24, 0x0e, 0xfc, 0x41, 0x5c, 0x38, 0xf6, 0xd8, 0x23, 0xb4, 0x37, 0x4e, 0x1c, 0x39, 0xa2, + 0x99, 0x5d, 0xdb, 0xeb, 0x78, 0xed, 0x84, 0x46, 0x5c, 0xe2, 0x99, 0xdf, 0xcc, 0x7b, 0xf3, 0xde, + 0xef, 0xbd, 0x79, 0xf3, 0x36, 0xf0, 0x71, 0xe0, 0x74, 0x4e, 0x91, 0xc9, 0x10, 0xc5, 0x99, 0xd7, + 0xc2, 0x3b, 0x83, 0xd3, 0x40, 0x70, 0xc9, 0xef, 0xe8, 0xbf, 0xe1, 0x85, 0x25, 0x5b, 0xa3, 0xe5, + 0xed, 0x57, 0x95, 0xff, 0x46, 0x7a, 0x28, 0xc2, 0x48, 0x8b, 0xf5, 0x01, 0x2c, 0xef, 0xa2, 0x6c, + 0xb4, 0x0f, 0xc3, 0x96, 0xf0, 0x02, 0xe9, 0x71, 0x56, 0xc7, 0xef, 0xdb, 0x18, 0x4a, 0x5a, 0x01, + 0xe0, 0xe7, 0x0c, 0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0x74, 0x19, 0xe8, + 0xa0, 0x84, 0xc6, 0x0b, 0x2a, 0xa2, 0x89, 0xdd, 0x07, 0x7e, 0x3b, 0x24, 0x13, 0x5d, 0xb0, 0xca, + 0x3a, 0xb2, 0x13, 0x60, 0x13, 0x9d, 0x53, 0x32, 0xb9, 0x11, 0x02, 0x1d, 0x6e, 0xec, 0x54, 0x94, + 0xa3, 0x51, 0xdf, 0x91, 0x1e, 0x74, 0x80, 0xcc, 0xf5, 0xd8, 0x31, 0x31, 0x94, 0x6f, 0x11, 0x54, + 0x6d, 0x49, 0xef, 0x0c, 0x49, 0x96, 0xbe, 0x09, 0xb7, 0x07, 0x36, 0xa9, 0x50, 0x78, 0x02, 0xc3, + 0xf8, 0xcd, 0xd2, 0xe5, 0x8b, 0xe4, 0x36, 0x7e, 0x35, 0x60, 0x76, 0xa0, 0xf3, 0xa0, 0x73, 0x00, + 0xd1, 0x68, 0xcb, 0x11, 0x6e, 0x44, 0x5b, 0x3c, 0x17, 0x9d, 0x40, 0x72, 0x62, 0x50, 0x0a, 0x73, + 0x11, 0x52, 0x0d, 0x02, 0x1f, 0x0f, 0x9c, 0x0e, 0xc9, 0x2a, 0x8f, 0x22, 0x6c, 0x97, 0xf3, 0xe3, + 0x08, 0xd4, 0x4c, 0x25, 0x36, 0xee, 0x31, 0x27, 0x08, 0xa2, 0x74, 0x4e, 0x6e, 0x8d, 0xe0, 0x42, + 0xff, 0xdc, 0x7d, 0xce, 0x90, 0x4c, 0x6c, 0xfc, 0x98, 0x03, 0xa8, 0x09, 0xc1, 0x85, 0xba, 0x4c, + 0xa1, 0x5a, 0x7e, 0xc0, 0xf0, 0x69, 0x80, 0x2d, 0x89, 0xca, 0xac, 0x45, 0x98, 0xef, 0x57, 0xb7, + 0xda, 0x69, 0x20, 0xd5, 0xcd, 0x2a, 0x01, 0x89, 0xef, 0x4e, 0xa3, 0x9b, 0x3d, 0x24, 0x4b, 0x67, + 0xa1, 0xa8, 0xd8, 0x7e, 0x24, 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0x97, 0xd5, 0x74, 0x04, 0x11, 0x00, 0x00, } func (m *GetSubscriptionRequest) Marshal() (dAtA []byte, err error) { @@ -2527,7 +2527,7 @@ func (m *VerifyAppStoreReceiptRequestSigned) MarshalToSizedBuffer(dAtA []byte) ( return len(dAtA) - i, nil } -func (m *VerifyAppStoreReceiptRequestResponse) Marshal() (dAtA []byte, err error) { +func (m *VerifyAppStoreReceiptResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2537,12 +2537,12 @@ func (m *VerifyAppStoreReceiptRequestResponse) Marshal() (dAtA []byte, err error return dAtA[:n], nil } -func (m *VerifyAppStoreReceiptRequestResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *VerifyAppStoreReceiptResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *VerifyAppStoreReceiptRequestResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *VerifyAppStoreReceiptResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -2946,7 +2946,7 @@ func (m *VerifyAppStoreReceiptRequestSigned) Size() (n int) { return n } -func (m *VerifyAppStoreReceiptRequestResponse) Size() (n int) { +func (m *VerifyAppStoreReceiptResponse) Size() (n int) { if m == nil { return 0 } @@ -5524,7 +5524,7 @@ func (m *VerifyAppStoreReceiptRequestSigned) Unmarshal(dAtA []byte) error { } return nil } -func (m *VerifyAppStoreReceiptRequestResponse) Unmarshal(dAtA []byte) error { +func (m *VerifyAppStoreReceiptResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -5547,10 +5547,10 @@ func (m *VerifyAppStoreReceiptRequestResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: VerifyAppStoreReceiptRequestResponse: wiretype end group for non-group") + return fmt.Errorf("proto: VerifyAppStoreReceiptResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: VerifyAppStoreReceiptRequestResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: VerifyAppStoreReceiptResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: diff --git a/paymentservice/paymentserviceproto/paymentservice_drpc.pb.go b/paymentservice/paymentserviceproto/paymentservice_drpc.pb.go index 01236cd2..253b1026 100644 --- a/paymentservice/paymentserviceproto/paymentservice_drpc.pb.go +++ b/paymentservice/paymentserviceproto/paymentservice_drpc.pb.go @@ -48,7 +48,7 @@ type DRPCAnyPaymentProcessingClient interface { GetVerificationEmail(ctx context.Context, in *GetVerificationEmailRequestSigned) (*GetVerificationEmailResponse, error) VerifyEmail(ctx context.Context, in *VerifyEmailRequestSigned) (*VerifyEmailResponse, error) GetAllTiers(ctx context.Context, in *GetTiersRequestSigned) (*GetTiersResponse, error) - VerifyAppStoreReceipt(ctx context.Context, in *VerifyAppStoreReceiptRequestSigned) (*VerifyAppStoreReceiptRequestResponse, error) + VerifyAppStoreReceipt(ctx context.Context, in *VerifyAppStoreReceiptRequestSigned) (*VerifyAppStoreReceiptResponse, error) } type drpcAnyPaymentProcessingClient struct { @@ -133,8 +133,8 @@ func (c *drpcAnyPaymentProcessingClient) GetAllTiers(ctx context.Context, in *Ge return out, nil } -func (c *drpcAnyPaymentProcessingClient) VerifyAppStoreReceipt(ctx context.Context, in *VerifyAppStoreReceiptRequestSigned) (*VerifyAppStoreReceiptRequestResponse, error) { - out := new(VerifyAppStoreReceiptRequestResponse) +func (c *drpcAnyPaymentProcessingClient) VerifyAppStoreReceipt(ctx context.Context, in *VerifyAppStoreReceiptRequestSigned) (*VerifyAppStoreReceiptResponse, error) { + out := new(VerifyAppStoreReceiptResponse) err := c.cc.Invoke(ctx, "/AnyPaymentProcessing/VerifyAppStoreReceipt", drpcEncoding_File_paymentservice_paymentserviceproto_protos_paymentservice_proto{}, in, out) if err != nil { return nil, err @@ -151,7 +151,7 @@ type DRPCAnyPaymentProcessingServer interface { GetVerificationEmail(context.Context, *GetVerificationEmailRequestSigned) (*GetVerificationEmailResponse, error) VerifyEmail(context.Context, *VerifyEmailRequestSigned) (*VerifyEmailResponse, error) GetAllTiers(context.Context, *GetTiersRequestSigned) (*GetTiersResponse, error) - VerifyAppStoreReceipt(context.Context, *VerifyAppStoreReceiptRequestSigned) (*VerifyAppStoreReceiptRequestResponse, error) + VerifyAppStoreReceipt(context.Context, *VerifyAppStoreReceiptRequestSigned) (*VerifyAppStoreReceiptResponse, error) } type DRPCAnyPaymentProcessingUnimplementedServer struct{} @@ -188,7 +188,7 @@ func (s *DRPCAnyPaymentProcessingUnimplementedServer) GetAllTiers(context.Contex return nil, drpcerr.WithCode(errors.New("Unimplemented"), drpcerr.Unimplemented) } -func (s *DRPCAnyPaymentProcessingUnimplementedServer) VerifyAppStoreReceipt(context.Context, *VerifyAppStoreReceiptRequestSigned) (*VerifyAppStoreReceiptRequestResponse, error) { +func (s *DRPCAnyPaymentProcessingUnimplementedServer) VerifyAppStoreReceipt(context.Context, *VerifyAppStoreReceiptRequestSigned) (*VerifyAppStoreReceiptResponse, error) { return nil, drpcerr.WithCode(errors.New("Unimplemented"), drpcerr.Unimplemented) } @@ -418,14 +418,14 @@ func (x *drpcAnyPaymentProcessing_GetAllTiersStream) SendAndClose(m *GetTiersRes type DRPCAnyPaymentProcessing_VerifyAppStoreReceiptStream interface { drpc.Stream - SendAndClose(*VerifyAppStoreReceiptRequestResponse) error + SendAndClose(*VerifyAppStoreReceiptResponse) error } type drpcAnyPaymentProcessing_VerifyAppStoreReceiptStream struct { drpc.Stream } -func (x *drpcAnyPaymentProcessing_VerifyAppStoreReceiptStream) SendAndClose(m *VerifyAppStoreReceiptRequestResponse) error { +func (x *drpcAnyPaymentProcessing_VerifyAppStoreReceiptStream) SendAndClose(m *VerifyAppStoreReceiptResponse) error { if err := x.MsgSend(m, drpcEncoding_File_paymentservice_paymentserviceproto_protos_paymentservice_proto{}); err != nil { return err } diff --git a/paymentservice/paymentserviceproto/protos/paymentservice.proto b/paymentservice/paymentserviceproto/protos/paymentservice.proto index e9a7bf46..f52765d4 100644 --- a/paymentservice/paymentserviceproto/protos/paymentservice.proto +++ b/paymentservice/paymentserviceproto/protos/paymentservice.proto @@ -229,7 +229,7 @@ message VerifyAppStoreReceiptRequestSigned { bytes signature = 2; } -message VerifyAppStoreReceiptRequestResponse { +message VerifyAppStoreReceiptResponse { } @@ -301,5 +301,5 @@ service AnyPaymentProcessing { // Verify purchase in case subscription was bought via AppStore // Incoming receipt contains all information to register purchase on Payment Node - rpc VerifyAppStoreReceipt(VerifyAppStoreReceiptRequestSigned) returns (VerifyAppStoreReceiptRequestResponse) {} + rpc VerifyAppStoreReceipt(VerifyAppStoreReceiptRequestSigned) returns (VerifyAppStoreReceiptResponse) {} } From 4f51a560e4e244e449365141105bd0cf910d9ae5 Mon Sep 17 00:00:00 2001 From: Sergey Cherepanov Date: Mon, 22 Apr 2024 18:11:39 +0200 Subject: [PATCH 109/140] proto version 3 --- net/secureservice/secureservice.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/secureservice/secureservice.go b/net/secureservice/secureservice.go index cbc8c466..2d9b651b 100644 --- a/net/secureservice/secureservice.go +++ b/net/secureservice/secureservice.go @@ -28,11 +28,11 @@ var ( // ProtoVersion 1 - version with yamux over tcp and quic // ProtoVersion 2 - acl compatible version // ProtoVersion 3 - acl with breaking changes / multiplayer - ProtoVersion = uint32(2) + ProtoVersion = uint32(3) ) var ( - compatibleVersions = []uint32{ProtoVersion, 3} + compatibleVersions = []uint32{ProtoVersion} ) func New() SecureService { From e8d2342dc89ac63c5f53554c47c969d068ecc6e2 Mon Sep 17 00:00:00 2001 From: Sergey Cherepanov Date: Mon, 22 Apr 2024 18:23:26 +0200 Subject: [PATCH 110/140] compatible ver 2 --- net/secureservice/secureservice.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/secureservice/secureservice.go b/net/secureservice/secureservice.go index 2d9b651b..e8fb18c1 100644 --- a/net/secureservice/secureservice.go +++ b/net/secureservice/secureservice.go @@ -32,7 +32,7 @@ var ( ) var ( - compatibleVersions = []uint32{ProtoVersion} + compatibleVersions = []uint32{2, ProtoVersion} ) func New() SecureService { From 7f2b2a5194bdf235529853cffb51ec974670914e Mon Sep 17 00:00:00 2001 From: Sergey Cherepanov Date: Thu, 25 Apr 2024 11:36:17 +0200 Subject: [PATCH 111/140] extra conn close --- net/peer/peer.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/peer/peer.go b/net/peer/peer.go index 72911214..e85691d3 100644 --- a/net/peer/peer.go +++ b/net/peer/peer.go @@ -244,6 +244,9 @@ var defaultProtoChecker = handshake.ProtoChecker{ } func (p *peer) serve(conn net.Conn) (err error) { + defer func() { + _ = conn.Close() + }() hsCtx, cancel := context.WithTimeout(p.Context(), time.Second*20) if _, err = handshake.IncomingProtoHandshake(hsCtx, conn, defaultProtoChecker); err != nil { cancel() From b00d992a54997b8631a1236be07f188ba7a68c8c Mon Sep 17 00:00:00 2001 From: Sergey Cherepanov Date: Thu, 25 Apr 2024 12:23:22 +0200 Subject: [PATCH 112/140] close quic connection on failed handshake --- net/transport/quic/quic.go | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/net/transport/quic/quic.go b/net/transport/quic/quic.go index 24f90fe3..dbd712ca 100644 --- a/net/transport/quic/quic.go +++ b/net/transport/quic/quic.go @@ -4,18 +4,20 @@ import ( "context" "crypto/tls" "fmt" - "github.com/anyproto/any-sync/app" - "github.com/anyproto/any-sync/app/logger" - "github.com/anyproto/any-sync/net/secureservice" - "github.com/anyproto/any-sync/net/transport" + "net" + "sync" + "time" + libp2crypto "github.com/libp2p/go-libp2p/core/crypto" "github.com/libp2p/go-libp2p/core/peer" libp2ptls "github.com/libp2p/go-libp2p/p2p/security/tls" "github.com/quic-go/quic-go" "go.uber.org/zap" - "net" - "sync" - "time" + + "github.com/anyproto/any-sync/app" + "github.com/anyproto/any-sync/app/logger" + "github.com/anyproto/any-sync/net/secureservice" + "github.com/anyproto/any-sync/net/transport" ) const CName = "net.transport.quic" @@ -139,6 +141,9 @@ func (q *quicTransport) Dial(ctx context.Context, addr string) (mc transport.Mul cctx, err := q.secure.HandshakeOutbound(ctx, stream, remotePeerId.String()) if err != nil { + defer func() { + _ = qConn.CloseWithError(3, "outbound handshake failed") + }() return nil, err } @@ -189,6 +194,9 @@ func (q *quicTransport) accept(conn quic.Connection) (err error) { }() cctx, err := q.secure.HandshakeInbound(ctx, stream, remotePeerId.String()) if err != nil { + defer func() { + _ = conn.CloseWithError(3, "inbound handshake failed") + }() return } mc := newConn(cctx, conn) From 6d7c258b5f72718811114557947dabd66dc345b6 Mon Sep 17 00:00:00 2001 From: Sergey Cherepanov Date: Mon, 29 Apr 2024 13:41:42 +0200 Subject: [PATCH 113/140] do not throw an error when members count not increased --- acl/acl.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/acl/acl.go b/acl/acl.go index c6ab1bae..8f5cac34 100644 --- a/acl/acl.go +++ b/acl/acl.go @@ -115,7 +115,7 @@ func (as *aclService) AddRecord(ctx context.Context, spaceId string, rec *consen } } if readers >= beforeReaders { - if uint32(readers) > limits.ReadMembers { + if readers > beforeReaders && uint32(readers) > limits.ReadMembers { return ErrLimitExceed } if uint32(writers) > limits.WriteMembers { From d5168aa061237bfc34873078ec38a98874e8adf5 Mon Sep 17 00:00:00 2001 From: Sergey Cherepanov Date: Mon, 29 Apr 2024 16:40:38 +0200 Subject: [PATCH 114/140] acl members limits: counts writers --- acl/acl.go | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/acl/acl.go b/acl/acl.go index 8f5cac34..9f008e1b 100644 --- a/acl/acl.go +++ b/acl/acl.go @@ -96,11 +96,14 @@ func (as *aclService) AddRecord(ctx context.Context, spaceId string, rec *consen acl.RLock() defer acl.RUnlock() - var beforeReaders int + var beforeReaders, beforeWriters int for _, acc := range acl.AclState().CurrentAccounts() { if !acc.Permissions.NoPermissions() { beforeReaders++ } + if acc.Permissions.CanWrite() { + beforeWriters++ + } } err = acl.ValidateRawRecord(rec, func(state *list.AclState) error { @@ -114,13 +117,11 @@ func (as *aclService) AddRecord(ctx context.Context, spaceId string, rec *consen writers++ } } - if readers >= beforeReaders { - if readers > beforeReaders && uint32(readers) > limits.ReadMembers { - return ErrLimitExceed - } - if uint32(writers) > limits.WriteMembers { - return ErrLimitExceed - } + if readers > beforeReaders && uint32(readers) > limits.ReadMembers { + return ErrLimitExceed + } + if writers > beforeWriters && uint32(writers) > limits.WriteMembers { + return ErrLimitExceed } return nil }) From c8d6fb239938721bac006bcd442818e811c876fa Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 29 Apr 2024 15:45:01 +0000 Subject: [PATCH 115/140] build(deps): bump github.com/quic-go/quic-go from 0.42.0 to 0.43.0 Bumps [github.com/quic-go/quic-go](https://github.com/quic-go/quic-go) from 0.42.0 to 0.43.0. - [Release notes](https://github.com/quic-go/quic-go/releases) - [Changelog](https://github.com/quic-go/quic-go/blob/master/Changelog.md) - [Commits](https://github.com/quic-go/quic-go/compare/v0.42.0...v0.43.0) --- updated-dependencies: - dependency-name: github.com/quic-go/quic-go dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 66e16b74..f7a2c794 100644 --- a/go.mod +++ b/go.mod @@ -26,7 +26,7 @@ require ( github.com/multiformats/go-multibase v0.2.0 github.com/multiformats/go-multihash v0.2.3 github.com/prometheus/client_golang v1.19.0 - github.com/quic-go/quic-go v0.42.0 + github.com/quic-go/quic-go v0.43.0 github.com/stretchr/testify v1.9.0 github.com/tyler-smith/go-bip39 v1.1.0 github.com/zeebo/blake3 v0.2.3 diff --git a/go.sum b/go.sum index a3231f6a..3a7c3420 100644 --- a/go.sum +++ b/go.sum @@ -304,8 +304,8 @@ github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= github.com/quic-go/qpack v0.4.0 h1:Cr9BXA1sQS2SmDUWjSofMPNKmvF6IiIfDRmgU0w1ZCo= github.com/quic-go/qpack v0.4.0/go.mod h1:UZVnYIfi5GRk+zI9UMaCPsmZ2xKJP7XBUvVyT1Knj9A= -github.com/quic-go/quic-go v0.42.0 h1:uSfdap0eveIl8KXnipv9K7nlwZ5IqLlYOpJ58u5utpM= -github.com/quic-go/quic-go v0.42.0/go.mod h1:132kz4kL3F9vxhW3CtQJLDVwcFe5wdWeJXXijhsO57M= +github.com/quic-go/quic-go v0.43.0 h1:sjtsTKWX0dsHpuMJvLxGqoQdtgJnbAPWY+W+5vjYW/g= +github.com/quic-go/quic-go v0.43.0/go.mod h1:132kz4kL3F9vxhW3CtQJLDVwcFe5wdWeJXXijhsO57M= github.com/quic-go/webtransport-go v0.6.0 h1:CvNsKqc4W2HljHJnoT+rMmbRJybShZ0YPFDD3NxaZLY= github.com/quic-go/webtransport-go v0.6.0/go.mod h1:9KjU4AEBqEQidGHNDkZrb8CAa1abRaosM2yGOyiikEc= github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY= From 30273bb966e7a321a9ba3eeba187fb46b47b70e1 Mon Sep 17 00:00:00 2001 From: Sergey Cherepanov Date: Tue, 30 Apr 2024 15:39:44 +0200 Subject: [PATCH 116/140] panic recover --- commonspace/objectsync/objectsync.go | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/commonspace/objectsync/objectsync.go b/commonspace/objectsync/objectsync.go index 08d55d8c..aec6c419 100644 --- a/commonspace/objectsync/objectsync.go +++ b/commonspace/objectsync/objectsync.go @@ -6,6 +6,9 @@ import ( "fmt" "time" + "github.com/cheggaaa/mb/v3" + "github.com/gogo/protobuf/proto" + "github.com/anyproto/any-sync/app" "github.com/anyproto/any-sync/commonspace/object/tree/treechangeproto" "github.com/anyproto/any-sync/commonspace/object/treemanager" @@ -13,15 +16,14 @@ import ( "github.com/anyproto/any-sync/metric" "github.com/anyproto/any-sync/net/peer" "github.com/anyproto/any-sync/util/multiqueue" - "github.com/cheggaaa/mb/v3" - "github.com/gogo/protobuf/proto" + + "go.uber.org/zap" "github.com/anyproto/any-sync/app/logger" "github.com/anyproto/any-sync/commonspace/object/syncobjectgetter" "github.com/anyproto/any-sync/commonspace/spacestorage" "github.com/anyproto/any-sync/commonspace/spacesyncproto" "github.com/anyproto/any-sync/nodeconf" - "go.uber.org/zap" ) const CName = "common.commonspace.objectsync" @@ -170,6 +172,12 @@ func (s *objectSync) handleRequest(ctx context.Context, senderId string, msg *sp func (s *objectSync) handleMessage(ctx context.Context, senderId string, msg *spacesyncproto.ObjectSyncMessage) (err error) { log := log.With(zap.String("objectId", msg.ObjectId)) + defer func() { + if p := recover(); p != nil { + log.Warn("object sync: panic recovered", zap.Any("panic", p)) + err = fmt.Errorf("panic recovered: %v", p) + } + }() err = s.checkEmptyFullSync(log, msg) if err != nil { return err From d1901d71e6cf2f99ef4a311e1fc017054ab3985a Mon Sep 17 00:00:00 2001 From: Grigory Efimov Date: Tue, 30 Apr 2024 13:45:14 +0000 Subject: [PATCH 117/140] .github/workflows/coverage.yml moved on reusable workflow --- .github/workflows/coverage.yml | 72 +++------------------------------- 1 file changed, 5 insertions(+), 67 deletions(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 08a5c2eb..d0a0f751 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -3,75 +3,13 @@ on: branches: - main +name: coverage + permissions: contents: write pull-requests: write jobs: - test: - runs-on: ubuntu-latest - strategy: - matrix: - go-version: - - '1.22' - env: - GOPRIVATE: github.com/anyproto - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-go@v4 - with: - go-version: '${{ matrix.go-version }}' - check-latest: true - - - name: git config - run: git config --global url.https://${{ secrets.ANYTYPE_PAT }}@github.com/.insteadOf https://github.com/ - - - name: Setup license repository - uses: actions/checkout@master - with: - repository: anyproto/open - ref: refs/heads/main - path: ./open - - name: Check licenses - run: | - cd open - python3 tools/generate.py --platform golang - cd .. - sudo gem install license_finder - license_finder inherited_decisions add open/decisions.yml - license_finder --enabled-package-managers gomodules - - - name: deps - run: make deps - - - name: unit tests - run: make test - - - name: Quality Gate - Test coverage shall be above threshold - env: - TESTCOVERAGE_THRESHOLD: 0 - run: | - go test ./... -coverprofile coverage.out -covermode count - - generated_pattern='^\/\/ Code generated .* DO NOT EDIT\.$' - files_list=$(grep -rl "$generated_pattern" . | grep '\.go$' | sed 's/^\.\///') - - for file in $files_list; do - echo "Removing $file from coverage report" - grep -v "$file" coverage.out > temp_file - mv temp_file coverage.out - done - - go tool cover -func coverage.out - echo "Quality Gate: checking test coverage is above threshold ..." - echo "Threshold : $TESTCOVERAGE_THRESHOLD %" - totalCoverage=`go tool cover -func=coverage.out | grep total | grep -Eo '[0-9]+\.[0-9]+'` - echo "Current test coverage : $totalCoverage %" - if (( $(echo "$totalCoverage $TESTCOVERAGE_THRESHOLD" | awk '{print ($1 > $2)}') )); then - echo "OK" - else - echo "Current test coverage is below threshold. Please add more unit tests or adjust threshold to a lower value." - echo "Failed" - exit 1 - fi - - uses: seriousben/go-patch-cover-action@v1 + release-reusable: + uses: anyproto/any-sync-node/.github/workflows/coverage-reusable.yml@main + secrets: inherit # pass all secrets From a312bcef2ccf57b66e3140e76ff2b9461506f59f Mon Sep 17 00:00:00 2001 From: Anton Akentev Date: Mon, 6 May 2024 16:52:21 +0200 Subject: [PATCH 118/140] Bump go-ethereum --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index f7a2c794..903c44bb 100644 --- a/go.mod +++ b/go.mod @@ -9,7 +9,7 @@ require ( github.com/anyproto/go-slip21 v1.0.0 github.com/cespare/xxhash v1.1.0 github.com/cheggaaa/mb/v3 v3.0.2 - github.com/ethereum/go-ethereum v1.13.12 + github.com/ethereum/go-ethereum v1.13.15 github.com/gobwas/glob v0.2.3 github.com/goccy/go-graphviz v0.1.2 github.com/gogo/protobuf v1.3.2 diff --git a/go.sum b/go.sum index 3a7c3420..e9dffb5c 100644 --- a/go.sum +++ b/go.sum @@ -86,8 +86,8 @@ github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 h1:8UrgZ3GkP4i/CLijOJx79Yu+etly github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0/go.mod h1:v57UDF4pDQJcEfFUCRop3lJL149eHGSe9Jvczhzjo/0= github.com/ethereum/c-kzg-4844 v0.4.0 h1:3MS1s4JtA868KpJxroZoepdV0ZKBp3u/O5HcZ7R3nlY= github.com/ethereum/c-kzg-4844 v0.4.0/go.mod h1:VewdlzQmpT5QSrVhbBuGoCdFJkpaJlO1aQputP83wc0= -github.com/ethereum/go-ethereum v1.13.12 h1:iDr9UM2JWkngBHGovRJEQn4Kor7mT4gt9rUZqB5M29Y= -github.com/ethereum/go-ethereum v1.13.12/go.mod h1:hKL2Qcj1OvStXNSEDbucexqnEt1Wh4Cz329XsjAalZY= +github.com/ethereum/go-ethereum v1.13.15 h1:U7sSGYGo4SPjP6iNIifNoyIAiNjrmQkz6EwQG+/EZWo= +github.com/ethereum/go-ethereum v1.13.15/go.mod h1:TN8ZiHrdJwSe8Cb6x+p0hs5CxhJZPbqB7hHkaUXcmIU= github.com/flynn/noise v1.1.0 h1:KjPQoQCEFdZDiP03phOvGi11+SVVhBG2wOWAorLsstg= github.com/flynn/noise v1.1.0/go.mod h1:xbMo+0i6+IGbYdJhF31t2eR1BIU0CYc12+BNAKwUTag= github.com/fogleman/gg v1.3.0 h1:/7zJX8F6AaYQc57WQCyN9cAIz+4bCJGO9B+dyW29am8= From 4342bca9446cc23594508f47e83bcc43124c8522 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 6 May 2024 15:09:06 +0000 Subject: [PATCH 119/140] build(deps): bump github.com/quic-go/quic-go from 0.43.0 to 0.43.1 Bumps [github.com/quic-go/quic-go](https://github.com/quic-go/quic-go) from 0.43.0 to 0.43.1. - [Release notes](https://github.com/quic-go/quic-go/releases) - [Changelog](https://github.com/quic-go/quic-go/blob/master/Changelog.md) - [Commits](https://github.com/quic-go/quic-go/compare/v0.43.0...v0.43.1) --- updated-dependencies: - dependency-name: github.com/quic-go/quic-go dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index f7a2c794..cd72c433 100644 --- a/go.mod +++ b/go.mod @@ -26,7 +26,7 @@ require ( github.com/multiformats/go-multibase v0.2.0 github.com/multiformats/go-multihash v0.2.3 github.com/prometheus/client_golang v1.19.0 - github.com/quic-go/quic-go v0.43.0 + github.com/quic-go/quic-go v0.43.1 github.com/stretchr/testify v1.9.0 github.com/tyler-smith/go-bip39 v1.1.0 github.com/zeebo/blake3 v0.2.3 diff --git a/go.sum b/go.sum index 3a7c3420..f9e837e6 100644 --- a/go.sum +++ b/go.sum @@ -304,8 +304,8 @@ github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= github.com/quic-go/qpack v0.4.0 h1:Cr9BXA1sQS2SmDUWjSofMPNKmvF6IiIfDRmgU0w1ZCo= github.com/quic-go/qpack v0.4.0/go.mod h1:UZVnYIfi5GRk+zI9UMaCPsmZ2xKJP7XBUvVyT1Knj9A= -github.com/quic-go/quic-go v0.43.0 h1:sjtsTKWX0dsHpuMJvLxGqoQdtgJnbAPWY+W+5vjYW/g= -github.com/quic-go/quic-go v0.43.0/go.mod h1:132kz4kL3F9vxhW3CtQJLDVwcFe5wdWeJXXijhsO57M= +github.com/quic-go/quic-go v0.43.1 h1:fLiMNfQVe9q2JvSsiXo4fXOEguXHGGl9+6gLp4RPeZQ= +github.com/quic-go/quic-go v0.43.1/go.mod h1:132kz4kL3F9vxhW3CtQJLDVwcFe5wdWeJXXijhsO57M= github.com/quic-go/webtransport-go v0.6.0 h1:CvNsKqc4W2HljHJnoT+rMmbRJybShZ0YPFDD3NxaZLY= github.com/quic-go/webtransport-go v0.6.0/go.mod h1:9KjU4AEBqEQidGHNDkZrb8CAa1abRaosM2yGOyiikEc= github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY= From cb39f025de4d8ed5d13e8cd2e6e82bec6db6e623 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 6 May 2024 15:09:12 +0000 Subject: [PATCH 120/140] build(deps): bump golang.org/x/crypto from 0.22.0 to 0.23.0 Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.22.0 to 0.23.0. - [Commits](https://github.com/golang/crypto/compare/v0.22.0...v0.23.0) --- updated-dependencies: - dependency-name: golang.org/x/crypto dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- go.mod | 4 ++-- go.sum | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/go.mod b/go.mod index f7a2c794..2c887319 100644 --- a/go.mod +++ b/go.mod @@ -33,7 +33,7 @@ require ( go.uber.org/atomic v1.11.0 go.uber.org/mock v0.4.0 go.uber.org/zap v1.27.0 - golang.org/x/crypto v0.22.0 + golang.org/x/crypto v0.23.0 golang.org/x/exp v0.0.0-20240325151524-a685a6edb6d8 golang.org/x/net v0.24.0 golang.org/x/time v0.5.0 @@ -105,7 +105,7 @@ require ( golang.org/x/image v0.14.0 // indirect golang.org/x/mod v0.16.0 // indirect golang.org/x/sync v0.6.0 // indirect - golang.org/x/sys v0.19.0 // indirect + golang.org/x/sys v0.20.0 // indirect golang.org/x/tools v0.19.0 // indirect google.golang.org/protobuf v1.32.0 // indirect lukechampine.com/blake3 v1.2.1 // indirect diff --git a/go.sum b/go.sum index 3a7c3420..2b1f9e89 100644 --- a/go.sum +++ b/go.sum @@ -384,8 +384,8 @@ golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20200115085410-6d4e4cb37c7d/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200602180216-279210d13fed/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.22.0 h1:g1v0xeRhjcugydODzvb3mEM9SQ0HGp9s/nh3COQ/C30= -golang.org/x/crypto v0.22.0/go.mod h1:vr6Su+7cTlO45qkww3VDJlzDn0ctJvRgYbC2NvXHt+M= +golang.org/x/crypto v0.23.0 h1:dIJU/v2J8Mdglj/8rJ6UUOM3Zc9zLZxVZwwxMooUSAI= +golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8= golang.org/x/exp v0.0.0-20240325151524-a685a6edb6d8 h1:aAcj0Da7eBAtrTp03QXWvm88pSyOt+UgdZw2BFZ+lEw= golang.org/x/exp v0.0.0-20240325151524-a685a6edb6d8/go.mod h1:CQ1k9gNrJ50XIzaKCRR2hssIjF07kZFEiieALBM/ARQ= golang.org/x/image v0.14.0 h1:tNgSxAFe3jC4uYqvZdTr84SZoM1KfwdC9SKIFrLjFn4= @@ -423,13 +423,13 @@ golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= -golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y= +golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= -golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk= +golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= From ef28e18625caf2b0534153e8ef7b0a5da1da2fdc Mon Sep 17 00:00:00 2001 From: kirillston Date: Thu, 9 May 2024 17:08:15 +0300 Subject: [PATCH 121/140] GO-3022 Invalid AppStore receipt error --- paymentservice/paymentserviceproto/errors.go | 1 + .../paymentserviceproto/paymentservice.pb.go | 181 +++++++++--------- .../protos/paymentservice.proto | 2 + 3 files changed, 95 insertions(+), 89 deletions(-) diff --git a/paymentservice/paymentserviceproto/errors.go b/paymentservice/paymentserviceproto/errors.go index 2ce67b2a..3888e250 100644 --- a/paymentservice/paymentserviceproto/errors.go +++ b/paymentservice/paymentserviceproto/errors.go @@ -26,4 +26,5 @@ var ( ErrEmailFailedToSend = errGroup.Register(errors.New("failed to send email"), uint64(ErrorCodes_EmailFailedToSend)) ErrEmailExpired = errGroup.Register(errors.New("email verification request expired. try getting new code"), uint64(ErrorCodes_EmailExpired)) ErrEmailWrongCode = errGroup.Register(errors.New("wrong verification code"), uint64(ErrorCodes_EmailWrongCode)) + ErrInvalidReceipt = errGroup.Register(errors.New("invalid AppStore receipt"), uint64(ErrorCodes_InvalidReceipt)) ) diff --git a/paymentservice/paymentserviceproto/paymentservice.pb.go b/paymentservice/paymentserviceproto/paymentservice.pb.go index 1796347e..3fe0fb1a 100644 --- a/paymentservice/paymentserviceproto/paymentservice.pb.go +++ b/paymentservice/paymentserviceproto/paymentservice.pb.go @@ -170,6 +170,7 @@ const ( ErrorCodes_EmailFailedToSend ErrorCodes = 15 ErrorCodes_EmailExpired ErrorCodes = 16 ErrorCodes_EmailWrongCode ErrorCodes = 17 + ErrorCodes_InvalidReceipt ErrorCodes = 18 ErrorCodes_ErrorOffset ErrorCodes = 600 ) @@ -192,6 +193,7 @@ var ErrorCodes_name = map[int32]string{ 15: "EmailFailedToSend", 16: "EmailExpired", 17: "EmailWrongCode", + 18: "InvalidReceipt", 600: "ErrorOffset", } @@ -214,6 +216,7 @@ var ErrorCodes_value = map[string]int32{ "EmailFailedToSend": 15, "EmailExpired": 16, "EmailWrongCode": 17, + "InvalidReceipt": 18, "ErrorOffset": 600, } @@ -1583,98 +1586,98 @@ func init() { } var fileDescriptor_4feb29dcc5ba50f6 = []byte{ - // 1448 bytes of a gzipped FileDescriptorProto + // 1454 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x58, 0xcd, 0x6f, 0x1b, 0x45, 0x14, 0xf7, 0xfa, 0x23, 0x89, 0x5f, 0xbe, 0x26, 0x13, 0x27, 0xdd, 0xba, 0x89, 0x49, 0x97, 0xaf, 0x28, 0x88, 0xad, 0x28, 0x3d, 0x20, 0x84, 0x10, 0x4e, 0xe2, 0x84, 0x48, 0x25, 0x44, 0xb6, 0xdb, - 0x0a, 0x8a, 0x80, 0x8d, 0xf7, 0x25, 0x59, 0xba, 0x99, 0x59, 0x66, 0xc7, 0x49, 0xcd, 0x8d, 0x23, - 0x37, 0x24, 0x0e, 0xfc, 0x41, 0x5c, 0x38, 0xf6, 0xd8, 0x23, 0xb4, 0x37, 0x4e, 0x1c, 0x39, 0xa2, - 0x99, 0x5d, 0xdb, 0xeb, 0x78, 0xed, 0x84, 0x46, 0x5c, 0xe2, 0x99, 0xdf, 0xcc, 0x7b, 0xf3, 0xde, - 0xef, 0xbd, 0x79, 0xf3, 0x36, 0xf0, 0x71, 0xe0, 0x74, 0x4e, 0x91, 0xc9, 0x10, 0xc5, 0x99, 0xd7, - 0xc2, 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x27, 0x10, 0xeb, + 0x21, 0xac, 0xa4, 0x4b, 0x36, 0xbc, 0x63, 0x86, 0x2e, 0x35, 0x61, 0x32, 0x70, 0x3a, 0x3e, 0x77, + 0x5c, 0x2d, 0x3c, 0x53, 0xef, 0x2e, 0xe9, 0x0a, 0x14, 0x43, 0xef, 0x98, 0x39, 0xb2, 0x2d, 0xd0, + 0xcc, 0xea, 0xbd, 0x3e, 0x60, 0xfd, 0x9d, 0x85, 0x1b, 0x43, 0x8a, 0xc3, 0x80, 0xb3, 0x10, 0x29, + 0x85, 0xbc, 0x32, 0x5e, 0x2b, 0x9c, 0xad, 0xeb, 0x6f, 0xfa, 0x0e, 0x4c, 0x84, 0xd2, 0x91, 0xed, + 0x50, 0xab, 0x9a, 0xbb, 0xbb, 0x68, 0x27, 0x45, 0x1b, 0x7a, 0xab, 0x1e, 0x1f, 0xa1, 0x6b, 0x30, + 0xed, 0x3a, 0x12, 0x1b, 0xd2, 0x11, 0x12, 0x5d, 0x33, 0xb7, 0x66, 0xac, 0xe7, 0xeb, 0x49, 0x88, + 0x96, 0x61, 0x4a, 0x2d, 0x6b, 0xcc, 0x0d, 0xcd, 0xbc, 0xde, 0xee, 0xad, 0x95, 0xb4, 0x17, 0x56, + 0xdb, 0x92, 0xd7, 0x91, 0xe1, 0xb9, 0x59, 0x58, 0x33, 0xd6, 0xa7, 0xea, 0x49, 0x88, 0xde, 0x83, + 0xd9, 0x98, 0xec, 0xcf, 0x50, 0x9e, 0x70, 0xd7, 0x9c, 0xd0, 0x36, 0xcd, 0xd9, 0x07, 0x49, 0xb4, + 0x3e, 0x78, 0x88, 0x6e, 0x00, 0x11, 0x11, 0x77, 0xe8, 0x56, 0x59, 0x67, 0xdf, 0x39, 0x45, 0x73, + 0x52, 0x13, 0x3e, 0x84, 0x2b, 0xf2, 0xda, 0x21, 0x8a, 0xda, 0xa9, 0xe3, 0xf9, 0xe6, 0x94, 0x3e, + 0xd4, 0x07, 0xe8, 0x3d, 0x58, 0x0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xd5, 0x4d, 0x18, 0x11, 0x00, 0x00, } func (m *GetSubscriptionRequest) Marshal() (dAtA []byte, err error) { diff --git a/paymentservice/paymentserviceproto/protos/paymentservice.proto b/paymentservice/paymentserviceproto/protos/paymentservice.proto index f52765d4..1829152c 100644 --- a/paymentservice/paymentserviceproto/protos/paymentservice.proto +++ b/paymentservice/paymentserviceproto/protos/paymentservice.proto @@ -256,6 +256,8 @@ enum ErrorCodes { EmailExpired = 16; EmailWrongCode = 17; + InvalidReceipt = 18; + ErrorOffset = 600; } From 1234ff066f2b982737b4a56c499a72f497e14d96 Mon Sep 17 00:00:00 2001 From: Anton Akentev Date: Mon, 13 May 2024 17:26:43 +0200 Subject: [PATCH 122/140] Add userEmail to BuySubscriptionRequest --- .../paymentserviceproto/paymentservice.pb.go | 235 +++++++++++------- .../protos/paymentservice.proto | 2 + 2 files changed, 146 insertions(+), 91 deletions(-) diff --git a/paymentservice/paymentserviceproto/paymentservice.pb.go b/paymentservice/paymentserviceproto/paymentservice.pb.go index 3fe0fb1a..34bbe4bd 100644 --- a/paymentservice/paymentserviceproto/paymentservice.pb.go +++ b/paymentservice/paymentserviceproto/paymentservice.pb.go @@ -493,6 +493,8 @@ type BuySubscriptionRequest struct { // if empty - then no name requested // if non-empty - PP node will register that name on behalf of the user RequestedAnyName string `protobuf:"bytes,5,opt,name=requestedAnyName,proto3" json:"requestedAnyName,omitempty"` + // for some payment methods we need to know the user's email + UserEmail string `protobuf:"bytes,6,opt,name=userEmail,proto3" json:"userEmail,omitempty"` } func (m *BuySubscriptionRequest) Reset() { *m = BuySubscriptionRequest{} } @@ -563,6 +565,13 @@ func (m *BuySubscriptionRequest) GetRequestedAnyName() string { return "" } +func (m *BuySubscriptionRequest) GetUserEmail() string { + if m != nil { + return m.UserEmail + } + return "" +} + type BuySubscriptionRequestSigned struct { // BuySubscriptionRequest Payload []byte `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"` @@ -1586,98 +1595,99 @@ func init() { } var fileDescriptor_4feb29dcc5ba50f6 = []byte{ - // 1454 bytes of a gzipped FileDescriptorProto + // 1458 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x58, 0xcd, 0x6f, 0x1b, 0x45, - 0x14, 0xf7, 0xfa, 0x23, 0x89, 0x5f, 0xbe, 0x26, 0x13, 0x27, 0xdd, 0xba, 0x89, 0x49, 0x97, 0xaf, - 0x28, 0x88, 0xad, 0x28, 0x3d, 0x20, 0x84, 0x10, 0x4e, 0xe2, 0x84, 0x48, 0x25, 0x44, 0xb6, 0xdb, - 0x0a, 0x8a, 0x80, 0x8d, 0xf7, 0x25, 0x59, 0xba, 0x99, 0x59, 0x66, 0xc7, 0x49, 0xcd, 0x7f, 0xc0, - 0x0d, 0x09, 0x21, 0xfe, 0x20, 0x2e, 0x1c, 0x7b, 0xec, 0x11, 0xda, 0x1b, 0x27, 0x8e, 0x1c, 0xd1, - 0xcc, 0xae, 0xed, 0x75, 0xbc, 0x76, 0x42, 0x23, 0x2e, 0xcd, 0xce, 0x6f, 0xe6, 0xbd, 0x79, 0xef, - 0xf7, 0x3e, 0xe6, 0xb9, 0xf0, 0x71, 0xe0, 0x74, 0x4e, 0x91, 0xc9, 0x10, 0xc5, 0x99, 0xd7, 0xc2, - 0x3b, 0x83, 0xcb, 0x40, 0x70, 0xc9, 0xef, 0xe8, 0x7f, 0xc3, 0x0b, 0x5b, 0xb6, 0x46, 0xcb, 0xdb, - 0xaf, 0x2a, 0xff, 0x8d, 0xf4, 0x50, 0x84, 0x91, 0x16, 0xeb, 0x03, 0x58, 0xde, 0x45, 0xd9, 0x68, - 0x1f, 0x86, 0x2d, 0xe1, 0x05, 0xd2, 0xe3, 0xac, 0x8e, 0xdf, 0xb7, 0x31, 0x94, 0xb4, 0x02, 0xc0, - 0xcf, 0x19, 0x8a, 0x2a, 0xeb, 0xec, 0x6d, 0x9b, 0xc6, 0x9a, 0xb1, 0x5e, 0xac, 0x27, 0x10, 0xeb, - 0x21, 0xac, 0xa4, 0x4b, 0x36, 0xbc, 0x63, 0x86, 0x2e, 0x35, 0x61, 0x32, 0x70, 0x3a, 0x3e, 0x77, - 0x5c, 0x2d, 0x3c, 0x53, 0xef, 0x2e, 0xe9, 0x0a, 0x14, 0x43, 0xef, 0x98, 0x39, 0xb2, 0x2d, 0xd0, - 0xcc, 0xea, 0xbd, 0x3e, 0x60, 0xfd, 0x9d, 0x85, 0x1b, 0x43, 0x8a, 0xc3, 0x80, 0xb3, 0x10, 0x29, - 0x85, 0xbc, 0x32, 0x5e, 0x2b, 0x9c, 0xad, 0xeb, 0x6f, 0xfa, 0x0e, 0x4c, 0x84, 0xd2, 0x91, 0xed, - 0x50, 0xab, 0x9a, 0xbb, 0xbb, 0x68, 0x27, 0x45, 0x1b, 0x7a, 0xab, 0x1e, 0x1f, 0xa1, 0x6b, 0x30, - 0xed, 0x3a, 0x12, 0x1b, 0xd2, 0x11, 0x12, 0x5d, 0x33, 0xb7, 0x66, 0xac, 0xe7, 0xeb, 0x49, 0x88, - 0x96, 0x61, 0x4a, 0x2d, 0x6b, 0xcc, 0x0d, 0xcd, 0xbc, 0xde, 0xee, 0xad, 0x95, 0xb4, 0x17, 0x56, - 0xdb, 0x92, 0xd7, 0x91, 0xe1, 0xb9, 0x59, 0x58, 0x33, 0xd6, 0xa7, 0xea, 0x49, 0x88, 0xde, 0x83, - 0xd9, 0x98, 0xec, 0xcf, 0x50, 0x9e, 0x70, 0xd7, 0x9c, 0xd0, 0x36, 0xcd, 0xd9, 0x07, 0x49, 0xb4, - 0x3e, 0x78, 0x88, 0x6e, 0x00, 0x11, 0x11, 0x77, 0xe8, 0x56, 0x59, 0x67, 0xdf, 0x39, 0x45, 0x73, - 0x52, 0x13, 0x3e, 0x84, 0x2b, 0xf2, 0xda, 0x21, 0x8a, 0xda, 0xa9, 0xe3, 0xf9, 0xe6, 0x94, 0x3e, - 0xd4, 0x07, 0xe8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 0xe7, 0x8e, + 0xab, 0x85, 0xa7, 0x1b, 0xbd, 0x25, 0x5d, 0x86, 0x52, 0xe8, 0x1d, 0x31, 0x47, 0x76, 0x04, 0x9a, + 0x59, 0xbd, 0xd7, 0x07, 0xac, 0xbf, 0xb3, 0x70, 0x63, 0x48, 0x71, 0x18, 0x70, 0x16, 0x22, 0xa5, + 0x90, 0x57, 0xc6, 0x6b, 0x85, 0x33, 0x0d, 0xfd, 0x4d, 0xdf, 0x81, 0x62, 0x28, 0x1d, 0xd9, 0x09, + 0xb5, 0xaa, 0xd9, 0xbb, 0x0b, 0x76, 0x52, 0xb4, 0xa9, 0xb7, 0x1a, 0xf1, 0x11, 0xba, 0x0a, 0x53, + 0xae, 0x23, 0xb1, 0x29, 0x1d, 0x21, 0xd1, 0x35, 0x73, 0xab, 0xc6, 0x5a, 0xbe, 0x91, 0x84, 0x68, + 0x05, 0x26, 0xd5, 0xb2, 0xce, 0xdc, 0xd0, 0xcc, 0xeb, 0xed, 0xf3, 0xb5, 0x92, 0xf6, 0xc2, 0x5a, + 0x47, 0xf2, 0x06, 0x32, 0x3c, 0x33, 0x0b, 0xab, 0xc6, 0xda, 0x64, 0x23, 0x09, 0xd1, 0x7b, 0x30, + 0x13, 0x93, 0xfd, 0x19, 0xca, 0x63, 0xee, 0x9a, 0x45, 0x6d, 0xd3, 0xac, 0xbd, 0x9f, 0x44, 0x1b, + 0x83, 0x87, 0xe8, 0x3a, 0x10, 0x11, 0x71, 0x87, 0x6e, 0x8d, 0x75, 0xf7, 0x9c, 0x13, 0x34, 0x27, + 0x34, 0xe1, 0x43, 0xb8, 0x22, 0xaf, 0x13, 0xa2, 0xa8, 0x9f, 0x38, 0x9e, 0x6f, 0x4e, 0xea, 0x43, + 0x7d, 0x80, 0xde, 0x83, 0xc5, 0x30, 0xf2, 0xfe, 0x00, 0x5b, 0x7c, 0x0f, 0xcf, 0x42, 0x1f, 0xa5, + 0x44, 0x61, 0x96, 0xb4, 0xad, 0xe9, 0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, 0x09, 0x99, 0x58, 0x0f, 0x81, 0x0e, 0x8f, + 0x7d, 0x2a, 0xca, 0xd1, 0x57, 0xdf, 0x91, 0x73, 0x68, 0x1f, 0x99, 0xeb, 0xb1, 0x23, 0x62, 0x28, + 0xdf, 0x22, 0xa8, 0xd6, 0x96, 0xde, 0x29, 0x92, 0x2c, 0x7d, 0x13, 0x6e, 0x0f, 0x1c, 0x52, 0xa1, + 0xf0, 0x04, 0x86, 0xf1, 0x9b, 0xa5, 0xdb, 0x17, 0xc9, 0xad, 0xff, 0x66, 0xc0, 0xcc, 0xc0, 0x5c, + 0x42, 0x67, 0x01, 0xa2, 0xaf, 0x4d, 0x47, 0xb8, 0x11, 0x6d, 0xf1, 0x5a, 0x74, 0x03, 0xc9, 0x89, + 0x41, 0x29, 0xcc, 0x46, 0x48, 0x2d, 0x08, 0x7c, 0xdc, 0x77, 0xba, 0x24, 0xab, 0x3c, 0x8a, 0xb0, + 0x1d, 0xce, 0x8f, 0x22, 0x50, 0x33, 0x95, 0x38, 0xb8, 0xcb, 0x9c, 0x20, 0x88, 0xd2, 0x39, 0x79, + 0x34, 0x82, 0x0b, 0xfd, 0x7b, 0xf7, 0x38, 0x43, 0x52, 0x5c, 0xff, 0x35, 0x07, 0x50, 0x17, 0x82, + 0x0b, 0x55, 0x4c, 0xa1, 0xda, 0x7e, 0xc0, 0xf0, 0x69, 0x80, 0x6d, 0x89, 0xca, 0xac, 0x05, 0x98, + 0xeb, 0x77, 0xb7, 0xfa, 0x49, 0x20, 0x55, 0x65, 0x95, 0x81, 0xc4, 0xb5, 0xd3, 0xec, 0x65, 0x0f, + 0xc9, 0xd2, 0x19, 0x28, 0x29, 0xb6, 0x1f, 0x89, 0xa8, 0xc6, 0xe2, 0x3c, 0xd8, 0xe3, 0x72, 0x9b, + 0x77, 0x98, 0x4b, 0xf2, 0x3d, 0x64, 0x97, 0x39, 0x11, 0x7b, 0x05, 0x15, 0xcd, 0x01, 0x56, 0x22, + 0xd9, 0xa2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e6, 0x55, 0xba, 0x62, 0x8f, 0x9b, 0x8c, 0x2b, 0xa6, 0x3d, + 0x62, 0xc0, 0xb5, 0x32, 0xf4, 0x31, 0x94, 0xd3, 0xc6, 0x3d, 0x6a, 0xd9, 0x97, 0x4e, 0x81, 0x95, + 0x15, 0x7b, 0xec, 0x24, 0x99, 0xa1, 0xdf, 0xc1, 0xcd, 0x91, 0x83, 0x14, 0x7d, 0xdb, 0xbe, 0xda, + 0x18, 0x57, 0xb1, 0xec, 0x4b, 0xa7, 0xb1, 0xc8, 0x91, 0xb4, 0x29, 0x86, 0x6a, 0xe9, 0xf1, 0xc3, + 0x4d, 0x65, 0xc5, 0x1e, 0x3b, 0x20, 0x65, 0xe8, 0x27, 0x30, 0x95, 0x18, 0x10, 0xe8, 0x4d, 0x7b, + 0xd4, 0xb8, 0x50, 0x29, 0xdb, 0x29, 0xa3, 0x47, 0x14, 0xf1, 0x1d, 0x94, 0x35, 0xdf, 0x57, 0x15, + 0x19, 0xd2, 0x25, 0x75, 0xa3, 0xfe, 0x1c, 0x14, 0x9f, 0x4f, 0xe0, 0xe7, 0xb2, 0x5f, 0xc3, 0x62, + 0xea, 0x43, 0x41, 0x5f, 0xb7, 0x2f, 0x7f, 0x9e, 0x2a, 0x55, 0x7b, 0xec, 0x2b, 0x63, 0x65, 0x36, + 0x3e, 0xfa, 0xe3, 0x45, 0xd5, 0x78, 0xf6, 0xa2, 0x6a, 0xfc, 0xf9, 0xa2, 0x6a, 0xfc, 0xfc, 0xb2, + 0x9a, 0x79, 0xf6, 0xb2, 0x9a, 0x79, 0xfe, 0xb2, 0x9a, 0xf9, 0xd2, 0xba, 0xfc, 0x7f, 0x32, 0x0e, + 0x8a, 0xfa, 0xcf, 0xfb, 0xff, 0x06, 0x00, 0x00, 0xff, 0xff, 0x3e, 0x6b, 0xbc, 0x1f, 0x36, 0x11, + 0x00, 0x00, } func (m *GetSubscriptionRequest) Marshal() (dAtA []byte, err error) { @@ -1849,6 +1859,13 @@ func (m *BuySubscriptionRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) _ = i var l int _ = l + if len(m.UserEmail) > 0 { + i -= len(m.UserEmail) + copy(dAtA[i:], m.UserEmail) + i = encodeVarintPaymentservice(dAtA, i, uint64(len(m.UserEmail))) + i-- + dAtA[i] = 0x32 + } if len(m.RequestedAnyName) > 0 { i -= len(m.RequestedAnyName) copy(dAtA[i:], m.RequestedAnyName) @@ -2656,6 +2673,10 @@ func (m *BuySubscriptionRequest) Size() (n int) { if l > 0 { n += 1 + l + sovPaymentservice(uint64(l)) } + l = len(m.UserEmail) + if l > 0 { + n += 1 + l + sovPaymentservice(uint64(l)) + } return n } @@ -3576,6 +3597,38 @@ func (m *BuySubscriptionRequest) Unmarshal(dAtA []byte) error { } m.RequestedAnyName = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UserEmail", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPaymentservice + } + 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 ErrInvalidLengthPaymentservice + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPaymentservice + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.UserEmail = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipPaymentservice(dAtA[iNdEx:]) diff --git a/paymentservice/paymentserviceproto/protos/paymentservice.proto b/paymentservice/paymentserviceproto/protos/paymentservice.proto index 1829152c..78d94b33 100644 --- a/paymentservice/paymentserviceproto/protos/paymentservice.proto +++ b/paymentservice/paymentserviceproto/protos/paymentservice.proto @@ -89,6 +89,8 @@ message BuySubscriptionRequest { // if empty - then no name requested // if non-empty - PP node will register that name on behalf of the user string requestedAnyName = 5; + // for some payment methods we need to know the user's email + string userEmail = 6; } message BuySubscriptionRequestSigned { From f59fa25f63a9600ded67547c4b4659bdefbc6049 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 13 May 2024 15:30:21 +0000 Subject: [PATCH 123/140] build(deps): bump github.com/prometheus/client_golang Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.19.0 to 1.19.1. - [Release notes](https://github.com/prometheus/client_golang/releases) - [Changelog](https://github.com/prometheus/client_golang/blob/main/CHANGELOG.md) - [Commits](https://github.com/prometheus/client_golang/compare/v1.19.0...v1.19.1) --- updated-dependencies: - dependency-name: github.com/prometheus/client_golang dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- go.mod | 4 ++-- go.sum | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index 4765fbfa..c7d59f57 100644 --- a/go.mod +++ b/go.mod @@ -25,7 +25,7 @@ require ( github.com/mr-tron/base58 v1.2.0 github.com/multiformats/go-multibase v0.2.0 github.com/multiformats/go-multihash v0.2.3 - github.com/prometheus/client_golang v1.19.0 + github.com/prometheus/client_golang v1.19.1 github.com/quic-go/quic-go v0.43.1 github.com/stretchr/testify v1.9.0 github.com/tyler-smith/go-bip39 v1.1.0 @@ -107,7 +107,7 @@ require ( golang.org/x/sync v0.6.0 // indirect golang.org/x/sys v0.20.0 // indirect golang.org/x/tools v0.19.0 // indirect - google.golang.org/protobuf v1.32.0 // indirect + google.golang.org/protobuf v1.33.0 // indirect lukechampine.com/blake3 v1.2.1 // indirect rsc.io/tmplfunc v0.0.3 // indirect ) diff --git a/go.sum b/go.sum index 06ac2185..a0318de0 100644 --- a/go.sum +++ b/go.sum @@ -294,8 +294,8 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/polydawn/refmt v0.89.0 h1:ADJTApkvkeBZsN0tBTx8QjpD9JkmxbKp0cxfr9qszm4= github.com/polydawn/refmt v0.89.0/go.mod h1:/zvteZs/GwLtCgZ4BL6CBsk9IKIlexP43ObX9AxTqTw= -github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= -github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= +github.com/prometheus/client_golang v1.19.1 h1:wZWJDwK+NameRJuPGDhlnFgx8e8HN3XHQeLaYJFJBOE= +github.com/prometheus/client_golang v1.19.1/go.mod h1:mP78NwGzrVks5S2H6ab8+ZZGJLZUq1hoULYBAYBw1Ho= github.com/prometheus/client_model v0.6.0 h1:k1v3CzpSRUTrKMppY35TLwPvxHqBu0bYgxZzqGIgaos= github.com/prometheus/client_model v0.6.0/go.mod h1:NTQHnmxFpouOD0DpvP4XujX3CdOAGQPoaGhyTchlyt8= github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= @@ -445,8 +445,8 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= -google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= From 0c34828aae48451498847f5bba86892f809aa301 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 13 May 2024 15:30:38 +0000 Subject: [PATCH 124/140] build(deps): bump golang.org/x/net from 0.24.0 to 0.25.0 Bumps [golang.org/x/net](https://github.com/golang/net) from 0.24.0 to 0.25.0. - [Commits](https://github.com/golang/net/compare/v0.24.0...v0.25.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 4765fbfa..d0a4ed82 100644 --- a/go.mod +++ b/go.mod @@ -35,7 +35,7 @@ require ( go.uber.org/zap v1.27.0 golang.org/x/crypto v0.23.0 golang.org/x/exp v0.0.0-20240325151524-a685a6edb6d8 - golang.org/x/net v0.24.0 + golang.org/x/net v0.25.0 golang.org/x/time v0.5.0 gopkg.in/yaml.v3 v3.0.1 storj.io/drpc v0.0.34 diff --git a/go.sum b/go.sum index 06ac2185..36c095e6 100644 --- a/go.sum +++ b/go.sum @@ -403,8 +403,8 @@ golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= -golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= +golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac= +golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= From b7e44373034aa379a7d285a0714191ec14f04c00 Mon Sep 17 00:00:00 2001 From: mcrakhman Date: Mon, 13 May 2024 19:22:51 +0200 Subject: [PATCH 125/140] Fix tree deletion and simultaneous access --- .../object/tree/objecttree/objecttree.go | 39 +++++++++++++++- .../object/tree/objecttree/objecttree_test.go | 45 +++++++++++++++++++ .../object/tree/treestorage/inmemory.go | 6 ++- 3 files changed, 88 insertions(+), 2 deletions(-) diff --git a/commonspace/object/tree/objecttree/objecttree.go b/commonspace/object/tree/objecttree/objecttree.go index 238636d6..9add0e62 100644 --- a/commonspace/object/tree/objecttree/objecttree.go +++ b/commonspace/object/tree/objecttree/objecttree.go @@ -29,6 +29,7 @@ var ( ErrNoChangeInTree = errors.New("no such change in tree") ErrMissingKey = errors.New("missing current read key") ErrDerived = errors.New("expect >= 2 changes in derived tree") + ErrDeleted = errors.New("object tree is deleted") ) type AddResultSummary int @@ -105,6 +106,7 @@ type objectTree struct { keys map[string]crypto.SymKey currentReadKey crypto.SymKey + isDeleted bool // buffers difSnapshotBuf []*treechangeproto.RawTreeChangeWithId @@ -179,6 +181,9 @@ func (ot *objectTree) Storage() treestorage.TreeStorage { } func (ot *objectTree) GetChange(id string) (*Change, error) { + if ot.isDeleted { + return nil, ErrDeleted + } if ch, ok := ot.tree.attached[id]; ok { return ch, nil } @@ -186,6 +191,10 @@ func (ot *objectTree) GetChange(id string) (*Change, error) { } func (ot *objectTree) AddContent(ctx context.Context, content SignableChangeContent) (res AddResult, err error) { + if ot.isDeleted { + err = ErrDeleted + return + } payload, err := ot.prepareBuilderContent(content) if err != nil { return @@ -227,6 +236,10 @@ func (ot *objectTree) AddContent(ctx context.Context, content SignableChangeCont } func (ot *objectTree) UnpackChange(raw *treechangeproto.RawTreeChangeWithId) (data []byte, err error) { + if ot.isDeleted { + err = ErrDeleted + return + } unmarshalled, err := ot.changeBuilder.Unmarshall(raw, true) if err != nil { return @@ -236,6 +249,10 @@ func (ot *objectTree) UnpackChange(raw *treechangeproto.RawTreeChangeWithId) (da } func (ot *objectTree) PrepareChange(content SignableChangeContent) (res *treechangeproto.RawTreeChangeWithId, err error) { + if ot.isDeleted { + err = ErrDeleted + return + } payload, err := ot.prepareBuilderContent(content) if err != nil { return @@ -291,6 +308,10 @@ func (ot *objectTree) prepareBuilderContent(content SignableChangeContent) (cnt } func (ot *objectTree) AddRawChanges(ctx context.Context, changesPayload RawChangesPayload) (addResult AddResult, err error) { + if ot.isDeleted { + err = ErrDeleted + return + } lastHeadId := ot.tree.lastIteratedHeadId addResult, err = ot.addRawChanges(ctx, changesPayload) if err != nil { @@ -526,6 +547,10 @@ func (ot *objectTree) IterateRoot(convert ChangeConvertFunc, iterate ChangeItera } func (ot *objectTree) IterateFrom(id string, convert ChangeConvertFunc, iterate ChangeIterateFunc) (err error) { + if ot.isDeleted { + err = ErrDeleted + return + } if convert == nil { ot.tree.Iterate(id, iterate) return @@ -575,12 +600,14 @@ func (ot *objectTree) IterateFrom(id string, convert ChangeConvertFunc, iterate } func (ot *objectTree) HasChanges(chs ...string) bool { + if ot.isDeleted { + return false + } for _, ch := range chs { if _, attachedExists := ot.tree.attached[ch]; !attachedExists { return false } } - return true } @@ -601,10 +628,17 @@ func (ot *objectTree) Close() error { } func (ot *objectTree) Delete() error { + if ot.isDeleted { + return nil + } + ot.isDeleted = true return ot.treeStorage.Delete() } func (ot *objectTree) SnapshotPath() []string { + if ot.isDeleted { + return nil + } // TODO: Add error as return parameter if ot.snapshotPathIsActual() { return ot.snapshotPath @@ -627,6 +661,9 @@ func (ot *objectTree) SnapshotPath() []string { } func (ot *objectTree) ChangesAfterCommonSnapshot(theirPath, theirHeads []string) ([]*treechangeproto.RawTreeChangeWithId, error) { + if ot.isDeleted { + return nil, ErrDeleted + } var ( needFullDocument = len(theirPath) == 0 ourPath = ot.SnapshotPath() diff --git a/commonspace/object/tree/objecttree/objecttree_test.go b/commonspace/object/tree/objecttree/objecttree_test.go index a93176e6..35cee25a 100644 --- a/commonspace/object/tree/objecttree/objecttree_test.go +++ b/commonspace/object/tree/objecttree/objecttree_test.go @@ -121,6 +121,51 @@ func TestObjectTree(t *testing.T) { aclList, keys := prepareAclList(t) ctx := context.Background() + t.Run("delete object tree", func(t *testing.T) { + exec := list.NewAclExecutor("spaceId") + type cmdErr struct { + cmd string + err error + } + cmds := []cmdErr{ + {"a.init::a", nil}, + } + for _, cmd := range cmds { + err := exec.Execute(cmd.cmd) + require.Equal(t, cmd.err, err, cmd) + } + aAccount := exec.ActualAccounts()["a"] + root, err := CreateObjectTreeRoot(ObjectTreeCreatePayload{ + PrivKey: aAccount.Keys.SignKey, + ChangeType: "changeType", + ChangePayload: nil, + SpaceId: "spaceId", + IsEncrypted: true, + }, aAccount.Acl) + require.NoError(t, err) + aStore, _ := treestorage.NewInMemoryTreeStorage(root, []string{root.Id}, []*treechangeproto.RawTreeChangeWithId{root}) + aTree, err := BuildKeyFilterableObjectTree(aStore, aAccount.Acl) + require.NoError(t, err) + err = aTree.Delete() + require.NoError(t, err) + _, err = aTree.ChangesAfterCommonSnapshot(nil, nil) + require.Equal(t, ErrDeleted, err) + err = aTree.IterateFrom("", nil, func(change *Change) bool { + return true + }) + require.Equal(t, ErrDeleted, err) + _, err = aTree.AddContent(ctx, SignableChangeContent{}) + require.Equal(t, ErrDeleted, err) + _, err = aTree.AddRawChanges(ctx, RawChangesPayload{}) + require.Equal(t, ErrDeleted, err) + _, err = aTree.PrepareChange(SignableChangeContent{}) + require.Equal(t, ErrDeleted, err) + _, err = aTree.UnpackChange(nil) + require.Equal(t, ErrDeleted, err) + _, err = aTree.GetChange("") + require.Equal(t, ErrDeleted, err) + }) + t.Run("user delete logic: validation, key change, decryption", func(t *testing.T) { exec := list.NewAclExecutor("spaceId") type cmdErr struct { diff --git a/commonspace/object/tree/treestorage/inmemory.go b/commonspace/object/tree/treestorage/inmemory.go index e5d3f753..b130317d 100644 --- a/commonspace/object/tree/treestorage/inmemory.go +++ b/commonspace/object/tree/treestorage/inmemory.go @@ -3,9 +3,10 @@ package treestorage import ( "context" "fmt" + "sync" + "github.com/anyproto/any-sync/commonspace/object/tree/treechangeproto" "github.com/anyproto/any-sync/util/slice" - "sync" ) type InMemoryTreeStorage struct { @@ -111,6 +112,9 @@ func (t *InMemoryTreeStorage) GetRawChange(ctx context.Context, changeId string) } func (t *InMemoryTreeStorage) Delete() error { + t.root = nil + t.Changes = nil + t.heads = nil return nil } From 0a606f6bd61841bc25340e9c8dea9fbd8c7ec183 Mon Sep 17 00:00:00 2001 From: mcrakhman Date: Mon, 13 May 2024 19:48:41 +0200 Subject: [PATCH 126/140] Fix tests --- commonspace/deletion_test.go | 10 ++++++---- commonspace/spacestorage/inmemorystorage.go | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/commonspace/deletion_test.go b/commonspace/deletion_test.go index 3d1f2dc2..e3289954 100644 --- a/commonspace/deletion_test.go +++ b/commonspace/deletion_test.go @@ -3,6 +3,12 @@ package commonspace import ( "context" "fmt" + "math/rand" + "testing" + "time" + + "github.com/stretchr/testify/require" + "github.com/anyproto/any-sync/commonspace/object/accountdata" "github.com/anyproto/any-sync/commonspace/object/tree/objecttree" "github.com/anyproto/any-sync/commonspace/object/tree/treechangeproto" @@ -12,10 +18,6 @@ import ( "github.com/anyproto/any-sync/commonspace/spacestorage" "github.com/anyproto/any-sync/commonspace/spacesyncproto" "github.com/anyproto/any-sync/util/crypto" - "github.com/stretchr/testify/require" - "math/rand" - "testing" - "time" ) func addIncorrectSnapshot(settingsObject settings.SettingsObject, acc *accountdata.AccountKeys, partialIds map[string]struct{}, newId string) (err error) { diff --git a/commonspace/spacestorage/inmemorystorage.go b/commonspace/spacestorage/inmemorystorage.go index 1c2dec54..1b6398de 100644 --- a/commonspace/spacestorage/inmemorystorage.go +++ b/commonspace/spacestorage/inmemorystorage.go @@ -186,7 +186,7 @@ func (i *InMemorySpaceStorage) AllTrees() map[string]treestorage.TreeStorage { defer i.Unlock() cp := map[string]treestorage.TreeStorage{} for id, store := range i.trees { - cp[id] = store + cp[id] = store.(*treestorage.InMemoryTreeStorage).Copy() } return cp } From f8b49b36b59d34ea2e9cedbece96c43d2285db01 Mon Sep 17 00:00:00 2001 From: mcrakhman Date: Thu, 16 May 2024 13:28:32 +0200 Subject: [PATCH 127/140] Add verbose errors --- .../object/tree/objecttree/objecttree.go | 18 +++++++++++++----- .../object/tree/objecttree/objecttree_test.go | 3 ++- .../tree/objecttree/objecttreevalidator.go | 2 +- 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/commonspace/object/tree/objecttree/objecttree.go b/commonspace/object/tree/objecttree/objecttree.go index 9add0e62..01e54242 100644 --- a/commonspace/object/tree/objecttree/objecttree.go +++ b/commonspace/object/tree/objecttree/objecttree.go @@ -4,14 +4,16 @@ package objecttree import ( "context" "errors" + "fmt" "sync" "time" - "github.com/anyproto/any-sync/util/crypto" + "go.uber.org/zap" "github.com/anyproto/any-sync/commonspace/object/acl/list" "github.com/anyproto/any-sync/commonspace/object/tree/treechangeproto" "github.com/anyproto/any-sync/commonspace/object/tree/treestorage" + "github.com/anyproto/any-sync/util/crypto" "github.com/anyproto/any-sync/util/slice" ) @@ -124,6 +126,7 @@ func (ot *objectTree) rebuildFromStorage(theirHeads []string, newChanges []*Chan ot.treeBuilder.Reset() ot.tree, err = ot.treeBuilder.Build(theirHeads, newChanges) if err != nil { + ot.tree = oldTree return } @@ -434,15 +437,20 @@ func (ot *objectTree) addRawChanges(ctx context.Context, changesPayload RawChang err = ot.rebuildFromStorage(headsToUse, ot.newChangesBuf) if err != nil { // rebuilding without new changes - ot.rebuildFromStorage(nil, nil) + rebuildErr := ot.rebuildFromStorage(nil, nil) + if rebuildErr != nil { + log.Error("failed to rebuild", zap.String("treeId", ot.id), zap.Strings("heads", ot.Heads()), zap.Error(err)) + } return } addResult, err = ot.createAddResult(prevHeadsCopy, Rebuild, nil, changesPayload.RawChanges) if err != nil { // that means that some unattached changes were somehow corrupted in memory // this shouldn't happen but if that happens, then rebuilding from storage - ot.rebuildFromStorage(nil, nil) - return + rebuildErr := ot.rebuildFromStorage(nil, nil) + if rebuildErr != nil { + log.Error("failed to rebuild after add result", zap.String("treeId", ot.id), zap.Strings("heads", ot.Heads()), zap.Error(err)) + } } return } @@ -463,7 +471,7 @@ func (ot *objectTree) addRawChanges(ctx context.Context, changesPayload RawChang err = ot.validateTree(treeChangesAdded) if err != nil { rollback(treeChangesAdded) - err = ErrHasInvalidChanges + err = fmt.Errorf("%w: %w", ErrHasInvalidChanges, err) return } addResult, err = ot.createAddResult(prevHeadsCopy, mode, treeChangesAdded, changesPayload.RawChanges) diff --git a/commonspace/object/tree/objecttree/objecttree_test.go b/commonspace/object/tree/objecttree/objecttree_test.go index 35cee25a..024ed1fe 100644 --- a/commonspace/object/tree/objecttree/objecttree_test.go +++ b/commonspace/object/tree/objecttree/objecttree_test.go @@ -2,6 +2,7 @@ package objecttree import ( "context" + "errors" "fmt" "testing" "time" @@ -1228,6 +1229,6 @@ func TestObjectTree(t *testing.T) { Heads: []string{"3"}, Changes: rawChanges, }, ctx.aclList) - require.Equal(t, ErrHasInvalidChanges, err) + require.True(t, errors.Is(err, ErrHasInvalidChanges)) }) } diff --git a/commonspace/object/tree/objecttree/objecttreevalidator.go b/commonspace/object/tree/objecttree/objecttreevalidator.go index bb971ad7..fc6dc6ee 100644 --- a/commonspace/object/tree/objecttree/objecttreevalidator.go +++ b/commonspace/object/tree/objecttree/objecttreevalidator.go @@ -170,7 +170,7 @@ func ValidateRawTreeBuildFunc(payload treestorage.TreeStorageCreatePayload, buil return } if !slice.UnsortedEquals(res.Heads, payload.Heads) { - return payload, ErrHasInvalidChanges + return payload, fmt.Errorf("heads mismatch: %v != %v, %w", res.Heads, payload.Heads, ErrHasInvalidChanges) } // if tree has only one change we still should check if the snapshot id is same as root if IsEmptyDerivedTree(tree) { From 246e18629be65a18a158b1c34342daf1e0159f65 Mon Sep 17 00:00:00 2001 From: mcrakhman Date: Thu, 16 May 2024 13:41:40 +0200 Subject: [PATCH 128/140] Add more error logs --- commonspace/object/tree/objecttree/objecttree.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/commonspace/object/tree/objecttree/objecttree.go b/commonspace/object/tree/objecttree/objecttree.go index 01e54242..7eeeac62 100644 --- a/commonspace/object/tree/objecttree/objecttree.go +++ b/commonspace/object/tree/objecttree/objecttree.go @@ -432,24 +432,26 @@ func (ot *objectTree) addRawChanges(ctx context.Context, changesPayload RawChang break } } - + log := log.With(zap.String("treeId", ot.id)) if shouldRebuildFromStorage { err = ot.rebuildFromStorage(headsToUse, ot.newChangesBuf) if err != nil { + log.Error("failed to rebuild with new heads", zap.Strings("headsToUse", headsToUse), zap.Error(err)) // rebuilding without new changes rebuildErr := ot.rebuildFromStorage(nil, nil) if rebuildErr != nil { - log.Error("failed to rebuild", zap.String("treeId", ot.id), zap.Strings("heads", ot.Heads()), zap.Error(err)) + log.Error("failed to rebuild from storage", zap.Strings("heads", ot.Heads()), zap.Error(rebuildErr)) } return } addResult, err = ot.createAddResult(prevHeadsCopy, Rebuild, nil, changesPayload.RawChanges) if err != nil { + log.Error("failed to create add result", zap.Strings("headsToUse", headsToUse), zap.Error(err)) // that means that some unattached changes were somehow corrupted in memory // this shouldn't happen but if that happens, then rebuilding from storage rebuildErr := ot.rebuildFromStorage(nil, nil) if rebuildErr != nil { - log.Error("failed to rebuild after add result", zap.String("treeId", ot.id), zap.Strings("heads", ot.Heads()), zap.Error(err)) + log.Error("failed to rebuild after add result", zap.Strings("heads", ot.Heads()), zap.Error(rebuildErr)) } } return From 6671f72d90f86451bfaf664bcf67e2c3196777c3 Mon Sep 17 00:00:00 2001 From: kirillston Date: Fri, 17 May 2024 16:55:28 +0300 Subject: [PATCH 129/140] GO-3478 Exclude billingID from rpc pars --- .../paymentserviceproto/paymentservice.pb.go | 238 +++++++----------- .../protos/paymentservice.proto | 4 +- 2 files changed, 94 insertions(+), 148 deletions(-) diff --git a/paymentservice/paymentserviceproto/paymentservice.pb.go b/paymentservice/paymentserviceproto/paymentservice.pb.go index 1796347e..66cc6a31 100644 --- a/paymentservice/paymentserviceproto/paymentservice.pb.go +++ b/paymentservice/paymentserviceproto/paymentservice.pb.go @@ -1397,10 +1397,8 @@ type VerifyAppStoreReceiptRequest struct { // in the following format: "A5k2d9sFZw84yisTxRnz2bPRd1YPfVfhxqymZ6yESprFTG65" // you can get it with Account().SignKey.GetPublic().Account() OwnerAnyId string `protobuf:"bytes,1,opt,name=ownerAnyId,proto3" json:"ownerAnyId,omitempty"` - // billingID is used to identify purchase request registered on payment node - BillingID string `protobuf:"bytes,2,opt,name=billingID,proto3" json:"billingID,omitempty"` // receipt is a JWT-encoded information about subscription purchase - Receipt string `protobuf:"bytes,3,opt,name=receipt,proto3" json:"receipt,omitempty"` + Receipt string `protobuf:"bytes,2,opt,name=receipt,proto3" json:"receipt,omitempty"` } func (m *VerifyAppStoreReceiptRequest) Reset() { *m = VerifyAppStoreReceiptRequest{} } @@ -1443,13 +1441,6 @@ func (m *VerifyAppStoreReceiptRequest) GetOwnerAnyId() string { return "" } -func (m *VerifyAppStoreReceiptRequest) GetBillingID() string { - if m != nil { - return m.BillingID - } - return "" -} - func (m *VerifyAppStoreReceiptRequest) GetReceipt() string { if m != nil { return m.Receipt @@ -1583,98 +1574,98 @@ func init() { } var fileDescriptor_4feb29dcc5ba50f6 = []byte{ - // 1448 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x58, 0xcd, 0x6f, 0x1b, 0x45, - 0x14, 0xf7, 0xfa, 0x23, 0x89, 0x5f, 0xbe, 0x26, 0x13, 0x27, 0xdd, 0xba, 0x89, 0x49, 0x97, 0xaf, - 0x28, 0x88, 0xad, 0x28, 0x3d, 0x20, 0x84, 0x10, 0x4e, 0xe2, 0x84, 0x48, 0x25, 0x44, 0xb6, 0xdb, - 0x0a, 0x8a, 0x80, 0x8d, 0xf7, 0x25, 0x59, 0xba, 0x99, 0x59, 0x66, 0xc7, 0x49, 0xcd, 0x8d, 0x23, - 0x37, 0x24, 0x0e, 0xfc, 0x41, 0x5c, 0x38, 0xf6, 0xd8, 0x23, 0xb4, 0x37, 0x4e, 0x1c, 0x39, 0xa2, - 0x99, 0x5d, 0xdb, 0xeb, 0x78, 0xed, 0x84, 0x46, 0x5c, 0xe2, 0x99, 0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, 0xd5, 0x89, 0x7a, 0x38, 0x28, 0xbe, 0x90, - 0xc0, 0x7b, 0xb2, 0x5f, 0xc3, 0x52, 0xea, 0xa3, 0x40, 0x5f, 0xb7, 0x2f, 0x7f, 0x8a, 0xca, 0x15, - 0x7b, 0xec, 0x8b, 0x62, 0x65, 0x36, 0x3f, 0xfa, 0xfd, 0x45, 0xc5, 0x78, 0xf6, 0xa2, 0x62, 0xfc, - 0xf1, 0xa2, 0x62, 0xfc, 0xfc, 0xb2, 0x92, 0x79, 0xf6, 0xb2, 0x92, 0x79, 0xfe, 0xb2, 0x92, 0xf9, - 0xd2, 0xba, 0xfc, 0xff, 0x12, 0x87, 0x13, 0xfa, 0xe7, 0xfd, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, - 0x04, 0x97, 0xd5, 0x74, 0x04, 0x11, 0x00, 0x00, + // 1446 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x58, 0xcb, 0x73, 0x1b, 0x45, + 0x13, 0xd7, 0xea, 0x61, 0x5b, 0xed, 0xd7, 0x78, 0x2c, 0x3b, 0x1b, 0xc5, 0xd6, 0xe7, 0xec, 0xf7, + 0x72, 0x99, 0x62, 0x53, 0x84, 0x1c, 0x28, 0x8a, 0xa2, 0x90, 0x6d, 0xd9, 0xb8, 0x2a, 0x18, 0x97, + 0xa4, 0x24, 0x40, 0x28, 0x60, 0xad, 0x6d, 0xdb, 0x4b, 0xd6, 0x33, 0xcb, 0xec, 0x28, 0xce, 0x72, + 0xe3, 0xc8, 0x8d, 0x2a, 0x0e, 0xfc, 0x41, 0x5c, 0x38, 0xe6, 0x98, 0x23, 0x24, 0x37, 0x4e, 0x1c, + 0x39, 0x52, 0x33, 0xbb, 0xb2, 0x56, 0xd6, 0x4a, 0x36, 0x71, 0x71, 0xb1, 0x66, 0x7e, 0x33, 0xdd, + 0xd3, 0xfd, 0xeb, 0x9e, 0x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0x3f, 0x0f, 0xd3, 0xea, 0xf7, + 0x01, 0x7b, 0xc2, 0xf8, 0x19, 0x23, 0x39, 0x4a, 0x60, 0x46, 0x01, 0x8d, 0x67, 0x81, 0xcf, 0x05, + 0x0a, 0x62, 0x50, 0x13, 0x2a, 0x0a, 0xd9, 0xec, 0x7a, 0xbe, 0x8b, 0xe2, 0xad, 0x47, 0x88, 0x4f, + 0xda, 0x8d, 0x56, 0x9b, 0xe4, 0x69, 0x15, 0x96, 0xd5, 0xca, 0x16, 0xdf, 0x12, 0xe8, 0x48, 0x9e, + 0x5a, 0x2b, 0xd0, 0x0a, 0x90, 0xb4, 0xd4, 0xa7, 0xe8, 0x08, 0x52, 0xa4, 0xcb, 0x40, 0x07, 0x25, + 0x34, 0x5e, 0x52, 0x31, 0x4b, 0xed, 0x3e, 0xf0, 0xbb, 0x21, 0x99, 0xe8, 0x81, 0x75, 0x16, 0xc9, + 0x28, 0xc0, 0x36, 0x3a, 0xa7, 0x64, 0x72, 0x23, 0x04, 0x3a, 0xdc, 0xba, 0xa9, 0x38, 0xc6, 0xa3, + 0xbe, 0x23, 0xe7, 0xd0, 0x01, 0x32, 0xd7, 0x63, 0xc7, 0xc4, 0x50, 0xbe, 0xc5, 0x50, 0xbd, 0x23, + 0xbd, 0xa7, 0x48, 0xf2, 0xf4, 0xbf, 0x70, 0x7b, 0x60, 0x93, 0x0a, 0x85, 0x27, 0x30, 0x4c, 0x5e, + 0x25, 0x5d, 0xa0, 0x48, 0x61, 0xe3, 0x27, 0x03, 0x66, 0x07, 0x7a, 0x0b, 0x3a, 0x07, 0x10, 0x8f, + 0xb6, 0x1c, 0xe1, 0xc6, 0xb4, 0x25, 0x73, 0x11, 0x05, 0x92, 0x13, 0x83, 0x52, 0x98, 0x8b, 0x91, + 0x7a, 0x10, 0xf8, 0x78, 0xe0, 0x44, 0x24, 0xaf, 0x3c, 0x8a, 0xb1, 0x5d, 0xce, 0x8f, 0x63, 0x50, + 0x33, 0x95, 0xda, 0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, 0x01, 0x4b, 0x99, 0x8f, 0x02, 0xfd, 0xb7, 0x7d, 0xf9, 0x53, 0x54, 0xad, 0xd9, 0x63, + 0x5f, 0x14, 0x2b, 0xb7, 0xf9, 0xde, 0x2f, 0x2f, 0x6b, 0xc6, 0xf3, 0x97, 0x35, 0xe3, 0xd7, 0x97, + 0x35, 0xe3, 0x87, 0x57, 0xb5, 0xdc, 0xf3, 0x57, 0xb5, 0xdc, 0x8b, 0x57, 0xb5, 0xdc, 0x67, 0xd6, + 0xe5, 0xff, 0x79, 0x38, 0x9c, 0xd0, 0x3f, 0x6f, 0xff, 0x15, 0x00, 0x00, 0xff, 0xff, 0x72, 0x4d, + 0xf4, 0xd7, 0xe6, 0x10, 0x00, 0x00, } func (m *GetSubscriptionRequest) Marshal() (dAtA []byte, err error) { @@ -2471,13 +2462,6 @@ func (m *VerifyAppStoreReceiptRequest) MarshalToSizedBuffer(dAtA []byte) (int, e copy(dAtA[i:], m.Receipt) i = encodeVarintPaymentservice(dAtA, i, uint64(len(m.Receipt))) i-- - dAtA[i] = 0x1a - } - if len(m.BillingID) > 0 { - i -= len(m.BillingID) - copy(dAtA[i:], m.BillingID) - i = encodeVarintPaymentservice(dAtA, i, uint64(len(m.BillingID))) - i-- dAtA[i] = 0x12 } if len(m.OwnerAnyId) > 0 { @@ -2918,10 +2902,6 @@ func (m *VerifyAppStoreReceiptRequest) Size() (n int) { if l > 0 { n += 1 + l + sovPaymentservice(uint64(l)) } - l = len(m.BillingID) - if l > 0 { - n += 1 + l + sovPaymentservice(uint64(l)) - } l = len(m.Receipt) if l > 0 { n += 1 + l + sovPaymentservice(uint64(l)) @@ -5322,38 +5302,6 @@ func (m *VerifyAppStoreReceiptRequest) Unmarshal(dAtA []byte) error { m.OwnerAnyId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BillingID", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPaymentservice - } - 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 ErrInvalidLengthPaymentservice - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPaymentservice - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.BillingID = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Receipt", wireType) } diff --git a/paymentservice/paymentserviceproto/protos/paymentservice.proto b/paymentservice/paymentserviceproto/protos/paymentservice.proto index f52765d4..adff4b6a 100644 --- a/paymentservice/paymentserviceproto/protos/paymentservice.proto +++ b/paymentservice/paymentserviceproto/protos/paymentservice.proto @@ -216,10 +216,8 @@ message VerifyAppStoreReceiptRequest { // in the following format: "A5k2d9sFZw84yisTxRnz2bPRd1YPfVfhxqymZ6yESprFTG65" // you can get it with Account().SignKey.GetPublic().Account() string ownerAnyId = 1; - // billingID is used to identify purchase request registered on payment node - string billingID = 2; // receipt is a JWT-encoded information about subscription purchase - string receipt = 3; + string receipt = 2; } message VerifyAppStoreReceiptRequestSigned { From d9aad302f27e98ed1255ddf66e7754b8e88155fd Mon Sep 17 00:00:00 2001 From: mcrakhman Date: Sun, 19 May 2024 14:11:07 +0200 Subject: [PATCH 130/140] Fix invalid change and add logs --- .../object/tree/objecttree/objecttree.go | 27 ++++--- .../object/tree/objecttree/objecttree_test.go | 79 +++++++++++++++++++ .../tree/objecttree/objecttreevalidator.go | 25 +++--- util/debug/stack.go | 28 +++++++ util/debug/stack_test.go | 38 +++++++++ 5 files changed, 177 insertions(+), 20 deletions(-) create mode 100644 util/debug/stack.go create mode 100644 util/debug/stack_test.go diff --git a/commonspace/object/tree/objecttree/objecttree.go b/commonspace/object/tree/objecttree/objecttree.go index 7eeeac62..544e5c2b 100644 --- a/commonspace/object/tree/objecttree/objecttree.go +++ b/commonspace/object/tree/objecttree/objecttree.go @@ -8,6 +8,8 @@ import ( "sync" "time" + "github.com/anyproto/any-sync/util/debug" + "go.uber.org/zap" "github.com/anyproto/any-sync/commonspace/object/acl/list" @@ -17,14 +19,6 @@ import ( "github.com/anyproto/any-sync/util/slice" ) -type RWLocker interface { - sync.Locker - RLock() - RUnlock() - TryRLock() bool - TryLock() bool -} - var ( ErrHasInvalidChanges = errors.New("the change is invalid") ErrNoCommonSnapshot = errors.New("trees doesn't have a common snapshot") @@ -32,6 +26,7 @@ var ( ErrMissingKey = errors.New("missing current read key") ErrDerived = errors.New("expect >= 2 changes in derived tree") ErrDeleted = errors.New("object tree is deleted") + ErrNoAclHead = errors.New("no acl head") ) type AddResultSummary int @@ -53,7 +48,7 @@ type ChangeIterateFunc = func(change *Change) bool type ChangeConvertFunc = func(change *Change, decrypted []byte) (any, error) type ReadableObjectTree interface { - RWLocker + sync.Locker Id() string Header() *treechangeproto.RawTreeChangeWithId @@ -118,7 +113,7 @@ type objectTree struct { snapshotPath []string - sync.RWMutex + sync.Mutex } func (ot *objectTree) rebuildFromStorage(theirHeads []string, newChanges []*Change) (err error) { @@ -193,11 +188,20 @@ func (ot *objectTree) GetChange(id string) (*Change, error) { return nil, ErrNoChangeInTree } +func (ot *objectTree) logUseWhenUnlocked() { + // this is needed to check when we use the tree not under the lock + if ot.TryLock() { + log.With(zap.String("treeId", ot.id), zap.String("stack", debug.StackCompact(true))).Error("use tree when unlocked") + ot.Unlock() + } +} + func (ot *objectTree) AddContent(ctx context.Context, content SignableChangeContent) (res AddResult, err error) { if ot.isDeleted { err = ErrDeleted return } + ot.logUseWhenUnlocked() payload, err := ot.prepareBuilderContent(content) if err != nil { return @@ -315,6 +319,7 @@ func (ot *objectTree) AddRawChanges(ctx context.Context, changesPayload RawChang err = ErrDeleted return } + ot.logUseWhenUnlocked() lastHeadId := ot.tree.lastIteratedHeadId addResult, err = ot.addRawChanges(ctx, changesPayload) if err != nil { @@ -395,7 +400,7 @@ func (ot *objectTree) addRawChanges(ctx context.Context, changesPayload RawChang headsToUse = changesPayload.NewHeads ) // if our validator provides filtering mechanism then we use it - filteredHeads, ot.newChangesBuf, ot.newSnapshotsBuf, ot.notSeenIdxBuf = ot.validator.FilterChanges(ot.aclList, changesPayload.NewHeads, ot.newChangesBuf, ot.newSnapshotsBuf, ot.notSeenIdxBuf) + filteredHeads, ot.newChangesBuf, ot.newSnapshotsBuf, ot.notSeenIdxBuf = ot.validator.FilterChanges(ot.aclList, ot.newChangesBuf, ot.newSnapshotsBuf, ot.notSeenIdxBuf) if filteredHeads { // if we filtered some of the heads, then we don't know which heads to use headsToUse = []string{} diff --git a/commonspace/object/tree/objecttree/objecttree_test.go b/commonspace/object/tree/objecttree/objecttree_test.go index 024ed1fe..c280c6aa 100644 --- a/commonspace/object/tree/objecttree/objecttree_test.go +++ b/commonspace/object/tree/objecttree/objecttree_test.go @@ -15,6 +15,7 @@ import ( "github.com/anyproto/any-sync/commonspace/object/accountdata" "github.com/anyproto/any-sync/commonspace/object/acl/list" + "github.com/anyproto/any-sync/commonspace/object/acl/liststorage" "github.com/anyproto/any-sync/commonspace/object/tree/treechangeproto" "github.com/anyproto/any-sync/commonspace/object/tree/treestorage" ) @@ -241,6 +242,84 @@ func TestObjectTree(t *testing.T) { require.NoError(t, err) }) + t.Run("filter changes when no aclHeadId", func(t *testing.T) { + exec := list.NewAclExecutor("spaceId") + type cmdErr struct { + cmd string + err error + } + cmds := []cmdErr{ + {"a.init::a", nil}, + {"a.invite::invId", nil}, + {"b.join::invId", nil}, + {"a.approve::b,r", nil}, + } + for _, cmd := range cmds { + err := exec.Execute(cmd.cmd) + require.Equal(t, cmd.err, err, cmd) + } + aAccount := exec.ActualAccounts()["a"] + bAccount := exec.ActualAccounts()["b"] + root, err := CreateObjectTreeRoot(ObjectTreeCreatePayload{ + PrivKey: aAccount.Keys.SignKey, + ChangeType: "changeType", + ChangePayload: nil, + SpaceId: "spaceId", + IsEncrypted: true, + }, aAccount.Acl) + require.NoError(t, err) + aStore, _ := treestorage.NewInMemoryTreeStorage(root, []string{root.Id}, []*treechangeproto.RawTreeChangeWithId{root}) + aTree, err := BuildKeyFilterableObjectTree(aStore, aAccount.Acl) + require.NoError(t, err) + _, err = aTree.AddContent(ctx, SignableChangeContent{ + Data: []byte("some"), + Key: aAccount.Keys.SignKey, + IsSnapshot: false, + IsEncrypted: true, + DataType: mockDataType, + }) + require.NoError(t, err) + bStore := aTree.Storage().(*treestorage.InMemoryTreeStorage).Copy() + // copying old version of storage + prevAclRecs, err := bAccount.Acl.RecordsAfter(ctx, "") + require.NoError(t, err) + storage, err := liststorage.NewInMemoryAclListStorage(prevAclRecs[0].Id, prevAclRecs) + require.NoError(t, err) + acl, err := list.BuildAclListWithIdentity(bAccount.Keys, storage, list.NoOpAcceptorVerifier{}) + require.NoError(t, err) + // creating tree with old storage which doesn't have a new invite record + bTree, err := BuildKeyFilterableObjectTree(bStore, acl) + require.NoError(t, err) + err = exec.Execute("a.invite::inv1Id") + require.NoError(t, err) + res, err := aTree.AddContent(ctx, SignableChangeContent{ + Data: []byte("some"), + Key: aAccount.Keys.SignKey, + IsSnapshot: false, + IsEncrypted: true, + DataType: mockDataType, + }) + unexpectedId := res.Added[0].Id + require.NoError(t, err) + var collectedChanges []*Change + err = aTree.IterateRoot(func(change *Change, decrypted []byte) (any, error) { + return nil, nil + }, func(change *Change) bool { + collectedChanges = append(collectedChanges, change) + return true + }) + require.NoError(t, err) + bObjTree := bTree.(*objectTree) + // this is just a random slice, so the func works + indexes := []int{1, 2, 3, 4, 5} + // checking that we filter the changes + filtered, filteredChanges, _, _ := bObjTree.validator.FilterChanges(bObjTree.aclList, collectedChanges, nil, indexes) + require.True(t, filtered) + for _, ch := range filteredChanges { + require.NotEqual(t, unexpectedId, ch.Id) + } + }) + t.Run("add content", func(t *testing.T) { root, err := CreateObjectTreeRoot(ObjectTreeCreatePayload{ PrivKey: keys.SignKey, diff --git a/commonspace/object/tree/objecttree/objecttreevalidator.go b/commonspace/object/tree/objecttree/objecttreevalidator.go index fc6dc6ee..27a5e215 100644 --- a/commonspace/object/tree/objecttree/objecttreevalidator.go +++ b/commonspace/object/tree/objecttree/objecttreevalidator.go @@ -16,7 +16,7 @@ type ObjectTreeValidator interface { ValidateFullTree(tree *Tree, aclList list.AclList) error // ValidateNewChanges should always be entered while holding a read lock on AclList ValidateNewChanges(tree *Tree, aclList list.AclList, newChanges []*Change) error - FilterChanges(aclList list.AclList, heads []string, changes []*Change, snapshots []*Change, indexes []int) (filteredHeads bool, filtered, filteredSnapshots []*Change, newIndexes []int) + FilterChanges(aclList list.AclList, changes []*Change, snapshots []*Change, indexes []int) (filteredHeads bool, filtered, filteredSnapshots []*Change, newIndexes []int) } type noOpTreeValidator struct { @@ -31,7 +31,7 @@ func (n *noOpTreeValidator) ValidateNewChanges(tree *Tree, aclList list.AclList, return nil } -func (n *noOpTreeValidator) FilterChanges(aclList list.AclList, heads []string, changes []*Change, snapshots []*Change, indexes []int) (filteredHeads bool, filtered, filteredSnapshots []*Change, newIndexes []int) { +func (n *noOpTreeValidator) FilterChanges(aclList list.AclList, changes []*Change, snapshots []*Change, indexes []int) (filteredHeads bool, filtered, filteredSnapshots []*Change, newIndexes []int) { if n.filterFunc == nil { return false, changes, snapshots, indexes } @@ -80,7 +80,7 @@ func (v *objectTreeValidator) ValidateNewChanges(tree *Tree, aclList list.AclLis return } -func (v *objectTreeValidator) FilterChanges(aclList list.AclList, heads []string, changes []*Change, snapshots []*Change, indexes []int) (filteredHeads bool, filtered, filteredSnapshots []*Change, newIndexes []int) { +func (v *objectTreeValidator) FilterChanges(aclList list.AclList, changes []*Change, snapshots []*Change, indexes []int) (filteredHeads bool, filtered, filteredSnapshots []*Change, newIndexes []int) { if !v.shouldFilter { return false, changes, snapshots, indexes } @@ -88,18 +88,25 @@ func (v *objectTreeValidator) FilterChanges(aclList list.AclList, heads []string defer aclList.RUnlock() state := aclList.AclState() for idx, c := range changes { - // only taking changes which we can read - if keys, exists := state.Keys()[c.ReadKeyId]; exists && keys.ReadKey != nil { + // this has to be a root + if c.PreviousIds == nil { + newIndexes = append(newIndexes, indexes[idx]) + filtered = append(filtered, c) + filteredSnapshots = append(filteredSnapshots, c) + continue + } + // only taking changes which we can read and for which we have acl heads + if keys, exists := state.Keys()[c.ReadKeyId]; aclList.HasHead(c.AclHeadId) && exists && keys.ReadKey != nil { newIndexes = append(newIndexes, indexes[idx]) filtered = append(filtered, c) if c.IsSnapshot { filteredSnapshots = append(filteredSnapshots, c) } - } else { - // if we filtered at least one change this can be the change between heads and other changes - // thus we cannot use heads - filteredHeads = true + continue } + // if we filtered at least one change this can be the change between heads and other changes + // thus we cannot use heads + filteredHeads = true } return } diff --git a/util/debug/stack.go b/util/debug/stack.go new file mode 100644 index 00000000..a7940649 --- /dev/null +++ b/util/debug/stack.go @@ -0,0 +1,28 @@ +package debug + +import ( + "bytes" + "compress/gzip" + "encoding/base64" + "runtime" +) + +func StackCompact(allGoroutines bool) string { + var buf bytes.Buffer + gz := gzip.NewWriter(&buf) + _, _ = gz.Write(Stack(allGoroutines)) + _ = gz.Close() + + return base64.StdEncoding.EncodeToString(buf.Bytes()) +} + +func Stack(allGoroutines bool) []byte { + buf := make([]byte, 1024) + for { + n := runtime.Stack(buf, allGoroutines) + if n < len(buf) { + return buf[:n] + } + buf = make([]byte, 2*len(buf)) + } +} diff --git a/util/debug/stack_test.go b/util/debug/stack_test.go new file mode 100644 index 00000000..ccb4634f --- /dev/null +++ b/util/debug/stack_test.go @@ -0,0 +1,38 @@ +package debug + +import ( + "bytes" + "compress/gzip" + "encoding/base64" + "strings" + "testing" + + "github.com/stretchr/testify/require" +) + +func TestStack(t *testing.T) { + stack := Stack(true) + require.True(t, strings.Contains(string(stack), "main.main")) +} + +func TestStackCompact(t *testing.T) { + stack := StackCompact(true) + decoded, err := base64.StdEncoding.DecodeString(string(stack)) + require.NoError(t, err) + rd, err := gzip.NewReader(bytes.NewReader(decoded)) + require.NoError(t, err) + var ( + buf = make([]byte, 1024) + res []byte + ) + for { + n, err := rd.Read(buf) + if n > 0 { + res = append(res, buf[:n]...) + } + if err != nil { + break + } + } + require.True(t, strings.Contains(string(res), "main.main")) +} From fab12e7b4a1ca385cc4d041b99367e893acfe0ec Mon Sep 17 00:00:00 2001 From: mcrakhman Date: Sun, 19 May 2024 14:23:04 +0200 Subject: [PATCH 131/140] Fix tests --- .../mock_objecttree/mock_objecttree.go | 38 ------------------- .../object/tree/objecttree/objecttree.go | 7 +++- .../synctree/mock_synctree/mock_synctree.go | 38 ------------------- 3 files changed, 6 insertions(+), 77 deletions(-) diff --git a/commonspace/object/tree/objecttree/mock_objecttree/mock_objecttree.go b/commonspace/object/tree/objecttree/mock_objecttree/mock_objecttree.go index 79cde13a..ad2e0fea 100644 --- a/commonspace/object/tree/objecttree/mock_objecttree/mock_objecttree.go +++ b/commonspace/object/tree/objecttree/mock_objecttree/mock_objecttree.go @@ -318,30 +318,6 @@ func (mr *MockObjectTreeMockRecorder) PrepareChange(arg0 any) *gomock.Call { return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrepareChange", reflect.TypeOf((*MockObjectTree)(nil).PrepareChange), arg0) } -// RLock mocks base method. -func (m *MockObjectTree) RLock() { - m.ctrl.T.Helper() - m.ctrl.Call(m, "RLock") -} - -// RLock indicates an expected call of RLock. -func (mr *MockObjectTreeMockRecorder) RLock() *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RLock", reflect.TypeOf((*MockObjectTree)(nil).RLock)) -} - -// RUnlock mocks base method. -func (m *MockObjectTree) RUnlock() { - m.ctrl.T.Helper() - m.ctrl.Call(m, "RUnlock") -} - -// RUnlock indicates an expected call of RUnlock. -func (mr *MockObjectTreeMockRecorder) RUnlock() *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RUnlock", reflect.TypeOf((*MockObjectTree)(nil).RUnlock)) -} - // Root mocks base method. func (m *MockObjectTree) Root() *objecttree.Change { m.ctrl.T.Helper() @@ -413,20 +389,6 @@ func (mr *MockObjectTreeMockRecorder) TryLock() *gomock.Call { return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TryLock", reflect.TypeOf((*MockObjectTree)(nil).TryLock)) } -// TryRLock mocks base method. -func (m *MockObjectTree) TryRLock() bool { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "TryRLock") - ret0, _ := ret[0].(bool) - return ret0 -} - -// TryRLock indicates an expected call of TryRLock. -func (mr *MockObjectTreeMockRecorder) TryRLock() *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TryRLock", reflect.TypeOf((*MockObjectTree)(nil).TryRLock)) -} - // Unlock mocks base method. func (m *MockObjectTree) Unlock() { m.ctrl.T.Helper() diff --git a/commonspace/object/tree/objecttree/objecttree.go b/commonspace/object/tree/objecttree/objecttree.go index 544e5c2b..36d347de 100644 --- a/commonspace/object/tree/objecttree/objecttree.go +++ b/commonspace/object/tree/objecttree/objecttree.go @@ -47,8 +47,13 @@ type RawChangesPayload struct { type ChangeIterateFunc = func(change *Change) bool type ChangeConvertFunc = func(change *Change, decrypted []byte) (any, error) -type ReadableObjectTree interface { +type TryLocker interface { sync.Locker + TryLock() bool +} + +type ReadableObjectTree interface { + TryLocker Id() string Header() *treechangeproto.RawTreeChangeWithId diff --git a/commonspace/object/tree/synctree/mock_synctree/mock_synctree.go b/commonspace/object/tree/synctree/mock_synctree/mock_synctree.go index ebf3cc79..15b5b689 100644 --- a/commonspace/object/tree/synctree/mock_synctree/mock_synctree.go +++ b/commonspace/object/tree/synctree/mock_synctree/mock_synctree.go @@ -349,30 +349,6 @@ func (mr *MockSyncTreeMockRecorder) PrepareChange(arg0 any) *gomock.Call { return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrepareChange", reflect.TypeOf((*MockSyncTree)(nil).PrepareChange), arg0) } -// RLock mocks base method. -func (m *MockSyncTree) RLock() { - m.ctrl.T.Helper() - m.ctrl.Call(m, "RLock") -} - -// RLock indicates an expected call of RLock. -func (mr *MockSyncTreeMockRecorder) RLock() *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RLock", reflect.TypeOf((*MockSyncTree)(nil).RLock)) -} - -// RUnlock mocks base method. -func (m *MockSyncTree) RUnlock() { - m.ctrl.T.Helper() - m.ctrl.Call(m, "RUnlock") -} - -// RUnlock indicates an expected call of RUnlock. -func (mr *MockSyncTreeMockRecorder) RUnlock() *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RUnlock", reflect.TypeOf((*MockSyncTree)(nil).RUnlock)) -} - // Root mocks base method. func (m *MockSyncTree) Root() *objecttree.Change { m.ctrl.T.Helper() @@ -470,20 +446,6 @@ func (mr *MockSyncTreeMockRecorder) TryLock() *gomock.Call { return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TryLock", reflect.TypeOf((*MockSyncTree)(nil).TryLock)) } -// TryRLock mocks base method. -func (m *MockSyncTree) TryRLock() bool { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "TryRLock") - ret0, _ := ret[0].(bool) - return ret0 -} - -// TryRLock indicates an expected call of TryRLock. -func (mr *MockSyncTreeMockRecorder) TryRLock() *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TryRLock", reflect.TypeOf((*MockSyncTree)(nil).TryRLock)) -} - // Unlock mocks base method. func (m *MockSyncTree) Unlock() { m.ctrl.T.Helper() From 65c8a36a4cb66ff52d00c95e5e1b3b2cb7cc1d1e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 20 May 2024 15:47:37 +0000 Subject: [PATCH 132/140] build(deps): bump github.com/quic-go/quic-go from 0.43.1 to 0.44.0 Bumps [github.com/quic-go/quic-go](https://github.com/quic-go/quic-go) from 0.43.1 to 0.44.0. - [Release notes](https://github.com/quic-go/quic-go/releases) - [Changelog](https://github.com/quic-go/quic-go/blob/master/Changelog.md) - [Commits](https://github.com/quic-go/quic-go/compare/v0.43.1...v0.44.0) --- updated-dependencies: - dependency-name: github.com/quic-go/quic-go dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- go.mod | 10 +++++----- go.sum | 20 ++++++++++---------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/go.mod b/go.mod index 466416a4..85805a3a 100644 --- a/go.mod +++ b/go.mod @@ -26,7 +26,7 @@ require ( github.com/multiformats/go-multibase v0.2.0 github.com/multiformats/go-multihash v0.2.3 github.com/prometheus/client_golang v1.19.1 - github.com/quic-go/quic-go v0.43.1 + github.com/quic-go/quic-go v0.44.0 github.com/stretchr/testify v1.9.0 github.com/tyler-smith/go-bip39 v1.1.0 github.com/zeebo/blake3 v0.2.3 @@ -34,7 +34,7 @@ require ( go.uber.org/mock v0.4.0 go.uber.org/zap v1.27.0 golang.org/x/crypto v0.23.0 - golang.org/x/exp v0.0.0-20240325151524-a685a6edb6d8 + golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 golang.org/x/net v0.25.0 golang.org/x/time v0.5.0 gopkg.in/yaml.v3 v3.0.1 @@ -103,10 +103,10 @@ require ( go.opentelemetry.io/otel/trace v1.14.0 // indirect go.uber.org/multierr v1.11.0 // indirect golang.org/x/image v0.14.0 // indirect - golang.org/x/mod v0.16.0 // indirect - golang.org/x/sync v0.6.0 // indirect + golang.org/x/mod v0.17.0 // indirect + golang.org/x/sync v0.7.0 // indirect golang.org/x/sys v0.20.0 // indirect - golang.org/x/tools v0.19.0 // indirect + golang.org/x/tools v0.21.0 // indirect google.golang.org/protobuf v1.33.0 // indirect lukechampine.com/blake3 v1.2.1 // indirect rsc.io/tmplfunc v0.0.3 // indirect diff --git a/go.sum b/go.sum index 454b4e17..44236ca5 100644 --- a/go.sum +++ b/go.sum @@ -304,8 +304,8 @@ github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= github.com/quic-go/qpack v0.4.0 h1:Cr9BXA1sQS2SmDUWjSofMPNKmvF6IiIfDRmgU0w1ZCo= github.com/quic-go/qpack v0.4.0/go.mod h1:UZVnYIfi5GRk+zI9UMaCPsmZ2xKJP7XBUvVyT1Knj9A= -github.com/quic-go/quic-go v0.43.1 h1:fLiMNfQVe9q2JvSsiXo4fXOEguXHGGl9+6gLp4RPeZQ= -github.com/quic-go/quic-go v0.43.1/go.mod h1:132kz4kL3F9vxhW3CtQJLDVwcFe5wdWeJXXijhsO57M= +github.com/quic-go/quic-go v0.44.0 h1:So5wOr7jyO4vzL2sd8/pD9Kesciv91zSk8BoFngItQ0= +github.com/quic-go/quic-go v0.44.0/go.mod h1:z4cx/9Ny9UtGITIPzmPTXh1ULfOyWh4qGQlpnPcWmek= github.com/quic-go/webtransport-go v0.6.0 h1:CvNsKqc4W2HljHJnoT+rMmbRJybShZ0YPFDD3NxaZLY= github.com/quic-go/webtransport-go v0.6.0/go.mod h1:9KjU4AEBqEQidGHNDkZrb8CAa1abRaosM2yGOyiikEc= github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY= @@ -386,16 +386,16 @@ golang.org/x/crypto v0.0.0-20200602180216-279210d13fed/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.23.0 h1:dIJU/v2J8Mdglj/8rJ6UUOM3Zc9zLZxVZwwxMooUSAI= golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8= -golang.org/x/exp v0.0.0-20240325151524-a685a6edb6d8 h1:aAcj0Da7eBAtrTp03QXWvm88pSyOt+UgdZw2BFZ+lEw= -golang.org/x/exp v0.0.0-20240325151524-a685a6edb6d8/go.mod h1:CQ1k9gNrJ50XIzaKCRR2hssIjF07kZFEiieALBM/ARQ= +golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 h1:vr/HnozRka3pE4EsMEg1lgkXJkTFJCVUX+S/ZT6wYzM= +golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842/go.mod h1:XtvwrStGgqGPLc4cjQfWqZHG1YFdYs6swckp8vpsjnc= golang.org/x/image v0.14.0 h1:tNgSxAFe3jC4uYqvZdTr84SZoM1KfwdC9SKIFrLjFn4= golang.org/x/image v0.14.0/go.mod h1:HUYqC05R2ZcZ3ejNQsIHQDQiwWM4JBqmm6MKANTp4LE= golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.16.0 h1:QX4fJ0Rr5cPQCF7O9lh9Se4pmwfwskqZfq5moyldzic= -golang.org/x/mod v0.16.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA= +golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= @@ -410,8 +410,8 @@ golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ= -golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= +golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -439,8 +439,8 @@ golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.19.0 h1:tfGCXNR1OsFG+sVdLAitlpjAvD/I6dHDKnYrpEZUHkw= -golang.org/x/tools v0.19.0/go.mod h1:qoJWxmGSIBmAeriMx19ogtrEPrGtDbPK634QFIcLAhc= +golang.org/x/tools v0.21.0 h1:qc0xYgIbsSDt9EyWz05J5wfa7LOVW0YTLOXrqdLAWIw= +golang.org/x/tools v0.21.0/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= From d8b93f5aec5f71f5fbbea7dde37590a4f42aa5c4 Mon Sep 17 00:00:00 2001 From: mcrakhman Date: Tue, 21 May 2024 11:12:26 +0200 Subject: [PATCH 133/140] Add locks to prevent logs from appearing --- commonspace/object/tree/objecttree/objecttreevalidator.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/commonspace/object/tree/objecttree/objecttreevalidator.go b/commonspace/object/tree/objecttree/objecttreevalidator.go index 27a5e215..117e0169 100644 --- a/commonspace/object/tree/objecttree/objecttreevalidator.go +++ b/commonspace/object/tree/objecttree/objecttreevalidator.go @@ -169,6 +169,8 @@ func ValidateRawTreeBuildFunc(payload treestorage.TreeStorageCreatePayload, buil if err != nil { return } + tree.Lock() + defer tree.Unlock() res, err := tree.AddRawChanges(context.Background(), RawChangesPayload{ NewHeads: payload.Heads, RawChanges: payload.Changes, @@ -201,6 +203,8 @@ func ValidateFilterRawTree(payload treestorage.TreeStorageCreatePayload, aclList if err != nil { return } + tree.Lock() + defer tree.Unlock() res, err := tree.AddRawChanges(context.Background(), RawChangesPayload{ NewHeads: payload.Heads, RawChanges: payload.Changes, From 9c1b7a82f946c11121b5f2a49655f455e3797729 Mon Sep 17 00:00:00 2001 From: mcrakhman Date: Tue, 21 May 2024 14:44:02 +0200 Subject: [PATCH 134/140] Add more rebuild logs --- commonspace/object/tree/objecttree/objecttree.go | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/commonspace/object/tree/objecttree/objecttree.go b/commonspace/object/tree/objecttree/objecttree.go index 36d347de..498941f9 100644 --- a/commonspace/object/tree/objecttree/objecttree.go +++ b/commonspace/object/tree/objecttree/objecttree.go @@ -342,7 +342,10 @@ func (ot *objectTree) AddRawChanges(ctx context.Context, changesPayload RawChang err = ot.treeStorage.AddRawChangesSetHeads(addResult.Added, addResult.Heads) if err != nil { // rolling back all changes made to inmemory state - ot.rebuildFromStorage(nil, nil) + rebuildErr := ot.rebuildFromStorage(nil, nil) + if rebuildErr != nil { + log.Error("failed to rebuild after adding to storage", zap.Strings("heads", ot.Heads()), zap.Error(rebuildErr)) + } } return } @@ -490,7 +493,11 @@ func (ot *objectTree) addRawChanges(ctx context.Context, changesPayload RawChang if err != nil { // that means that some unattached changes were somehow corrupted in memory // this shouldn't happen but if that happens, then rebuilding from storage - ot.rebuildFromStorage(nil, nil) + rollback(treeChangesAdded) + rebuildErr := ot.rebuildFromStorage(nil, nil) + if rebuildErr != nil { + log.Error("failed to rebuild after add result", zap.Strings("heads", ot.Heads()), zap.Error(rebuildErr)) + } return } return From 9c856abb1f5a4cc29904774bd5dbc6c04094d54c Mon Sep 17 00:00:00 2001 From: mcrakhman Date: Tue, 21 May 2024 14:51:14 +0200 Subject: [PATCH 135/140] Differentiate logs --- commonspace/object/tree/objecttree/objecttree.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commonspace/object/tree/objecttree/objecttree.go b/commonspace/object/tree/objecttree/objecttree.go index 498941f9..63dad661 100644 --- a/commonspace/object/tree/objecttree/objecttree.go +++ b/commonspace/object/tree/objecttree/objecttree.go @@ -496,7 +496,7 @@ func (ot *objectTree) addRawChanges(ctx context.Context, changesPayload RawChang rollback(treeChangesAdded) rebuildErr := ot.rebuildFromStorage(nil, nil) if rebuildErr != nil { - log.Error("failed to rebuild after add result", zap.Strings("heads", ot.Heads()), zap.Error(rebuildErr)) + log.Error("failed to rebuild after add result (add to tree)", zap.Strings("heads", ot.Heads()), zap.Error(rebuildErr)) } return } From 42ce5a250cbac825be3f53b59f2fba6f28fc4554 Mon Sep 17 00:00:00 2001 From: kirillston Date: Wed, 22 May 2024 20:29:41 +0300 Subject: [PATCH 136/140] GO-3511 Add error codes on internal PP failures --- paymentservice/paymentserviceproto/errors.go | 38 +-- .../paymentserviceproto/paymentservice.pb.go | 276 +++++++++--------- .../protos/paymentservice.proto | 4 +- 3 files changed, 165 insertions(+), 153 deletions(-) diff --git a/paymentservice/paymentserviceproto/errors.go b/paymentservice/paymentserviceproto/errors.go index 3888e250..9f1d16dc 100644 --- a/paymentservice/paymentserviceproto/errors.go +++ b/paymentservice/paymentserviceproto/errors.go @@ -9,22 +9,24 @@ import ( var ( errGroup = rpcerr.ErrGroup(ErrorCodes_ErrorOffset) - ErrEthAddressEmpty = errGroup.Register(errors.New("owner eth address is empty"), uint64(ErrorCodes_EthAddressEmpty)) - ErrInvalidSignature = errGroup.Register(errors.New("invalid signature"), uint64(ErrorCodes_InvalidSignature)) - ErrTierWrong = errGroup.Register(errors.New("wrong tier specified"), uint64(ErrorCodes_TierWrong)) - ErrTierNotFound = errGroup.Register(errors.New("requested tier not found"), uint64(ErrorCodes_TierNotFound)) - ErrTierInactive = errGroup.Register(errors.New("requested tier is not active"), uint64(ErrorCodes_TierInactive)) - ErrPaymentMethodWrong = errGroup.Register(errors.New("wrong payment method specified"), uint64(ErrorCodes_PaymentMethodWrong)) - ErrBadAnyName = errGroup.Register(errors.New("bad any name specified"), uint64(ErrorCodes_BadAnyName)) - ErrUnknown = errGroup.Register(errors.New("unknown error"), uint64(ErrorCodes_Unknown)) - ErrSubsAlreadyActive = errGroup.Register(errors.New("user already has an active subscription"), uint64(ErrorCodes_SubsAlreadyActive)) - ErrSubsNotFound = errGroup.Register(errors.New("no subscription for user"), uint64(ErrorCodes_SubsNotFound)) - ErrSubsWrongState = errGroup.Register(errors.New("subscription is not in PendingRequiresFinalization state"), uint64(ErrorCodes_SubsWrongState)) - ErrEmailWrongFormat = errGroup.Register(errors.New("wrong email format"), uint64(ErrorCodes_EmailWrongFormat)) - ErrEmailAlreadyVerified = errGroup.Register(errors.New("email already verified"), uint64(ErrorCodes_EmailAlreadyVerified)) - ErrEmailAlreadySent = errGroup.Register(errors.New("email verification request already sent. wait for the email or try again later"), uint64(ErrorCodes_EmailAlreadySent)) - ErrEmailFailedToSend = errGroup.Register(errors.New("failed to send email"), uint64(ErrorCodes_EmailFailedToSend)) - ErrEmailExpired = errGroup.Register(errors.New("email verification request expired. try getting new code"), uint64(ErrorCodes_EmailExpired)) - ErrEmailWrongCode = errGroup.Register(errors.New("wrong verification code"), uint64(ErrorCodes_EmailWrongCode)) - ErrInvalidReceipt = errGroup.Register(errors.New("invalid AppStore receipt"), uint64(ErrorCodes_InvalidReceipt)) + ErrEthAddressEmpty = errGroup.Register(errors.New("owner eth address is empty"), uint64(ErrorCodes_EthAddressEmpty)) + ErrInvalidSignature = errGroup.Register(errors.New("invalid signature"), uint64(ErrorCodes_InvalidSignature)) + ErrTierWrong = errGroup.Register(errors.New("wrong tier specified"), uint64(ErrorCodes_TierWrong)) + ErrTierNotFound = errGroup.Register(errors.New("requested tier not found"), uint64(ErrorCodes_TierNotFound)) + ErrTierInactive = errGroup.Register(errors.New("requested tier is not active"), uint64(ErrorCodes_TierInactive)) + ErrPaymentMethodWrong = errGroup.Register(errors.New("wrong payment method specified"), uint64(ErrorCodes_PaymentMethodWrong)) + ErrBadAnyName = errGroup.Register(errors.New("bad any name specified"), uint64(ErrorCodes_BadAnyName)) + ErrUnknown = errGroup.Register(errors.New("unknown error"), uint64(ErrorCodes_Unknown)) + ErrSubsAlreadyActive = errGroup.Register(errors.New("user already has an active subscription"), uint64(ErrorCodes_SubsAlreadyActive)) + ErrSubsNotFound = errGroup.Register(errors.New("no subscription for user"), uint64(ErrorCodes_SubsNotFound)) + ErrSubsWrongState = errGroup.Register(errors.New("subscription is not in PendingRequiresFinalization state"), uint64(ErrorCodes_SubsWrongState)) + ErrEmailWrongFormat = errGroup.Register(errors.New("wrong email format"), uint64(ErrorCodes_EmailWrongFormat)) + ErrEmailAlreadyVerified = errGroup.Register(errors.New("email already verified"), uint64(ErrorCodes_EmailAlreadyVerified)) + ErrEmailAlreadySent = errGroup.Register(errors.New("email verification request already sent. wait for the email or try again later"), uint64(ErrorCodes_EmailAlreadySent)) + ErrEmailFailedToSend = errGroup.Register(errors.New("failed to send email"), uint64(ErrorCodes_EmailFailedToSend)) + ErrEmailExpired = errGroup.Register(errors.New("email verification request expired. try getting new code"), uint64(ErrorCodes_EmailExpired)) + ErrEmailWrongCode = errGroup.Register(errors.New("wrong verification code"), uint64(ErrorCodes_EmailWrongCode)) + ErrAppleInvalidReceipt = errGroup.Register(errors.New("invalid AppStore receipt"), uint64(ErrorCodes_AppleInvalidReceipt)) + ErrApplePurchaseRegistration = errGroup.Register(errors.New("invalid AppStore receipt"), uint64(ErrorCodes_ApplePurchaseRegistration)) + ErrAppleSubscriptionRenew = errGroup.Register(errors.New("invalid AppStore receipt"), uint64(ErrorCodes_AppleSubscriptionRenew)) ) diff --git a/paymentservice/paymentserviceproto/paymentservice.pb.go b/paymentservice/paymentserviceproto/paymentservice.pb.go index 68171d00..dec2b86b 100644 --- a/paymentservice/paymentserviceproto/paymentservice.pb.go +++ b/paymentservice/paymentserviceproto/paymentservice.pb.go @@ -152,26 +152,28 @@ func (PaymentMethod) EnumDescriptor() ([]byte, []int) { type ErrorCodes int32 const ( - ErrorCodes_Unexpected ErrorCodes = 0 - ErrorCodes_EthAddressEmpty ErrorCodes = 1 - ErrorCodes_InvalidSignature ErrorCodes = 2 - ErrorCodes_TierWrong ErrorCodes = 3 - ErrorCodes_TierNotFound ErrorCodes = 4 - ErrorCodes_TierInactive ErrorCodes = 5 - ErrorCodes_PaymentMethodWrong ErrorCodes = 6 - ErrorCodes_BadAnyName ErrorCodes = 7 - ErrorCodes_Unknown ErrorCodes = 8 - ErrorCodes_SubsAlreadyActive ErrorCodes = 9 - ErrorCodes_SubsNotFound ErrorCodes = 10 - ErrorCodes_SubsWrongState ErrorCodes = 11 - ErrorCodes_EmailWrongFormat ErrorCodes = 12 - ErrorCodes_EmailAlreadyVerified ErrorCodes = 13 - ErrorCodes_EmailAlreadySent ErrorCodes = 14 - ErrorCodes_EmailFailedToSend ErrorCodes = 15 - ErrorCodes_EmailExpired ErrorCodes = 16 - ErrorCodes_EmailWrongCode ErrorCodes = 17 - ErrorCodes_InvalidReceipt ErrorCodes = 18 - ErrorCodes_ErrorOffset ErrorCodes = 600 + ErrorCodes_Unexpected ErrorCodes = 0 + ErrorCodes_EthAddressEmpty ErrorCodes = 1 + ErrorCodes_InvalidSignature ErrorCodes = 2 + ErrorCodes_TierWrong ErrorCodes = 3 + ErrorCodes_TierNotFound ErrorCodes = 4 + ErrorCodes_TierInactive ErrorCodes = 5 + ErrorCodes_PaymentMethodWrong ErrorCodes = 6 + ErrorCodes_BadAnyName ErrorCodes = 7 + ErrorCodes_Unknown ErrorCodes = 8 + ErrorCodes_SubsAlreadyActive ErrorCodes = 9 + ErrorCodes_SubsNotFound ErrorCodes = 10 + ErrorCodes_SubsWrongState ErrorCodes = 11 + ErrorCodes_EmailWrongFormat ErrorCodes = 12 + ErrorCodes_EmailAlreadyVerified ErrorCodes = 13 + ErrorCodes_EmailAlreadySent ErrorCodes = 14 + ErrorCodes_EmailFailedToSend ErrorCodes = 15 + ErrorCodes_EmailExpired ErrorCodes = 16 + ErrorCodes_EmailWrongCode ErrorCodes = 17 + ErrorCodes_AppleInvalidReceipt ErrorCodes = 18 + ErrorCodes_ApplePurchaseRegistration ErrorCodes = 19 + ErrorCodes_AppleSubscriptionRenew ErrorCodes = 20 + ErrorCodes_ErrorOffset ErrorCodes = 600 ) var ErrorCodes_name = map[int32]string{ @@ -193,31 +195,35 @@ var ErrorCodes_name = map[int32]string{ 15: "EmailFailedToSend", 16: "EmailExpired", 17: "EmailWrongCode", - 18: "InvalidReceipt", + 18: "AppleInvalidReceipt", + 19: "ApplePurchaseRegistration", + 20: "AppleSubscriptionRenew", 600: "ErrorOffset", } var ErrorCodes_value = map[string]int32{ - "Unexpected": 0, - "EthAddressEmpty": 1, - "InvalidSignature": 2, - "TierWrong": 3, - "TierNotFound": 4, - "TierInactive": 5, - "PaymentMethodWrong": 6, - "BadAnyName": 7, - "Unknown": 8, - "SubsAlreadyActive": 9, - "SubsNotFound": 10, - "SubsWrongState": 11, - "EmailWrongFormat": 12, - "EmailAlreadyVerified": 13, - "EmailAlreadySent": 14, - "EmailFailedToSend": 15, - "EmailExpired": 16, - "EmailWrongCode": 17, - "InvalidReceipt": 18, - "ErrorOffset": 600, + "Unexpected": 0, + "EthAddressEmpty": 1, + "InvalidSignature": 2, + "TierWrong": 3, + "TierNotFound": 4, + "TierInactive": 5, + "PaymentMethodWrong": 6, + "BadAnyName": 7, + "Unknown": 8, + "SubsAlreadyActive": 9, + "SubsNotFound": 10, + "SubsWrongState": 11, + "EmailWrongFormat": 12, + "EmailAlreadyVerified": 13, + "EmailAlreadySent": 14, + "EmailFailedToSend": 15, + "EmailExpired": 16, + "EmailWrongCode": 17, + "AppleInvalidReceipt": 18, + "ApplePurchaseRegistration": 19, + "AppleSubscriptionRenew": 20, + "ErrorOffset": 600, } func (x ErrorCodes) String() string { @@ -1586,99 +1592,101 @@ func init() { } var fileDescriptor_4feb29dcc5ba50f6 = []byte{ - // 1457 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x58, 0x5b, 0x6f, 0x1b, 0xc5, - 0x17, 0xf7, 0xfa, 0x96, 0xf8, 0xe4, 0x36, 0x99, 0x38, 0xe9, 0xd6, 0x4d, 0xfc, 0x4f, 0xf7, 0x7f, - 0x8b, 0x82, 0xd8, 0x8a, 0xd2, 0x07, 0x84, 0x10, 0xc2, 0x49, 0x9c, 0x10, 0xa9, 0x84, 0xc8, 0x76, - 0x5b, 0xa0, 0x08, 0xd8, 0x78, 0x4f, 0x92, 0xa5, 0x9b, 0x99, 0x65, 0x76, 0xdc, 0x74, 0xf9, 0x04, - 0xf0, 0x86, 0x84, 0x10, 0x1f, 0x88, 0x17, 0x1e, 0xfb, 0xd8, 0x47, 0x68, 0xbf, 0x00, 0x8f, 0x3c, - 0xa2, 0x99, 0x5d, 0xc7, 0xeb, 0x78, 0xe3, 0x84, 0x46, 0xbc, 0x34, 0x3b, 0xbf, 0x99, 0x73, 0xe6, - 0x9c, 0xdf, 0xb9, 0xcc, 0x71, 0xe1, 0xfd, 0xc0, 0x89, 0x4e, 0x90, 0xc9, 0x10, 0xc5, 0x53, 0xaf, - 0x8b, 0x77, 0x86, 0x97, 0x81, 0xe0, 0x92, 0xdf, 0xd1, 0xff, 0x86, 0xe7, 0xb6, 0x6c, 0x8d, 0xd6, - 0xb6, 0x5e, 0x57, 0xfe, 0x4b, 0xe9, 0xa1, 0x08, 0x63, 0x2d, 0xd6, 0x3b, 0xb0, 0xb4, 0x83, 0xb2, - 0x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, 0xa0, - 0x7f, 0x35, 0x4f, 0x02, 0xa9, 0x6a, 0xa7, 0x0a, 0x24, 0xa9, 0x8e, 0x76, 0x3f, 0x7b, 0x48, 0x9e, - 0xce, 0x40, 0x45, 0xb1, 0xfd, 0x48, 0xc4, 0x55, 0x94, 0xe4, 0xc1, 0x1e, 0x97, 0xdb, 0xbc, 0xc7, - 0x5c, 0x52, 0xec, 0x23, 0xbb, 0xcc, 0x89, 0xd9, 0x2b, 0xa9, 0x68, 0x0e, 0xb1, 0x12, 0xcb, 0x96, - 0x95, 0x15, 0x1b, 0x4e, 0xbf, 0x69, 0x90, 0x09, 0x55, 0x9e, 0xfd, 0xb8, 0x4c, 0x2a, 0xc7, 0x54, - 0x00, 0x1b, 0xbe, 0x40, 0xc7, 0x8d, 0x92, 0x48, 0x54, 0x74, 0x6c, 0x7a, 0x07, 0xe1, 0xd9, 0x7d, - 0xa0, 0x08, 0x54, 0x88, 0x56, 0xaa, 0x82, 0x84, 0x64, 0x4a, 0x99, 0xae, 0xdb, 0xa6, 0x06, 0xb7, - 0xb9, 0x38, 0x71, 0x24, 0x99, 0x56, 0x19, 0xaa, 0xd1, 0x44, 0x67, 0xfc, 0xba, 0xa0, 0x4b, 0x66, - 0xce, 0xce, 0x27, 0x3b, 0x6d, 0x64, 0x92, 0xcc, 0x2a, 0x13, 0x34, 0xba, 0xed, 0x78, 0x3e, 0xba, - 0x1d, 0xde, 0x46, 0xe6, 0x92, 0x39, 0x65, 0x82, 0x86, 0x9b, 0xcf, 0x02, 0x4f, 0xa0, 0x4b, 0x88, - 0x32, 0x61, 0x70, 0x9d, 0x62, 0x98, 0xcc, 0x2b, 0x2c, 0x61, 0x2f, 0x29, 0x30, 0x42, 0x29, 0x81, - 0x29, 0x1d, 0x84, 0x8f, 0x0f, 0x0f, 0x43, 0x94, 0xe4, 0x45, 0xf1, 0xee, 0x9f, 0x25, 0xa8, 0x36, - 0x58, 0x94, 0xd0, 0xb3, 0x2f, 0xb8, 0xea, 0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 0x1b, 0x3f, 0xbc, 0xaa, 0xe7, - 0x9e, 0xbf, 0xaa, 0xe7, 0x5e, 0xbc, 0xaa, 0xe7, 0x3e, 0xb3, 0x2e, 0xff, 0xbf, 0x8a, 0x83, 0xb2, - 0xfe, 0xf3, 0xf6, 0x5f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x52, 0xc6, 0x90, 0x45, 0x18, 0x11, 0x00, - 0x00, + // 1495 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x58, 0x4b, 0x6f, 0x1b, 0x47, + 0x12, 0xe6, 0xf0, 0x25, 0xb1, 0xf4, 0x6a, 0x35, 0x29, 0x79, 0x44, 0x4b, 0x5c, 0x79, 0xf6, 0x25, + 0x68, 0xb1, 0x63, 0xac, 0xd7, 0x87, 0xc5, 0x62, 0xb1, 0x08, 0x25, 0x51, 0x8a, 0x00, 0x47, 0x11, + 0x48, 0xda, 0x4e, 0xe2, 0x20, 0xc9, 0x88, 0x53, 0xa2, 0x26, 0x1e, 0x75, 0x4f, 0x7a, 0x9a, 0x92, + 0x99, 0x5f, 0x90, 0xdc, 0x02, 0xe4, 0x90, 0x1f, 0x94, 0x4b, 0x8e, 0xbe, 0x04, 0xf0, 0x31, 0xb1, + 0xff, 0x40, 0x8e, 0x39, 0x06, 0xdd, 0x33, 0x14, 0x87, 0xe2, 0x88, 0x52, 0x2c, 0xe4, 0x62, 0x4d, + 0x7f, 0xdd, 0x55, 0x5d, 0xf5, 0xd5, 0xa3, 0x8b, 0x86, 0xff, 0x07, 0x4e, 0xff, 0x14, 0x99, 0x0c, + 0x51, 0x9c, 0x79, 0x1d, 0xbc, 0x3f, 0xba, 0x0c, 0x04, 0x97, 0xfc, 0xbe, 0xfe, 0x37, 0xbc, 0xb4, + 0x65, 0x6b, 0xb4, 0xba, 0xf3, 0xb6, 0xf2, 0x9f, 0x4a, 0x0f, 0x45, 0x18, 0x69,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, 0xeb, 0x29, 0xe2, 0xf3, 0x76, 0xa3, 0xd5, 0x26, 0x59, 0x5a, 0x85, 0x65, 0xb5, + 0xb3, 0xcd, 0xb7, 0x05, 0x3a, 0x92, 0x27, 0xf6, 0x72, 0xb4, 0x02, 0x24, 0x29, 0xf5, 0x21, 0x3a, + 0x82, 0xe4, 0xe9, 0x32, 0xd0, 0x51, 0x09, 0x8d, 0x17, 0x54, 0xcc, 0x12, 0xa7, 0x0f, 0xfd, 0x5e, + 0x48, 0x8a, 0x03, 0xb0, 0xce, 0xfa, 0xb2, 0x1f, 0x60, 0x1b, 0x9d, 0x53, 0x32, 0xb5, 0x19, 0x02, + 0x1d, 0x1f, 0xec, 0x54, 0x1c, 0xa3, 0xaf, 0xa1, 0x23, 0x17, 0xd0, 0x21, 0x32, 0xd7, 0x63, 0x5d, + 0x62, 0x28, 0xdf, 0x22, 0xa8, 0xde, 0x91, 0xde, 0x19, 0x92, 0x2c, 0xfd, 0x2b, 0xdc, 0x1b, 0x39, + 0xa4, 0x42, 0xe1, 0x09, 0x0c, 0xe3, 0x57, 0x49, 0x37, 0x28, 0x92, 0xdb, 0xfc, 0xce, 0x80, 0xb9, + 0x91, 0xc9, 0x83, 0xce, 0x03, 0x44, 0x5f, 0xdb, 0x8e, 0x70, 0x23, 0xda, 0xe2, 0xb5, 0xe8, 0x07, + 0x92, 0x13, 0x83, 0x52, 0x98, 0x8f, 0x90, 0x7a, 0x10, 0xf8, 0x78, 0xe8, 0xf4, 0x49, 0x56, 0x79, + 0x14, 0x61, 0x7b, 0x9c, 0x77, 0x23, 0x50, 0x33, 0x95, 0x38, 0xb8, 0xcf, 0x9c, 0x20, 0x88, 0x12, + 0x36, 0x79, 0x34, 0x82, 0x0b, 0xc3, 0x7b, 0x0f, 0x38, 0x43, 0x52, 0xdc, 0xfc, 0x31, 0x07, 0xd0, + 0x10, 0x82, 0x0b, 0x55, 0x2e, 0xa1, 0xda, 0x7e, 0xcc, 0xf0, 0x45, 0x80, 0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, 0x2a, 0xbe, 0x98, 0xc0, 0x2f, + 0x64, 0x3f, 0x81, 0xa5, 0xd4, 0x87, 0x86, 0xfe, 0xd9, 0xbe, 0xfe, 0x79, 0xab, 0xd6, 0xec, 0x89, + 0xaf, 0x94, 0x95, 0xd9, 0xfa, 0xdf, 0x0f, 0xaf, 0x6b, 0xc6, 0xcb, 0xd7, 0x35, 0xe3, 0xa7, 0xd7, + 0x35, 0xe3, 0x9b, 0x37, 0xb5, 0xcc, 0xcb, 0x37, 0xb5, 0xcc, 0xab, 0x37, 0xb5, 0xcc, 0x47, 0xd6, + 0xf5, 0xff, 0xd7, 0x71, 0x54, 0xd4, 0x7f, 0xfe, 0xfd, 0x5b, 0x00, 0x00, 0x00, 0xff, 0xff, 0xf3, + 0xa2, 0x9f, 0x51, 0x58, 0x11, 0x00, 0x00, } func (m *GetSubscriptionRequest) Marshal() (dAtA []byte, err error) { diff --git a/paymentservice/paymentserviceproto/protos/paymentservice.proto b/paymentservice/paymentserviceproto/protos/paymentservice.proto index 725166a9..c2708e0c 100644 --- a/paymentservice/paymentserviceproto/protos/paymentservice.proto +++ b/paymentservice/paymentserviceproto/protos/paymentservice.proto @@ -256,7 +256,9 @@ enum ErrorCodes { EmailExpired = 16; EmailWrongCode = 17; - InvalidReceipt = 18; + AppleInvalidReceipt = 18; + ApplePurchaseRegistration = 19; + AppleSubscriptionRenew = 20; ErrorOffset = 600; } From e32feb3d1a8502615984dd4c504f8749e6366622 Mon Sep 17 00:00:00 2001 From: kirillston Date: Thu, 23 May 2024 00:31:00 +0300 Subject: [PATCH 137/140] GO-3511 Add correct messages --- paymentservice/paymentserviceproto/errors.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/paymentservice/paymentserviceproto/errors.go b/paymentservice/paymentserviceproto/errors.go index 9f1d16dc..00cb6d5d 100644 --- a/paymentservice/paymentserviceproto/errors.go +++ b/paymentservice/paymentserviceproto/errors.go @@ -27,6 +27,6 @@ var ( ErrEmailExpired = errGroup.Register(errors.New("email verification request expired. try getting new code"), uint64(ErrorCodes_EmailExpired)) ErrEmailWrongCode = errGroup.Register(errors.New("wrong verification code"), uint64(ErrorCodes_EmailWrongCode)) ErrAppleInvalidReceipt = errGroup.Register(errors.New("invalid AppStore receipt"), uint64(ErrorCodes_AppleInvalidReceipt)) - ErrApplePurchaseRegistration = errGroup.Register(errors.New("invalid AppStore receipt"), uint64(ErrorCodes_ApplePurchaseRegistration)) - ErrAppleSubscriptionRenew = errGroup.Register(errors.New("invalid AppStore receipt"), uint64(ErrorCodes_AppleSubscriptionRenew)) + ErrApplePurchaseRegistration = errGroup.Register(errors.New("error on purchase registration"), uint64(ErrorCodes_ApplePurchaseRegistration)) + ErrAppleSubscriptionRenew = errGroup.Register(errors.New("error on subscription renew"), uint64(ErrorCodes_AppleSubscriptionRenew)) ) From 2b2512c1c20613b7f836c4e5e6c2257374c037cb Mon Sep 17 00:00:00 2001 From: Anton Akentev Date: Fri, 24 May 2024 14:27:04 +0100 Subject: [PATCH 138/140] GO-2450 Get rid of go-ethereum because it is huge --- go.mod | 16 +-- go.sum | 72 ------------- util/crypto/mnemonic.go | 75 +++++++++++-- util/crypto/mnemonic_test.go | 23 ++-- util/go-ethereum/accounts/hd.go | 180 ++++++++++++++++++++++++++++++++ 5 files changed, 256 insertions(+), 110 deletions(-) create mode 100644 util/go-ethereum/accounts/hd.go diff --git a/go.mod b/go.mod index 85805a3a..7a1347e7 100644 --- a/go.mod +++ b/go.mod @@ -7,9 +7,10 @@ require ( github.com/anyproto/go-chash v0.1.0 github.com/anyproto/go-slip10 v1.0.0 github.com/anyproto/go-slip21 v1.0.0 + github.com/btcsuite/btcd v0.22.1 + github.com/btcsuite/btcutil v1.0.3-0.20201208143702-a53e38424cce github.com/cespare/xxhash v1.1.0 github.com/cheggaaa/mb/v3 v3.0.2 - github.com/ethereum/go-ethereum v1.13.15 github.com/gobwas/glob v0.2.3 github.com/goccy/go-graphviz v0.1.2 github.com/gogo/protobuf v1.3.2 @@ -21,7 +22,6 @@ require ( github.com/ipfs/go-cid v0.4.1 github.com/ipfs/go-ipld-format v0.6.0 github.com/libp2p/go-libp2p v0.33.2 - github.com/miguelmota/go-ethereum-hdwallet v0.1.2 github.com/mr-tron/base58 v1.2.0 github.com/multiformats/go-multibase v0.2.0 github.com/multiformats/go-multihash v0.2.3 @@ -44,20 +44,12 @@ require ( require ( github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 // indirect github.com/beorn7/perks v1.0.1 // indirect - github.com/bits-and-blooms/bitset v1.10.0 // indirect - github.com/btcsuite/btcd v0.22.1 // indirect - github.com/btcsuite/btcd/btcec/v2 v2.2.0 // indirect github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1 // indirect - github.com/btcsuite/btcutil v1.0.3-0.20201208143702-a53e38424cce // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect - github.com/consensys/bavard v0.1.13 // indirect - github.com/consensys/gnark-crypto v0.12.1 // indirect github.com/crackcomm/go-gitignore v0.0.0-20170627025303-887ab5e44cc3 // indirect - github.com/crate-crypto/go-kzg-4844 v0.7.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/davidlazar/go-crypto v0.0.0-20200604182044-b73af7476f6c // indirect github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect - github.com/ethereum/c-kzg-4844 v0.4.0 // indirect github.com/fogleman/gg v1.3.0 // indirect github.com/go-logr/logr v1.4.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect @@ -65,7 +57,6 @@ require ( github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 // indirect github.com/google/pprof v0.0.0-20240402174815-29b9bb013b0f // indirect github.com/hashicorp/golang-lru/v2 v2.0.5 // indirect - github.com/holiman/uint256 v1.2.4 // indirect github.com/ipfs/bbloom v0.0.4 // indirect github.com/ipfs/go-bitfield v1.1.0 // indirect github.com/ipfs/go-datastore v0.6.0 // indirect @@ -81,7 +72,6 @@ require ( github.com/libp2p/go-buffer-pool v0.1.0 // indirect github.com/mattn/go-isatty v0.0.20 // indirect github.com/minio/sha256-simd v1.0.1 // indirect - github.com/mmcloughlin/addchain v0.4.0 // indirect github.com/multiformats/go-base32 v0.1.0 // indirect github.com/multiformats/go-base36 v0.2.0 // indirect github.com/multiformats/go-multiaddr v0.12.3 // indirect @@ -96,7 +86,6 @@ require ( github.com/prometheus/common v0.48.0 // indirect github.com/prometheus/procfs v0.12.0 // indirect github.com/spaolacci/murmur3 v1.1.0 // indirect - github.com/supranational/blst v0.3.11 // indirect github.com/whyrusleeping/chunker v0.0.0-20181014151217-fe64bd25879f // indirect github.com/zeebo/errs v1.3.0 // indirect go.opentelemetry.io/otel v1.14.0 // indirect @@ -109,5 +98,4 @@ require ( golang.org/x/tools v0.21.0 // indirect google.golang.org/protobuf v1.33.0 // indirect lukechampine.com/blake3 v1.2.1 // indirect - rsc.io/tmplfunc v0.0.3 // indirect ) diff --git a/go.sum b/go.sum index 44236ca5..f5655148 100644 --- a/go.sum +++ b/go.sum @@ -1,14 +1,8 @@ filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA= filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/DataDog/zstd v1.4.5 h1:EndNeuB0l9syBZhut0wns3gV1hL8zX8LIu6ZiVHWLIQ= -github.com/DataDog/zstd v1.4.5/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo= github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= -github.com/StackExchange/wmi v1.2.1 h1:VIkavFPXSjcnS+O8yTq7NI32k0R5Aj+v39y29VYDOSA= -github.com/StackExchange/wmi v1.2.1/go.mod h1:rcmrprowKIVzvc+NUiLncP2uuArMWLCbu9SBzvHz7e8= -github.com/VictoriaMetrics/fastcache v1.12.1 h1:i0mICQuojGDL3KblA7wUNlY5lOK6a4bwt3uRKnkZU40= -github.com/VictoriaMetrics/fastcache v1.12.1/go.mod h1:tX04vaqcNoQeGLD+ra5pU5sWkuxnzWhEzLwhP9w653o= github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII= github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 h1:s6gZFSlWYmbqAuRjVTiNNhvNRfY2Wxp9nhfyel4rklc= github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE= @@ -23,13 +17,9 @@ github.com/benbjohnson/clock v1.3.5 h1:VvXlSJBzZpA/zum6Sj74hxwYI2DIxRWuNIoXAzHZz github.com/benbjohnson/clock v1.3.5/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/bits-and-blooms/bitset v1.10.0 h1:ePXTeiPEazB5+opbv5fr8umg2R/1NlzgDsyepwsSr88= -github.com/bits-and-blooms/bitset v1.10.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8= github.com/btcsuite/btcd v0.20.1-beta/go.mod h1:wVuoA8VJLEcwgqHBwHmzLRazpKxTv13Px/pDuV7OomQ= github.com/btcsuite/btcd v0.22.1 h1:CnwP9LM/M9xuRrGSCGeMVs9iv09uMqwsVX7EeIpgV2c= github.com/btcsuite/btcd v0.22.1/go.mod h1:wqgTSL29+50LRkmOVknEdmt8ZojIzhuWvgu/iptuN7Y= -github.com/btcsuite/btcd/btcec/v2 v2.2.0 h1:fzn1qaOt32TuLjFlkzYSsBC35Q3KUjT1SwPxiMSCF5k= -github.com/btcsuite/btcd/btcec/v2 v2.2.0/go.mod h1:U7MHm051Al6XmscBQ0BoNydpOTsFAn707034b5nY8zU= github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1 h1:q0rUy8C/TYNBQS1+CGKw68tLOFYSNEs0TFnxxnS9+4U= github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f/go.mod h1:TdznJufoqS23FtqVCzL0ZqgP5MqXbb4fg/WgDys70nA= @@ -47,31 +37,11 @@ github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cheggaaa/mb/v3 v3.0.2 h1:jd1Xx0zzihZlXL6HmnRXVCI1BHuXz/kY+VzX9WbvNDU= github.com/cheggaaa/mb/v3 v3.0.2/go.mod h1:zCt2QeYukhd/g0bIdNqF+b/kKz1hnLFNDkP49qN5kqI= -github.com/cockroachdb/errors v1.8.1 h1:A5+txlVZfOqFBDa4mGz2bUWSp0aHElvHX2bKkdbQu+Y= -github.com/cockroachdb/errors v1.8.1/go.mod h1:qGwQn6JmZ+oMjuLwjWzUNqblqk0xl4CVV3SQbGwK7Ac= -github.com/cockroachdb/logtags v0.0.0-20190617123548-eb05cc24525f h1:o/kfcElHqOiXqcou5a3rIlMc7oJbMQkeLk0VQJ7zgqY= -github.com/cockroachdb/logtags v0.0.0-20190617123548-eb05cc24525f/go.mod h1:i/u985jwjWRlyHXQbwatDASoW0RMlZ/3i9yJHE2xLkI= -github.com/cockroachdb/pebble v0.0.0-20230928194634-aa077af62593 h1:aPEJyR4rPBvDmeyi+l/FS/VtA00IWvjeFvjen1m1l1A= -github.com/cockroachdb/pebble v0.0.0-20230928194634-aa077af62593/go.mod h1:6hk1eMY/u5t+Cf18q5lFMUA1Rc+Sm5I6Ra1QuPyxXCo= -github.com/cockroachdb/redact v1.0.8 h1:8QG/764wK+vmEYoOlfobpe12EQcS81ukx/a4hdVMxNw= -github.com/cockroachdb/redact v1.0.8/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= -github.com/cockroachdb/sentry-go v0.6.1-cockroachdb.2 h1:IKgmqgMQlVJIZj19CdocBeSfSaiCbEBZGKODaixqtHM= -github.com/cockroachdb/sentry-go v0.6.1-cockroachdb.2/go.mod h1:8BT+cPK6xvFOcRlk0R8eg+OTkcqI6baNH4xAkpiYVvQ= -github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 h1:zuQyyAKVxetITBuuhv3BI9cMrmStnpT18zmgmTxunpo= -github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06/go.mod h1:7nc4anLGjupUW/PeY5qiNYsdNXj7zopG+eqsS7To5IQ= -github.com/consensys/bavard v0.1.13 h1:oLhMLOFGTLdlda/kma4VOJazblc7IM5y5QPd2A/YjhQ= -github.com/consensys/bavard v0.1.13/go.mod h1:9ItSMtA/dXMAiL7BG6bqW2m3NdSEObYWoH223nGHukI= -github.com/consensys/gnark-crypto v0.12.1 h1:lHH39WuuFgVHONRl3J0LRBtuYdQTumFSDtJF7HpyG8M= -github.com/consensys/gnark-crypto v0.12.1/go.mod h1:v2Gy7L/4ZRosZ7Ivs+9SfUDr0f5UlG+EM5t7MPHiLuY= github.com/corona10/goimagehash v1.0.2 h1:pUfB0LnsJASMPGEZLj7tGY251vF+qLGqOgEP4rUs6kA= github.com/corona10/goimagehash v1.0.2/go.mod h1:/l9umBhvcHQXVtQO1V6Gp1yD20STawkhRnnX0D1bvVI= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/crackcomm/go-gitignore v0.0.0-20170627025303-887ab5e44cc3 h1:HVTnpeuvF6Owjd5mniCL8DEXo7uYXdQEmOP4FJbV5tg= github.com/crackcomm/go-gitignore v0.0.0-20170627025303-887ab5e44cc3/go.mod h1:p1d6YEZWvFzEh4KLyvBcVSnrfNDDvK2zfK/4x2v/4pE= -github.com/crate-crypto/go-ipa v0.0.0-20231025140028-3c0104f4b233 h1:d28BXYi+wUpz1KBmiF9bWrjEMacUEREV6MBi2ODnrfQ= -github.com/crate-crypto/go-ipa v0.0.0-20231025140028-3c0104f4b233/go.mod h1:geZJZH3SzKCqnz5VT0q/DyIG/tvu/dZk+VIfXicupJs= -github.com/crate-crypto/go-kzg-4844 v0.7.0 h1:C0vgZRk4q4EZ/JgPfzuSoxdCq3C3mOZMBShovmncxvA= -github.com/crate-crypto/go-kzg-4844 v0.7.0/go.mod h1:1kMhvPgI0Ky3yIa+9lFySEBUBXkYxeOi8ZF1sYioxhc= github.com/cskr/pubsub v1.0.2 h1:vlOzMhl6PFn60gRlTQQsIfVwaPB/B/8MziK8FhEPt/0= github.com/cskr/pubsub v1.0.2/go.mod h1:/8MzYXk/NJAz782G8RPkFzXTZVu63VotefPnR9TIRis= github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -84,10 +54,6 @@ github.com/decred/dcrd/crypto/blake256 v1.0.1 h1:7PltbUIQB7u/FfZ39+DGa/ShuMyJ5il github.com/decred/dcrd/crypto/blake256 v1.0.1/go.mod h1:2OfgNZ5wDpcsFmHmCK5gZTPcCXqlm2ArzUIkw9czNJo= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 h1:8UrgZ3GkP4i/CLijOJx79Yu+etlyjdBU4sfcs2WYQMs= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0/go.mod h1:v57UDF4pDQJcEfFUCRop3lJL149eHGSe9Jvczhzjo/0= -github.com/ethereum/c-kzg-4844 v0.4.0 h1:3MS1s4JtA868KpJxroZoepdV0ZKBp3u/O5HcZ7R3nlY= -github.com/ethereum/c-kzg-4844 v0.4.0/go.mod h1:VewdlzQmpT5QSrVhbBuGoCdFJkpaJlO1aQputP83wc0= -github.com/ethereum/go-ethereum v1.13.15 h1:U7sSGYGo4SPjP6iNIifNoyIAiNjrmQkz6EwQG+/EZWo= -github.com/ethereum/go-ethereum v1.13.15/go.mod h1:TN8ZiHrdJwSe8Cb6x+p0hs5CxhJZPbqB7hHkaUXcmIU= github.com/flynn/noise v1.1.0 h1:KjPQoQCEFdZDiP03phOvGi11+SVVhBG2wOWAorLsstg= github.com/flynn/noise v1.1.0/go.mod h1:xbMo+0i6+IGbYdJhF31t2eR1BIU0CYc12+BNAKwUTag= github.com/fogleman/gg v1.3.0 h1:/7zJX8F6AaYQc57WQCyN9cAIz+4bCJGO9B+dyW29am8= @@ -97,15 +63,11 @@ github.com/francoispqt/gojay v1.2.13/go.mod h1:ehT5mTG4ua4581f1++1WLG0vPdaA9HaiD github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= -github.com/gballet/go-verkle v0.1.1-0.20231031103413-a67434b50f46 h1:BAIP2GihuqhwdILrV+7GJel5lyPV3u1+PgzrWLc0TkE= -github.com/gballet/go-verkle v0.1.1-0.20231031103413-a67434b50f46/go.mod h1:QNpY22eby74jVhqH4WhDLDwxc/vqsern6pW+u2kbkpc= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= -github.com/go-ole/go-ole v1.3.0 h1:Dt6ye7+vXGIKZ7Xtk4s6/xVdGDQynvom7xCFEdWr6uE= -github.com/go-ole/go-ole v1.3.0/go.mod h1:5LS6F96DhAwUc7C+1HLexzMXY1xGRSryjyPPKW6zv78= github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls= github.com/go-yaml/yaml v2.1.0+incompatible/go.mod h1:w2MrLa16VYP0jy6N7M5kHaCkaLENm+P+Tv+MfurjSw0= @@ -113,8 +75,6 @@ github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y= github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= github.com/goccy/go-graphviz v0.1.2 h1:sWSJ6w13BCm/ZOUTHDVrdvbsxqN8yyzaFcHrH/hQ9Yg= github.com/goccy/go-graphviz v0.1.2/go.mod h1:pMYpbAqJT10V8dzV1JN/g/wUlG/0imKPzn3ZsrchGCI= -github.com/gofrs/flock v0.8.1 h1:+gYjHKf32LDeiEEFhQaotPbLuUXjY5ZqxKgXy7n59aw= -github.com/gofrs/flock v0.8.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 h1:DACJavvAHhabrF08vX0COfcOBJRhZ8lUbR+ZWIs0Y5g= @@ -122,15 +82,12 @@ github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGw github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb h1:PBC98N2aIaM3XXiurYmW7fx4GZkL8feAMVq7nEjURHk= -github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gopacket v1.1.19 h1:ves8RnFZPGiFnTS0uPQStjwru6uO6h+nlr9j6fL7kF8= github.com/google/gopacket v1.1.19/go.mod h1:iJ8V8n6KS+z2U1A8pUwu8bW5SyEMkXJB8Yo/Vo+TKTo= github.com/google/pprof v0.0.0-20240402174815-29b9bb013b0f h1:f00RU+zOX+B3rLAmMMkzHUF2h1z4DeYR9tTCvEq2REY= github.com/google/pprof v0.0.0-20240402174815-29b9bb013b0f/go.mod h1:kf6iHlnVGwgKolg33glAes7Yg/8iWP8ukqeldJSO7jw= -github.com/google/subcommands v1.2.0/go.mod h1:ZjhPrFU+Olkh9WazFPsl27BQ4UPiG37m3yTrtFlrHVk= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= @@ -140,8 +97,6 @@ github.com/hashicorp/golang-lru/v2 v2.0.5 h1:wW7h1TG88eUIJ2i69gaE3uNVtEPIagzhGvH github.com/hashicorp/golang-lru/v2 v2.0.5/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= github.com/hashicorp/yamux v0.1.1 h1:yrQxtgseBDrq9Y652vSRDvsKCJKOUD+GzTS4Y0Y8pvE= github.com/hashicorp/yamux v0.1.1/go.mod h1:CtWFDAQgb7dxtzFs4tWbplKIe2jSi3+5vKbgIO0SLnQ= -github.com/holiman/uint256 v1.2.4 h1:jUc4Nk8fm9jZabQuqr2JzednajVmBpC+oiTiXZJEApU= -github.com/holiman/uint256 v1.2.4/go.mod h1:EOMSn4q6Nyt9P6efbI3bueV4e1b3dGlUCXeiRV4ng7E= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/huandu/go-assert v1.1.5 h1:fjemmA7sSfYHJD7CUqs9qTwwfdNAx7/j2/ZlHXzNB3c= github.com/huandu/go-assert v1.1.5/go.mod h1:yOLvuqZwmcHIC5rIzrBhT7D3Q9c3GFnd0JrPVhn/06U= @@ -213,10 +168,6 @@ github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= -github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= -github.com/leanovate/gopter v0.2.9 h1:fQjYxZaynp97ozCzfOyOuAGOU4aU/z37zf/tOujFk7c= -github.com/leanovate/gopter v0.2.9/go.mod h1:U2L/78B+KVFIx2VmW6onHJQzXtFb+p5y3y2Sh+Jxxv8= github.com/libp2p/go-buffer-pool v0.1.0 h1:oK4mSFcQz7cTQIfqbe4MIj9gLW+mnanjyFtc6cdF0Y8= github.com/libp2p/go-buffer-pool v0.1.0/go.mod h1:N+vh8gMqimBzdKkSMVuydVDq+UV5QTWy5HSiZacSbPg= github.com/libp2p/go-libp2p v0.33.2 h1:vCdwnFxoGOXMKmaGHlDSnL4bM3fQeW8pgIa9DECnb40= @@ -238,19 +189,12 @@ github.com/libp2p/go-yamux/v4 v4.0.1/go.mod h1:NWjl8ZTLOGlozrXSOZ/HlfG++39iKNnM5 github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= -github.com/mattn/go-runewidth v0.0.13 h1:lTGmDsbAYt5DmK6OnoV7EuIF1wEIFAcxld6ypU4OSgU= -github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/miekg/dns v1.1.58 h1:ca2Hdkz+cDg/7eNF6V56jjzuZ4aCAE+DbVkILdQWG/4= github.com/miekg/dns v1.1.58/go.mod h1:Ypv+3b/KadlvW9vJfXOTf300O4UqaHFzFCuHz+rPkBY= -github.com/miguelmota/go-ethereum-hdwallet v0.1.2 h1:mz9LO6V7QCRkLYb0AH17t5R8KeqCe3E+hx9YXpmZeXA= -github.com/miguelmota/go-ethereum-hdwallet v0.1.2/go.mod h1:fdNwFSoBFVBPnU0xpOd6l2ueqsPSH/Gch5kIvSvTGk8= github.com/minio/blake2b-simd v0.0.0-20160723061019-3f5f724cb5b1/go.mod h1:pD8RvIylQ358TN4wwqatJ8rNavkEINozVn9DtGI3dfQ= github.com/minio/sha256-simd v0.1.1-0.20190913151208-6de447530771/go.mod h1:B5e1o+1/KgNmWrSQK08Y6Z1Vb5pwIktudl0J58iy0KM= github.com/minio/sha256-simd v1.0.1 h1:6kaan5IFmwTNynnKKpDHe6FWHohJOHhCPchzK49dzMM= github.com/minio/sha256-simd v1.0.1/go.mod h1:Pz6AKMiUdngCLpeTL/RJY1M9rUuPMYujV5xJjtbRSN8= -github.com/mmcloughlin/addchain v0.4.0 h1:SobOdjm2xLj1KkXN5/n0xTIWyZA2+s99UCY1iPfkHRY= -github.com/mmcloughlin/addchain v0.4.0/go.mod h1:A86O+tHqZLMNO4w6ZZ4FlVQEadcoqkyU72HC5wJ4RlU= -github.com/mmcloughlin/profile v0.1.1/go.mod h1:IhHD7q1ooxgwTgjxQYkACGA77oFTDdFVejUS1/tS/qU= github.com/mr-tron/base58 v1.1.3/go.mod h1:BinMc/sQntlIE1frQmRFPUoPA1Zkr8VRgBdjWI2mNwc= github.com/mr-tron/base58 v1.2.0 h1:T/HDJBh4ZCPbU39/+c3rRvE0uKBQlU27+QI8LJ4t64o= github.com/mr-tron/base58 v1.2.0/go.mod h1:BinMc/sQntlIE1frQmRFPUoPA1Zkr8VRgBdjWI2mNwc= @@ -278,8 +222,6 @@ github.com/multiformats/go-varint v0.0.7 h1:sWSGR+f/eu5ABZA2ZpYKBILXTTs9JWpdEM/n github.com/multiformats/go-varint v0.0.7/go.mod h1:r8PUYw/fD/SjBCiKOoDlGF6QawOELpZAu9eioSos/OU= github.com/nfnt/resize v0.0.0-20160724205520-891127d8d1b5 h1:BvoENQQU+fZ9uukda/RzCAL/191HHwJA5b13R6diVlY= github.com/nfnt/resize v0.0.0-20160724205520-891127d8d1b5/go.mod h1:jpp1/29i3P1S/RLdc7JQKbRpFeM1dOBd8T9ki5s+AY8= -github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= -github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo/v2 v2.17.1 h1:V++EzdbhI4ZV4ev0UTIj0PzhzOcReJFyJaLjtSF55M8= @@ -308,13 +250,9 @@ github.com/quic-go/quic-go v0.44.0 h1:So5wOr7jyO4vzL2sd8/pD9Kesciv91zSk8BoFngItQ github.com/quic-go/quic-go v0.44.0/go.mod h1:z4cx/9Ny9UtGITIPzmPTXh1ULfOyWh4qGQlpnPcWmek= github.com/quic-go/webtransport-go v0.6.0 h1:CvNsKqc4W2HljHJnoT+rMmbRJybShZ0YPFDD3NxaZLY= github.com/quic-go/webtransport-go v0.6.0/go.mod h1:9KjU4AEBqEQidGHNDkZrb8CAa1abRaosM2yGOyiikEc= -github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY= -github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible h1:Bn1aCHHRnjv4Bl16T8rcaFjYSrGrIZvpiGO6P3Q4GpU= -github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/smartystreets/assertions v1.2.0 h1:42S6lae5dvLc7BrLu/0ugRtcFVjoJNMC/N3yZFZkDFs= github.com/smartystreets/assertions v1.2.0/go.mod h1:tcbTF8ujkAEcZ8TElKY+i30BzYlVhC/LOxJk7iOWnoo= @@ -330,14 +268,6 @@ github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -github.com/supranational/blst v0.3.11 h1:LyU6FolezeWAhvQk0k6O/d49jqgO52MSDDfYgbeoEm4= -github.com/supranational/blst v0.3.11/go.mod h1:jZJtfjgudtNl4en1tzwPIV3KjUnQUvG3/j+w+fVonLw= -github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 h1:epCh84lMvA70Z7CTTCmYQn2CKbY8j86K7/FAIr141uY= -github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7/go.mod h1:q4W45IWZaF22tdD+VEXcAWRA037jwmWEB5VWYORlTpc= -github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= -github.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0hSfmBq8nJbHYI= -github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk= -github.com/tklauser/numcpus v0.6.1/go.mod h1:1XfjsgE2zo8GVw7POkMbHENHzVg3GzmoZ9fESEdAacY= github.com/tyler-smith/go-bip39 v1.1.0 h1:5eUemwrMargf3BSLRRCalXT93Ns6pQJIjYQN2nyfOP8= github.com/tyler-smith/go-bip39 v1.1.0/go.mod h1:gUYDtqQw1JS3ZJ8UWVcGTGqqr6YIN3CWg+kkNaLt55U= github.com/urfave/cli v1.22.10/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= @@ -464,7 +394,5 @@ gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= lukechampine.com/blake3 v1.2.1 h1:YuqqRuaqsGV71BV/nm9xlI0MKUv4QC54jQnBChWbGnI= lukechampine.com/blake3 v1.2.1/go.mod h1:0OFRp7fBtAylGVCO40o87sbupkyIGgbpv1+M1k1LM6k= -rsc.io/tmplfunc v0.0.3 h1:53XFQh69AfOa8Tw0Jm7t+GV7KZhOi6jzsCzTtKbMvzU= -rsc.io/tmplfunc v0.0.3/go.mod h1:AG3sTPzElb1Io3Yg4voV9AGZJuleGAwaVRxL9M49PhA= storj.io/drpc v0.0.34 h1:q9zlQKfJ5A7x8NQNFk8x7eKUF78FMhmAbZLnFK+og7I= storj.io/drpc v0.0.34/go.mod h1:Y9LZaa8esL1PW2IDMqJE7CFSNq7d5bQ3RI7mGPtmKMg= diff --git a/util/crypto/mnemonic.go b/util/crypto/mnemonic.go index f1565e9d..b1026a4f 100644 --- a/util/crypto/mnemonic.go +++ b/util/crypto/mnemonic.go @@ -6,12 +6,11 @@ import ( "errors" "fmt" + "github.com/anyproto/any-sync/util/go-ethereum/accounts" "github.com/anyproto/go-slip10" + "github.com/btcsuite/btcd/chaincfg" + "github.com/btcsuite/btcutil/hdkeychain" "github.com/tyler-smith/go-bip39" - - hdwallet "github.com/miguelmota/go-ethereum-hdwallet" - - "github.com/ethereum/go-ethereum/common" ) var ( @@ -40,6 +39,9 @@ type DerivationResult struct { OldAccountKey PrivKey MasterNode slip10.Node + // Anytype uses ED25519 + // Ethereum and Bitcoin use ECDSA secp256k1 elliptic curves + // // this key is used to sign ethereum transactions to use Any Naming Service // same mnemonic/seed phrase is used as for AnyType identity // m/44'/60'/0'/0/index @@ -134,7 +136,7 @@ func (m Mnemonic) DeriveKeys(index uint32) (res DerivationResult, err error) { res.OldAccountKey = oldRes.MasterKey // now derive ethereum key - _, pk, err := m.ethereumKeyFromMnemonic(index, defaultEthereumDerivation) + pk, err := m.ethereumKeyFromMnemonic(index, defaultEthereumDerivation) if err != nil { return } @@ -164,10 +166,34 @@ func genKey(node slip10.Node) (key PrivKey, err error) { return } -func (m Mnemonic) ethereumKeyFromMnemonic(index uint32, path string) (addr common.Address, pk *ecdsa.PrivateKey, err error) { +func derivePrivateKey(masterKey *hdkeychain.ExtendedKey, path accounts.DerivationPath) (*ecdsa.PrivateKey, error) { + var err error + key := masterKey + for _, n := range path { + key, err = key.DeriveNonStandard(n) + + if err != nil { + return nil, err + } + } + + privateKey, err := key.ECPrivKey() + privateKeyECDSA := privateKey.ToECDSA() + if err != nil { + return nil, err + } + + return privateKeyECDSA, nil +} + +/* +// this function was using go-ethereum codebase which is huge +// we got rid of it +// +func (m Mnemonic) ethereumKeyFromMnemonic(index uint32, path string) (pk *ecdsa.PrivateKey, err error) { wallet, err := hdwallet.NewFromMnemonic(string(m)) if err != nil { - return common.Address{}, nil, err + return nil, err } // m/44'/60'/0'/0/0 for first account @@ -177,15 +203,42 @@ func (m Mnemonic) ethereumKeyFromMnemonic(index uint32, path string) (addr commo p := hdwallet.MustParseDerivationPath(fullPath) account, err := wallet.Derive(p, false) if err != nil { - return common.Address{}, nil, err + return nil, err } - addr = account.Address + //addr = account.Address pk, err = wallet.PrivateKey(account) if err != nil { - return common.Address{}, nil, err + return nil, err } - return addr, pk, nil + return pk, nil +}*/ + +func (m Mnemonic) ethereumKeyFromMnemonic(index uint32, path string) (pk *ecdsa.PrivateKey, err error) { + seed, err := m.Seed() + if err != nil { + return + } + + masterKey, err := hdkeychain.NewMaster(seed, &chaincfg.MainNetParams) + if err != nil { + return nil, err + } + + // m/44'/60'/0'/0/0 for first account + // m/44'/60'/0'/0/1 for second account, etc + fullPath := fmt.Sprintf("%s/%d", path, index) + p, err := accounts.ParseDerivationPath(fullPath) + if err != nil { + panic(err) + } + + pk, err = derivePrivateKey(masterKey, p) + if err != nil { + return nil, err + } + + return pk, nil } diff --git a/util/crypto/mnemonic_test.go b/util/crypto/mnemonic_test.go index 6c3dc52c..20758f85 100644 --- a/util/crypto/mnemonic_test.go +++ b/util/crypto/mnemonic_test.go @@ -7,9 +7,6 @@ import ( "testing" "github.com/anyproto/go-slip10" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/hexutil" - "github.com/ethereum/go-ethereum/crypto" "github.com/stretchr/testify/require" ) @@ -53,35 +50,35 @@ func TestMnemonic(t *testing.T) { // get address by public key publicKey := res.EthereumIdentity.Public() - publicKeyECDSA, ok := publicKey.(*ecdsa.PublicKey) + _, ok := publicKey.(*ecdsa.PublicKey) require.Equal(t, true, ok) - ethAddress := crypto.PubkeyToAddress(*publicKeyECDSA) - - require.Equal(t, common.HexToAddress("0xC49926C4124cEe1cbA0Ea94Ea31a6c12318df947"), ethAddress) + //ethAddress := crypto.PubkeyToAddress(*publicKeyECDSA) + //require.Equal(t, common.HexToAddress("0xC49926C4124cEe1cbA0Ea94Ea31a6c12318df947"), ethAddress) } +/* +// this test was using go-ethereum codebase which is huge +// we got rid of it func TestMnemonic_ethereumKeyFromMnemonic(t *testing.T) { var badPphrase Mnemonic = "tag volcano" - _, _, err := badPphrase.ethereumKeyFromMnemonic(0, defaultEthereumDerivation) + _, err := badPphrase.ethereumKeyFromMnemonic(0, defaultEthereumDerivation) require.Error(t, err) // good var phrase Mnemonic = "tag volcano eight thank tide danger coast health above argue embrace heavy" - addr, pk, err := phrase.ethereumKeyFromMnemonic(0, defaultEthereumDerivation) + pk, err := phrase.ethereumKeyFromMnemonic(0, defaultEthereumDerivation) require.NoError(t, err) - require.Equal(t, common.HexToAddress("0xC49926C4124cEe1cbA0Ea94Ea31a6c12318df947"), addr) // what wallet.PrivateKeyHex(account) does bytes := crypto.FromECDSA(pk) pkStr := hexutil.Encode(bytes)[2:] require.Equal(t, "63e21d10fd50155dbba0e7d3f7431a400b84b4c2ac1ee38872f82448fe3ecfb9", pkStr) - addr, pk, err = phrase.ethereumKeyFromMnemonic(1, defaultEthereumDerivation) + pk, err = phrase.ethereumKeyFromMnemonic(1, defaultEthereumDerivation) require.NoError(t, err) - require.Equal(t, common.HexToAddress("0x8230645aC28A4EdD1b0B53E7Cd8019744E9dD559"), addr) bytes = crypto.FromECDSA(pk) pkStr = hexutil.Encode(bytes)[2:] require.Equal(t, "b31048b0aa87649bdb9016c0ee28c788ddfc45e52cd71cc0da08c47cb4390ae7", pkStr) -} +}*/ diff --git a/util/go-ethereum/accounts/hd.go b/util/go-ethereum/accounts/hd.go new file mode 100644 index 00000000..daca75eb --- /dev/null +++ b/util/go-ethereum/accounts/hd.go @@ -0,0 +1,180 @@ +// Copyright 2017 The go-ethereum Authors +// This file is part of the go-ethereum library. +// +// The go-ethereum library is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// The go-ethereum library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with the go-ethereum library. If not, see . + +package accounts + +import ( + "encoding/json" + "errors" + "fmt" + "math" + "math/big" + "strings" +) + +// DefaultRootDerivationPath is the root path to which custom derivation endpoints +// are appended. As such, the first account will be at m/44'/60'/0'/0, the second +// at m/44'/60'/0'/1, etc. +var DefaultRootDerivationPath = DerivationPath{0x80000000 + 44, 0x80000000 + 60, 0x80000000 + 0, 0} + +// DefaultBaseDerivationPath is the base path from which custom derivation endpoints +// are incremented. As such, the first account will be at m/44'/60'/0'/0/0, the second +// at m/44'/60'/0'/0/1, etc. +var DefaultBaseDerivationPath = DerivationPath{0x80000000 + 44, 0x80000000 + 60, 0x80000000 + 0, 0, 0} + +// LegacyLedgerBaseDerivationPath is the legacy base path from which custom derivation +// endpoints are incremented. As such, the first account will be at m/44'/60'/0'/0, the +// second at m/44'/60'/0'/1, etc. +var LegacyLedgerBaseDerivationPath = DerivationPath{0x80000000 + 44, 0x80000000 + 60, 0x80000000 + 0, 0} + +// DerivationPath represents the computer friendly version of a hierarchical +// deterministic wallet account derivation path. +// +// The BIP-32 spec https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki +// defines derivation paths to be of the form: +// +// m / purpose' / coin_type' / account' / change / address_index +// +// The BIP-44 spec https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki +// defines that the `purpose` be 44' (or 0x8000002C) for crypto currencies, and +// SLIP-44 https://github.com/satoshilabs/slips/blob/master/slip-0044.md assigns +// the `coin_type` 60' (or 0x8000003C) to Ethereum. +// +// The root path for Ethereum is m/44'/60'/0'/0 according to the specification +// from https://github.com/ethereum/EIPs/issues/84, albeit it's not set in stone +// yet whether accounts should increment the last component or the children of +// that. We will go with the simpler approach of incrementing the last component. +type DerivationPath []uint32 + +// ParseDerivationPath converts a user specified derivation path string to the +// internal binary representation. +// +// Full derivation paths need to start with the `m/` prefix, relative derivation +// paths (which will get appended to the default root path) must not have prefixes +// in front of the first element. Whitespace is ignored. +func ParseDerivationPath(path string) (DerivationPath, error) { + var result DerivationPath + + // Handle absolute or relative paths + components := strings.Split(path, "/") + switch { + case len(components) == 0: + return nil, errors.New("empty derivation path") + + case strings.TrimSpace(components[0]) == "": + return nil, errors.New("ambiguous path: use 'm/' prefix for absolute paths, or no leading '/' for relative ones") + + case strings.TrimSpace(components[0]) == "m": + components = components[1:] + + default: + result = append(result, DefaultRootDerivationPath...) + } + // All remaining components are relative, append one by one + if len(components) == 0 { + return nil, errors.New("empty derivation path") // Empty relative paths + } + for _, component := range components { + // Ignore any user added whitespace + component = strings.TrimSpace(component) + var value uint32 + + // Handle hardened paths + if strings.HasSuffix(component, "'") { + value = 0x80000000 + component = strings.TrimSpace(strings.TrimSuffix(component, "'")) + } + // Handle the non hardened component + bigval, ok := new(big.Int).SetString(component, 0) + if !ok { + return nil, fmt.Errorf("invalid component: %s", component) + } + max := math.MaxUint32 - value + if bigval.Sign() < 0 || bigval.Cmp(big.NewInt(int64(max))) > 0 { + if value == 0 { + return nil, fmt.Errorf("component %v out of allowed range [0, %d]", bigval, max) + } + return nil, fmt.Errorf("component %v out of allowed hardened range [0, %d]", bigval, max) + } + value += uint32(bigval.Uint64()) + + // Append and repeat + result = append(result, value) + } + return result, nil +} + +// String implements the stringer interface, converting a binary derivation path +// to its canonical representation. +func (path DerivationPath) String() string { + result := "m" + for _, component := range path { + var hardened bool + if component >= 0x80000000 { + component -= 0x80000000 + hardened = true + } + result = fmt.Sprintf("%s/%d", result, component) + if hardened { + result += "'" + } + } + return result +} + +// MarshalJSON turns a derivation path into its json-serialized string +func (path DerivationPath) MarshalJSON() ([]byte, error) { + return json.Marshal(path.String()) +} + +// UnmarshalJSON a json-serialized string back into a derivation path +func (path *DerivationPath) UnmarshalJSON(b []byte) error { + var dp string + var err error + if err = json.Unmarshal(b, &dp); err != nil { + return err + } + *path, err = ParseDerivationPath(dp) + return err +} + +// DefaultIterator creates a BIP-32 path iterator, which progresses by increasing the last component: +// i.e. m/44'/60'/0'/0/0, m/44'/60'/0'/0/1, m/44'/60'/0'/0/2, ... m/44'/60'/0'/0/N. +func DefaultIterator(base DerivationPath) func() DerivationPath { + path := make(DerivationPath, len(base)) + copy(path[:], base[:]) + // Set it back by one, so the first call gives the first result + path[len(path)-1]-- + return func() DerivationPath { + path[len(path)-1]++ + return path + } +} + +// LedgerLiveIterator creates a bip44 path iterator for Ledger Live. +// Ledger Live increments the third component rather than the fifth component +// i.e. m/44'/60'/0'/0/0, m/44'/60'/1'/0/0, m/44'/60'/2'/0/0, ... m/44'/60'/N'/0/0. +func LedgerLiveIterator(base DerivationPath) func() DerivationPath { + path := make(DerivationPath, len(base)) + copy(path[:], base[:]) + // Set it back by one, so the first call gives the first result + path[2]-- + return func() DerivationPath { + // ledgerLivePathIterator iterates on the third component + path[2]++ + return path + } +} From ed568338e2cea49be78d32531076aac849ed8b27 Mon Sep 17 00:00:00 2001 From: Anton Akentev Date: Fri, 24 May 2024 17:04:34 +0100 Subject: [PATCH 139/140] code review fixes --- util/crypto/mnemonic.go | 33 +-------- util/crypto/mnemonic_test.go | 29 -------- util/{go-ethereum => ethereum}/accounts/hd.go | 68 ------------------- 3 files changed, 2 insertions(+), 128 deletions(-) rename util/{go-ethereum => ethereum}/accounts/hd.go (66%) diff --git a/util/crypto/mnemonic.go b/util/crypto/mnemonic.go index b1026a4f..9aed9022 100644 --- a/util/crypto/mnemonic.go +++ b/util/crypto/mnemonic.go @@ -6,11 +6,12 @@ import ( "errors" "fmt" - "github.com/anyproto/any-sync/util/go-ethereum/accounts" "github.com/anyproto/go-slip10" "github.com/btcsuite/btcd/chaincfg" "github.com/btcsuite/btcutil/hdkeychain" "github.com/tyler-smith/go-bip39" + + "github.com/anyproto/any-sync/util/ethereum/accounts" ) var ( @@ -186,36 +187,6 @@ func derivePrivateKey(masterKey *hdkeychain.ExtendedKey, path accounts.Derivatio return privateKeyECDSA, nil } -/* -// this function was using go-ethereum codebase which is huge -// we got rid of it -// -func (m Mnemonic) ethereumKeyFromMnemonic(index uint32, path string) (pk *ecdsa.PrivateKey, err error) { - wallet, err := hdwallet.NewFromMnemonic(string(m)) - if err != nil { - return nil, err - } - - // m/44'/60'/0'/0/0 for first account - // m/44'/60'/0'/0/1 for second account, etc - fullPath := fmt.Sprintf("%s/%d", path, index) - - p := hdwallet.MustParseDerivationPath(fullPath) - account, err := wallet.Derive(p, false) - if err != nil { - return nil, err - } - - //addr = account.Address - - pk, err = wallet.PrivateKey(account) - if err != nil { - return nil, err - } - - return pk, nil -}*/ - func (m Mnemonic) ethereumKeyFromMnemonic(index uint32, path string) (pk *ecdsa.PrivateKey, err error) { seed, err := m.Seed() if err != nil { diff --git a/util/crypto/mnemonic_test.go b/util/crypto/mnemonic_test.go index 20758f85..a3bd76ee 100644 --- a/util/crypto/mnemonic_test.go +++ b/util/crypto/mnemonic_test.go @@ -52,33 +52,4 @@ func TestMnemonic(t *testing.T) { publicKey := res.EthereumIdentity.Public() _, ok := publicKey.(*ecdsa.PublicKey) require.Equal(t, true, ok) - //ethAddress := crypto.PubkeyToAddress(*publicKeyECDSA) - //require.Equal(t, common.HexToAddress("0xC49926C4124cEe1cbA0Ea94Ea31a6c12318df947"), ethAddress) } - -/* -// this test was using go-ethereum codebase which is huge -// we got rid of it -func TestMnemonic_ethereumKeyFromMnemonic(t *testing.T) { - var badPphrase Mnemonic = "tag volcano" - _, err := badPphrase.ethereumKeyFromMnemonic(0, defaultEthereumDerivation) - require.Error(t, err) - - // good - var phrase Mnemonic = "tag volcano eight thank tide danger coast health above argue embrace heavy" - - pk, err := phrase.ethereumKeyFromMnemonic(0, defaultEthereumDerivation) - require.NoError(t, err) - - // what wallet.PrivateKeyHex(account) does - bytes := crypto.FromECDSA(pk) - pkStr := hexutil.Encode(bytes)[2:] - require.Equal(t, "63e21d10fd50155dbba0e7d3f7431a400b84b4c2ac1ee38872f82448fe3ecfb9", pkStr) - - pk, err = phrase.ethereumKeyFromMnemonic(1, defaultEthereumDerivation) - require.NoError(t, err) - - bytes = crypto.FromECDSA(pk) - pkStr = hexutil.Encode(bytes)[2:] - require.Equal(t, "b31048b0aa87649bdb9016c0ee28c788ddfc45e52cd71cc0da08c47cb4390ae7", pkStr) -}*/ diff --git a/util/go-ethereum/accounts/hd.go b/util/ethereum/accounts/hd.go similarity index 66% rename from util/go-ethereum/accounts/hd.go rename to util/ethereum/accounts/hd.go index daca75eb..2ec577fc 100644 --- a/util/go-ethereum/accounts/hd.go +++ b/util/ethereum/accounts/hd.go @@ -17,7 +17,6 @@ package accounts import ( - "encoding/json" "errors" "fmt" "math" @@ -35,11 +34,6 @@ var DefaultRootDerivationPath = DerivationPath{0x80000000 + 44, 0x80000000 + 60, // at m/44'/60'/0'/0/1, etc. var DefaultBaseDerivationPath = DerivationPath{0x80000000 + 44, 0x80000000 + 60, 0x80000000 + 0, 0, 0} -// LegacyLedgerBaseDerivationPath is the legacy base path from which custom derivation -// endpoints are incremented. As such, the first account will be at m/44'/60'/0'/0, the -// second at m/44'/60'/0'/1, etc. -var LegacyLedgerBaseDerivationPath = DerivationPath{0x80000000 + 44, 0x80000000 + 60, 0x80000000 + 0, 0} - // DerivationPath represents the computer friendly version of a hierarchical // deterministic wallet account derivation path. // @@ -116,65 +110,3 @@ func ParseDerivationPath(path string) (DerivationPath, error) { } return result, nil } - -// String implements the stringer interface, converting a binary derivation path -// to its canonical representation. -func (path DerivationPath) String() string { - result := "m" - for _, component := range path { - var hardened bool - if component >= 0x80000000 { - component -= 0x80000000 - hardened = true - } - result = fmt.Sprintf("%s/%d", result, component) - if hardened { - result += "'" - } - } - return result -} - -// MarshalJSON turns a derivation path into its json-serialized string -func (path DerivationPath) MarshalJSON() ([]byte, error) { - return json.Marshal(path.String()) -} - -// UnmarshalJSON a json-serialized string back into a derivation path -func (path *DerivationPath) UnmarshalJSON(b []byte) error { - var dp string - var err error - if err = json.Unmarshal(b, &dp); err != nil { - return err - } - *path, err = ParseDerivationPath(dp) - return err -} - -// DefaultIterator creates a BIP-32 path iterator, which progresses by increasing the last component: -// i.e. m/44'/60'/0'/0/0, m/44'/60'/0'/0/1, m/44'/60'/0'/0/2, ... m/44'/60'/0'/0/N. -func DefaultIterator(base DerivationPath) func() DerivationPath { - path := make(DerivationPath, len(base)) - copy(path[:], base[:]) - // Set it back by one, so the first call gives the first result - path[len(path)-1]-- - return func() DerivationPath { - path[len(path)-1]++ - return path - } -} - -// LedgerLiveIterator creates a bip44 path iterator for Ledger Live. -// Ledger Live increments the third component rather than the fifth component -// i.e. m/44'/60'/0'/0/0, m/44'/60'/1'/0/0, m/44'/60'/2'/0/0, ... m/44'/60'/N'/0/0. -func LedgerLiveIterator(base DerivationPath) func() DerivationPath { - path := make(DerivationPath, len(base)) - copy(path[:], base[:]) - // Set it back by one, so the first call gives the first result - path[2]-- - return func() DerivationPath { - // ledgerLivePathIterator iterates on the third component - path[2]++ - return path - } -} From 595765fc38625d32b11095d449b9ab0473cd29c2 Mon Sep 17 00:00:00 2001 From: Anton Akentev Date: Fri, 24 May 2024 17:38:35 +0100 Subject: [PATCH 140/140] add more tests --- go.mod | 1 + go.sum | 4 +- util/crypto/mnemonic_test.go | 86 +++++++++++++++++++++++++++++++++++- 3 files changed, 88 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 7a1347e7..6008fe2b 100644 --- a/go.mod +++ b/go.mod @@ -55,6 +55,7 @@ require ( github.com/go-logr/stdr v1.2.2 // indirect github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 // indirect + github.com/golang/protobuf v1.5.4 // indirect github.com/google/pprof v0.0.0-20240402174815-29b9bb013b0f // indirect github.com/hashicorp/golang-lru/v2 v2.0.5 // indirect github.com/ipfs/bbloom v0.0.4 // indirect diff --git a/go.sum b/go.sum index f5655148..ce5a3407 100644 --- a/go.sum +++ b/go.sum @@ -80,8 +80,8 @@ github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69 github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 h1:DACJavvAHhabrF08vX0COfcOBJRhZ8lUbR+ZWIs0Y5g= github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gopacket v1.1.19 h1:ves8RnFZPGiFnTS0uPQStjwru6uO6h+nlr9j6fL7kF8= diff --git a/util/crypto/mnemonic_test.go b/util/crypto/mnemonic_test.go index a3bd76ee..95af7c42 100644 --- a/util/crypto/mnemonic_test.go +++ b/util/crypto/mnemonic_test.go @@ -2,14 +2,49 @@ package crypto import ( "crypto/ecdsa" + "crypto/elliptic" "crypto/rand" + "encoding/hex" + "fmt" "strings" "testing" "github.com/anyproto/go-slip10" "github.com/stretchr/testify/require" + "golang.org/x/crypto/sha3" ) +func Keccak256(data []byte) []byte { + hash := sha3.NewLegacyKeccak256() + hash.Write(data) + return hash.Sum(nil) +} + +func PublicKeyToAddress(pub *ecdsa.PublicKey) string { + // Serialize the public key to a byte slice + pubBytes := elliptic.Marshal(pub.Curve, pub.X, pub.Y) + + // Compute the Keccak256 hash of the public key (excluding the first byte) + hash := Keccak256(pubBytes[1:]) + + // Take the last 20 bytes of the hash as the address + address := hash[12:] + + return fmt.Sprintf("0x%x", address) +} + +func PrivateKeyToBytes(priv *ecdsa.PrivateKey) []byte { + return priv.D.Bytes() +} + +// Encode encodes b as a hex string with 0x prefix. +func Encode(b []byte) string { + enc := make([]byte, len(b)*2+2) + copy(enc, "0x") + hex.Encode(enc[2:], b) + return string(enc) +} + func TestMnemonic(t *testing.T) { phrase, err := NewMnemonicGenerator().WithWordCount(12) require.NoError(t, err) @@ -50,6 +85,55 @@ func TestMnemonic(t *testing.T) { // get address by public key publicKey := res.EthereumIdentity.Public() - _, ok := publicKey.(*ecdsa.PublicKey) + publicKeyECDSA, ok := publicKey.(*ecdsa.PublicKey) require.Equal(t, true, ok) + + // convert publicKeyECDSA to address + ethAddress := PublicKeyToAddress(publicKeyECDSA) + shouldBe := strings.ToLower("0xC49926C4124cEe1cbA0Ea94Ea31a6c12318df947") + require.Equal(t, shouldBe, ethAddress) +} + +func TestMnemonic_ethereumKeyFromMnemonic(t *testing.T) { + var badPphrase Mnemonic = "tag volcano" + _, err := badPphrase.ethereumKeyFromMnemonic(0, defaultEthereumDerivation) + require.Error(t, err) + + // good + var phrase Mnemonic = "tag volcano eight thank tide danger coast health above argue embrace heavy" + + pk, err := phrase.ethereumKeyFromMnemonic(0, defaultEthereumDerivation) + require.NoError(t, err) + + // check address + publicKey := pk.Public() + publicKeyECDSA, ok := publicKey.(*ecdsa.PublicKey) + require.Equal(t, true, ok) + + // convert publicKeyECDSA to address + ethAddress := PublicKeyToAddress(publicKeyECDSA) + shouldBe := strings.ToLower("0xC49926C4124cEe1cbA0Ea94Ea31a6c12318df947") + require.Equal(t, shouldBe, ethAddress) + + // what wallet.PrivateKeyHex(account) does + bytes := PrivateKeyToBytes(pk) + pkStr := Encode(bytes)[2:] + require.Equal(t, "63e21d10fd50155dbba0e7d3f7431a400b84b4c2ac1ee38872f82448fe3ecfb9", pkStr) + + pk, err = phrase.ethereumKeyFromMnemonic(1, defaultEthereumDerivation) + require.NoError(t, err) + + // check address + publicKey = pk.Public() + publicKeyECDSA, ok = publicKey.(*ecdsa.PublicKey) + require.Equal(t, true, ok) + + // convert publicKeyECDSA to address + ethAddress = PublicKeyToAddress(publicKeyECDSA) + shouldBe = strings.ToLower("0x8230645aC28A4EdD1b0B53E7Cd8019744E9dD559") + require.Equal(t, shouldBe, ethAddress) + + bytes = PrivateKeyToBytes(pk) + pkStr = Encode(bytes)[2:] + require.Equal(t, "b31048b0aa87649bdb9016c0ee28c788ddfc45e52cd71cc0da08c47cb4390ae7", pkStr) }