Repository navigation
fix(scrolls): check Litecoin scrolls against the ya3wx key - #273
Merged
Merged
Conversation
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>
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
[High impact] The PR appears safe to merge; the previous stale-guest issue is addressed and no new blocking issue was found. SummaryLitecoin scroll outputs now use the existing
Reviews (2) · Last reviewed commit: "fix(guests): pin the rebuilt version-16 ..." · Reviewed by Greptile |
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>
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.
Litecoin scroll outputs are checked against the existing
scrolls_litecoincanisterya3wx-vqaaa-aaaak-qzmja-cai.addressessigns the first-input preimage and pays for Schnorr from the canister balance. The host fills Litecoin scroll outputs by callingya3wx, and verifies the signature withSCROLLS_LITECOIN_ADDRS_PUBKEY1ed9e3732a0b1df786044973959dbdd0aec8e0e23bbb9bdbe3459e5d57c4728f. Bitcoin stays onSCROLLS_ADDRS_PUBKEYforrpgc6-oqaaa-aaaak-qy3uq-cai.Version 16 has one verification key, from the rebuilt guests:
0x00764be83874ba96706a4134fc8c09ccc40f60a2988a6106f9a9134b1acfa4e9. That ischarms-lib'sSPELL_VKand the EthereumPROGRAM_VKEY. The previous version-16 key is not a fallback. Versions 0 through 15 andGROTH16_VK_HASHare unchanged.scrolls/LITECOIN.mdandscrolls/BITCOIN-V16.mdupgrade those two existing canisters with icp-cli (icp deploy --mode upgrade --no-create). They do not create a canister.lmbwh-3qaaa-aaaak-qunha-caistays on its current wasm. Cycles come from the admin identity's cycles ledger. The cycles walletqcncw-aqaaa-aaaac-qhmma-caiis empty and unused.This pull request does not deploy or upgrade anything. After it merges, Ivan upgrades
ya3wx-vqaaa-aaaak-qzmja-caiandrpgc6-oqaaa-aaaak-qy3uq-caifrom this main, from his own machine. Untilrpgc6is upgraded, that deployment still embeds the previous version-16 key. After he upgrades it, the same canister id embeds0x00764be83874ba96706a4134fc8c09ccc40f60a2988a6106f9a9134b1acfa4e9. Do not upgrade the Ethereum proxy0x7f7ab9224782dE7a20e89E6fc0DE52Ff6b48d8f0,scrolls_cardano, orcharms_metadata.litecoin_spell_is_one_op_returnstays a single OP_RETURN spell.Tests
cargo test --manifest-path scrolls/Cargo.toml --package scrolls_litecoincargo test -p charms-client --lib scrolls_litecoin_addrs_pubkey_is_the_one_derived_for_icp_threshold_schnorrcargo test -p charms-client --lib litecoin_spell_accepts_a_scroll_output_signed_by_the_litecoin_keycargo test -p charms-client --lib litecoin_spell_rejects_a_scroll_output_not_signed_by_the_litecoin_keycargo test --profile=test litecoin_spell_is_one_op_return