dapptools icon indicating copy to clipboard operation
dapptools copied to clipboard

`unexpected symbolic argument` for prove test with single `address` argument

Open transmissions11 opened this issue 4 years ago • 4 comments

I have a simple test function that takes a single address arg:

function proveConnectingExecutionManager(address newExecutionManager) public {
        registry.connectExecutionManager(newExecutionManager);
        assertEq(registry.L1_NovaExecutionManagerAddress(), newExecutionManager);
}

https://github.com/Rari-Capital/nova-invariants/blob/4d1a9c9a4aa929314e82da79b6d52c980506c57e/src/Registry.t.sol#L31

The connectExecutionManager() function is simple:

address public L1_NovaExecutionManagerAddress;

function connectExecutionManager(address newExecutionManagerAddress) external requiresAuth {
        L1_NovaExecutionManagerAddress = newExecutionManagerAddress;
        emit ExecutionManagerConnected(newExecutionManagerAddress);
}

https://github.com/Rari-Capital/nova/blob/3252ceea5e50d3c29be69861b77908a5b4f28815/contracts/L2_NovaRegistry.sol#L39-L48

Why is this failing with unexpected symbolic argument:

hevm: unexpected symbolic argument
CallStack (from HasCallStack):
  error, called at src/EVM/Symbolic.hs:42:14 in hevm-0.48.1-68JBNYehi12HotjGf8Zowl:EVM.Symbolic

transmissions11 avatar Sep 26 '21 00:09 transmissions11

You would have to look into which opcode this error is thrown on to get a clue about what specifically is not supported here, I agree that it looks like this should be doable

MrChico avatar Nov 13 '21 18:11 MrChico

How can I find which opcode? The debugger crashes running the test too

transmissions11 avatar Nov 13 '21 20:11 transmissions11

Whatever opcode it crashes on if you step carefully would be the culprit

MrChico avatar Nov 14 '21 01:11 MrChico

hmm ok the debugger doesn't actually seem to crash anymore, just show that the test failed without any assertion violations or reverts? 🤔

https://asciinema.org/a/FRAL9R3u42exwNWtp3FVCL0l3

transmissions11 avatar Nov 14 '21 03:11 transmissions11