Skip to content

onchain allocation: CreateUser create+allocate+activate atomically#3107

Open
elitegreg wants to merge 4 commits intomainfrom
gm/onchain-allocation-issue-2402
Open

onchain allocation: CreateUser create+allocate+activate atomically#3107
elitegreg wants to merge 4 commits intomainfrom
gm/onchain-allocation-issue-2402

Conversation

@elitegreg
Copy link
Contributor

Closes #2402

Summary of Changes

  • Modified process_create_user to handle activation as well if feature flag is enabled and the users cli is new enough (passing the extra accounts).
  • Changes the SDK CreateUser to appropriately call the smartcontract based on feature flag

Testing Verification

  • New tests added
  • Existing tests pass

@elitegreg elitegreg requested a review from vihu February 26, 2026 16:27
@elitegreg elitegreg marked this pull request as draft February 27, 2026 16:19
@elitegreg elitegreg force-pushed the gm/onchain-allocation-issue-2402 branch from e127bfb to 017c4aa Compare February 27, 2026 17:55
@elitegreg elitegreg marked this pull request as ready for review February 27, 2026 18:11
@vihu
Copy link
Contributor

vihu commented Feb 27, 2026

Worth it to add maybe a few more atomic creation tests? Similar to test_create_user_atomic_with_onchain_allocation but for allocated ip, mcast etc?

@vihu
Copy link
Contributor

vihu commented Feb 27, 2026

Might also be good to add a test exercising the new macro by passing it a wrong PDA imho

@elitegreg elitegreg force-pushed the gm/onchain-allocation-issue-2402 branch from 017c4aa to 5952b2c Compare March 2, 2026 19:17
Add dz_prefix_count field to UserCreateArgs that enables atomic user
creation with resource allocation and activation in a single transaction,
removing the need for a separate activator-driven ActivateUser step.
@elitegreg elitegreg force-pushed the gm/onchain-allocation-issue-2402 branch from 5952b2c to e84224e Compare March 3, 2026 05:28
@elitegreg
Copy link
Contributor Author

Worth it to add maybe a few more atomic creation tests? Similar to test_create_user_atomic_with_onchain_allocation but for allocated ip, mcast etc?

I did for allocated, not mcast. I haven't modified the CreateSubscribeUser instruction yet, so no need to do mcast.

@elitegreg
Copy link
Contributor Author

Might also be good to add a test exercising the new macro by passing it a wrong PDA imho

done

@elitegreg elitegreg enabled auto-merge (squash) March 3, 2026 05:29
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.

Phase 2: Modify CreateUser for atomic create+allocate+activate

2 participants