From 438d6b3eb0fadd1b352b9e68880bd5bcab8f16d0 Mon Sep 17 00:00:00 2001 From: Mateo Miccino Date: Tue, 26 Sep 2023 10:16:36 -0300 Subject: [PATCH 1/2] refactor: remove unused bff protos (#177) --- README.md | 12 +-- .../bff/authentication_service.proto | 39 --------- .../bff/comms_director_service.proto | 33 -------- proto/decentraland/bff/comms_service.proto | 25 ------ proto/decentraland/bff/http_endpoints.proto | 81 ------------------- proto/decentraland/bff/topics_service.proto | 34 -------- public/bff-services.proto | 16 ---- 7 files changed, 1 insertion(+), 239 deletions(-) delete mode 100644 proto/decentraland/bff/authentication_service.proto delete mode 100644 proto/decentraland/bff/comms_director_service.proto delete mode 100644 proto/decentraland/bff/comms_service.proto delete mode 100644 proto/decentraland/bff/http_endpoints.proto delete mode 100644 proto/decentraland/bff/topics_service.proto delete mode 100644 public/bff-services.proto diff --git a/README.md b/README.md index 0bf501ad..598bdb0b 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ protoc \ --dcl_ts_proto_out="$(pwd)/out-ts" \ -I="$(pwd)/node_modules/@dcl/protocol/public" \ -I="$(pwd)/node_modules/@dcl/protocol/proto" \ - "$(pwd)/node_modules/@dcl/protocol/public/bff-services.proto" + "$(pwd)/node_modules/@dcl/protocol/public/sdk-components.proto" ``` # Style Guidelines @@ -64,16 +64,6 @@ Some guidelines and testing before merge: Repositories: [kernel](https://github.com/decentraland/kernel/), [js-sdk-toolchain](https://github.com/decentraland/js-sdk-toolchain/) and [scene-runtime](https://github.com/decentraland/scene-runtime/) In this case, there is no problem with when each PR is merged. It's recommendable to merge first the rpc server-side (in this case, Kernel), second the `scene-runtime` (and this would require a second update from `kernel`) and last the `js-sdk-toolchain`. -## Renderer protocol (RPC) - -Repositories: [kernel](https://github.com/decentraland/kernel/) and [unity-renderer](https://github.com/decentraland/unity-renderer/) - -TODO - -## BFF - -TODO - ## Comms TODO diff --git a/proto/decentraland/bff/authentication_service.proto b/proto/decentraland/bff/authentication_service.proto deleted file mode 100644 index 2df28cb5..00000000 --- a/proto/decentraland/bff/authentication_service.proto +++ /dev/null @@ -1,39 +0,0 @@ -syntax = "proto3"; - -import "google/protobuf/empty.proto"; - -package decentraland.bff; - -enum DisconnectionReason { - DR_KICKED = 0; -} - -message GetChallengeRequest { - string address = 1; -} - -message GetChallengeResponse { - string challenge_to_sign = 1; - bool already_connected = 2; -} - -message SignedChallenge { - string auth_chain_json = 1; -} - -message WelcomePeerInformation { - string peer_id = 1; - - // list of available modules in this BFF - repeated string available_modules = 2; -} - -message DisconnectionMessage { - DisconnectionReason reason = 1; -} - -service BffAuthenticationService { - rpc GetChallenge(GetChallengeRequest) returns (GetChallengeResponse) {} - rpc Authenticate(SignedChallenge) returns (WelcomePeerInformation) {} - rpc GetDisconnectionMessage(google.protobuf.Empty) returns (DisconnectionMessage) {} -} diff --git a/proto/decentraland/bff/comms_director_service.proto b/proto/decentraland/bff/comms_director_service.proto deleted file mode 100644 index 345a7ba3..00000000 --- a/proto/decentraland/bff/comms_director_service.proto +++ /dev/null @@ -1,33 +0,0 @@ -syntax = "proto3"; - -// CommsDirector are formalized at https://rfc.decentraland.org/adr/ADR-81 - -import "google/protobuf/empty.proto"; -import "decentraland/common/vectors.proto"; - -package decentraland.bff; - -message WorldCommand { - oneof command { - SetCommsAdapter set_comms_adapter = 1; - } -} - -message SetCommsAdapter { - string connection_string = 1; -} - -message Heartbeat { - decentraland.common.Position position = 1; - optional string desired_room = 2; -} - -service CommsDirectorService { - // every couple seconds AND at the beginning, the explorers must send a heartbeat - // to make the comms director aware of their location - rpc SendHeartbeat(Heartbeat) returns (google.protobuf.Empty) {} - - // before sending the first heartbeat, it is required that the explorers subscribe - // to a list of comms commands - rpc GetCommsCommands(google.protobuf.Empty) returns (stream WorldCommand) {} -} diff --git a/proto/decentraland/bff/comms_service.proto b/proto/decentraland/bff/comms_service.proto deleted file mode 100644 index e261bc48..00000000 --- a/proto/decentraland/bff/comms_service.proto +++ /dev/null @@ -1,25 +0,0 @@ -syntax = "proto3"; -package decentraland.bff; - -import "decentraland/bff/topics_service.proto"; - -message Subscription { - uint32 subscription_id = 1; -} - -message UnsubscriptionResult { - bool ok = 1; -} - -service CommsService { - rpc SubscribeToPeerMessages(SubscriptionRequest) returns (Subscription) {} - rpc GetPeerMessages(Subscription) returns (stream PeerTopicSubscriptionResultElem) {} - rpc UnsubscribeToPeerMessages(Subscription) returns (UnsubscriptionResult) {} - - rpc SubscribeToSystemMessages(SubscriptionRequest) returns (Subscription) {} - rpc GetSystemMessages(Subscription) returns (stream SystemTopicSubscriptionResultElem) {} - rpc UnsubscribeToSystemMessages(Subscription) returns (UnsubscriptionResult) {} - - // send a peer message to a topic - rpc PublishToTopic(PublishToTopicRequest) returns (PublishToTopicResult) {} -} \ No newline at end of file diff --git a/proto/decentraland/bff/http_endpoints.proto b/proto/decentraland/bff/http_endpoints.proto deleted file mode 100644 index a017eb60..00000000 --- a/proto/decentraland/bff/http_endpoints.proto +++ /dev/null @@ -1,81 +0,0 @@ -syntax = "proto3"; -package decentraland.bff; - -import "google/protobuf/empty.proto"; - -message AboutResponse { - bool healthy = 1; - AboutConfiguration configurations = 2; - ContentInfo content = 3; - CommsInfo comms = 4; - LambdasInfo lambdas = 5; - optional BffInfo bff = 6; - bool accepting_users = 7; - - message MinimapConfiguration { - bool enabled = 1; - optional string data_image = 2; - optional string estate_image = 3; - } - - message SkyboxConfiguration { - // only one value at a time - optional float fixed_hour = 1; - repeated string textures = 2; - } - - message AboutConfiguration { - optional string realm_name = 1; - uint32 network_id = 2; - repeated string global_scenes_urn = 3; - repeated string scenes_urn = 4; - optional MinimapConfiguration minimap = 5; - optional SkyboxConfiguration skybox = 6; - - // A content server to be used to load the parcels around the user. Uses the POST /entities/active endpoint - // to continously fetch the parcels around the users. if null, then the default content server will be used - // if == "" then the city_loader will be disabled and the scenes_urn will be used to load the world - optional string city_loader_content_server = 7; - } - - message ContentInfo { - // common properties - bool healthy = 1; - optional string version = 2; - optional string commit_hash = 3; - string public_url = 4; - } - message LambdasInfo { - // common properties - bool healthy = 1; - optional string version = 2; - optional string commit_hash = 3; - string public_url = 4; - } - message CommsInfo { - // common properties - bool healthy = 1; - optional string version = 2; - optional string commit_hash = 3; - optional string public_url = 4; - // specific properties - string protocol = 50; - optional int32 users_count = 51; - optional string fixed_adapter = 52; - } - message BffInfo { - // common properties - bool healthy = 1; - optional string version = 2; - optional string commit_hash = 3; - string public_url = 4; - // specific properties - optional int32 user_count = 51; - optional string protocol_version = 52; - } -} - -service HttpEndpoints { - // Returns the status and configuration of the bff microservice - rpc About(google.protobuf.Empty) returns (AboutResponse) {} -} diff --git a/proto/decentraland/bff/topics_service.proto b/proto/decentraland/bff/topics_service.proto deleted file mode 100644 index 6f0ad32b..00000000 --- a/proto/decentraland/bff/topics_service.proto +++ /dev/null @@ -1,34 +0,0 @@ -syntax = "proto3"; -package decentraland.bff; - -message SubscriptionRequest { - string topic = 1; -} - -message PeerTopicSubscriptionResultElem { - bytes payload = 1; - string topic = 2; - string sender = 3; -} - -message SystemTopicSubscriptionResultElem { - bytes payload = 1; - string topic = 2; -} - -message PublishToTopicRequest { - string topic = 1; - bytes payload = 2; -} - -message PublishToTopicResult { - bool ok = 1; -} - -service TopicsService { - rpc PeerSubscription(SubscriptionRequest) returns (stream PeerTopicSubscriptionResultElem) {} - rpc SystemSubscription(SubscriptionRequest) returns (stream SystemTopicSubscriptionResultElem) {} - - // send a peer message to a topic - rpc PublishToTopic(PublishToTopicRequest) returns (PublishToTopicResult) {} -} diff --git a/public/bff-services.proto b/public/bff-services.proto deleted file mode 100644 index 57baad1a..00000000 --- a/public/bff-services.proto +++ /dev/null @@ -1,16 +0,0 @@ -syntax = "proto3"; - -// This version is used to check compatibility between Kernel<>BFF -// Update it manually using semantic versioning. Patches may be skipped. -package v1_0_0; - -// This file only imports all the services for the BFF to help the compiler -// resolve all dependencies - -import public "decentraland/bff/authentication_service.proto"; -import public "decentraland/bff/http_endpoints.proto"; -import public "decentraland/bff/topics_service.proto"; -import public "decentraland/bff/comms_director_service.proto"; - -// TO BE DELETED -import public "decentraland/bff/comms_service.proto"; \ No newline at end of file From a9a962adc727481961dad2d379121a912672cae5 Mon Sep 17 00:00:00 2001 From: pbosio Date: Tue, 26 Sep 2023 11:50:38 -0300 Subject: [PATCH 2/2] fix: deprecate Animator's state name property (#178) --- proto/decentraland/sdk/components/animator.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proto/decentraland/sdk/components/animator.proto b/proto/decentraland/sdk/components/animator.proto index 6e51ef0b..b7649aec 100644 --- a/proto/decentraland/sdk/components/animator.proto +++ b/proto/decentraland/sdk/components/animator.proto @@ -16,7 +16,7 @@ message PBAnimator { // AnimationState indicates the status and configuration of one available animation. message PBAnimationState { - string name = 1; // the identifier for this animation, to use in scene code + reserved 1; // deprecated `name` prop string clip = 2; // the animation path in the `files` array of the scene manifest optional bool playing = 3; // whether this animation is currently playing optional float weight = 4; // the "weight" of this animation (see below, default: 1.0)