fix!: calculate default request cost before sending#256
Merged
Conversation
gregorydemay
approved these changes
Dec 18, 2025
Contributor
gregorydemay
left a comment
There was a problem hiding this comment.
Thanks @lpahlavi ! Just a couple of nits, but otherwise LGTM!
|
|
||
| impl<R> DefaultRequestCycles for GetSignaturesForAddressRequestBuilder<R> { | ||
| fn default_request_cycles(&self) -> u128 { | ||
| 2_000_000_000 // TODO XC-338: Check heuristic |
Contributor
There was a problem hiding this comment.
nit: Is the TODO still relevant (also below)?
Contributor
Author
There was a problem hiding this comment.
I am not 100% certain so I would still maybe double-check this to be sure. I will do this in another PR so I can merge this one and include it in today's release.
Co-authored-by: gregorydemay <112856886+gregorydemay@users.noreply.github.com>
Merged
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Instead of initializing
RequestBuilderinstances with a default cycles cost estimate, calculate the cycles cost estimate when sending the corresponding request. This ensures all request parameters are correctly taken into account for the cycles cost estimation.BREAKING CHANGE: This change is breaking for the
sol_rpc_clientcrate. TheRequest::cycles_mutmethod now returns an&mut Option<u128>instead of&mut u128and the obsoleteGetBlockRequestBuilder::update_cyclesmethod is removed.