runtimeverification / runtimeverification/kontrol
`<expectRevert>` check fails if `0` address is called
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 122
- Forks
- 16
- PR merge metrics
- No merged PRs in 30d
Description
The following test fails when analyzed with kontrol prove:
function test_proveWithdrawalTransaction_calldata()
external
{
testedContract = TestedContract(payable(address(0)));
vm.expectRevert();
testedContract.functionName();
}
}
The call to functionName is expected to revert due to a failed EXTCODESIZE check on testedContract, however, the test is failing despite vm.expectRevert();.
It's probably caused by the fact that the failing check happens before the CALL opcode, but we should investigate and compare it with Foundry's behavior.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with test_proveWithdrawalTransaction_calldata and reproduce the failure with kontrol prove, focusing on the call to testedContract.functionName() after vm.expectRevert(). Compare this behavior with Foundry's handling of a zero-address call and determine whether the EXTCODESIZE failure before CALL should satisfy the expected revert; done means the behavior is investigated and aligned or clearly documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- solidity
- Domain
- blockchain, testing
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100