Skip to content

[mlir][Sol] Revert on failed create/create2 in sol.new lowering#37

Merged
vladimirradosavljevic merged 1 commit intomainfrom
mlir_revert_on_failed_create_create2
Mar 13, 2026
Merged

[mlir][Sol] Revert on failed create/create2 in sol.new lowering#37
vladimirradosavljevic merged 1 commit intomainfrom
mlir_revert_on_failed_create_create2

Conversation

@vladimirradosavljevic
Copy link
Copy Markdown
Contributor

@vladimirradosavljevic vladimirradosavljevic commented Mar 12, 2026

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the sol.new lowering to correctly revert when an EVM create/create2 fails (i.e., returns 0), forwarding any revert data produced by the initcode.

Changes:

  • Change sol.new lowering to materialize yul.create/yul.create2 as a value instead of directly replacing the op.
  • Add a status == 0 check after create/create2.
  • Emit a conditional forwarding revert on failure before replacing the original sol.new op result.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Copy link
Copy Markdown
Contributor

@PavelKopyl PavelKopyl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@vladimirradosavljevic vladimirradosavljevic force-pushed the mlir_address_type_builtins branch from 7ffc8fe to d88179f Compare March 13, 2026 09:49
Base automatically changed from mlir_address_type_builtins to main March 13, 2026 09:50
Signed-off-by: Vladimir Radosavljevic <vr@matterlabs.dev>
@vladimirradosavljevic vladimirradosavljevic force-pushed the mlir_revert_on_failed_create_create2 branch from 7708130 to 6425a2a Compare March 13, 2026 09:51
@vladimirradosavljevic vladimirradosavljevic merged commit 60a40c5 into main Mar 13, 2026
6 checks passed
@vladimirradosavljevic vladimirradosavljevic deleted the mlir_revert_on_failed_create_create2 branch March 13, 2026 09:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants