sdk: serviceability go executor CreateUser/DeleteUser#3774
Open
elitegreg wants to merge 3 commits into
Open
Conversation
… planner Adds the Solana-side primitives the device-stress orchestrator (#3746) needs: - CreateUser / DeleteUser methods on the Go serviceability executor (variants 36 / 42), with account-list construction mirroring the Rust SDK and a post-confirmation visibility wait so callers can record t_activate against the user PDA. - PDA helpers: GetUserPDA, GetAccessPassPDA, GetTunnelIdsPDA, GetDzPrefixBlockPDA — seed bytes mirrored from smartcontract/programs/doublezero-serviceability/src/pda.rs. - Pure PlanReconcile function and ReconcilePlan type for sweep delta planning, deterministic via ClientIp-ascending sort. - Rust fixture generator extended to emit user_create_args.{bin,json} and user_delete_args.{bin,json}; Go tests load them as the cross-language wire format contract. Part 1 of #3746 — library-only, no new binary. Closes #3770.
PlanReconcile is orchestrator policy ("how many users do we want") rather
than an SDK primitive ("how do I submit a CreateUser/DeleteUser"). Move it
out of the serviceability SDK and land it alongside the device-stress
orchestrator binary in part 2 of #3746.
63c03be to
ed95322
Compare
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.
Summary
Adds the Solana-side primitives the device-stress orchestrator (#3746) needs as a library-only change — no new binary.
CreateUser(variant 36) andDeleteUser(variant 42) executor methods onsmartcontract/sdk/go/serviceability, with account-list construction mirroring the Rust SDK; both wait for post-confirmation visible state so callers get a meaningfult_activateto record.GetUserPDA,GetAccessPassPDA,GetTunnelIdsPDA,GetDzPrefixBlockPDA— seeds mirrored fromsmartcontract/programs/doublezero-serviceability/src/pda.rs.user_create_args.{bin,json}anduser_delete_args.{bin,json}; Go tests load them as the cross-language wire-format contract.Part 1 of #3746. Closes #3770.
PlanReconcile/ReconcilePlanwere originally scoped here but are orchestrator policy, not an SDK primitive, so they now land alongside the orchestrator binary in part 2 of #3746.Testing Verification
buildCreateUserInstruction/buildDeleteUserInstructionproduce the same borsh body as the Rust-generated fixtures (user_create_args.bin,user_delete_args.bin).AccountMetalists (smartcontract/sdk/rs/src/commands/user/create.rs:209anddelete.rs:363).GetTunnelIdsPDA/GetDzPrefixBlockPDAverified to use 8-byte little-endian index.make go-build go-lint go-testall green.