Skip to content

core: Remove solana-sdk dependency#6302

Merged
steviez merged 1 commit intoanza-xyz:masterfrom
steviez:rm_moar_sdk2
May 23, 2025
Merged

core: Remove solana-sdk dependency#6302
steviez merged 1 commit intoanza-xyz:masterfrom
steviez:rm_moar_sdk2

Conversation

@steviez
Copy link
Copy Markdown

@steviez steviez commented May 23, 2025

Problem

The current code uses limited_deserialize() from solana-sdk:
https://github.com/anza-xyz/solana-sdk/blob/1276772ee61fbd1f8a60cfec7cd553aa4f6a55f3/sdk/src/program_utils.rs#L13-L21
This function doesn't have a limit parameter, and instead hardcodes PACKET_DATA_SIZE as the limit. However, the implementation is actually just a re-export of solana-bincode as shown below:
https://github.com/anza-xyz/solana-sdk/blob/master/program/src/program_utils.rs
So, just update to solana-bincode directly with PACKET_DATA_SIZE set as the limit to maintain existing behavior

Use limited_deserialize from solana-bincode instead
@steviez steviez requested a review from t-nelson May 23, 2025 17:34
@codecov-commenter
Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.7%. Comparing base (f3a45e7) to head (4e0c297).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##           master    #6302     +/-   ##
=========================================
- Coverage    82.8%    82.7%   -0.1%     
=========================================
  Files         845      845             
  Lines      377826   377826             
=========================================
- Hits       312851   312665    -186     
- Misses      64975    65161    +186     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Copy Markdown

@t-nelson t-nelson left a comment

Choose a reason for hiding this comment

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

@steviez steviez merged commit ae8fe77 into anza-xyz:master May 23, 2025
58 checks passed
@steviez steviez deleted the rm_moar_sdk2 branch May 23, 2025 19:29
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.

3 participants