Skip to content

SPL: Use ATA interface crate instead of program crate #7256

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

Merged
merged 2 commits into from
Jul 31, 2025

Conversation

joncinque
Copy link

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

ATA is already in a good position since it has a small "interface"-style crate which Agave is partly using. Agave still needs the program crate to deserialize instructions.

Summary of changes

Use the interface crate everywhere.

The only substantive change is in the instruction parsing test. The interface crate does not have the deprecated instruction creator, so we mimic it inline instead.

The best part: the ata program crate is completely gone from lockfiles!

#### 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

ATA is already in a good position since it has a small "interface"-style
crate which Agave is partly using. Agave still needs the program crate
to deserialize instructions.

#### Summary of changes

Use the interface crate everywhere.

The only substantive change is in the instruction parsing test. The
interface crate does not have the deprecated instruction creator, so we
mimic it inline instead.

The best part: the ata program crate is completely gone from lockfiles!
rustopian
rustopian previously approved these changes Jul 31, 2025
Copy link

@rustopian rustopian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Built and tested without issue, and yup, clean lockfile build has no ATA dep 🙌

@joncinque
Copy link
Author

Oops sorry, I didn't push the full test fix, should be good now

@rustopian
Copy link

rustopian commented Jul 31, 2025

Oops sorry, I didn't push the full test fix, should be good now

Then how did I get green across the board O.o
I'll do a clean clone

@rustopian
Copy link

rustopian commented Jul 31, 2025

Oops sorry, I didn't push the full test fix, should be good now

Then how did I get green across the board O.o I'll do a clean clone

not related to this PR

I was tricked by a macOS environment issue for a while. Maybe PRing update to readme once I get it figured out. (disabling GCC 15 does not fix.)

@codecov-commenter
Copy link

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.8%. Comparing base (bca4a36) to head (43a8fc2).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##           master    #7256     +/-   ##
=========================================
- Coverage    82.8%    82.8%   -0.1%     
=========================================
  Files         803      803             
  Lines      364439   364436      -3     
=========================================
- Hits       302068   302029     -39     
- Misses      62371    62407     +36     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@joncinque
Copy link
Author

Soooo can I get that approval again? 😁

@rustopian rustopian self-requested a review July 31, 2025 18:59
Copy link

@rustopian rustopian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed passing (for reals this time)

@joncinque joncinque merged commit c9e8500 into anza-xyz:master Jul 31, 2025
52 checks passed
@joncinque joncinque deleted the ata-interface branch July 31, 2025 20:05
kskalski pushed a commit to kskalski/agave that referenced this pull request Aug 1, 2025
* SPL: Use ATA interface crate instead of program crate

#### 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

ATA is already in a good position since it has a small "interface"-style
crate which Agave is partly using. Agave still needs the program crate
to deserialize instructions.

#### Summary of changes

Use the interface crate everywhere.

The only substantive change is in the instruction parsing test. The
interface crate does not have the deprecated instruction creator, so we
mimic it inline instead.

The best part: the ata program crate is completely gone from lockfiles!

* Fix test
joncinque added a commit that referenced this pull request Aug 4, 2025
#### Problem

As outlined in #7256, we need to get Agave off of crates that depend
back on Agave.

spl-instruction-padding is one of those crates

#### Summary of changes

Use spl-instruction-padding-interface instead. Everything else is
exactly the same.
joncinque added a commit that referenced this pull request Aug 4, 2025
#### Problem

As outlined in #7256, we need to get Agave off of crates that depend
back on Agave.

spl-memo is one of those crates

#### Summary of changes

Use spl-memo-interface instead. The only difference is that `build_memo`
takes in a program id, which is used in one test.
joncinque added a commit that referenced this pull request Aug 5, 2025
#### Problem

As outlined in #7256, we need to get Agave off of crates that depend
back on Agave.

spl-token-2022 is one of those crates

#### Summary of changes

Use spl-token-2022-interface instead. To go with this, we had to also
upgrade to confidential-transfer-proof-extract v0.4.0, which requires
modifications to some tests.

Everything should be very straightforward otherwise, and we get to see
some red lines in the lockfile!
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.

4 participants