Skip to content

build: migrate dependencies to solana-sdk repository#55

Merged
lpahlavi merged 13 commits intomainfrom
lpahlavi/forked-sdk-dependencies
Jul 7, 2025
Merged

build: migrate dependencies to solana-sdk repository#55
lpahlavi merged 13 commits intomainfrom
lpahlavi/forked-sdk-dependencies

Conversation

@lpahlavi
Copy link
Contributor

@lpahlavi lpahlavi commented Apr 2, 2025

❓ Why this change?

Previously, we relied on patched dependencies from the anza-xyz/agave repository. However, the Solana SDK has since been migrated to anza-xyz/solana-sdk, making the old patch target obsolete.

Additionally, our workspace Cargo.toml specified patched dependencies using semver-compatible version ranges, such as:

solana-account-decoder-client-types = "2.2.0"

This works fine during cargo build, because patched versions from the fork are prioritized. But when running cargo publish, Cargo ignores the patches and resolves the latest semver-compatible upstream version instead (e.g., v2.3.2), which may introduce breaking changes. For example, in v2.3.1 of the solana-account-decoder-client-types crate, a new (optional) cost_units field was added to UiTransactionStatusMeta, causing compilation failures at publish time.

✅ What’s the fix?

  • 🔄 Patch all Solana SDK crates from the new anza-xyz/solana-sdk fork
  • 📌 Pin all patched Solana versions using = to avoid semver drift:
    solana-account-decoder-client-types = "=2.3.3"
    

This ensures reproducible builds and a smooth cargo publish process for the SOL RPC canister crate.

@lpahlavi lpahlavi force-pushed the lpahlavi/forked-sdk-dependencies branch from 6ea313f to 5490fe9 Compare July 4, 2025 07:04
@lpahlavi lpahlavi changed the title build: Use new fork of solana-sdk repository build: migrate dependencies to solana-sdk repository Jul 4, 2025
@lpahlavi lpahlavi marked this pull request as ready for review July 4, 2025 12:22
@lpahlavi lpahlavi requested a review from a team as a code owner July 4, 2025 12:22
@lpahlavi lpahlavi requested a review from gregorydemay July 4, 2025 12:22
Copy link
Contributor

@gregorydemay gregorydemay left a comment

Choose a reason for hiding this comment

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

Thanks @lpahlavi for this PR! Some minor comments.

@lpahlavi
Copy link
Contributor Author

lpahlavi commented Jul 4, 2025

Thanks a lot for having a look @gregorydemay! I believe I should have addressed all of your comments.

@lpahlavi lpahlavi requested a review from gregorydemay July 4, 2025 15:13
@lpahlavi lpahlavi merged commit 6b8e60c into main Jul 7, 2025
12 checks passed
@lpahlavi lpahlavi deleted the lpahlavi/forked-sdk-dependencies branch July 7, 2025 06:02
This was referenced Jul 7, 2025
@github-actions github-actions bot mentioned this pull request Jul 17, 2025
@github-actions github-actions bot mentioned this pull request Jul 31, 2025
lpahlavi added a commit that referenced this pull request Jul 31, 2025
## 🤖 New release

* `sol_rpc_types`: 1.0.0 -> 2.0.0 (⚠ API breaking changes)
* `sol_rpc_canister`: 1.0.0 -> 1.1.0 (✓ API compatible changes)
* `sol_rpc_client`: 1.0.0 -> 2.0.0 (⚠ API breaking changes)

### ⚠ `sol_rpc_types` breaking changes

```text
--- failure constructible_struct_adds_field: externally-constructible struct adds field ---

Description:
A pub struct constructible with a struct literal has a new pub field. Existing struct literals must be updated to include the new field.
        ref: https://doc.rust-lang.org/reference/expressions/struct-expr.html
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.41.0/src/lints/constructible_struct_adds_field.ron

Failed in:
  field TransactionStatusMeta.cost_units in /tmp/.tmpuppblp/sol-rpc-canister/libs/types/src/solana/transaction/mod.rs:286
```

<details><summary><i><b>Changelog</b></i></summary><p>

## `sol_rpc_types`

<blockquote>

## [2.0.0] - 2025-07-31

### Added

- Add optional `cost_units` to `TransactionStatusMeta`
([#180](#180))
- Add build requirements to READMEs and rustdoc
([#169](#169))
- Add `Cargo.toml` linting to CI pipeline
([#155](#155))

### Changed

- Require HTTP outcall base fee
([#185](#185))
- Select supported providers based on successful responses
([#183](#183))
- Migrate dependencies to `solana-sdk` repository
([#55](#55))
- Improve docs for `InstallArgs`
([#172](#172))

[2.0.0]:
https://github.com/dfinity/sol-rpc-canister/compare/1.0.0..2.0.0
</blockquote>

## `sol_rpc_canister`

<blockquote>

## [1.1.0] - 2025-07-31

### Added

- Add optional `cost_units` to `TransactionStatusMeta` (#180)
- Add more metrics (#144)

### Changed

- Do not record metrics for requests with insufficient cycles (#184)
- Require HTTP outcall base fee (#185)
- Select supported providers based on successful responses (#183)

### Fixed

- Change `nat16` to `nat32` in examples (#151)
</blockquote>

## `sol_rpc_client`

<blockquote>

## [2.0.0] - 2025-07-31

### Added

- Add `try_send` method to SOL RPC client
([#187](#187))
- Add build requirements to READMEs and rustdoc
([#169](#169))
- Add `Cargo.toml` linting to CI pipeline
([#155](#155))

### Changed

- Revert `sol_rpc_client` bump
([#178](#178))
- Migrate dependencies to `solana-sdk` repository
([#55](#55))
- Bump `sol_rpc_client` to `v1.0.1`
([#164](#164))
- Enable `ed25519` feature in docs
([#162](#162))

### Fixed

- Use correct fee for t-sig with local development key
([#160](#160))

[2.0.0]:
https://github.com/dfinity/sol-rpc-canister/compare/1.0.0..2.0.0
</blockquote>


</p></details>

---
This PR was generated with
[release-plz](https://github.com/release-plz/release-plz/).

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Louis Pahlavi <louis.pahlavi@dfinity.org>
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