argotorg / argotorg/solidity

Make `revertStrings: debug` the default in tests

Open
#16,659 0 comments 0 reactions 0 assignees View on GitHub
low effort low impact nice to have testing :hammer:
Dominant language
C++
Stars
25.7k
Forks
6.2k
Avg merge
2d 19h
Merged PRs (30d)
29

Description

Related to https://github.com/argotorg/solidity/pull/16483#discussion_r2829850997

### Description
Isoltest has a `revertStrings` setting. Make it default to `debug`.

### Motivation
The current default is the equivalent of `--revert-strings default`, which means that on validations we revert with no message (`revert(0, 0)`). This is primarily motivated by gas cost so it makes sense as a default for the compiler. However, we do not have that constraint when running tests and `--revert-strings debug` would be a more useful default.

### Example
By default expectations look like this:
```solidity
// ----
// f(uint256[]): 42 -> FAILURE
```

You can explicitly request more verbose debug strings:
```solidity
// ====
// revertStrings: debug
// ----
// f(uint256[]): 42 -> FAILURE, hex"08c379a0", 0x20, 43, "ABI decoding: invalid calldata a", "rray length"
```

It should be the default instead.
```solidity
// ----
// f(uint256[]): 42 -> FAILURE, hex"08c379a0", 0x20, 43, "ABI decoding: invalid calldata a", "rray length"
```

Contributor guide

Open the contributing guide

Research direction

Start by locating isoltest's handling of the revertStrings setting and the existing tests or examples that exercise revert expectations. Change only the test default while preserving the explicit debug override, then run the relevant isoltest tests and verify the default output includes the debug revert data shown in the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, solidity
Domain
compilers, testing
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
58/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.