argotorg / argotorg/solidity

EthDebug source contents and language are mandatory

Open
#16,001 0 comments 0 reactions 0 assignees View on GitHub
bug :bug:
Dominant language
C++
Stars
25.7k
Forks
6.2k
Avg merge
2d 19h
Merged PRs (30d)
29

Description

## Description

According to the EthDebug spec, a source's contents and language are required fields, but solc does not generate them. See: https://ethdebug.github.io/format/spec/materials/source

## Environment

- Compiler version: Version: 0.8.29+commit.ab55807c.Linux.g++
- Compilation pipeline (legacy, IR, EOF): IR
- Target EVM version (as per compiler settings): osaca
- Framework/IDE (e.g. Foundry, Hardhat, Remix): No
- EVM execution environment / backend / blockchain client: No
- Operating system: WSL

## Steps to Reproduce

```bash
solc --standard-json input.json --pretty-json > ouput.json
```

input.json
~~~json
{
"language": "Solidity",
"sources": {
"contract.sol": {
"content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.29;\n\nabstract contract GreeterBase {\n function greet() public view virtual returns (string memory);\n}"
},
"interface.sol": {
"content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.29;\n\ninterface IGreeter {\n function greet() external view returns (string memory);\n}"
}
},
"settings": {
"viaIR": true,
"debug": {
"debugInfo": [
"ethdebug"
]
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode.ethdebug",
"evm.deployedBytecode.ethdebug",
"ir",
"irOptimized"
]
}
}
}
}
~~~

output.json
~~~json
{
"contracts": {
// ...
},
"ethdebug": {
"compilation": {
"compiler": {
"name": "solc",
"version": "0.8.29+commit.ab55807c.Linux.g++"
},
"sources": [
{
"id": 0,
"path": "contract.sol"
// "language": <-- missing
// "contents": <-- missing
},
{
"id": 1,
"path": "interface.sol"
// "language": <-- missing
// "contents": <-- missing
}
]
}
},
"sources": {
"contract.sol": {
"id": 0
},
"interface.sol": {
"id": 1
}
}
}
~~~

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the issue with solc --standard-json using the provided input.json and inspect the generated ethdebug compilation.sources entries. Compare the output with the EthDebug source requirements; done means each source entry contains its required language and contents fields.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, solidity
Domain
blockchain, compilers
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.