Duplicate auxdata in legacyAssembly
- Dominant language
- C++
- Stars
- 25.7k
- Forks
- 6.2k
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 29
Description
## Description
In Sourcify, we use the `legacyAssembly` compiler output to find auxdata in the bytecode. We encountered a contract that has the same auxdata twice in the `legacyAssembly` but this auxdata is only once in the deployedBytecode.
The contract can be found in Sourcify here: https://repo.sourcify.dev/1/0xC8D03C8456B6DD7D32579B4764B01DB2F05B5310
The issue is that we find two occurrences of the `a264697066735822122083cc662d6513f67d0b1f903cbaa4084d0b73f05b2f7d3a19f7a4764de12a82bc64736f6c63430008180033` auxdata in the `legacyAssembly` output. The compiler output can be found here:
[duplicate-auxdata.legacyAssembly.json](https://github.com/user-attachments/files/20081592/duplicate-auxdata.legacyAssembly.json)
See https://github.com/ethereum/sourcify/issues/2095 for the Sourcify issue.
## Environment
- Compiler version: v0.8.24+commit.e11b9ed9
- Compilation pipeline (legacy, IR, EOF): legacy
- Target EVM version (as per compiler settings): cancun
- Operating system: Linux
## Steps to Reproduce
Use solc v0.8.24+commit.e11b9ed9 to compile via this standard json input:
[duplicate-auxdata-input.json](https://github.com/user-attachments/files/20081499/duplicate-auxdata-input.json)
Contributor guide
Research direction
Start by compiling duplicate-auxdata-input.json with solc v0.8.24 using the legacy pipeline and compare the result with duplicate-auxdata.legacyAssembly.json. Trace the legacyAssembly output generation for the reported contract and verify that the auxdata is represented consistently with deployedBytecode, with no duplicate occurrence.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, solidity
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100