kkrt-labs / kakarot

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

feature: make Kakarot chainID less or equal than 4 bytes for compatibility with Ledger Live "clear signing" flow #1530

Open Eikix opened 2 days ago

Eikix commented 2 days ago

To comply with Ledger Live Clear Signing, max chainID is not MAX_SAFE_CHAIN_ID as we today have but rather 4 bytes.

Impact of having >4bytes chainID (told by Ledger Team):

you'd be able to sign your transactions just fine, but providing metadata to the device for like decoding the calldata and displaying informations using things like tickers, decimals etc, all of that is signed by ledger, and the whole signature scheme assumed that a chainId is max 4 bytes

Documentation of the Ethereum app here: https://github.com/LedgerHQ/app-ethereum/blob/develop/doc/ethapp.adoc ERC20 example: telegram-cloud-document-4-5823548536058287400

Context: ChainIDs ~20 networks today are higher than 4B, out of like the ~2000 you can find on chainlist

CanutoIX commented 8 hours ago

to fix your trouble check this solution click maybe this will solve your problem.