Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CIP-62: Gingerbread Hardfork #386

Merged
merged 7 commits into from
Aug 23, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
91 changes: 91 additions & 0 deletions CIPs/cip-0062.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
---
cip: 62
title: Gingerbread Hardfork
author: Paul Lange <@palango>, Gastón Ponti (@gastonponti)
discussions-to: https://github.com/celo-org/celo-proposals/discussions/378
status: Final
type: Meta
created: 2023-06-20
license: Apache 2.0
---

This is the Meta CIP for the technical specifications of the Celo Gingerbread Hardfork.

## Simple Summary

Enable the activation of the two parts of the Celo Gingerbread Hardfork specification which focuses on Ethereum alignment.

## Abstract

Add support for protocol-impacting changes that increase alignment with Ethereum by removing unused Celo-specific features and protocol differences. This hardfork is named _Gingerbread_ by the community.

This document proposes the following blocks at which to implement these changes in the Celo networks:

- Baklava Testnet:
- Part 1: on block `18785000`
- Part 2: on block `TODO`
- Alfajores Testnet, both Parts on block `TODO`
- Celo Mainnet, both Parts on block `TODO`

For more information on the opcodes and their respective EIP and CIP implementations, please see the _Specification_ section of this document.

## Motivation

To enhance the EVM's capabilities and while pushing forward the Celo blockchain functionality in order to enable economic conditions for prosperity as well as reducing differences with Ethereum which will lead to increased compatibility and ease maintenance.

A second Part of the Gingerbread Hardfork was decided later to reduce even more the differences with Ethereum, and give us some future tools required for Celo's switch to become a Layer 2.

## Specification

This Hardfork will be executed as a two steps release in Baklava, and just a release with one activation block for Alfajores and Mainnet.

The Gingerbread Hardfork specification meta document includes the following proposals.

CIPs to be included in the Part 1:

- [CIP-52: Ultragreen Celo](https://github.com/celo-org/celo-proposals/blob/master/CIPs/cip-0052.md)
- [CIP-53: Remove minimum client version check](https://github.com/celo-org/celo-proposals/blob/master/CIPs/cip-0053.md)
- [CIP-54: Remove sending of community rewards to reserve if undercollaterized](https://github.com/celo-org/celo-proposals/blob/master/CIPs/cip-0054.md)
- [CIP-55: Remove Tobin Tax](https://github.com/celo-org/celo-proposals/blob/master/CIPs/cip-0055.md)
- [CIP-56: Remove freezable check on epoch rewards](https://github.com/celo-org/celo-proposals/blob/master/CIPs/cip-0056.md)
- [CIP-57: Remove full node incentives](https://github.com/celo-org/celo-proposals/blob/master/CIPs/cip-0057.md)
- [CIP-58: Restore opcode gas costs from Ethereum](https://github.com/celo-org/celo-proposals/blob/master/CIPs/cip-0058.md)
- [CIP-59: Re-add header fields with values used in Ethereum 2.0](https://github.com/celo-org/celo-proposals/blob/master/CIPs/cip-0059.md)
- [CIP-60: Add GASLIMIT opcode](https://github.com/celo-org/celo-proposals/blob/master/CIPs/cip-0060.md)
- [CIP-61: Add BASEFEE opcode](https://github.com/celo-org/celo-proposals/blob/master/CIPs/cip-0061.md)

CIPs to be included in the Part 2:

- [CIP-63: Remove BLS-12377, BLS-12381, CIP-20 and CIP-25 precompiles](https://github.com/celo-org/celo-proposals/blob/master/CIPs/cip-0063.md)
- [CIP-64: New Transaction Type: Celo Dynamic Fee v2](https://github.com/celo-org/celo-proposals/blob/master/CIPs/cip-0064.md)
- [CIP-65: Total Transaction Data Limit](https://github.com/celo-org/celo-proposals/blob/master/CIPs/cip-0065.md)

With the above CIPs the block header contains the same data as the Ethereum chain. Therefore, the hash of the header will be changed so that it is compatible with Ethereum.

### Deprecation Warning

As part of Celo's switch to become a Layer 2 and the deprecation of the full node incentives (part of this Hard Fork CIP-57) in future Hard Forks:

- The Celo Legacy Transaction: `rlp(nonce, gasPrice, gas, feeCurrency, gatewayFeeRecipient, gatewayFee, to, value, data, signatureV, signatureR, signatureS)` will be changed to the original Ethereum transaction `rlp(nonce, gasPrice, gas, to, value, data, signatureV, signatureR, signatureS)`, removing not only the gateway fields, but also the `feeCurrency`.
- The Enveloped Transaction created in the [CIP-42](https://github.com/celo-org/celo-proposals/blob/master/CIPs/cip-0042.md) (Type: `0x7c`) will be completely deprecated

As the full node incentives are removed these transactions not only consume unnecesary space, but bring unnecessary complexity to our codebase.

For the sake of maintaining the functionality of paying fees in any of our whitelisted currencies the [CIP-64](https://github.com/celo-org/celo-proposals/blob/master/CIPs/cip-0064.md) was added to this Hard Fork. Even if the three transactions will work in this Gingerbread Hard Fork, we recommend to start migrating any application that uses the Celo Legacy transaction for fee payments in a different currency, or any transaction of the type `0x7c` (CIP-42) to this new CIP-64.

## Rationale

__Ethereum Compatibility__: We include CIPs to increase compatibility with ethereum transactions and opcodes.

__Celo Network Maintenance__: Several CIPs are included to simplify maintenance of the Celo blockchain code by removing unused features.


## Implementation

Adoption of the content of this CIP requires a hardfork as it introduces changes that are not backward compatible. The following clients with Celo support will implement the Celo Gingerbread hardfork specification:

- celo-blockchain

## Copyright

This work is licensed under the Apache License, Version 2.0.