crytic / crytic/echidna

Corpus format without Haskell `ByteString Show` representation

Open
#1,594 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Haskell
Stars
3.2k
Forks
432
Avg merge
1d 20h
Merged PRs (30d)
5

Description

### Describe the desired feature

**Current Situation**

Bytes in Echidna corpus files use the `ByteString` `Show` representation. This produces a Haskell string literal using [Haskell string-literal escape conventions](https://downloads.haskell.org/ghc/latest/docs/libraries/base-4.22.0.0-66f8/GHC-Show.html#v:showLitString), requiring other tools to understand Haskell-specific escape sequences.

```json
{
"tag": "SolCall",
"contents": [
"example",
[
{
"tag": "AbiBytes",
"contents": [2, "\"\\NUL\\255\""]
}
]
]
}
```

**Suggested Change**

Represent bytes as `0x`-prefixed hexadecimal strings instead.

```json
{
"tag": "SolCall",
"contents": [
"example",
[
{
"tag": "AbiBytes",
"contents": [2, "0x00ff"]
}
]
]
}
```

Contributor guide

Open the contributing guide

Research direction

The issue names no implementation files or tests; start by locating the corpus JSON serialization and deserialization entry points, then find the handling of AbiBytes. Compare the current ByteString Show output with the requested 0x-prefixed hexadecimal form; done means corpus bytes round-trip and match the shown format without Haskell-specific escapes.

Written by the indexing model from the issue text.

Assessment

Tech stack
haskell
Domain
data, testing
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
65/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.