Yul exception:Could not create stack layout after 1000 iterations.

Hey there :slight_smile: I wrote a fairly simple circuit and I generated a UltraVerifier for it:
Now, when I try to deploy the contract I got the following error:
Yul exception:Could not create stack layout after 1000 iterations.
Since I’m new in noir I don’t really know what to do /look at.
I’m using foundry and that’s my foundry.toml file:

[profile.default]
src = "src"
out = "out"
libs = ["lib", "noir"]
ffi = true
ast = true
build_info = true
extra_output = ["storageLayout"]
optimizer = true
optimizer_runs = 0
via_ir=true  

remappings = [
    my remapps
]

can anyone help here? also, is there a noir discord?
thank you!!

1 Like

This is a great question for discord. You can join the Noir discord here.

1 Like

Hi! The error Yul exception: Could not create stack layout after 1000 iterations indicates that the compiler is having trouble optimizing the code, especially when via_ir is enabled. This issue can arise due to the complexity or size of the code that the compiler is trying to optimize, particularly when many intermediate objects are generated.