Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: Cairo 2.6.0 contracts fail to compile #1581

Open
SamrendraS opened this issue Apr 30, 2024 · 2 comments
Open

bug: Cairo 2.6.0 contracts fail to compile #1581

SamrendraS opened this issue Apr 30, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@SamrendraS
Copy link
Contributor

Bug Report

On declaring contracts compiled with Cairo 2.6.0, Madara returns a 500 error

2024-04-30 12:44:13 Failed to convert BroadcastedTransaction to AccountTransaction: Failed to compile to Sierra

The same issue can be resolved when compiling with Cairo 2.5.0.

Steps to reproduce:
casm.contract_class.json
sierra.compiled_contract_class.json

The files linked above are ones generated with Cairo 2.6.0, attempting to declare them causes an error in Madara

@SamrendraS SamrendraS added the bug Something isn't working label Apr 30, 2024
@tdelabro
Copy link
Collaborator

tdelabro commented May 6, 2024

@m-kus we talked about this at some point no?

@SamrendraS, to me, this seems like the intended behavior.

This version of Madara, only supports declaring contracts compiled with one specific version of the compiler.
If we upgrade Madara to a later version of cairo, we will stop supporting the previous one.
We want to be able to execute already declared classes that have been compiled with past versions of the compiler, but to only accept new ones that have been compiled with the latest version.

@EvolveArt @apoorvsadana @antiyro any opinion?

@m-kus
Copy link
Contributor

m-kus commented Jun 5, 2024

Sorry, missed the mention 🙈

@tdelabro yes exactly, had the same issue, mentioned here https://github.com/keep-starknet-strange/madara/blob/main/crates/client/starknet-block-import/README.md#notes

IIRC one of the proposed solutions was to have multiple external compilers for the according version ranges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants