Skip to content

Fix variable string and bytes PDA seeds in legacy Anchor IDLs - #1127

Merged
lorisleiva merged 1 commit into
mainfrom
fix/v00-variable-pda-seeds
Aug 29, 2026
Merged

Fix variable string and bytes PDA seeds in legacy Anchor IDLs#1127
lorisleiva merged 1 commit into
mainfrom
fix/v00-variable-pda-seeds

Conversation

@lorisleiva

Copy link
Copy Markdown
Member

This PR is a follow-up to #1126, which fixed byte-array PDA seeds for Anchor v01 IDLs. The legacy v00 path has the same bug: pdaNodeFromAnchorV00 strips the Borsh size prefix from constant string and bytes seeds but not from variable ones, so a variable seed derives a different PDA than the on-chain program. This change hoists the seed type conversion into a single helper used by both branches, so constant and variable seeds are now consistent by construction.

This PR is a follow-up to #1126, which fixed byte-array PDA seeds for Anchor v01 IDLs. The legacy v00 path has the same bug: `pdaNodeFromAnchorV00` strips the Borsh size prefix from constant `string` and `bytes` seeds but not from variable ones, so a variable seed derives a different PDA than the on-chain program. This change hoists the seed type conversion into a single helper used by both branches, so constant and variable seeds are now consistent by construction.
@changeset-bot

changeset-bot Bot commented Aug 29, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 6c0857b

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@codama/nodes-from-anchor Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@lorisleiva
lorisleiva marked this pull request as ready for review August 29, 2026 10:17

Copy link
Copy Markdown
Member Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@lorisleiva
lorisleiva merged commit 3e5388a into main Aug 29, 2026
5 checks passed
@lorisleiva
lorisleiva deleted the fix/v00-variable-pda-seeds branch August 29, 2026 10:28
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.

1 participant