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

Fix ABIEncoder V2 compilation failures #636

Closed
1 task
cgewecke opened this issue May 24, 2021 · 5 comments
Closed
1 task

Fix ABIEncoder V2 compilation failures #636

cgewecke opened this issue May 24, 2021 · 5 comments

Comments

@cgewecke
Copy link
Member

cf: solidity 10354

@dileepfrog discovered a way to configure the optimizer so stack too deep errors go away without stripping out the trace.

config.compilers.solc.settings.optimizer.enabled = false;
config.compilers.solc.settings.optimizer.details = {
  yul: true,
  yulDetails: {
    stackAllocation: true,
  },
};

TODO

  • Check behavior across solc versions
JasoonS added a commit to Float-Capital/solidity-coverage that referenced this issue Jul 3, 2021
…pilation of all valid contracts without optimization
ali2251 added a commit to ali2251/solidity-coverage that referenced this issue Jul 8, 2021
Fix for ABIEncoderV2
sc-forks#636
@amalnathsathyan
Copy link

image
Still same error !! Any help ?

@washboardalex
Copy link

The above config change did not work for us, we are still experiencing this issue with compiler v0.7.5 and abi encoder v2.

@dileepfrog
Copy link

@amalnathsathyan @washboardalex You will need to make these changes to the solidity-coverage code itself, which overrides your project settings. For example, Float-Capital@723ed39#diff-21d7978b20ae71148e42ff520f3a63e74edba221f9285763d67eb1735d42fdbfR111

@cgewecke
Copy link
Member Author

In 0.7.17 this special config is available as a boolean option.

Will test it out ... if everything seems okay will make this default in 0.8.x

To turn it on, use .solcover.js to set

configureYulOptimizer: true

@cgewecke
Copy link
Member Author

In 0.7.18 you can additionally specify any optimizer details via a .solcover.js config option. Have also added a little section to REAMDE FAQ docs with other configurations known to work.

There's not much more we can do about this I think (unfortunately)

andy-at-mask added a commit to DimensionDev/MysteryBox that referenced this issue Feb 15, 2022
    CompilerError: Stack too deep when compiling inline assembly: Variable headStart is 1 slot(s) too deep inside the stack.
    issue description: ethereum/solidity#10354
    workaround: sc-forks/solidity-coverage#636
andy-at-mask added a commit to DimensionDev/MysteryBox that referenced this issue Feb 18, 2022
    CompilerError: Stack too deep when compiling inline assembly: Variable headStart is 1 slot(s) too deep inside the stack.
    issue description: ethereum/solidity#10354
    workaround: sc-forks/solidity-coverage#636
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants