diff --git a/commonspace/object/acl/syncacl/headupdate.go b/commonspace/object/acl/syncacl/headupdate.go index a7bf2ed29..0cd189a52 100644 --- a/commonspace/object/acl/syncacl/headupdate.go +++ b/commonspace/object/acl/syncacl/headupdate.go @@ -1,6 +1,7 @@ package syncacl import ( + "github.com/anyproto/any-sync/commonspace/spacesyncproto" "github.com/anyproto/any-sync/commonspace/sync/objectsync/objectmessages" "github.com/anyproto/any-sync/consensus/consensusproto" ) @@ -24,6 +25,10 @@ func (h *InnerHeadUpdate) MsgSize() uint64 { return size + uint64(len(h.head)) + uint64(len(h.root.Id)) + uint64(len(h.root.Payload)) } +func (h *InnerHeadUpdate) ObjectType() spacesyncproto.ObjectType { + return spacesyncproto.ObjectType_Acl +} + func (h *InnerHeadUpdate) Prepare() error { logMsg := consensusproto.WrapHeadUpdate(&consensusproto.LogHeadUpdate{ Head: h.head, diff --git a/commonspace/object/tree/synctree/headupdate.go b/commonspace/object/tree/synctree/headupdate.go index e828ae46f..4e847aa09 100644 --- a/commonspace/object/tree/synctree/headupdate.go +++ b/commonspace/object/tree/synctree/headupdate.go @@ -4,6 +4,7 @@ import ( "slices" "github.com/anyproto/any-sync/commonspace/object/tree/treechangeproto" + "github.com/anyproto/any-sync/commonspace/spacesyncproto" "github.com/anyproto/any-sync/commonspace/sync/objectsync/objectmessages" ) @@ -21,6 +22,10 @@ func (h *InnerHeadUpdate) MsgSize() (size uint64) { return uint64(len(h.prepared)) } +func (h *InnerHeadUpdate) ObjectType() spacesyncproto.ObjectType { + return spacesyncproto.ObjectType_Tree +} + func (h *InnerHeadUpdate) Prepare() error { treeMsg := treechangeproto.WrapHeadUpdate(&treechangeproto.TreeHeadUpdate{ Heads: h.heads, diff --git a/commonspace/spacesyncproto/protos/spacesync.proto b/commonspace/spacesyncproto/protos/spacesync.proto index a0d893d6a..2129ef8df 100644 --- a/commonspace/spacesyncproto/protos/spacesync.proto +++ b/commonspace/spacesyncproto/protos/spacesync.proto @@ -79,6 +79,7 @@ message ObjectSyncMessage { string replyId = 3; bytes payload = 4; string objectId = 5; + ObjectType objectType = 6; } // SpacePushRequest is a request to add space on a node containing only one acl record @@ -201,4 +202,11 @@ enum DiffType { Initial = 0; V1 = 1; V2 = 2; -} \ No newline at end of file +} + +// ObjectType is a type of object +enum ObjectType { + Tree = 0; + Acl = 1; + KeyValue = 2; +} diff --git a/commonspace/spacesyncproto/spacesync.pb.go b/commonspace/spacesyncproto/spacesync.pb.go index f5bf4e660..daaa880fa 100644 --- a/commonspace/spacesyncproto/spacesync.pb.go +++ b/commonspace/spacesyncproto/spacesync.pb.go @@ -129,6 +129,35 @@ func (DiffType) EnumDescriptor() ([]byte, []int) { return fileDescriptor_80e49f1f4ac27799, []int{2} } +// ObjectType is a type of object +type ObjectType int32 + +const ( + ObjectType_Tree ObjectType = 0 + ObjectType_Acl ObjectType = 1 + ObjectType_KeyValue ObjectType = 2 +) + +var ObjectType_name = map[int32]string{ + 0: "Tree", + 1: "Acl", + 2: "KeyValue", +} + +var ObjectType_value = map[string]int32{ + "Tree": 0, + "Acl": 1, + "KeyValue": 2, +} + +func (x ObjectType) String() string { + return proto.EnumName(ObjectType_name, int32(x)) +} + +func (ObjectType) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_80e49f1f4ac27799, []int{3} +} + // HeadSyncRange presenting a request for one range type HeadSyncRange struct { From uint64 `protobuf:"varint,1,opt,name=from,proto3" json:"from,omitempty"` @@ -468,11 +497,12 @@ func (m *HeadSyncResponse) GetDiffType() DiffType { // ObjectSyncMessage is a message sent on object sync type ObjectSyncMessage struct { - SpaceId string `protobuf:"bytes,1,opt,name=spaceId,proto3" json:"spaceId,omitempty"` - RequestId string `protobuf:"bytes,2,opt,name=requestId,proto3" json:"requestId,omitempty"` - ReplyId string `protobuf:"bytes,3,opt,name=replyId,proto3" json:"replyId,omitempty"` - Payload []byte `protobuf:"bytes,4,opt,name=payload,proto3" json:"payload,omitempty"` - ObjectId string `protobuf:"bytes,5,opt,name=objectId,proto3" json:"objectId,omitempty"` + SpaceId string `protobuf:"bytes,1,opt,name=spaceId,proto3" json:"spaceId,omitempty"` + RequestId string `protobuf:"bytes,2,opt,name=requestId,proto3" json:"requestId,omitempty"` + ReplyId string `protobuf:"bytes,3,opt,name=replyId,proto3" json:"replyId,omitempty"` + Payload []byte `protobuf:"bytes,4,opt,name=payload,proto3" json:"payload,omitempty"` + ObjectId string `protobuf:"bytes,5,opt,name=objectId,proto3" json:"objectId,omitempty"` + ObjectType ObjectType `protobuf:"varint,6,opt,name=objectType,proto3,enum=spacesync.ObjectType" json:"objectType,omitempty"` } func (m *ObjectSyncMessage) Reset() { *m = ObjectSyncMessage{} } @@ -551,6 +581,13 @@ func (m *ObjectSyncMessage) GetObjectId() string { return "" } +func (m *ObjectSyncMessage) GetObjectType() ObjectType { + if m != nil { + return m.ObjectType + } + return ObjectType_Tree +} + // SpacePushRequest is a request to add space on a node containing only one acl record type SpacePushRequest struct { Payload *SpacePayload `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"` @@ -1687,6 +1724,7 @@ func init() { proto.RegisterEnum("spacesync.ErrCodes", ErrCodes_name, ErrCodes_value) proto.RegisterEnum("spacesync.SpaceSubscriptionAction", SpaceSubscriptionAction_name, SpaceSubscriptionAction_value) proto.RegisterEnum("spacesync.DiffType", DiffType_name, DiffType_value) + proto.RegisterEnum("spacesync.ObjectType", ObjectType_name, ObjectType_value) proto.RegisterType((*HeadSyncRange)(nil), "spacesync.HeadSyncRange") proto.RegisterType((*HeadSyncResult)(nil), "spacesync.HeadSyncResult") proto.RegisterType((*HeadSyncResultElement)(nil), "spacesync.HeadSyncResultElement") @@ -1718,89 +1756,92 @@ func init() { } var fileDescriptor_80e49f1f4ac27799 = []byte{ - // 1298 bytes of a gzipped FileDescriptorProto + // 1348 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x57, 0xcb, 0x73, 0xdb, 0x44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xbb, 0x32, 0xef, 0x26, - 0x4e, 0x48, 0x21, 0x99, 0x90, 0x99, 0x1f, 0x12, 0x57, 0x0e, 0x91, 0x81, 0x13, 0x52, 0xcc, 0x57, - 0x28, 0x03, 0xb0, 0xdd, 0xce, 0xaa, 0x34, 0x4a, 0x69, 0x8b, 0x82, 0x39, 0x14, 0x8e, 0x8f, 0xa7, - 0x6c, 0x94, 0x34, 0x6a, 0x3b, 0x43, 0x12, 0xb1, 0xad, 0x0d, 0x36, 0x73, 0x19, 0xc6, 0xda, 0xb1, - 0x38, 0x73, 0xd1, 0x03, 0xd8, 0x8d, 0xa8, 0x4b, 0x03, 0xee, 0x11, 0x5f, 0x46, 0x6d, 0xe0, 0x1c, - 0xc7, 0xda, 0x80, 0xeb, 0x39, 0x37, 0x71, 0xfd, 0x2d, 0x2b, 0xf5, 0xed, 0xfb, 0x89, 0xef, 0xb9, - 0xe1, 0xb2, 0x9e, 0xa6, 0x86, 0x42, 0x47, 0x35, 0xee, 0xff, 0x07, 0x68, 0xfd, 0xa8, 0x83, 0x91, - 0x97, 0xa0, 0x1d, 0x58, 0x93, 0x36, 0xa2, 0xcf, 0x34, 0x52, 0x38, 0x77, 0x72, 0x38, 0x98, 0xbc, - 0x1e, 0x66, 0x0a, 0x2f, 0x3d, 0x3e, 0xb2, 0x5d, 0x9c, 0xb7, 0x11, 0x49, 0x13, 0xc7, 0x57, 0x80, - 0x49, 0xd2, 0x19, 0x07, 0x59, 0x60, 0x64, 0x54, 0xda, 0xb0, 0x02, 0x0f, 0x0d, 0xa0, 0x2d, 0x21, - 0x87, 0x94, 0x73, 0x2f, 0x38, 0x63, 0xc7, 0x85, 0x16, 0x96, 0xca, 0xd0, 0xc7, 0x70, 0xb3, 0x8c, - 0x9f, 0x76, 0x77, 0x89, 0xd4, 0xfa, 0x43, 0x83, 0xb5, 0x5c, 0x4a, 0x62, 0x2e, 0x3c, 0xd9, 0x20, - 0x3e, 0x53, 0xdb, 0x24, 0xa5, 0xc5, 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0xf6, 0xa3, 0x68, 0x37, 0x74, 0x29, 0x43, 0x2d, 0x80, 0x17, 0x01, 0x3d, 0x9f, 0x50, - 0x87, 0x53, 0xd7, 0xac, 0x20, 0x53, 0xed, 0xfa, 0x43, 0x8f, 0x31, 0x2f, 0x38, 0x33, 0x35, 0x74, - 0x4d, 0x4d, 0xf4, 0xfe, 0xb9, 0xc7, 0x38, 0x33, 0x75, 0xb4, 0x01, 0xd7, 0x24, 0xe3, 0x59, 0xc8, - 0xed, 0x60, 0x97, 0x38, 0x23, 0x6a, 0xae, 0x20, 0x04, 0x2d, 0xc9, 0xb4, 0x59, 0x3c, 0xf9, 0xae, - 0x59, 0x45, 0x1d, 0x68, 0xcb, 0x09, 0x64, 0xcf, 0x42, 0xae, 0xe2, 0xf2, 0x4e, 0x7c, 0x6a, 0xae, - 0xa2, 0x36, 0x98, 0x98, 0x3a, 0xd4, 0x9b, 0x70, 0x9b, 0xd9, 0xc1, 0x2b, 0xe2, 0x7b, 0xae, 0x59, - 0x13, 0x18, 0x8a, 0x50, 0x2b, 0xca, 0xac, 0x0b, 0xcd, 0xbd, 0x69, 0xbc, 0xfa, 0xa8, 0xaa, 0x93, - 0xd9, 0x40, 0xb7, 0x60, 0xf3, 0x79, 0x18, 0x1e, 0x92, 0x60, 0xa6, 0x78, 0xec, 0x69, 0x14, 0x8e, - 0x85, 0x33, 0xb3, 0x29, 0x02, 0xde, 0x8f, 0xa2, 0x30, 0x3a, 0x3a, 0x3d, 0x65, 0x94, 0x9b, 0xee, - 0xdd, 0x47, 0xb0, 0xb9, 0x64, 0x56, 0xd0, 0x3a, 0x34, 0x15, 0xf7, 0x84, 0x9a, 0x15, 0x61, 0xfa, - 0x22, 0x60, 0x29, 0x43, 0xbb, 0xfb, 0x21, 0x34, 0x92, 0x77, 0x09, 0x5a, 0x83, 0xba, 0x1d, 0x78, - 0xe2, 0x4e, 0x36, 0x2b, 0xa8, 0x06, 0xfa, 0xd7, 0xdb, 0xa6, 0x26, 0x7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x81, 0x27, 0xf3, + 0x6e, 0xe2, 0x94, 0x14, 0x92, 0x31, 0x99, 0x06, 0x11, 0xf1, 0xe4, 0x10, 0x59, 0x38, 0x25, 0xc5, + 0x7c, 0x45, 0x32, 0x80, 0x81, 0xd7, 0x59, 0x96, 0x46, 0x19, 0x8d, 0x3e, 0x01, 0x48, 0xbe, 0x65, + 0x42, 0x35, 0x99, 0xd0, 0xba, 0x96, 0xd0, 0x51, 0x26, 0xc4, 0x9a, 0xa2, 0x43, 0xc1, 0x1e, 0x0a, + 0x9d, 0xe3, 0x09, 0x3b, 0x4f, 0xfb, 0xbb, 0x9d, 0x07, 0x20, 0x52, 0x5a, 0xd9, 0xd9, 0xd0, 0x70, + 0x12, 0xed, 0x44, 0x9c, 0x47, 0xd6, 0x03, 0xd8, 0x8b, 0xa9, 0x47, 0x43, 0xee, 0x93, 0x40, 0x26, + 0x6b, 0x61, 0x8d, 0xe3, 0xac, 0xc1, 0x65, 0xcd, 0x4d, 0xd2, 0x36, 0xc7, 0xc9, 0x7c, 0x07, 0x41, + 0xea, 0x7b, 0x66, 0x26, 0x9d, 0xfb, 0x99, 0xa1, 0xd0, 0x51, 0xfd, 0xfe, 0xff, 0x01, 0x3a, 0x3f, + 0x9a, 0x60, 0xe9, 0x12, 0xb4, 0x0b, 0x2b, 0xd2, 0x46, 0x8c, 0x07, 0x8d, 0x15, 0xce, 0x75, 0x0d, + 0x07, 0x93, 0x17, 0xc3, 0x5c, 0xe1, 0x99, 0xcf, 0xcf, 0x07, 0x1e, 0xd6, 0x6d, 0x44, 0xd2, 0xc4, + 0x0d, 0x14, 0x60, 0x9a, 0x74, 0xce, 0x41, 0x0e, 0x58, 0x39, 0x95, 0xf5, 0xb9, 0xc0, 0x43, 0x3b, + 0xd0, 0x96, 0x90, 0x43, 0xca, 0xb9, 0x1f, 0x9e, 0xb1, 0xe3, 0x42, 0xe7, 0x4b, 0x65, 0xe8, 0x53, + 0xb8, 0x52, 0xc6, 0xcf, 0x86, 0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 0xac, 0x90, + 0x60, 0xde, 0xfb, 0xf8, 0xb7, 0x57, 0x3d, 0xe3, 0xe5, 0xab, 0x9e, 0xf1, 0xd7, 0xab, 0x9e, 0xf1, + 0xcb, 0xeb, 0x5e, 0xe5, 0xe5, 0xeb, 0x5e, 0xe5, 0xcf, 0xd7, 0xbd, 0xca, 0x37, 0xdd, 0xc5, 0xff, + 0x10, 0x9e, 0xd4, 0xe4, 0xcf, 0xed, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0x1a, 0x58, 0xa1, 0xcd, + 0x35, 0x0e, 0x00, 0x00, } func (m *HeadSyncRange) Marshal() (dAtA []byte, err error) { @@ -2048,6 +2089,11 @@ func (m *ObjectSyncMessage) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.ObjectType != 0 { + i = encodeVarintSpacesync(dAtA, i, uint64(m.ObjectType)) + i-- + dAtA[i] = 0x30 + } if len(m.ObjectId) > 0 { i -= len(m.ObjectId) copy(dAtA[i:], m.ObjectId) @@ -2953,6 +2999,9 @@ func (m *ObjectSyncMessage) Size() (n int) { if l > 0 { n += 1 + l + sovSpacesync(uint64(l)) } + if m.ObjectType != 0 { + n += 1 + sovSpacesync(uint64(m.ObjectType)) + } return n } @@ -4099,6 +4148,25 @@ func (m *ObjectSyncMessage) Unmarshal(dAtA []byte) error { } m.ObjectId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ObjectType", wireType) + } + m.ObjectType = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSpacesync + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ObjectType |= ObjectType(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipSpacesync(dAtA[iNdEx:]) diff --git a/commonspace/sync/objectsync/objectmessages/headupdate.go b/commonspace/sync/objectsync/objectmessages/headupdate.go index 2d9c3e02c..e8510f0e3 100644 --- a/commonspace/sync/objectsync/objectmessages/headupdate.go +++ b/commonspace/sync/objectsync/objectmessages/headupdate.go @@ -39,6 +39,7 @@ type InnerHeadUpdate interface { Prepare() error Heads() []string MsgSize() uint64 + ObjectType() spacesyncproto.ObjectType } type ObjectMeta struct { @@ -48,10 +49,11 @@ type ObjectMeta struct { } type HeadUpdate struct { - Meta ObjectMeta - Bytes []byte - Update InnerHeadUpdate - msg *spacesyncproto.ObjectSyncMessage + Meta ObjectMeta + Bytes []byte + Update InnerHeadUpdate + objectType spacesyncproto.ObjectType + msg *spacesyncproto.ObjectSyncMessage } func (h *HeadUpdate) MsgSize() uint64 { @@ -84,6 +86,7 @@ func (h *HeadUpdate) SetProtoMessage(message proto.Message) error { h.Bytes = msg.GetPayload() h.Meta.SpaceId = msg.SpaceId h.Meta.ObjectId = msg.ObjectId + h.objectType = msg.GetObjectType() return nil } @@ -94,14 +97,19 @@ func (h *HeadUpdate) ProtoMessage() (proto.Message, error) { return nil, err } return &spacesyncproto.ObjectSyncMessage{ - SpaceId: h.Meta.SpaceId, - Payload: payload, - ObjectId: h.Meta.ObjectId, + SpaceId: h.Meta.SpaceId, + Payload: payload, + ObjectId: h.Meta.ObjectId, + ObjectType: h.Update.ObjectType(), }, nil } return NewMessage(), nil } +func (h *HeadUpdate) ObjectType() spacesyncproto.ObjectType { + return h.objectType +} + func (h *HeadUpdate) SpaceId() string { return h.Meta.SpaceId } @@ -116,9 +124,10 @@ func (h *HeadUpdate) ObjectId() string { func (h *HeadUpdate) Copy() drpc.Message { return &HeadUpdate{ - Meta: h.Meta, - Bytes: h.Bytes, - Update: h.Update, - msg: h.msg, + Meta: h.Meta, + Bytes: h.Bytes, + Update: h.Update, + msg: h.msg, + objectType: h.objectType, } } diff --git a/commonspace/sync/sync.go b/commonspace/sync/sync.go index b58d75dbf..bbc173fb8 100644 --- a/commonspace/sync/sync.go +++ b/commonspace/sync/sync.go @@ -12,6 +12,7 @@ import ( "github.com/anyproto/any-sync/app/logger" "github.com/anyproto/any-sync/commonspace/peermanager" "github.com/anyproto/any-sync/commonspace/spacestate" + "github.com/anyproto/any-sync/commonspace/spacesyncproto" "github.com/anyproto/any-sync/commonspace/sync/syncdeps" "github.com/anyproto/any-sync/metric" "github.com/anyproto/any-sync/nodeconf" @@ -117,6 +118,9 @@ func (s *syncService) HandleMessage(ctx context.Context, msg drpc.Message) error if !ok { return ErrUnexpectedMessage } + if idMsg.ObjectType() == spacesyncproto.ObjectType_KeyValue { + return nil + } objectId := idMsg.ObjectId() err := s.receiveQueue.Add(ctx, objectId, msgCtx{ ctx: ctx, diff --git a/commonspace/sync/sync_test.go b/commonspace/sync/sync_test.go index c1070c18a..7a2fbe0bc 100644 --- a/commonspace/sync/sync_test.go +++ b/commonspace/sync/sync_test.go @@ -115,6 +115,14 @@ func TestSyncService(t *testing.T) { } require.Equal(t, headUpdate, f.syncHandler.headUpdate) }) + t.Run("handle key value message no op", func(t *testing.T) { + f := newFixture(t) + headUpdate := &testMessage{objectId: "objectId", objectType: spacesyncproto.ObjectType_KeyValue} + err := f.HandleMessage(ctx, headUpdate) + require.NoError(t, err) + f.Close(t) + require.Nil(t, f.syncHandler.headUpdate) + }) t.Run("handle message", func(t *testing.T) { f := newFixture(t) f.syncHandler.toReceiveData = map[string][]*testResponse{ @@ -386,7 +394,12 @@ func (r *testRequest) MsgSize() uint64 { } type testMessage struct { - objectId string + objectId string + objectType spacesyncproto.ObjectType +} + +func (t *testMessage) ObjectType() spacesyncproto.ObjectType { + return t.objectType } func (t *testMessage) ObjectId() string { diff --git a/commonspace/sync/syncdeps/message.go b/commonspace/sync/syncdeps/message.go index c18440987..26a0fac33 100644 --- a/commonspace/sync/syncdeps/message.go +++ b/commonspace/sync/syncdeps/message.go @@ -1,6 +1,9 @@ package syncdeps +import "github.com/anyproto/any-sync/commonspace/spacesyncproto" + type Message interface { ObjectId() string MsgSize() uint64 + ObjectType() spacesyncproto.ObjectType } diff --git a/net/secureservice/secureservice.go b/net/secureservice/secureservice.go index 046434ab0..3f38e5da2 100644 --- a/net/secureservice/secureservice.go +++ b/net/secureservice/secureservice.go @@ -30,12 +30,14 @@ var ( // ProtoVersion 3 - acl with breaking changes / multiplayer // ProtoVersion 4 - new sync compatible version // ProtoVersion 5 - sync with no entry space + // ProtoVersion 6 - sync with key value messages CompatibleVersion = uint32(4) ProtoVersion = uint32(5) + KeyValueVersion = uint32(6) ) var ( - compatibleVersions = []uint32{CompatibleVersion, ProtoVersion} + compatibleVersions = []uint32{CompatibleVersion, ProtoVersion, KeyValueVersion} ) func New() SecureService {