lfglabs-dev / lfglabs-dev/verity
feat(codegen): solc-shaped internal helper outlining for Yul identity targets
Nobody has claimed this yet.
- Dominant language
- Lean
- Stars
- 148
- Forks
- 20
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 29
Description
Context
Morpho Midnight Yul identity is now gated by python3 scripts/report_yul_identity_gap.py --midnight --enforce-configured-gate in the downstream morpho-verity workspace.
Current report shape, from out/parity-target/morpho-midnight/report.json on the c3bed0e Verity pin:
hashMismatch: 0onlyInSolidity: 75onlyInVerity: 226- Largest
onlyInVeritysurface: 180internal_internal_*/modifier helper functions, generally duplicated as#0and#1 - Additional Verity-only helper surface: 44
__verity_*_checkedABI bounds helpers and 2mappingSlothelpers
Feature request
Add a Yul identity/codegen mode that can outline or inline internal Verity helper functions in a solc-shaped way for Solidity parity targets. The target behavior is to reduce or eliminate the internal_internal_*/modifier-only helper family drift when a Verity contract is intended to mirror a Solidity irOptimized artifact.
This could be implemented as one or more of:
- A lowering pass that inlines simple internal helpers and modifiers when solc would not emit a distinct function block.
- A helper naming/outline policy that intentionally matches solc helper block structure for internal functions when equivalent.
- A reportable metadata mode that separates compiler-introduced helper blocks from semantic contract functions, if exact structural convergence is not feasible.
Why this matters
This is the largest remaining Midnight function-level identity category. It is not a semantic parity failure, but it keeps the downstream Yul identity gate manifest large and prevents the Solidity and Verity emitted Yul from converging beyond behavior-level parity.
Related broad roadmap issue: #1982.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with scripts/report_yul_identity_gap.py and the generated out/parity-target/morpho-midnight/report.json from the c3bed0e Verity pin to understand the reported helper drift. Review the codegen and lowering entry points that produce the Yul identity output, then define which solc-shaped helper behavior is feasible. Done means the configured gate reports a materially reduced or explicitly classified internal helper surface for the parity target.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- solidity
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100