Repository navigation
fix(scrolls): size broadcast response cap for headers (16 KiB) - #274
Merged
Merged
Conversation
The IC counts response headers against max_response_bytes. litecoinspace sends ~700 B of Cloudflare headers before the txid, so a 1 KiB cap failed sign_and_submit after the broadcast had already gone through (unwrap tx 92bdf0aa…3b47 on testnet). Same cap in scrolls_bitcoin.
Contributor
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
Contributor
[Medium impact] This PR appears safe to merge. SummaryRaises the broadcast response cap from 1 KiB to 16 KiB in both Scrolls canisters, leaving room for response headers.
Reviews (1) · Last reviewed commit: "docs(solutions): broadcast outcall cap c..." · Reviewed by Greptile |
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.
Problem
On the Litecoin testnet demo,
scrolls_litecoinsign_and_submitreturnedlitecoinspace HTTP outcall failed: … Http body exceeds size limit of 1024 bytes,but the broadcast had gone through and the tx was mined (testnet unwrap
92bdf0aa…3b47, block 5016534).Cause
The IC counts response header names and values, plus the body, against
max_response_bytes, and it checks the raw response before the transform runs.litecoinspace sends about 680 B of Cloudflare headers (
nel,report-to,cf-ray, …) ahead of the 64-char txid, so the 1 KiB cap fails some of the time.scrolls_bitcoinhas the same 1 KiB cap. mempool.space sends about 240 B ofheaders today, so it has not failed yet.
Change
MAX_BROADCAST_RESPONSE_BYTESgoes from 1024 to 16 KiB inscrolls_litecoinandscrolls_bitcoin. That adds about 0.2B cycles per call on a 13-node subnet, and under 0.5B on a 34-node subnet.-27"already in chain" response normalized by the transform.docs/solutions/integration-issues/scrolls-broadcast-outcall-cap-counts-response-headers.md.Only the canisters change. No guest,
charms-client, or VK changes.This PR does not upgrade
ya3wxorrpgc6. The demo canisteryv4h2already runs this fix from
demo/zkltc-testnet.