Skip to content

fix(scrolls): check Litecoin scrolls against the ya3wx key - #273

Merged
cursor[bot] merged 2 commits into
mainfrom
cursor/pin-litecoin-scrolls-key-53c0
Nov 3, 2026
Merged

cursor[bot] merged 2 commits into
mainfrom
cursor/pin-litecoin-scrolls-key-53c0

Conversation

@imikushin

@imikushin imikushin commented Nov 3, 2026 •

Copy link
Copy Markdown
Member

Litecoin scroll outputs are checked against the existing scrolls_litecoin canister ya3wx-vqaaa-aaaak-qzmja-cai. addresses signs the first-input preimage and pays for Schnorr from the canister balance. The host fills Litecoin scroll outputs by calling ya3wx, and verifies the signature with SCROLLS_LITECOIN_ADDRS_PUBKEY 1ed9e3732a0b1df786044973959dbdd0aec8e0e23bbb9bdbe3459e5d57c4728f. Bitcoin stays on SCROLLS_ADDRS_PUBKEY for rpgc6-oqaaa-aaaak-qy3uq-cai.

Version 16 has one verification key, from the rebuilt guests: 0x00764be83874ba96706a4134fc8c09ccc40f60a2988a6106f9a9134b1acfa4e9. That is charms-lib's SPELL_VK and the Ethereum PROGRAM_VKEY. The previous version-16 key is not a fallback. Versions 0 through 15 and GROTH16_VK_HASH are unchanged.

scrolls/LITECOIN.md and scrolls/BITCOIN-V16.md upgrade those two existing canisters with icp-cli (icp deploy --mode upgrade --no-create). They do not create a canister. lmbwh-3qaaa-aaaak-qunha-cai stays on its current wasm. Cycles come from the admin identity's cycles ledger. The cycles wallet qcncw-aqaaa-aaaac-qhmma-cai is empty and unused.

This pull request does not deploy or upgrade anything. After it merges, Ivan upgrades ya3wx-vqaaa-aaaak-qzmja-cai and rpgc6-oqaaa-aaaak-qy3uq-cai from this main, from his own machine. Until rpgc6 is upgraded, that deployment still embeds the previous version-16 key. After he upgrades it, the same canister id embeds 0x00764be83874ba96706a4134fc8c09ccc40f60a2988a6106f9a9134b1acfa4e9. Do not upgrade the Ethereum proxy 0x7f7ab9224782dE7a20e89E6fc0DE52Ff6b48d8f0, scrolls_cardano, or charms_metadata.

litecoin_spell_is_one_op_return stays a single OP_RETURN spell.

Tests

  • cargo test --manifest-path scrolls/Cargo.toml --package scrolls_litecoin
  • cargo test -p charms-client --lib scrolls_litecoin_addrs_pubkey_is_the_one_derived_for_icp_threshold_schnorr
  • cargo test -p charms-client --lib litecoin_spell_accepts_a_scroll_output_signed_by_the_litecoin_key
  • cargo test -p charms-client --lib litecoin_spell_rejects_a_scroll_output_not_signed_by_the_litecoin_key
  • cargo test --profile=test litecoin_spell_is_one_op_return
Open in Web Open in Cursor 

Litecoin addresses sign the first-input preimage and pay for Schnorr from the canister balance. The host verifies that signature with the ya3wx threshold key and fills Litecoin scroll outputs from ya3wx. The runbooks upgrade the existing ya3wx and rpgc6 canisters with icp-cli.

The guests workflow uploads rebuilt bytes when the checker drifts. That upload comes out once those bytes replace the version-16 key.

Co-authored-by: i.mikushin <i.mikushin@icloud.com>
Copilot AI balanced review requested due to automatic review settings November 3, 2026 16:28

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 3, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[High impact] The PR appears safe to merge; the previous stale-guest issue is addressed and no new blocking issue was found.

Summary

Litecoin scroll outputs now use the existing ya3wx canister and its Schnorr key. Bitcoin keeps its existing signer.

  • Litecoin spells can create Scrolls outputs with their own signer.
  • Version 16 proofs now use the updated verification key.

Reviews (2) · Last reviewed commit: "fix(guests): pin the rebuilt version-16 ..." · Reviewed by Greptile

Comment thread charms-client/src/lib.rs Resolved
The CI guest rebuild produced SPELL_VK 0x00764be83874ba96706a4134fc8c09ccc40f60a2988a6106f9a9134b1acfa4e9. That is the only version-16 key, including the Ethereum program key. The temporary upload step is removed.

Co-authored-by: i.mikushin <i.mikushin@icloud.com>
@cursor
cursor Bot merged commit 685f950 into main Nov 3, 2026
7 checks passed
@cursor
cursor Bot deleted the cursor/pin-litecoin-scrolls-key-53c0 branch November 3, 2026 17:12
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.

3 participants