-
Notifications
You must be signed in to change notification settings - Fork 2
interface: Introduce lightweight crate for instruction + id #67
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
Conversation
#### Problem In order to publish the v3 SDK crates and have them usable in Agave, we also need to have SPL crates using the v3 SDK crates. However, we have a circular dependency between Agave and SPL which currently makes this impossible. The overall plan is to have Agave only use "interface" crates from SPL, which have no dependencies on Agave crates. You can see more info about the project at https://github.com/orgs/anza-xyz/projects/27 Instruction-padding is pretty simple, since it just exposes an instruction creator and id to Agave. #### Summary of changes Create the new interface crate with the instruction and id. The Rust scripts needed to be adapted to having more than one crate, so I copied all the scripts from token-2022 and updated the commands in package.json accordingly.
#### Problem The repo has no automated publishing workflow. #### Summary of changes Following how it's done at token-2022, add the workflow! This means adding a script, package.json entry, git-cliff configuration, and GH actions workflow file. Note that this requires solana-program#67 to land first.
buffalojoec
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When updating everything v3 crates, I'll probably also update this to use a Makefile too.
Please do 🙏
scripts/rust/audit.mjs
Outdated
| // Crate: idna | ||
| // Version: 0.1.5 | ||
| // Title: `idna` accepts Punycode labels that do not produce any non-ASCII when decoded | ||
| // Date: 2024-12-09 | ||
| // ID: RUSTSEC-2024-0421 | ||
| // URL: https://rustsec.org/advisories/RUSTSEC-2024-0421 | ||
| // Solution: Upgrade to >=1.0.0 | ||
| // need to solve this dependency tree: | ||
| // jsonrpc-core-client v18.0.0 -> jsonrpc-client-transports v18.0.0 -> url v1.7.2 -> idna v0.1.5 | ||
| 'RUSTSEC-2024-0421', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is this one only being caught now? It seems old enough to have been caught by previous CI runs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops you're right, thanks for catching that -- I just copied the scripts from another repo
#### Problem The repo has no automated publishing workflow. #### Summary of changes Following how it's done at token-2022, add the workflow! This means adding a script, package.json entry, git-cliff configuration, and GH actions workflow file. Note that this requires solana-program#67 to land first.
* CI: Add publish workflow #### Problem The repo has no automated publishing workflow. #### Summary of changes Following how it's done at token-2022, add the workflow! This means adding a script, package.json entry, git-cliff configuration, and GH actions workflow file. Note that this requires #67 to land first. * Fix yaml * Proper default
Problem
In order to publish the v3 SDK crates and have them usable in Agave, we also need to have SPL crates using the v3 SDK crates. However, we have a circular dependency between Agave and SPL which currently makes this impossible.
The overall plan is to have Agave only use "interface" crates from SPL, which have no dependencies on Agave crates.
You can see more info about the project at https://github.com/orgs/anza-xyz/projects/27
Instruction-padding is pretty simple, since it just exposes an instruction creator and id to Agave.
Summary of changes
Create the new interface crate with the instruction and id.
The Rust scripts needed to be adapted to having more than one crate, so I copied all the scripts from token-2022 and updated the commands in package.json accordingly.
When updating everything v3 crates, I'll probably also update this to use a Makefile too.
Also, I removed the semver-check, and will add that to the publish script when that gets created.