Skip to content

Commit

Permalink
Split what's changed page into 2 subsections (#1521)
Browse files Browse the repository at this point in the history
  • Loading branch information
piersy authored Oct 10, 2024
1 parent 8e0e61e commit 72433b2
Show file tree
Hide file tree
Showing 4 changed files with 74 additions and 68 deletions.
68 changes: 2 additions & 66 deletions docs/cel2/whats-changed.md → docs/cel2/whats-changed/l1-l2.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,8 @@
---
title: What's changed?
description: Changes from L1 to L2 and from op-stack to L2
---

# What's changed

Celo is moving from being a POS (proof of stake) based L1 blockchain to an L2 built on the OP Stack. In Celo L1 both ordering and data availability were provided by the validators participating in the POS consensus mechanism, being an L2 means that Celo will instead rely on the the L1 (Ethereum) for ordering and on [EigenDA](https://www.eigenda.xyz/) for data availability. Outsourcing those components allows Celo to offer increased scalability while focussing on providing value for users. See below for more details about all the changes involved.

# Celo L1 → L2

## Node operators

In the Celo L1 node, operators simply needed to run the celo-blockchain client, a single service that was a fork of go-ethereum. Moving to the Celo L2 node operators will need to run an op-geth instance for execution, an op-node instance for consensus and an eigenda-proxy for data availability. Instructions on operating nodes are [here](./l2-operator-guide).
In the Celo L1 node, operators simply needed to run the celo-blockchain client, a single service that was a fork of go-ethereum. Moving to the Celo L2 node operators will need to run an op-geth instance for execution, an op-node instance for consensus and an eigenda-proxy for data availability. Instructions on operating nodes are [here](../l2-operator-guide).

## Deprecated transactions

Expand Down Expand Up @@ -93,59 +84,4 @@ For in depth details of what is changed see here - (TODO add section in specs co

### Pre-transition execution and state access

RPC API calls for pre-transition blocks that are performing execution or accessing state will not be directly supported by the new Celo L2 implementation, however if this is required you can configure your Celo L2 node to proxy to an archive Celo L1 node for these calls. See [here](./l2-operator-guide#supporting-historical-execution)


# Optimism → Celo L2

## Blocks

Celo L2 block times are 1s as opposed to 2s for optimism, the gas limit per block remains the same.

## Native token
The native token is CELO as opposed to ETH. The native token is also an ERC20 token.

## New transaction type

Type 123 (`0x7b`) transaction type allows paying for gas in currencies other than the native asset (CELO). It has an additional field `feeCurrency` which allows the sender to chose the currency they pay gas in a chosen fee currency. See [here](https://specs.celo.org/fee_abstraction.html) for details on using fee currencies.

The fee currencies available at mainnet launch will be:

- USDC (USDC)
- Tether USD (USD₮)
- PUSO (PUSO)
- ECO CFA (eXOF)
- Celo Kenyan Shilling (cKES)
- Celo Dollar (cUSD)
- Celo Euro (cEUR)
- Celo Brazilian Real (cREAL)

More details on supported transaction types [here](https://specs.celo.org/tx_types.html).

## L1 fees

In the Optimism model, an extra fee is added on to user transactions in order to cover the cost of the L1, this can be surprising to users since they have no visibility about what that fee may be since it is not included in the results of calling `eth_estimateGas`.

The Celo L2 always keeps the L1 fee at zero. This doesn't however mean that we will not charge fees to cover the cost of the L1, just that we won't do it via the L1 fees mechanism. Instead we may raise or lower the [base fee floor](#eip1559-implementation-1) accordingly to match the L1 fees.

## EIP1559 implementation

The Celo L2 adds a base fee floor, which imposes a lower limit on the base fee. This is currently configured through chain config.

The starting value is:

- Alfajores testnet:
- base fee floor: 25 gwei


## MaxCodeSize

The hardcoded protocol parameter `MaxCodeSize` is raised from 24576 to 65536.

## Block receipt

Historically the Celo L1 generated a block receipts when system contract calls generated logs, although the Celo L2 doesn't produce block receipts, the pre-existing block receipts are retrievable via the RPC API `eth_getBlockReceipt` call passing the hash of the block in question.

## Improved finality guarantees

The Celo L2 blocks only reference L1 blocks that are finalized, this means that the Celo L2 is protected from re-orgs that could occur due to L1 re-orgs, this is in contrast to the Optimism L2 blocks which reference L1 blocks 4 blocks behind the L1 chain head.
RPC API calls for pre-transition blocks that are performing execution or accessing state will not be directly supported by the new Celo L2 implementation, however if this is required you can configure your Celo L2 node to proxy to an archive Celo L1 node for these calls. See [here](../l2-operator-guide#supporting-historical-execution)
53 changes: 53 additions & 0 deletions docs/cel2/whats-changed/op-l2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Optimism → Celo L2

## Blocks

Celo L2 block times are 1s as opposed to 2s for optimism, the gas limit per block remains the same.

## Native token
The native token is CELO as opposed to ETH. The native token is also an ERC20 token.

## New transaction type

Type 123 (`0x7b`) transaction type allows paying for gas in currencies other than the native asset (CELO). It has an additional field `feeCurrency` which allows the sender to chose the currency they pay gas in a chosen fee currency. See [here](https://specs.celo.org/fee_abstraction.html) for details on using fee currencies.

The fee currencies available at mainnet launch will be:

- USDC (USDC)
- Tether USD (USD₮)
- PUSO (PUSO)
- ECO CFA (eXOF)
- Celo Kenyan Shilling (cKES)
- Celo Dollar (cUSD)
- Celo Euro (cEUR)
- Celo Brazilian Real (cREAL)

More details on supported transaction types [here](https://specs.celo.org/tx_types.html).

## L1 fees

In the Optimism model, an extra fee is added on to user transactions in order to cover the cost of the L1, this can be surprising to users since they have no visibility about what that fee may be since it is not included in the results of calling `eth_estimateGas`.

The Celo L2 always keeps the L1 fee at zero. This doesn't however mean that we will not charge fees to cover the cost of the L1, just that we won't do it via the L1 fees mechanism. Instead we may raise or lower the [base fee floor](#eip1559-implementation) accordingly to match the L1 fees.

## EIP1559 implementation

The Celo L2 adds a base fee floor, which imposes a lower limit on the base fee. This is currently configured through chain config.

The starting value is:

- Alfajores testnet:
- base fee floor: 25 gwei


## MaxCodeSize

The hardcoded protocol parameter `MaxCodeSize` is raised from 24576 to 65536.

## Block receipt

Historically the Celo L1 generated a block receipts when system contract calls generated logs, although the Celo L2 doesn't produce block receipts, the pre-existing block receipts are retrievable via the RPC API `eth_getBlockReceipt` call passing the hash of the block in question.

## Improved finality guarantees

The Celo L2 blocks only reference L1 blocks that are finalized, this means that the Celo L2 is protected from re-orgs that could occur due to L1 re-orgs, this is in contrast to the Optimism L2 blocks which reference L1 blocks 4 blocks behind the L1 chain head.
12 changes: 12 additions & 0 deletions docs/cel2/whats-changed/overview.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
title: What's changed?
description: Changes from L1 to L2 and from op-stack to L2
---

# What's changed

Celo is moving from being a POS (proof of stake) based L1 blockchain to an L2 built on the OP Stack. In Celo L1 both ordering and data availability were provided by the validators participating in the POS consensus mechanism, being an L2 means that Celo will instead rely on the the L1 (Ethereum) for ordering and on [EigenDA](https://www.eigenda.xyz/) for data availability. Outsourcing those components allows Celo to offer increased scalability while focussing on providing value for users. See below for more details about all the changes involved.

## Details
* [Celo L1 → L2 changes](l1-l2)
* [Optimism → Celo L2 changes](op-l2)
9 changes: 7 additions & 2 deletions sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -1169,9 +1169,14 @@ const sidebars = {
label: "L2 Architecture",
id: "cel2/cel2-architecture",
},
{ type: "doc",
{ type: "category",
label: "What's Changed?",
id: "cel2/whats-changed",
link: { type: 'doc', id: 'cel2/whats-changed/overview' },
collapsed: false,
items: [
'cel2/whats-changed/l1-l2',
'cel2/whats-changed/op-l2'
],
},
{ type: "link", label: "Cel2 Specs", href: "https://specs.celo.org/" },
{ type: "doc", label: "FAQ", id: "cel2/faq" },
Expand Down

0 comments on commit 72433b2

Please sign in to comment.