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

fact_registry_FactRegistry.contract_class.json too large for deployment when LAYOUT_TYPES is set to "starknet" #145

Closed
swift-hl opened this issue Sep 5, 2024 · 4 comments
Assignees

Comments

@swift-hl
Copy link

swift-hl commented Sep 5, 2024

I encountered an issue while deploying a contract to the StarkNet testnet. When I set LAYOUT_TYPES to "starknet", the deployment fails during the execution of the following command:

starkli declare ./target/dev/fact_registry_FactRegistry.contract_class.json

After investigating, it seems the functions eval_composition_polynomial_inner and eval_oods_polynomial_inner are too large, which likely causes the contract size to exceed the limits for deployment.

Would it be possible to optimize these functions?

@Okm165
Copy link
Collaborator

Okm165 commented Sep 6, 2024

Hey @swift-hl your observations are correct we resolve this issue by splitting the verifier to multi-contract logic.
Checkout this https://github.com/HerodotusDev/integrity/tree/autogenerated_split branch we implemented this already.
It will be merged into main after refactor and probably dynamic layout split addition.

@Okm165
Copy link
Collaborator

Okm165 commented Sep 6, 2024

As u noticed, the Cairo1 implementation of simple logic in auto-generated is main cause of the size of the contract class json.
In the past I already introduced some Cairo1 specific impl tricks to reduce the size by 4x, if we find some more tricks to do so I will optimize the auto-generated further, but now we moved to splitting it.

@Okm165 Okm165 self-assigned this Sep 9, 2024
@swift-hl
Copy link
Author

I optimized the size of the contract class JSON in this PR '#149'.

@fmkra
Copy link
Member

fmkra commented Nov 19, 2024

Fixed in the new contract splitting architecture

@fmkra fmkra closed this as completed Nov 19, 2024
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

No branches or pull requests

3 participants