Skip to content

refactor: use canister runtime crates#248

Merged
lpahlavi merged 1 commit intomainfrom
lpahlavi/update-ic-cdk
Dec 11, 2025
Merged

refactor: use canister runtime crates#248
lpahlavi merged 1 commit intomainfrom
lpahlavi/update-ic-cdk

Conversation

@lpahlavi
Copy link
Contributor

@lpahlavi lpahlavi commented Nov 7, 2025

(DEFI-2462) This PR replaces the local Runtime trait by the one in the new ic-canister-runtime crate and uses the relevant implementations in the ic-agent-canister-runtime and ic-pocket-canister-runtime crates.

A follow-up PR will clean-up the HTTP mocking infrastructure to switch to the one from ic-pocket-canister-runtime.

@lpahlavi lpahlavi force-pushed the lpahlavi/update-ic-cdk branch 5 times, most recently from b2d9b48 to 70b67d4 Compare November 10, 2025 16:19
@lpahlavi lpahlavi changed the title chore: update ic-cdk to v0.18.6 chore!: update ic-cdk to v0.18.6 Nov 10, 2025
@lpahlavi lpahlavi force-pushed the lpahlavi/update-ic-cdk branch 2 times, most recently from 29dda2a to a1c03c0 Compare November 20, 2025 13:49
@lpahlavi lpahlavi changed the base branch from main to lpahlavi/standalone-basic-solana November 20, 2025 13:50
@lpahlavi lpahlavi force-pushed the lpahlavi/standalone-basic-solana branch from 42aea94 to e59b66b Compare November 20, 2025 13:51
@lpahlavi lpahlavi force-pushed the lpahlavi/update-ic-cdk branch 4 times, most recently from ea5f6c0 to 0e08142 Compare November 20, 2025 16:58
@lpahlavi lpahlavi marked this pull request as ready for review November 20, 2025 20:21
Cargo.toml Outdated
ic-agent = "0.44.3"
ic-agent-canister-runtime = { git = "https://github.com/dfinity/canhttp/", rev = "3d27f24df421cd7a25e8a38bb4cc117926e0e820" }
ic-canister-runtime = { git = "https://github.com/dfinity/canhttp/", rev = "3d27f24df421cd7a25e8a38bb4cc117926e0e820", features = ["wallet"] }
ic-cdk = "0.18.7"
Copy link
Contributor

Choose a reason for hiding this comment

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

why doing the ic-cdk upgrade and the switch to the canhttp runtime into a single PR? I have the impression that it would be much easier to split this in 2:

  1. Upgrade to the new version of the ic-cdk
  2. Then, switch to canhttp runtime.

WDYT?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@gregorydemay Good question. I initially wanted to split things as you proposed as well, but realized I would then have to adapt the Runtime trait and implementations to the breaking changes introduced by the ic-cdk v0.18.6 (e.g. define a new IcError type and return this instead of the old (RejectCode,String)).

If you think it makes sense, I could do it like this, but I thought it made more sense to leverage the fact we already have a runtime implementation that supports ic-cdk v0.18.6 in the ic-canister-runtime crate.

WDYT?

Copy link
Contributor Author

@lpahlavi lpahlavi Nov 24, 2025

Choose a reason for hiding this comment

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

@gregorydemay In the end I decided to split this up into 2 separate PRs. The first one, updating the ic-cdk to v0.19.0 is here: #251. It will require merging #249 first though due to the breaking changes in the client.

@lpahlavi lpahlavi marked this pull request as draft November 24, 2025 15:44
@lpahlavi lpahlavi changed the title chore!: update ic-cdk to v0.18.6 refactor: use canister runtime crates Nov 24, 2025
@lpahlavi lpahlavi force-pushed the lpahlavi/update-ic-cdk branch 2 times, most recently from 7fdd826 to ed9a70c Compare November 25, 2025 06:52
@lpahlavi lpahlavi changed the base branch from lpahlavi/standalone-basic-solana to lpahlavi/bump-ic-cdk-to-v0.19.0 November 25, 2025 06:52
@lpahlavi lpahlavi marked this pull request as ready for review November 25, 2025 08:39
@lpahlavi lpahlavi force-pushed the lpahlavi/bump-ic-cdk-to-v0.19.0 branch 2 times, most recently from 2a619bb to 64dc327 Compare December 8, 2025 13:37
@lpahlavi lpahlavi force-pushed the lpahlavi/update-ic-cdk branch from 9bfa70f to 953a817 Compare December 10, 2025 07:28
@lpahlavi lpahlavi requested a review from a team December 10, 2025 07:28
@lpahlavi lpahlavi force-pushed the lpahlavi/update-ic-cdk branch 3 times, most recently from 103cd10 to a763614 Compare December 10, 2025 07:42
Base automatically changed from lpahlavi/bump-ic-cdk-to-v0.19.0 to main December 11, 2025 08:18
@lpahlavi lpahlavi force-pushed the lpahlavi/update-ic-cdk branch from 29d6c7a to 45a0680 Compare December 11, 2025 08:24
Copy link
Contributor

@mducroux mducroux left a comment

Choose a reason for hiding this comment

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

Thanks for this PR @lpahlavi. LGTM!

@lpahlavi lpahlavi merged commit 50c0c60 into main Dec 11, 2025
38 of 40 checks passed
@lpahlavi lpahlavi deleted the lpahlavi/update-ic-cdk branch December 11, 2025 14:52
@github-actions github-actions bot mentioned this pull request Jan 12, 2026
lpahlavi added a commit that referenced this pull request Jan 12, 2026
## 🤖 New release

* `sol_rpc_types`: 3.0.0 -> 4.0.0
* `sol_rpc_canister`: 1.3.0
* `sol_rpc_client`: 3.0.0 -> 3.1.0

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

## `sol_rpc_types`

<blockquote>

## [3.1.0] - 2026-01-12

### Changed

- Bump `ic-cdk` to v0.19.0
([#251](#251))
- Upgrade various dependencies
([#260](#260))

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

## `sol_rpc_canister`

<blockquote>

## [1.3.0] - 2026-01-12

### Changed

- Bump `ic-cdk` to v0.19.0
([#251](#251))
- Upgrade various dependencies
([#260](#260))

### Fixed

- Do not ignore `response_size_estimate` for `getBlock` endpoint
([#236](#236))

[1.3.0]:
sol_rpc_canister-v1.2.0...sol_rpc_canister-v1.3.0
</blockquote>

## `sol_rpc_client`

<blockquote>

## [4.0.0] - 2026-01-12

### Changed

- Use `ic_canister_runtime::Runtime` instead of local `Runtime` trait
([#248](#248))
- **BREAKING:** Bump `ic-cdk` to v0.19.0. See PR description for more
details on the breaking changes.
([#251](#251))
- Upgrade various dependencies
([#260](#260))

### Fixed

- **BREAKING:** Calculate default request cost before sending. See PR
description for more details on the breaking changes.
([#256](#256))

[4.0.0]:
https://github.com/dfinity/sol-rpc-canister/compare/3.0.0..4.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>
Co-authored-by: Louis Pahlavi <louis.pahlavi@gmail.com>
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