diff --git a/docs/cel2/whats-changed.md b/docs/cel2/whats-changed/l1-l2.md similarity index 63% rename from docs/cel2/whats-changed.md rename to docs/cel2/whats-changed/l1-l2.md index 3e9863f2db..6f3602f5c3 100644 --- a/docs/cel2/whats-changed.md +++ b/docs/cel2/whats-changed/l1-l2.md @@ -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 @@ -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) \ No newline at end of file diff --git a/docs/cel2/whats-changed/op-l2.md b/docs/cel2/whats-changed/op-l2.md new file mode 100644 index 0000000000..09389181e9 --- /dev/null +++ b/docs/cel2/whats-changed/op-l2.md @@ -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. \ No newline at end of file diff --git a/docs/cel2/whats-changed/overview.md b/docs/cel2/whats-changed/overview.md new file mode 100644 index 0000000000..7efe131a54 --- /dev/null +++ b/docs/cel2/whats-changed/overview.md @@ -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) \ No newline at end of file diff --git a/sidebars.js b/sidebars.js index be388a8798..f356563fce 100644 --- a/sidebars.js +++ b/sidebars.js @@ -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" },