-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #453 from rsksmart/enhance_eth_compatibility_contr…
…act_deployment RSKIP 453: Prevent address creation on failed CREATE/CREATE2 operations
- Loading branch information
Showing
2 changed files
with
54 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters