Skip to content

Commit

Permalink
Merge pull request #453 from rsksmart/enhance_eth_compatibility_contr…
Browse files Browse the repository at this point in the history
…act_deployment

RSKIP 453: Prevent address creation on failed CREATE/CREATE2 operations
  • Loading branch information
aeidelman authored Nov 20, 2024
2 parents 22ea8ca + 088ee36 commit f22720e
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 1 deletion.
51 changes: 51 additions & 0 deletions IPs/RSKIP453.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
---
rskip: 453
title: Prevent address creation on failed CREATE/CREATE2 operations
description:
status: Draft
purpose:
author: AS
layer: Core
complexity: 2
created: 2024/10/09
---
# Prevent address creation on failed CREATE/CREATE2 operations


|RSKIP | 453 |
| :------------ |:-------------|
|**Title** |Prevent Address Creation on Failed CREATE/CREATE2 Operations|
|**Created** |OCT-2024 |
|**Author** |AS |
|**Purpose** |Usa |
|**Layer** |Core |
|**Complexity** |1 |
|**Status** |Draft |


## Abstract

This RSKIP proposes aligning Rootstock (RSK) contract deployment behavior with Ethereum by failing contract creation. This change ensures no empty contract accounts are left in the state, mirroring Ethereum's behavior.

## Motivation

RSK currently leaves empty contract accounts in the state when contract creation fails, differing from Ethereum. Aligning with Ethereum will improve compatibility, security, and user experience in the ecosystem.

## Specification

1. **Contract Size Limit Exceeded**:
When deploying contracts via CREATE/CREATE2 opcodes, if the code size exceeds the max limit, the contract creation should fail, and no empty contract account should remain in the state.

2. **Insufficient Gas**:
If gas runs out during contract creation (CREATE/CREATE2), the contract creation should fail, and no empty contract account should be created.

3. **No Gas Refund**:
In both cases (code size or gas limit), all remaining gas should be consumed, with no refunds provided.

## Backward Compatibility

This change is a hard fork and therefore all full nodes must be updated.

## Copyright

Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/).
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,7 @@ You can find an easily browseable version of this information [here](https://ips
| 438 |[Limit the maximum size of initcode and apply extra gas cost for every 32-byte chunk of initcode](IPs/RSKIP438.md)|16-JUL-24 | FML | Fai | Core | 2 | Draft |
| 445 |[MCOPY instruction](IPs/RSKIP445.md)| 12-AUG-24 | AE | Usa | Core | 2 | Draft |
| 446 |[Transient storage opcodes](IPs/RSKIP446.md)| 12-AUG-24 | AE | Usa | Core | 2 | Draft|
| 453 |[Prevent address creation on failed CREATE/CREATE2 operations](IPs/RSKIP453.md)| 09-OCT-24 | AS | Usa | Core | 1 | Draft|

(*) Under evaluation to be implemented in the next reference client release

Expand All @@ -245,10 +246,12 @@ You can find an easily browseable version of this information [here](https://ips
|----------|:--------------------------|:---------------------------------------|
| AE | Adrian Eidelman | adrian@rootstocklabs.com |
| AL | Angel Lopez | |
| AS | Angel Soto | angel.soto@rootstocklabs.com |
| AM | Ariel Mendelzon | amendelzon@rootstocklabs.com |
| DLL | Diego López León | |
| DM | Diego Masini | |
| FJ | Federico Jinich | federico@rootstocklabs.com |
| FML | Frederico M. Leal | frederico.macielleal@rootstocklabs.com |
| GM | Guido Medina | |
| IO | Ilan Olkies | ilan@rootstocklabs.com |
| JIO | Jose Ignacio Orlicki | |
Expand All @@ -274,7 +277,6 @@ You can find an easily browseable version of this information [here](https://ips
| SM | Shreemoy Mishra | shreemoy@rootstocklabs.com |
| SMS | Sebastian Matias Sicardi | |
| VK | Volodymyr Kravets | volodymyr@rootstocklabs.com |
| FML | Frederico M. Leal | frederico.macielleal@rootstocklabs.com |


## Build locally
Expand Down

0 comments on commit f22720e

Please sign in to comment.