fix(token-extensions/group): re-enable group anchor + quasar examples#53
Merged
Conversation
Both were excluded as "not live", but the real blockers were build/code bugs: - group/anchor: a dead `spl-token-group-interface = "0.2.5"` dependency (never imported in code — the GroupPointer types come from anchor_spl::token_2022) transitively pinned an old solana-zk-token-sdk that conflicts with ed25519-dalek 2 on `zeroize`, breaking `cargo build-sbf`. Removed the dep; the program now builds and its LiteSVM test passes. - group/quasar: three bugs in src/lib.rs — `Program<System>` should be `Program<SystemProgram>` (compile error); the GroupPointer extension opcode was 41 (that's GroupMemberPointer) instead of 40; and the mint account was allocated 250 bytes instead of 234 (base 82 padded to 165 + 1 account-type byte + GroupPointer TLV of 2+2+64), which made InitializeMint2 fail with InvalidAccountData. Fixed all three; builds and both tests pass. Drop both from .github/.ghaignore so CI builds and tests them.
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
Two Token-2022 group examples were excluded in
.github/.ghaignoreas "not live", but the real blockers were build/code bugs (the on-chain GroupPointer extension works fine on the current toolchain). Both are now fixed and verified.tokens/token-extensions/group/anchor—cargo build-sbffailed to resolvezeroize: a deadspl-token-group-interface = "0.2.5"dependency (never imported — theGroupPointertypes come fromanchor_spl::token_2022) transitively pinned an oldsolana-zk-token-sdkincompatible withed25519-dalek 2. Removed the dead dep → builds, and its LiteSVM test (test_initialize_group) passes.tokens/token-extensions/group/quasar— three bugs insrc/lib.rs:Program<System>→Program<SystemProgram>(compile error E0412).41→40(41 is GroupMemberPointer; the runtime log confirmed the wrong instruction was being invoked).250→234bytes (base 82 padded to 165 + 1 account-type byte + GroupPointer TLV of 2+2+64); the wrong size madeInitializeMint2fail withInvalidAccountData.Both dropped from
.github/.ghaignoreso CI builds and tests them.Verified locally on the CI toolchain (Solana 3.1.x / platform-tools v1.52):
group/anchorbuilds +cargo testpasses;group/quasarbuilds + both tests pass (logs showGroupPointerInstruction::Initialize success,InitializeMint2 success).https://claude.ai/code/session_013dpnF6uSGWXjkJJZseqzcP
Generated by Claude Code