feat(canister_logging): charge for fetching logs via update call#7033
Merged
feat(canister_logging): charge for fetching logs via update call#7033
Conversation
michael-weigelt
approved these changes
Oct 2, 2025
dsarlis
approved these changes
Oct 20, 2025
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.
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.
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