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

Failed to compile with zksolc: address-to-bytecode conversion error #334

Closed
2 tasks done
webthethird opened this issue Apr 22, 2024 · 1 comment
Closed
2 tasks done

Comments

@webthethird
Copy link

webthethird commented Apr 22, 2024

Component

Forge

Have you ensured that all of these are up to date?

  • Foundry
  • Foundryup

What version of Foundry are you on?

forge 0.0.2 (532ef5e 2024-04-22T00:21:35.201114596Z)

What command(s) is the bug in?

forge test, forge build

Operating System

Linux

Describe the bug

I installed foundry-zksync yesterday, but now forge test is failing to compile with zksolc. Specifically, I am getting the following error when it tries to compile a foundry test I have been using with vanilla foundry. Note that this is not the test file I am trying to run now, as I used --match-path test/unit/LimitOrderTest.sol but the error is coming from RewardTest.sol.

image

The error reads:

Failed to compile with zksolc: Compilation failed with "Contract `test/unit/RewardsTest.sol:RewardsTest` compiling error: The contract `test/unit/RewardsTest.sol:RewardsTest` assembly-to-bytecode conversion error: assembly parse error Label DEFAULT_FAR_RETURN was tried to be used for either PC or constant at offset 67996 that is more than `65535` addressable spaceThe contract `test/unit/RewardsTest.sol:RewardsTest` assembly-to-bytecode conversion error: assembly parse error Label DEFAULT_FAR_RETURN was tried to be used for either PC or constant at offset 67996 that is more than `65535` addressable space\n\n\nStack backtrace:\n   0: <unknown>\n   1: <unknown>\n   2: <unknown>\n   3: <unknown>\n   4: <unknown>\n   5: <unknown>\n   6: <unknown>\n   7: <unknown>\n   8: <unknown>\n   9: <unknown>\n  10: <unknown>\n  11: <unknown>\n  12: <unknown>\n  13: <unknown>\n  14: <unknown>\n  15: <unknown>\n  16: <unknown>\n  17: <unknown>\n  18: <unknown>\n  19: <unknown>\n  20: <unknown>\n  21: <unknown>\n  22: <unknown>\n  23: <unknown>\n  24: <unknown>\n  25: <unknown>\n  26: <unknown>\n  27: <unknown>\n  28: <unknown>\n  29: <unknown>\n  30: <unknown>\n  31: <unknown>\n". Using compiler: "/home/webthethird/.zksync/zksolc-linux-amd64-musl-v1.4.0", with args "/home/webthethird/Ethereum/Increment/peripheral-contracts/test/unit/RewardsTest.sol" ["--standard-json", "--solc", "/home/webthethird/.svm/0.8.20/solc-0.8.20"]

RewardsTest.sol is a large file, certainly too large to be deployable, but that has never been an issue with foundry before installing this fork. There also should be no need to compile RewardsTest, since I only want to run the tests in LimitOrderTest.sol.

@webthethird
Copy link
Author

Sorry, this is a duplicate of #300

@webthethird webthethird closed this as not planned Won't fix, can't repro, duplicate, stale Apr 22, 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

1 participant