Skip to content

feat(scrolls): add the Litecoin canister source - #272

Merged
cursor[bot] merged 4 commits into
mainfrom
cursor/litecoin-scrolls-canister-686e
Nov 3, 2026
Merged

cursor[bot] merged 4 commits into
mainfrom
cursor/litecoin-scrolls-canister-686e

Conversation

@imikushin

@imikushin imikushin commented Nov 3, 2026 •

Copy link
Copy Markdown
Member

Summary

Adds the scrolls_litecoin canister source and the deploy runbook at scrolls/LITECOIN.md. This pull request does not deploy a canister and does not merge.

The canister follows the Bitcoin scrolls shape with its own constants:

  • vetKD domain scrolls_litecoin/derivation_prefix[/v1]
  • network labels main (ltc) and test (tltc)
  • broadcast URLs on litecoinspace
  • empty init (service : () ->), no create-time cycles argument, no fee-address setter
  • deposit_cycles minimum 1000000000000

The Litecoin fee addresses are their own values in scrolls/src/scrolls_litecoin/config.yaml. The initial keys are the Bitcoin fee keys in ltc1 and tltc1 encoding. That reuse is intended. A later change edits only that yaml, then rebuilds and upgrades this canister. It does not require editing the Bitcoin fee config.

Every dfx build and every dfx deploy in the runbook unsets NEXT_SCROLLS_LITECOIN_CANISTER_ID. Deploy compiles again, so a shell-exported value is not compiled into the wasm that gets installed, including the fee-address upgrade.

addresses rejects an empty out_is before any signing call. Before sign_with_schnorr, it accepts the caller cycles that cost_sign_with_schnorr quotes for key key_1 and that request. The IC cycle-cost reference lists 26153846153 cycles for the production key. A surplus is not kept as a fee. No cycles attached does not reach the signer.

The runbook wasm check fails when the file is missing. It looks for a canister principal, not the forwarding variable's name.

There is no host caller. Filling scroll outputs needs a canister id, and checking the threshold signature needs a public key. Neither exists until this canister is deployed, so Litecoin scroll outputs stay rejected.

scrolls/Cargo.toml and scrolls/Cargo.lock gain the new package so cargo test --package scrolls_litecoin and --locked CI can see it. The lock diff is only the new scrolls_litecoin package entry.

Pull request 269 stays open and is not merged. This branch does not edit charms-client, guest bytes, scrolls_bitcoin, or the version-16 key.

Test plan

  • cargo test --manifest-path scrolls/Cargo.toml --package scrolls_litecoin (15 passed on the parent commit; the runbook check passed again after this edit)
  • cargo test --profile=test litecoin_spell_is_one_op_return on the earlier parent commit
  • No attached cycles does not call the signer (no_attached_cycles_never_reaches_the_signer)
  • Runbook forwarding check fails for a missing wasm and for an embedded principal
  • dfx build is intentionally not run in this pull request
Open in Web Open in Cursor 

Add scrolls_litecoin with its own vetKD domain, main and test labels,
Litecoin fee addresses, and litecoinspace broadcast URLs. Init takes
no arguments. No host caller is added, so Litecoin scroll outputs stay
rejected. The workspace member and lock entry let cargo test the package
under --locked.

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

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 latest runbook change fixes the outstanding forwarding concern.

Summary

Adds the scrolls_litecoin canister source, build registration, and deployment runbook. This PR does not deploy it.

  • The Litecoin canister signs selected transaction inputs and broadcasts the transaction.
  • Callers can get Litecoin output scripts with a Schnorr signature.
  • The Litecoin canister checks spells in Litecoin transactions.
  • Operators can build and deploy Litecoin Scrolls as a separate canister.

No new issues were found in the changes since the previous review.

Reviews (4) · Last reviewed commit: "docs(scrolls): unset the Litecoin forwar..." · Reviewed by Greptile

Comment thread scrolls/src/scrolls_litecoin/src/lib.rs Resolved
Comment thread scrolls/LITECOIN.md Resolved
cursoragent and others added 2 commits November 3, 2026 05:28
addresses accepts the cost_sign_with_schnorr quote before signing and
rejects an empty out_is first. The runbook wasm check fails when the
file is missing and looks for a forwarding principal.

Co-authored-by: i.mikushin <i.mikushin@icloud.com>
The ltc1 and tltc1 addresses stay in the Litecoin yaml. The runbook
states that those initial keys are the Bitcoin fee keys and that a later
change edits only that yaml. Drop the test that pinned the witness
programs to the Bitcoin bytes.

Co-authored-by: i.mikushin <i.mikushin@icloud.com>
Comment thread scrolls/LITECOIN.md Resolved
dfx deploy compiles again. Every deploy in the runbook unsets
NEXT_SCROLLS_LITECOIN_CANISTER_ID, including the fee-address upgrade,
so a shell export is not compiled into the wasm that gets installed.

Co-authored-by: i.mikushin <i.mikushin@icloud.com>
@cursor
cursor Bot merged commit 50a9950 into main Nov 3, 2026
4 checks passed
@cursor
cursor Bot deleted the cursor/litecoin-scrolls-canister-686e branch November 3, 2026 15:24
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