Skip to content

Conversation

@lpahlavi
Copy link
Contributor

@lpahlavi lpahlavi commented Oct 29, 2025

This PR changes the request IDs in JSON-RPC requests from variable-size (i.e. canhttp::http::json::Id::Number) to constant-size (i.e. canhttp::http::json::ConstantSizeId). This ensures the size of a request and hence the cycles cost is independent of its ID.

@lpahlavi lpahlavi requested a review from gregorydemay October 29, 2025 15:11
@lpahlavi lpahlavi marked this pull request as ready for review October 29, 2025 15:11
@lpahlavi lpahlavi requested a review from a team as a code owner October 29, 2025 15:11
@lpahlavi lpahlavi merged commit 4d17b8d into main Oct 31, 2025
11 checks passed
@lpahlavi lpahlavi deleted the lpahlavi/constant-size-id branch October 31, 2025 14:12
@lpahlavi lpahlavi mentioned this pull request Nov 3, 2025
lpahlavi added a commit that referenced this pull request Nov 3, 2025
## 🤖 New release

* `evm_rpc_client`: 0.1.0 -> 0.2.0 (✓ API compatible changes)
* `evm_rpc`: 2.6.0 -> 2.7.0 (✓ API compatible changes)

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

## `evm_rpc_client`

<blockquote>

## [0.2.0] - 2025-11-03

### Added

- Add `.request_cost()` method to `RequestBuilder` to compute the cycles
cost of a request via the new `CyclesCost`
query endpoints
([#509](#509))
- Add the option to configure a retry strategy in the EVM RPC client to
e.g., try a request with increasingly many
cycles if it fails to to insufficient cycles
([#512](#512))

[0.2.0]:
evm_rpc_client-v0.1.0...evm_rpc_client-v0.2.0
</blockquote>

## `evm_rpc`

<blockquote>

## [2.7.0] - 2025-11-03

### Added

- For each `eth_*` endpoint, add a new corresponding `eth_*CyclesCost`
query endpoint with the same Candid arguments, that allows computing the
cycles cost of calling the corresponding `eth_*` update endpoint
([#508](#508),
[#509](#509))

### Changed

- Use constant-size request IDs in JSON-RPC requests to allow for
consistent request cycles costs
([#514](#514))

[2.7.0]:
v2.6.0...v2.7.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 <[email protected]>
@github-actions github-actions bot mentioned this pull request Nov 17, 2025
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