-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
internal error: entered unreachable code: We should never have decoded calldata for contract creations
#6139
Comments
@Evalir what changed with trace decoding? foundry/crates/evm/traces/src/lib.rs Line 262 in cc760aa
this unreachable doesn't look sound to me |
@mattsse we'll have to triage—this unreachable was already there from the previous implementation. Possible that the issue might come from another place |
looks like we're decoding init code now, so I'm removing the unreachable for now this shouldn't be there anyway |
any other issues we need to fix asap @pcaversaccio ? :) sorry for the inconveniences lately, lots of moving parts atm -.- |
triggering new release once merged |
Well you might look at a similar issue I reported some months ago: #5629. Very weird behaviour. |
See the debugging info I added there: If I replace hex"01" with abi.encode(hex"01") it will run successfully (if I use abi.encodePacked instead it will revert; the function deployCreate uses bytes as input for the argument, which is the init code). So two questions @Evalir: why is this throwing only if I use the ci profile and why is there an issue with the hex/abi.encodePacked instruction? |
okay that's the same bug, yeah. so the bug here is actually pretty simple that we just didn't handle the case where we were able to decode the constructor calldata this panic is now removed with #5629, so no more crashes here |
Amazing! Is this closeable @pcaversaccio ? |
one sec -currently running my CI with the latest release |
LGTM - thx for fixing. |
Component
Forge
Have you ensured that all of these are up to date?
What version of Foundry are you on?
forge 0.2.0 (93f64c7 2023-10-27T00:24:49.496418315Z)
What command(s) is the bug in?
forge test
Operating System
Linux
Describe the bug
Multiple times during CI runs I face the following error (example)
I'm doing an invariant test on my create factory here. The issue as it seems is that for certain
initCode
inputs (i.e. decoded calldata) it panics. It's getting pretty annoying lately tbh. Any way to disable this in my test environment?The text was updated successfully, but these errors were encountered: