Skip to content

fix(scrolls): size broadcast response cap for headers (16 KiB) - #274

Merged
imikushin merged 2 commits into
mainfrom
fix/scrolls-broadcast-response-cap
Nov 4, 2026
Merged

imikushin merged 2 commits into
mainfrom
fix/scrolls-broadcast-response-cap

Conversation

@imikushin

Copy link
Copy Markdown
Member

Problem

On the Litecoin testnet demo, scrolls_litecoin sign_and_submit returned
litecoinspace 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_bitcoin has the same 1 KiB cap. mempool.space sends about 240 B of
headers today, so it has not failed yet.

Change

  • MAX_BROADCAST_RESPONSE_BYTES goes from 1024 to 16 KiB in scrolls_litecoin and scrolls_bitcoin. That adds about 0.2B cycles per call on a 13-node subnet, and under 0.5B on a 34-node subnet.
  • The success handling stays the same: a 200 with the txid, or the -27 "already in chain" response normalized by the transform.
  • Adds 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 ya3wx or rpgc6. The demo canister yv4h2
already runs this fix from demo/zkltc-testnet.

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.
Copilot AI balanced review requested due to automatic review settings November 4, 2026 17:42

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@greptile-apps

greptile-apps Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] This PR appears safe to merge.

Summary

Raises the broadcast response cap from 1 KiB to 16 KiB in both Scrolls canisters, leaving room for response headers.

  • Bitcoin and Litecoin broadcasts now allow 16 KiB responses.

Reviews (1) · Last reviewed commit: "docs(solutions): broadcast outcall cap c..." · Reviewed by Greptile

@imikushin
imikushin merged commit c0674c8 into main Nov 4, 2026
4 checks passed
@imikushin
imikushin deleted the fix/scrolls-broadcast-response-cap branch November 4, 2026 17:53
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