Skip to content

serviceability: add owner field to UpdateMulticastGroup instruction#3527

Merged
juan-malbeclabs merged 2 commits intomainfrom
jo/964
Apr 13, 2026
Merged

serviceability: add owner field to UpdateMulticastGroup instruction#3527
juan-malbeclabs merged 2 commits intomainfrom
jo/964

Conversation

@juan-malbeclabs
Copy link
Copy Markdown
Contributor

Summary of Changes

  • Adds an optional owner field to MulticastGroupUpdateArgs, allowing foundation members to reassign ownership of a multicast group after creation
  • Adds --owner CLI flag to doublezero multicast group update, accepting a pubkey or me (resolves to the active keypair)
  • New field is appended after use_onchain_allocation in the Borsh encoding, so older serialized instructions continue to deserialize correctly via BorshDeserializeIncremental

Diff Breakdown

Category Files Lines (+/-) Net
Core logic 3 +20 / -4 +16
Scaffolding 1 +1 / -0 +1
Tests 4 +200 / -30 +170

Small core change, most of the diff is new and refactored unit tests.

Key files (click to expand)
  • smartcontract/cli/src/multicastgroup/update.rs — adds --owner arg with validate_pubkey (accepts me), resolves me to the payer pubkey in execute; adds three new unit tests covering no owner, explicit pubkey, and me resolution
  • smartcontract/programs/doublezero-serviceability/src/processors/multicastgroup/update.rs — adds owner: Option<Pubkey> to MulticastGroupUpdateArgs and applies the update in the processor
  • smartcontract/sdk/rs/src/commands/multicastgroup/update.rs — adds owner: Option<Pubkey> to UpdateMulticastGroupCommand and threads it through to the instruction args

Testing Verification

  • All existing multicast group integration tests pass (test_multicastgroup, test_multicastgroup_deactivate_*, test_delete_multicastgroup_*, test_update_multicastgroup_*)
  • test_multicastgroup extended to set owner: Some(new_owner) in the update step and assert the new owner is persisted on-chain
  • Three new CLI unit tests: test_cli_multicastgroup_update_with_explicit_owner, test_cli_multicastgroup_update_owner_me, and test_cli_multicastgroup_update_owner_parsing

@juan-malbeclabs juan-malbeclabs enabled auto-merge (squash) April 13, 2026 16:39
@juan-malbeclabs juan-malbeclabs merged commit de9b985 into main Apr 13, 2026
45 of 48 checks passed
@juan-malbeclabs juan-malbeclabs deleted the jo/964 branch April 13, 2026 17:52
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