Skip to content

Support custom instruction discriminators#2349

Closed
guibescos wants to merge 4 commits intosolana-foundation:masterfrom
guibescos:guibescos/support-custom-instruction-discriminator
Closed

Support custom instruction discriminators#2349
guibescos wants to merge 4 commits intosolana-foundation:masterfrom
guibescos:guibescos/support-custom-instruction-discriminator

Conversation

@guibescos
Copy link
Copy Markdown
Contributor

No description provided.

@vercel
Copy link
Copy Markdown

vercel bot commented Dec 29, 2022

@guibescos is attempting to deploy a commit to the coral-xyz Team on Vercel.

A member of the Team first needs to authorize it.

@guibescos guibescos changed the title Fix Support custom instruction discriminators Dec 29, 2022
@Henry-E
Copy link
Copy Markdown
Collaborator

Henry-E commented Jan 3, 2023

Thanks for the PR!

Would it be possible to give a bit more explanation about what this is for and the changes it makes?

As far as I'm aware the anchor idl currently has no support at all for including the discriminator hash in the IDL? Adding support for discriminators more generally is a thing that has been floated, though no steps have been taken yet on making it a reality, e.g. #2138 . I suspect that adding support for discriminators is much broader problem than the solution here which might only tackle a very niche aspect of that? But totally open to understanding what the goal is here.

Also, would this be a breaking or non-breaking change to the IDL or programs that currently know how to parse IDLs?

@Henry-E Henry-E added idl related to the IDL, either program or client side question Further information is requested labels Jan 3, 2023
@guibescos
Copy link
Copy Markdown
Contributor Author

guibescos commented Jan 3, 2023

This is a draft and it was made to tackle Pyth's oracle program that I'm working on.
Right now, I feel like implementing my own Coder seems like a better solution instead of adding complexity to the BorshCoder (support for other native solana programs is also done through custom coders).
Feel free to close.

@Henry-E
Copy link
Copy Markdown
Collaborator

Henry-E commented Jan 4, 2023

Cool, no worries if it's only a draft. Just trying to stay on top of open PRs. We could definitely look at merging a custom coder for pyth like has been done with the SPL ones by acheron.

@Henry-E Henry-E added probably will close and removed question Further information is requested labels Jan 5, 2023
@acheroncrypto acheroncrypto mentioned this pull request Feb 25, 2024
@acheroncrypto
Copy link
Copy Markdown
Collaborator

Added in #2824.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

idl related to the IDL, either program or client side probably will close ts

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants