kkrt-labs / kakarot

Kakarot is a zkEVM written in Cairo, leveraging the STARK proof system.
https://kakarot.org
MIT License
991 stars 302 forks source link

feat: use Argent multisig in the deploy script #1411

Closed ClementWalter closed 1 month ago

ClementWalter commented 2 months ago

Feature Request

Describe the Feature Request

We want to be able to use a multisig instead of the basic Argent account in the deployment script, for deploying Kakarot and other critical part of the stack.

How

eugypalu commented 1 month ago

The sign functions used by the two libraries (starknet.js and starknet_py) are different, and as a result, they produce different signatures for the same (msg_hash, priv_key), even though both signatures are valid. I have ruled out other possible causes through testing with both libraries. At the signing step, the same hash is produced and the same key is used, so the steps leading up to the signature are correct, and the issue lies in the signature calculation. However, this difference creates a compatibility problem with Argent’s API, which uses starknet.js to calculate transaction signatures. When a transaction is signed using starknet_py, the resulting signature is rejected by Argent’s API as invalidSignature