feat: Pulse with quantization#429
Open
lorux0 wants to merge 90 commits into
Open
Conversation
* Initial draft of LightSource component * Fixed conflicting ids * Refactor structure * Fixed ids * Removed unused property and adjusted ids again * Fixed color reference * Fixed lowecase to oneof name * Test to fix proto builds * Renamed file to properly generate classes with the intended name * Updated documentation * Added cookie field * Added missing import * Fixed proper type reference * Set optional properties, improved documentation * Updated shadow mask type to TextureUnion * Reordered properties to support different defaults on different messages
* feat: Concept of friendships * feat: Only friend requests need id * feat: change order of props for compatibility * feat: New stream FriendUpdate (online, offline, away in the future) * feat: Missing changes after merge * feat: Get Friends and Mutual responses include data from their profile * feat: Friendship request response also include profile data * fix: change string for bool on has claimed name * refactor: Rename stream friend connectivity updates subscription and response * feat: Additional data in upsert and updates responses * feat: Add None Friendship Status
feat: avatar_target param addition in movePlayerTo (#248) Added avatar_target param in movePlayerTo
* feat: RPCs for blocking feature * refactor: Enhance block unblock response * refactor: Rename Profile to UserProfile * feat: Add RPC GetBlockingStatus * refactor: GetBlockingStatus with empty payload * refactor: GetBlockingStatusResponse has two array of addresses * refactor: New type BlockedUserProfile * feat: Add SubscribeToBlockUpdates rpc * feat: New FriendshipStatus BlockedBy * feat: Add clearer error messages to block/unblock responses * feat: Add Block update to FriendshipUpdate message type
* feat: Social settings * fix: Missing props in the unblock response --------- Co-authored-by: Kevin Szuchet <kevin.szuchet@decentraland.org>
feat: Include isFriend when receiving privacy settings
* feat: Add optional from in Chat * refactor: Rename field + comment * chore: enhance comment * chore: fix typo
feat: add z-index and opacity support for ui elements (#266) * Added z index property to ui transform * Update property id As per protocol-squad's request, I updated the index to match their implementation * Added opacity property --------- Signed-off-by: Alejandro Alvarez Melucci <163010988+AlejandroAlvarezMelucciDCL@users.noreply.github.com>
* feat: Add new errors * fix: Update protobuf to a more recent version * fix: Update deps * fix: Outout information about protobufjs * fix: Use fixed protobuf version * feat: Add Start Private Voice chat procedure * feat: Add forbidden error * feat: Add Accept Private Voice Chat messages * feat: Add more properties to the accept response * feat: Add voice chat rejection to the protocol * fix: Remove forbidden from voice chat rejection response * feat: Add private voice subscription updates * fix: Use User as callee * fix: Temporarily remove the subscription RPC call * feat: Add End Call message * fix: Add the not found error to the end private voice chat call * feat: Add get incoming private voice chat request * fix: Override protbuf with older versio * fix: Protobuf types * feat: Add subscription call * fix: Add Yarn or NPM * feat: Add Private Voice Chat credenetials * fix: Change the credentials to return the connection url
Co-authored-by: Kevin Szuchet <kevin.szuchet@decentraland.org>
* feat: add z-index and opacity support for ui elements (#266) * Added z index property to ui transform * Update property id As per protocol-squad's request, I updated the index to match their implementation Signed-off-by: Alejandro Alvarez Melucci <163010988+AlejandroAlvarezMelucciDCL@users.noreply.github.com> * Added opacity property --------- Signed-off-by: Alejandro Alvarez Melucci <163010988+AlejandroAlvarezMelucciDCL@users.noreply.github.com> * feat: control day/night cycle (#277) * Added PBSkyboxTime. * Fixed typo * Lint pass fix * Added documentation * Fixed implementation to comply with ADR 259 * Removed unintended comment --------- Signed-off-by: Alejandro Alvarez Melucci <163010988+AlejandroAlvarezMelucciDCL@users.noreply.github.com>
* add timestamp into emotes & instant into movement * fix retro compatibility * removed incremental id * add is_emoting flag --------- Co-authored-by: Vitaly Popuzin <popuzin@gmail.com> Co-authored-by: Vitaly Popuzin <35366872+popuz@users.noreply.github.com>
chore: sync main to experimental
edited light proto
* feat: add communities voice chat proto objects * feat: add SubscribeToCommunityVoiceChatUpdates * feat: add eof * feat: remove chat_id * feat: add community voice chat actions (#287) * feat: add ended status to CommunityVoiceChatUpdate (#293) * feat: add ended status to CommunityVoiceChatUpdate * feat: add CommunityVoiceChatStatus * feat: choose another name --------- Co-authored-by: Kevin Szuchet <31735779+kevinszuchet@users.noreply.github.com>
* feat: add communities voice chat proto objects * feat: add SubscribeToCommunityVoiceChatUpdates * feat: add eof * feat: remove chat_id * feat: add community voice chat actions (#287) * feat: add ended status to CommunityVoiceChatUpdate (#293) * feat: add ended status to CommunityVoiceChatUpdate * feat: add CommunityVoiceChatStatus * feat: choose another name * feat: experimental branch - control day night cycle (#278) * feat: Enhance errors on Social Service definition * refactor: Try splitting into a new version * refactor: Move errors to new file * feat: Avoid exposing social service v3 * chore: Remove deprecated comment * style: Add spaces between messages + missing eof --------- Co-authored-by: Juanma Hidalgo <juanma06@gmail.com> Co-authored-by: Alejandro Alvarez Melucci <163010988+AlejandroAlvarezMelucciDCL@users.noreply.github.com>
* feat: add positions array to the CommunityVoiceChatUpdate * feat: add community fields needed as well * feat: remove the voice_chat_id * feat: add worlds
Signed-off-by: Pravus <pravusjif@gmail.com>
chore: sync main to experimental
chore: sync main to experimental
chore: sync main to experimental
fix: update oddish-action to support npm Trusted Publishing (OIDC) The old oddish-action version always writes _authToken to .npmrc, which prevents npm from falling through to OIDC-based Trusted Publishing. This caused E404 on publish after npm invalidated granular tokens that bypass 2FA. Update to the latest oddish-action that detects OIDC availability and remove NODE_AUTH_TOKEN so npm uses Trusted Publishing instead.
* fix: install npm@11 for Trusted Publishing OIDC auth The GitHub Actions runner ships npm 10.9.8, which does not support tokenless Trusted Publishing (OIDC) auth. npm 11 is required. Without this, `npm publish --provenance` fails with ENEEDAUTH. Matches the working pattern from decentraland/marketplace. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix: add setup-node 24 and fix repository.url for provenance - Add actions/setup-node with node-version 24 (ships npm 11.x for Trusted Publishing OIDC support) - Replace npm@11 corepack workaround with proper Node 24 setup - Fix package.json repository field to full object format required for npm provenance verification Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * chore: bump actions/checkout and actions/setup-node to v6 Both actions now use the node24 runtime, replacing the node20 runtime that is being phased out. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
chore: sync main to experimental
Signed-off-by: Pravus <pravusjif@gmail.com>
chore: sync main to experimental
* Add Quantization as a protobuf plugin * pulse_comms.proto Signed-off-by: Mikhail Agapov <mikhail.agapov@decentraland.org> * add server message & handshake response * add player state full/delta * add player joined message * add player joined into server message * add player state into client message * Update protobufjs to 7.5.4 to resolve the problem with namespaces * proto/google/ is no longer created or published, so both buf (CI) and protoc (consumers like unity-explorer) resolve descriptor.proto from their own built-in includes — which all have the correct csharp_namespace Signed-off-by: Mikhail Agapov <mikhail.agapov@decentraland.org> * fix: exclude proto/google from npm package to fix C# codegen namespace Revert protobufjs to 7.2.4 (7.5.4 breaks buf and proto-compatibility-tool with newer reserved syntax) and restore the make install copy step for local tooling. Change "files" from "proto" to "proto/decentraland" so the stripped google/protobuf/descriptor.proto (missing csharp_namespace option) is no longer published. Consumers' protoc resolves descriptor.proto from its own built-in includes which have the correct option csharp_namespace = "Google.Protobuf.Reflection". Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Adjust states encoding * Add quantization example for PlayerStateDelta Signed-off-by: Mikhail Agapov <mikhail.agapov@decentraland.org> * Copy protoc-gen-bitwise to the output package * Make Quantize.cs compitable with Unity Signed-off-by: Mikhail Agapov <mikhail.agapov@decentraland.org> * Isolate PlayerState as a reusable component Signed-off-by: Mikhail Agapov <mikhail.agapov@decentraland.org> * Add requried quntizationfor delta Signed-off-by: Mikhail Agapov <mikhail.agapov@decentraland.org> * Add RESYNC_REQUEST Signed-off-by: Mikhail Agapov <mikhail.agapov@decentraland.org> * ProfileVersionAnnouncement - parcel_index change uint32 -> int32 Signed-off-by: Mikhail Agapov <mikhail.agapov@decentraland.org> * add emote messages * add duration on EmoteStart for one shot emotes * Fix MovementBlend Range Signed-off-by: Mikhail Agapov <mikhail.agapov@decentraland.org> * add teleport messages * Add "jump_count" Signed-off-by: Mikhail Agapov <mikhail.agapov@decentraland.org> * add teleport ClientMessage & ServerMessage * Add BaselineSeq to delta Signed-off-by: Mikhail Agapov <mikhail.agapov@decentraland.org> * add parcel index & player state in teleport * add head yaw and head pitch to state flags * Add `sequence` to `EmoteStarted` Signed-off-by: Mikhail Agapov <mikhail.agapov@decentraland.org> * add player state into EmoteStart * Add seq and PlayerState to `EmoteStopped` Signed-off-by: Mikhail Agapov <mikhail.agapov@decentraland.org> * Add "realm" field to "TeleportRequest" Signed-off-by: Mikhail Agapov <mikhail.agapov@decentraland.org> * Split pulse_comms into separate files Signed-off-by: Mikhail Agapov <mikhail.agapov@decentraland.org> * Add Initial State to HandshakeRequest - It's needed to properly authorize reconnection in the middle of the session Signed-off-by: Mikhail Agapov <mikhail.agapov@decentraland.org> * Add support for "pointing at" Signed-off-by: Mikhail Agapov <mikhail.agapov@decentraland.org> * Change "Point At" to the absolute value Signed-off-by: Mikhail Agapov <mikhail.agapov@decentraland.org> * Add "realm" to the initial state Signed-off-by: Mikhail Agapov <mikhail.agapov@decentraland.org> * Change head_pitch max from 180 to 360 Signed-off-by: Mikhail Agapov <mikhail.agapov@decentraland.org> * emote mask --------- Signed-off-by: Mikhail Agapov <mikhail.agapov@decentraland.org> Co-authored-by: Nicolas Lorusso <nalorusso@gmail.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Rewrite the protoc-gen-bitwise plugin from Python to a dependency-free
Node implementation, so protocol generation needs only `node` on PATH —
no Python interpreter and no `protobuf` pip package.
- plugin.js stdin/stdout protoc plugin entry; advertises
FEATURE_PROTO3_OPTIONAL
- wire.js self-contained protobuf wire codec for
CodeGeneratorRequest/Response (no runtime deps)
- options.js parser for the custom quantized / bit_packed options
- generator_csharp.js C# partial-class generator with faithful %g float
formatting; output is byte-for-byte identical to the
Python plugin
- test/ + `npm run gen:test` golden-fixture parity test
- remove plugin.py, generator_csharp.py, options_pb2.py
- package.json ship only the .js + C# runtime (exclude test fixtures)
- README.md, CLAUDE.md Python -> Node prerequisites and invocation
Verified byte-identical regeneration three ways: protoc end-to-end, a
Pulse clean-room rebuild (all 16 generated files), and unity-explorer
build-protocol. Consumers invoke the plugin via a tiny `node plugin.js`
wrapper (.cmd on Windows, shell script elsewhere).
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
chore: sync main to experimental
Co-authored-by: gon boedo <gonzalo@dclregenesislabs.xyz>
* Add Quantization as a protobuf plugin * pulse_comms.proto Signed-off-by: Mikhail Agapov <mikhail.agapov@decentraland.org> * add server message & handshake response * add player state full/delta * add player joined message * add player joined into server message * add player state into client message * Update protobufjs to 7.5.4 to resolve the problem with namespaces * proto/google/ is no longer created or published, so both buf (CI) and protoc (consumers like unity-explorer) resolve descriptor.proto from their own built-in includes — which all have the correct csharp_namespace Signed-off-by: Mikhail Agapov <mikhail.agapov@decentraland.org> * fix: exclude proto/google from npm package to fix C# codegen namespace Revert protobufjs to 7.2.4 (7.5.4 breaks buf and proto-compatibility-tool with newer reserved syntax) and restore the make install copy step for local tooling. Change "files" from "proto" to "proto/decentraland" so the stripped google/protobuf/descriptor.proto (missing csharp_namespace option) is no longer published. Consumers' protoc resolves descriptor.proto from its own built-in includes which have the correct option csharp_namespace = "Google.Protobuf.Reflection". Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Adjust states encoding * Add quantization example for PlayerStateDelta Signed-off-by: Mikhail Agapov <mikhail.agapov@decentraland.org> * Copy protoc-gen-bitwise to the output package * Make Quantize.cs compitable with Unity Signed-off-by: Mikhail Agapov <mikhail.agapov@decentraland.org> * Isolate PlayerState as a reusable component Signed-off-by: Mikhail Agapov <mikhail.agapov@decentraland.org> * Add requried quntizationfor delta Signed-off-by: Mikhail Agapov <mikhail.agapov@decentraland.org> * Add RESYNC_REQUEST Signed-off-by: Mikhail Agapov <mikhail.agapov@decentraland.org> * ProfileVersionAnnouncement - parcel_index change uint32 -> int32 Signed-off-by: Mikhail Agapov <mikhail.agapov@decentraland.org> * add emote messages * add duration on EmoteStart for one shot emotes * Fix MovementBlend Range Signed-off-by: Mikhail Agapov <mikhail.agapov@decentraland.org> * add teleport messages * Add "jump_count" Signed-off-by: Mikhail Agapov <mikhail.agapov@decentraland.org> * add teleport ClientMessage & ServerMessage * Add BaselineSeq to delta Signed-off-by: Mikhail Agapov <mikhail.agapov@decentraland.org> * add parcel index & player state in teleport * add head yaw and head pitch to state flags * Add `sequence` to `EmoteStarted` Signed-off-by: Mikhail Agapov <mikhail.agapov@decentraland.org> * add player state into EmoteStart * Add seq and PlayerState to `EmoteStopped` Signed-off-by: Mikhail Agapov <mikhail.agapov@decentraland.org> * Add "realm" field to "TeleportRequest" Signed-off-by: Mikhail Agapov <mikhail.agapov@decentraland.org> * Split pulse_comms into separate files Signed-off-by: Mikhail Agapov <mikhail.agapov@decentraland.org> * Add Initial State to HandshakeRequest - It's needed to properly authorize reconnection in the middle of the session Signed-off-by: Mikhail Agapov <mikhail.agapov@decentraland.org> * Add support for "pointing at" Signed-off-by: Mikhail Agapov <mikhail.agapov@decentraland.org> * Change "Point At" to the absolute value Signed-off-by: Mikhail Agapov <mikhail.agapov@decentraland.org> * Add "realm" to the initial state Signed-off-by: Mikhail Agapov <mikhail.agapov@decentraland.org> * Change head_pitch max from 180 to 360 Signed-off-by: Mikhail Agapov <mikhail.agapov@decentraland.org> * emote mask --------- Signed-off-by: Mikhail Agapov <mikhail.agapov@decentraland.org> Co-authored-by: Nicolas Lorusso <nalorusso@gmail.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Test this pull request on NPM or Yarn
|
Rewrite the protoc-gen-bitwise plugin from Python to a dependency-free
Node implementation, so protocol generation needs only `node` on PATH —
no Python interpreter and no `protobuf` pip package.
- plugin.js stdin/stdout protoc plugin entry; advertises
FEATURE_PROTO3_OPTIONAL
- wire.js self-contained protobuf wire codec for
CodeGeneratorRequest/Response (no runtime deps)
- options.js parser for the custom quantized / bit_packed options
- generator_csharp.js C# partial-class generator with faithful %g float
formatting; output is byte-for-byte identical to the
Python plugin
- test/ + `npm run gen:test` golden-fixture parity test
- remove plugin.py, generator_csharp.py, options_pb2.py
- package.json ship only the .js + C# runtime (exclude test fixtures)
- README.md, CLAUDE.md Python -> Node prerequisites and invocation
Verified byte-identical regeneration three ways: protoc end-to-end, a
Pulse clean-room rebuild (all 16 generated files), and unity-explorer
build-protocol. Consumers invoke the plugin via a tiny `node plugin.js`
wrapper (.cmd on Windows, shell script elsewhere).
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
#431) * feat: power-law quantized float option; apply to Pulse velocity deltas Add a new `(decentraland.common.quantized_power)` field option for uint32 fields: an `(bits-1)`-bit linear unorm magnitude `u` (high bits) plus a sign (LSB), decoded as `sign * max * u^pow`. Unlike the linear `quantized` option, zero is exactly representable (`u=0` -> `0`) and `pow > 1` concentrates resolution near zero. Putting the sign in the LSB (`(magnitude << 1) | sign`) makes the varint cost track magnitude rather than direction — a small `|value|` of either sign stays in one varint byte, and a stopped axis canonicalizes to 0 (omitted by proto3). `PlayerStateDeltaTier0.velocity_x/y/z` switch from `quantized{min:-50,max:50,bits:8}` to `quantized_power{max:50,pow:2,bits:8}`. The linear quantizer could not represent an exact 0 over [-50,50] in 8 bits (±0.196 residual), which drove a steady drift on stopped foreign avatars; the power curve fixes that and spends its bits on the low speeds where avatars actually move. Implemented end to end against the Node protoc-gen-bitwise plugin: options.proto message + extension (50003), the options.js parser, generator_csharp.js dispatch, the C# runtime (Quantize.EncodePower/DecodePower), golden-fixture coverage (test helper + regenerated PulseServer/QuantizationExample goldens), plus the README, CLAUDE.md and quantization_example.proto docs. Breaking wire change for velocity_x/y/z: server (pulse), Unity, godot and bevy must regenerate and deploy in lockstep. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: robtfm <50659922+robtfm@users.noreply.github.com> * Quantize PlayerState identically to PlayerStateDeltaTier0 Signed-off-by: Mikhail Agapov <mikhail.agapov@decentraland.org> * Add "step" const to the quantization gen Signed-off-by: Mikhail Agapov <mikhail.agapov@decentraland.org> --------- Signed-off-by: robtfm <50659922+robtfm@users.noreply.github.com> Signed-off-by: Mikhail Agapov <mikhail.agapov@decentraland.org> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Co-authored-by: Mikhail Agapov <mikhail.agapov@decentraland.org>
* Quantize TeleportRequest * Add Quantized Values Validation Signed-off-by: Mikhail Agapov <mikhail.agapov@decentraland.org> * Import "decentraland/common/vectors.proto" is unused Signed-off-by: Mikhail Agapov <mikhail.agapov@decentraland.org> * protoc-gen-bitwise: add range check, drop decode cache Emit AreQuantizedFieldsInRange() (per-field integer bounds check, used by the server to reject out-of-range client codes) and remove the per-field decoded- float cache — decode on get, encode on set. Regenerate goldens; add UPDATE_GOLDEN mode to the golden test so future generator changes are one command. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> --------- Signed-off-by: Mikhail Agapov <mikhail.agapov@decentraland.org> Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
# Conflicts: # CLAUDE.md # README.md # proto/decentraland/common/options.proto # proto/decentraland/common/quantization_example.proto # proto/decentraland/pulse/pulse_client.proto # proto/decentraland/pulse/pulse_server.proto # proto/decentraland/pulse/pulse_shared.proto # protoc-gen-bitwise/generator_csharp.js # protoc-gen-bitwise/options.js # protoc-gen-bitwise/runtime/cs/Quantize.cs # protoc-gen-bitwise/test/generator.test.js # protoc-gen-bitwise/test/golden/PulseServer.Bitwise.cs # protoc-gen-bitwise/test/golden/QuantizationExample.Bitwise.cs
…Reader/BitWriter CLAUDE.md still documented the original bit-stream design (BitWriter/ BitReader classes, float fields, "68 bits = 9 bytes on the wire"). The plugin actually emits quantized-accessor partials (*.Bitwise.cs) over plain uint32 fields sent as standard protobuf varints, backed only by Quantize.cs; runtime BitReader.cs/BitWriter.cs were referenced by nothing and are removed. Also sync README with current generator output (QuantizedStep consts, AreQuantizedFieldsInRange, EncodePower/ DecodePower, per-proto-file output naming) and drop the incorrect "cached" accessor wording. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
With core.autocrlf=true (and no .gitattributes) git materializes the golden .cs fixtures with CRLF on Windows while the generator always emits LF, so the strict byte comparison failed on any fresh Windows checkout. Normalize line endings when reading the goldens. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
… into chore/sync
chore: sync main to experimental
kuruk-mm
approved these changes
Jul 16, 2026
kuruk-mm
reviewed
Jul 16, 2026
| message PBVirtualCamera { | ||
| optional common.CameraTransition default_transition = 1; | ||
| optional uint32 look_at_entity = 2; | ||
| optional float fov = 3; // default: 60 |
Member
There was a problem hiding this comment.
this will implement this missing feature from the experimental branch, it is great for us, but it could be another pr for sanity
kuruk-mm
reviewed
Jul 16, 2026
Comment on lines
+45
to
+49
| // Mask for which bones an animation applies to. | ||
| enum AvatarEmoteMask { | ||
| AEM_FULL_BODY = 0; | ||
| AEM_UPPER_BODY = 1; | ||
| } No newline at end of file |
Member
There was a problem hiding this comment.
great to have this, but it could be in another pr or change the pr description to be experimental->main update
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is the following pr of: #360
That allows other clients to implement the protocol of the authoritative multiplayer (aka pulse).