Skip to content

feat(canister_logging): charge for fetching logs via update call#7033

Merged
maksymar merged 9 commits intomasterfrom
maksym/fetch-logs-fee
Oct 20, 2025
Merged

feat(canister_logging): charge for fetching logs via update call#7033
maksymar merged 9 commits intomasterfrom
maksym/fetch-logs-fee

Conversation

@maksymar
Copy link
Copy Markdown
Contributor

@maksymar maksymar commented Oct 1, 2025

This PR implements charging for fetching canister logs for update calls (when feature is enabled).

The actual fees are just placeholders for now, should be adjusted after benchmarking the actual costs.

When charging for logs user is required to provide enough cycles to cover a full response 2MB, but it only charges the actual amount of bytes returned.

EXC-2114

@github-actions github-actions bot added the feat label Oct 1, 2025
@maksymar maksymar marked this pull request as ready for review October 2, 2025 07:39
@maksymar maksymar requested review from a team as code owners October 2, 2025 07:39
@maksymar maksymar changed the title feat(canister_logging): charge for fetching logs feat(canister_logging): charge for fetching logs via update call Oct 2, 2025
Comment thread rs/cycles_account_manager/src/lib.rs Outdated
Comment thread rs/execution_environment/src/execution_environment.rs Outdated
@maksymar maksymar enabled auto-merge October 2, 2025 14:13
@maksymar maksymar added this pull request to the merge queue Oct 20, 2025
Merged via the queue into master with commit 3e6cc22 Oct 20, 2025
55 of 60 checks passed
@maksymar maksymar deleted the maksym/fetch-logs-fee branch October 20, 2025 11:48
maksymar added a commit that referenced this pull request Apr 16, 2026
Add Criterion benchmarks measuring the cost of fetch_canister_logs
query calls at varying buffer sizes (128 KiB, 1 MiB, 2 MiB) and
record sizes (0-byte worst case, 100-byte realistic).

Extract shared setup into setup_canister_with_full_log(), reused by
both existing resize benchmarks and the new fetch benchmarks.

The current fetch_canister_logs fees are placeholders (PR #7033).
These benchmarks will provide the measurements needed to calibrate
them before enabling the feature.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants