Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NonZeroPubkeyOption #93

Merged
merged 1 commit into from
Jul 7, 2023
Merged

NonZeroPubkeyOption #93

merged 1 commit into from
Jul 7, 2023

Conversation

skrrb
Copy link
Contributor

@skrrb skrrb commented Jul 7, 2023

unfortunately, anchor-ts doesn't play well with generics (coral-xyz/anchor#1849). hence, loading the existing idl in ts with the current PodOption produces IdlError: Type not found: {"name":"value","type":{"defined":"T"}}

since this type is only used to store pubkeys, the generic can be safely removed in favor of Pubkey. In addition, as the zeroed pubkey will not be a valid pda, the bit flag can be further dropped saving some (minimal) space in the accounts (measuring the CU of both approaches, i.e. with/without flag, doesn't seem to make any appreciable difference)

@skrrb skrrb requested a review from metaproph3t July 7, 2023 07:47
@binyebarwe binyebarwe self-requested a review July 7, 2023 09:26
@binyebarwe binyebarwe merged commit 15d6ba0 into master Jul 7, 2023
2 checks passed
@binyebarwe binyebarwe deleted the feature/pubkey-option branch July 7, 2023 09:27
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