Skip to content

smartcontract: rename subscribe to use roles terminology#3499

Merged
martinsander00 merged 4 commits intomainfrom
ms/subscribe-rename
Apr 15, 2026
Merged

smartcontract: rename subscribe to use roles terminology#3499
martinsander00 merged 4 commits intomainfrom
ms/subscribe-rename

Conversation

@martinsander00
Copy link
Copy Markdown
Contributor

@martinsander00 martinsander00 commented Apr 8, 2026

Summary

  • Rename SubscribeMulticastGroup instruction variant to UpdateMulticastGroupRoles — the instruction manages both publisher and subscriber roles, so "subscribe" was misleading
  • Rename processor functions (process_subscribe_multicastgroupprocess_update_multicastgroup_roles), args struct (MulticastGroupSubscribeArgsUpdateMulticastGroupRolesArgs), and SDK command/trait method to match
  • Simplify the status validation guard: replace is_unsubscribe_only with has_role (inverted logic, same semantics), preserving the existing behavior that allows role removal for any user status and role addition for Pending/Activated/Updating users

Lines of Code

Section Added Removed
Core logic +29 -28
Internal references (CLI, SDK, client) +76 -73
Tests +47 -47

All changes are pure renames — no behavioral, wire-format, or user-facing CLI changes.

Testing Verification

  • No changes needed in e2e tests (Go SDK) — confirms the Borsh wire format is unchanged since serialization is index-based, not name-based

@martinsander00 martinsander00 enabled auto-merge (squash) April 9, 2026 17:04
Rename subscribe_user_to_multicastgroup → update_user_multicastgroup_subscription
and process_subscribe_multicastgroup → process_update_multicastgroup_subscription
to reflect that these functions handle both subscribe and unsubscribe. Simplify
the status guard to use a positive is_subscribe check instead of double-negated
!is_unsubscribe_only.

Resolves #3498
…Roles

Rename instruction variant, args struct, SDK command, and trait method
to use 'roles' terminology, clarifying the instruction manages both
publisher and subscriber roles rather than just subscriptions.
@martinsander00 martinsander00 changed the title smartcontract: rename subscribe processor for clarity smartcontract: rename subscribe to use roles terminology Apr 15, 2026
@elitegreg elitegreg self-requested a review April 15, 2026 21:21
@martinsander00 martinsander00 merged commit fb9d996 into main Apr 15, 2026
33 checks passed
@martinsander00 martinsander00 deleted the ms/subscribe-rename branch April 15, 2026 21:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants