-
Notifications
You must be signed in to change notification settings - Fork 406
Description
Describe the issue:
The same virtual environment was working back in v2.2.1 and apparently broken in v2.2.2. All I did was simply upgrade echidna from v2.2.1 to v2.2.2 where v2.2.1 version renamed to echidna_v2.2.1
The error occurs after Running slither on
and halted at echidna: setupTerm: Couldn't look up terminfo entry "xterm-256color"
The relevant log below is a result of switching between the two versions over the same contract and same environment.
Code example to reproduce the issue:
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
/*
echidna TestEchidna.sol --contract TestCounter
*/
contract Counter {
uint public count;
function inc() external {
count += 1;
}
function dec() external {
count -= 1;
}
}
contract TestCounter is Counter {
function echidna_test_true() public view returns (bool) {
return true;
}
function echidna_test_false() public view returns (bool) {
return false;
}
function echidna_test_count() public view returns (bool) {
// Here we are testing that Counter.count should always be <= 5.
// Test will fail. Echidna is smart enough to call Counter.inc() more
// than 5 times.
return count <= 5;
}
}
Version:
echidna --version
Echidna 2.2.2
slither --version
0.10.0
Additional detail of environment:
Windows 11 WSL2 Ubuntu 22.04.2 LTS
PyCharm 2023.3.3 (Community Edition)
Virtual Environment (venv)
Relevant log output:
Observed:
echidna ./TestEchidna.sol --contract TestCounter
Compiling ./TestEchidna.sol... Done! (0.291617561s)
Analyzing contract: ./TestEchidna.sol:TestCounter
Running slither on ./TestEchidna.sol... Done! (0.522016266s)
echidna: setupTerm: Couldn't look up terminfo entry "xterm-256color" => Problem
Expected:
echidna_v2.2.1 ./TestEchidna.sol --contract TestCounter
Compiling ./TestEchidna.sol... Done! (0.292887755s)
Analyzing contract: ./TestEchidna.sol:TestCounter
Running slither on ./TestEchidna.sol... Done! (0.525188319s)
echidna_test_count: failed!💥
Call sequence:
inc()
inc()
inc()
inc()
inc()
inc()
echidna_test_false: failed with no transactions made ⁉️
echidna_test_true: passing
Unique instructions: 245
Unique codehashes: 1
Corpus size: 5
Seed: 4522597650411972567