From 42721346c5aa610d2658c69d163f74e0c57bb08f Mon Sep 17 00:00:00 2001 From: Victoria Peschke Date: Thu, 24 Jul 2025 17:49:15 +0200 Subject: [PATCH 1/4] Update overview.md: remove warning and outdated information --- .../using-celo/protocol/transaction/overview.md | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/docs/what-is-celo/using-celo/protocol/transaction/overview.md b/docs/what-is-celo/using-celo/protocol/transaction/overview.md index 5fce0f51e2..c495683d14 100644 --- a/docs/what-is-celo/using-celo/protocol/transaction/overview.md +++ b/docs/what-is-celo/using-celo/protocol/transaction/overview.md @@ -5,19 +5,15 @@ description: Introduction to transactions on Celo. # Transactions on Celo -Introduction to transactions on Celo. +In Celo's transition to a Layer 2 (L2) solution, several key changes have been proposed to the network's tokenomics, particularly concerning gas pricing and transaction fee allocation. --- -## Gas Pricing - :::info This section is a work in progress and based on the ["The Great Celo Halvening - Proposed Tokenomics in the Era of Celo L2"](https://forum.celo.org/t/the-great-celo-halvening-proposed-tokenomics-in-the-era-of-celo-l2/9701/1). Please check the [forum](https://forum.celo.org/) for the latest information. ::: -In Celo's transition to a Layer 2 (L2) solution, several key changes have been proposed to the network's tokenomics, particularly concerning gas pricing and transaction fee allocation. - ## Gas Pricing Mechanism Celo employs a gas pricing model based on **EIP-1559**, which dynamically adjusts the base fee to manage network demand. This mechanism ensures that gas prices respond to network congestion, increasing during high demand periods and decreasing when demand is low. The protocol sets a **base fee floor** to prevent the base fee from falling below a certain threshold, safeguarding the network against spam transactions and uncontrolled state growth. From 4e22807952861f0cbd9a616a040cf07a2b4b7d81 Mon Sep 17 00:00:00 2001 From: Victoria Peschke Date: Thu, 24 Jul 2025 17:55:56 +0200 Subject: [PATCH 2/4] Update transaction-types.mdx: correct title casing and remove outdated warnings --- .../transaction/transaction-types.mdx | 57 +++++++------------ 1 file changed, 21 insertions(+), 36 deletions(-) diff --git a/docs/what-is-celo/using-celo/protocol/transaction/transaction-types.mdx b/docs/what-is-celo/using-celo/protocol/transaction/transaction-types.mdx index 848445cb98..76e3dc9f3e 100644 --- a/docs/what-is-celo/using-celo/protocol/transaction/transaction-types.mdx +++ b/docs/what-is-celo/using-celo/protocol/transaction/transaction-types.mdx @@ -1,5 +1,5 @@ --- -title: Transaction types on Celo +title: Transaction Types on Celo description: This page contains an explainer on transaction types supported on Celo and a demo to make specific transactions. --- @@ -8,37 +8,22 @@ import TabItem from "@theme/TabItem"; This page contains an explainer on transaction types supported on Celo and a demo to make specific transactions. -> **IMPORTANT** -> This repo is for educational purposes only. The information provided here may be inaccurate. -> Please don't rely on it exclusively to implement low-level client libraries. - -:::warning -As of block height 31,056,500 (March 26, 2025, 3:00 AM UTC), Celo is no longer a standalone Layer 1 blockchain—it is now an Ethereum Layer 2! -Some documentation may be outdated as updates are in progress. If you encounter issues, please [file a bug report](https://github.com/celo-org/docs/issues/new/choose). - -For the most up-to-date information, refer to our [Celo L2 documentation](https://docs.celo.org/cel2). -::: +--- ## Summary -Celo has support for all Ethereum transaction types (i.e. "100% Ethereum compatibility") -and a single Celo transaction type. +Celo has support for all Ethereum transaction types (i.e. "100% Ethereum compatibility") and a single Celo transaction type. -### Actively supported on Celo +### Actively Supported on Celo | Chain | Transaction type | # | Specification | Recommended | Support | Comment | | ----------------------------------------------------------------------- | -------------------------- | ----- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------- | --------- | -------------------------------------------------------- | | | Dynamic fee transaction v2 | `123` | [CIP-64](https://github.com/celo-org/celo-proposals/blob/master/CIPs/cip-0064.md) | ✅ | Active 🟢 | Supports paying gas in custom fee currencies | +| | Set code transaction | `4` | [EIP-7702](https://eips.ethereum.org/EIPS/eip-7702) | Available since the Isthmus hardfork | | | Dynamic fee transaction | `2` | [EIP-1559](https://eips.ethereum.org/EIPS/eip-1559) ([CIP-42](https://github.com/celo-org/celo-proposals/blob/master/CIPs/cip-0042.md)) | ✅ | Active 🟢 | Typical Ethereum transaction | | | Access list transaction | `1` | [EIP-2930](https://eips.ethereum.org/EIPS/eip-2930) ([CIP-35](https://github.com/celo-org/celo-proposals/blob/master/CIPs/cip-0035.md)) | ❌ | Active 🟢 | Does not support dynamically changing _base fee_ per gas | | | Legacy transaction | `0` | [Ethereum Yellow Paper](https://ethereum.github.io/yellowpaper/paper.pdf) ([CIP-35](https://github.com/celo-org/celo-proposals/blob/master/CIPs/cip-0035.md)) | ❌ | Active 🟢 | Does not support dynamically changing _base fee_ per gas | -### Scheduled for support on Celo - -| Chain | Transaction type | # | Specification | Comment | -| ----------------------------------------------------------------------- | -------------------- | --- | --------------------------------------------------- | ----------------------------------------------------------------------- | -| | Set code transaction | `4` | [EIP-7702](https://eips.ethereum.org/EIPS/eip-7702) | Available from the [Isthmus](/cel2/notices/isthmus-upgrade.md) hardfork | - ### Deprecated on Celo | Chain | Transaction type | # | Specification |   Support | Comment | @@ -53,7 +38,7 @@ The stages of support are: because it might be deprecated in the future. - **Deprecated** 🔴: the transaction type is not supported and not recommended for use. -### Client library support +### Client Library Support Legend: @@ -79,7 +64,7 @@ Legend: ## Background -### Legacy transactions +### Legacy Transactions Ethereum originally had one format for transactions (now called "legacy transactions"). A legacy transaction contains the following transaction parameters: @@ -108,7 +93,7 @@ To produce a valid "legacy transaction": A valid signed transaction can then be submitted on-chain, and its raw parameters can be parsed by RLP-decoding the transaction. -### Typed transactions +### Typed Transactions Over time, the Ethereum community has sought to add new types of transactions such as dynamic fee transactions @@ -122,7 +107,7 @@ legacy transaction format, the concept of **typed transactions** was proposed in [EIP-2718: Typed Transaction Envelope](https://eips.ethereum.org/EIPS/eip-2718), which introduces a new high-level transaction format that is used to implement all future transaction types. -### Distinguishing between legacy and typed transactions +### Distinguishing Between Legacy and Typed Transactions Whereas a valid "legacy transaction" is simply an RLP-encoded list of **transaction parameters**, a valid "typed transactions" is an arbitrary byte array @@ -152,9 +137,9 @@ Every transaction type is defined in an EIP, which specifies how to _encode_ as transaction payloads. This means that a typed transaction can only be interpreted with knowledge of its transaction type and a relevant decoder. -## List of transaction types on Celo +## List of Transaction Types on Celo -### Legacy transaction (`0`) +### Legacy Transaction (`0`) :::note This transaction type is 100% compatible with Ethereum and has no Celo-specific parameters. @@ -177,7 +162,7 @@ they are commonly referred to as "type 0" transactions. on [May 19, 2021](https://blog.celo.org/donut-hardfork-is-live-on-celo-585e2e294dcb) as specified in [CIP-35: Support for Ethereum-compatible transactions](https://github.com/celo-org/celo-proposals/blob/master/CIPs/cip-0035.md). -### Access list transaction (`1`) +### Access List Transaction (`1`) :::note This transaction type is 100% compatible with Ethereum and has no Celo-specific parameters. @@ -198,7 +183,7 @@ This transaction type is 100% compatible with Ethereum and has no Celo-specific on [May 19, 2021](https://blog.celo.org/donut-hardfork-is-live-on-celo-585e2e294dcb) as specified in [CIP-35: Support for Ethereum-compatible transactions](https://github.com/celo-org/celo-proposals/blob/master/CIPs/cip-0035.md). -### Dynamic fee transaction (`2`) +### Dynamic Fee Transaction (`2`) :::note This transaction type is 100% compatible with Ethereum and has no Celo-specific parameters. @@ -219,7 +204,7 @@ This transaction type is 100% compatible with Ethereum and has no Celo-specific on [Mar 8, 2022](https://blog.celo.org/brewing-the-espresso-hardfork-92a696af1a17) as specified in [CIP-42: Modification to EIP-1559](https://github.com/celo-org/celo-proposals/blob/master/CIPs/cip-0042.md) -### Set code transaction (`4`) +### Set Code Transaction (`4`) :::note This transaction type is 100% compatible with Ethereum and has no Celo-specific parameters. @@ -238,7 +223,7 @@ This transaction type is 100% compatible with Ethereum and has no Celo-specific - It is scheduled for support on Celo during the [Celo Isthmus](/cel2/notices/isthmus-upgrade.md) hardfork. -### Legacy transaction (`0`) +### Legacy Transaction (`0`) :::danger This transaction type is no longer supported following the migration to Celo L2. @@ -259,7 +244,7 @@ parameters: `feecurrency`, `gatewayfeerecipient`, and `gatewayfee`. [Apr 22, 2020](https://dune.com/queries/3106924/5185945) as specified in [Blockchain client v1.0.0](https://github.com/celo-org/celo-blockchain/tree/celo-v1.0.0). -### Dynamic fee transaction (`124`) +### Dynamic Fee Transaction (`124`) :::danger This transaction type is no longer supported following the migration to Celo L2. @@ -286,7 +271,7 @@ parameters: `feecurrency`, `gatewayfeerecipient`, and `gatewayfee`. on [Mar 8, 2022](https://blog.celo.org/brewing-the-espresso-hardfork-92a696af1a17) as specified in [CIP-42: Modification to EIP-1559](https://github.com/celo-org/celo-proposals/blob/master/CIPs/cip-0042.md). -### Dynamic fee transaction v2 (`123`) +### Dynamic Fee Transaction v2 (`123`) :::warning This transaction is not compatible with Ethereum and has one Celo-specific @@ -358,7 +343,7 @@ const walletClient = createWalletClient({ -### Function to print Transaction receipt +### Function to Print Transaction Receipt @@ -403,7 +388,7 @@ const walletClient = createWalletClient({ -### Code to send Transaction Type (0) +### Code to Send Transaction Type (0) @@ -436,7 +421,7 @@ const walletClient = createWalletClient({ -### Code to send Transaction Type (2) +### Code to Send Transaction Type (2) @@ -470,7 +455,7 @@ const walletClient = createWalletClient({ -### Code to send Transaction Type (123) +### Code to Send Transaction Type (123) From 9c64331c6263d32f6d99a3e18eeef6d904c0be12 Mon Sep 17 00:00:00 2001 From: Victoria Peschke Date: Thu, 24 Jul 2025 17:57:30 +0200 Subject: [PATCH 3/4] Update transaction documentation: remove outdated warnings and improve formatting --- .../protocol/transaction/overview.md | 6 ++-- .../transaction/tx-comment-encryption.md | 29 +++++++------------ 2 files changed, 14 insertions(+), 21 deletions(-) diff --git a/docs/what-is-celo/using-celo/protocol/transaction/overview.md b/docs/what-is-celo/using-celo/protocol/transaction/overview.md index c495683d14..6d7d9e5e05 100644 --- a/docs/what-is-celo/using-celo/protocol/transaction/overview.md +++ b/docs/what-is-celo/using-celo/protocol/transaction/overview.md @@ -16,7 +16,7 @@ This section is a work in progress and based on the ["The Great Celo Halvening - ## Gas Pricing Mechanism -Celo employs a gas pricing model based on **EIP-1559**, which dynamically adjusts the base fee to manage network demand. This mechanism ensures that gas prices respond to network congestion, increasing during high demand periods and decreasing when demand is low. The protocol sets a **base fee floor** to prevent the base fee from falling below a certain threshold, safeguarding the network against spam transactions and uncontrolled state growth. +Celo employs a gas pricing model based on **EIP-1559**, which dynamically adjusts the base fee to manage network demand. This mechanism ensures that gas prices respond to network congestion, increasing during high demand periods and decreasing when demand is low. The protocol sets a **base fee floor** to prevent the base fee from falling below a certain threshold, safeguarding the network against spam transactions and uncontrolled state growth. ## Fee Abstraction @@ -38,10 +38,10 @@ With the shift to L2, the allocation of transaction fees has been restructured t - **Sequencer and Batcher Operations**: Supporting the infrastructure that orders and batches transactions on the network. - - **Revenue Sharing with the OP-Stack**: Complying with the Superchain Ecosystem requirements, which involve sharing revenue with the OP-Stack. + - **Revenue Sharing with the OP-Stack**: Complying with the Superchain Ecosystem requirements, which involve sharing revenue with the OP-Stack. This reallocation ensures that transaction fees are utilized effectively to maintain network sustainability and operational efficiency in the L2 environment. ## Conclusion -Celo's transition to L2 introduces significant changes to gas pricing and transaction fee allocation, aligning with the network's goals of sustainability, user accessibility, and robust operational support. These adjustments are designed to enhance the overall efficiency and resilience of the Celo ecosystem. +Celo's transition to L2 introduces significant changes to gas pricing and transaction fee allocation, aligning with the network's goals of sustainability, user accessibility, and robust operational support. These adjustments are designed to enhance the overall efficiency and resilience of the Celo ecosystem. diff --git a/docs/what-is-celo/using-celo/protocol/transaction/tx-comment-encryption.md b/docs/what-is-celo/using-celo/protocol/transaction/tx-comment-encryption.md index ae4a2cb5b1..bcf0e43077 100644 --- a/docs/what-is-celo/using-celo/protocol/transaction/tx-comment-encryption.md +++ b/docs/what-is-celo/using-celo/protocol/transaction/tx-comment-encryption.md @@ -7,40 +7,33 @@ description: Overview of encrypted payment comments and its technical details re In this section, you will find detailed information about the various transaction types supported on Celo, including encrypted payment comments and their technical details, as well as insights into gas pricing and fee abstraction. -:::warning -As of block height 31,056,500 (March 26, 2025, 3:00 AM UTC), Celo is no longer a standalone Layer 1 blockchain—it is now an Ethereum Layer 2! -Some documentation may be outdated as updates are in progress. If you encounter issues, please [file a bug report](https://github.com/celo-org/docs/issues/new/choose). - -For the most up-to-date information, refer to our [Celo L2 documentation](https://docs.celo.org/cel2). -::: - --- -### Introduction to Comment Encryption +## Introduction to Comment Encryption As part of Celo's identity protocol, a public encryption key is stored along with a user's address in the `Accounts` contract. Both the address key pair and the encryption key pair are derived from the backup phrase. When sending a transaction the encryption key of the recipient is retrieved when getting his or her address. The comment is then encrypted using a 128 bit hybrid encryption scheme \(ECDH on secp256k1 with AES-128-CTR\). This system ensures that comments can only be read by the sending and receiving parties and that messages will be recovered when restoring a wallet from its backup phrase. -### Comment Encryption Technical Details +## Comment Encryption Technical Details A 128 bit randomly generated session key, sk, is generated and used to symmetrically encrypt the comment. sk is asymmetrically encrypted to the sender and to the recipient. ‌`Encrypted = ECIES(sk, to=pubSelf) | ECIES(sk, to=pubOther) | AES(ke=sk, km=sk, comment)` -#### ‌Symmetric Encryption \(AES-128-CTR\) +### ‌Symmetric Encryption \(AES-128-CTR\) - Takes encryption key, ke, and MAC key, km, and the data to encrypt, plaintext - Cipher: AES-128-CTR using a randomly generated iv - Authenticate iv \| ciphertext using HMAC with SHA-256 and km - Return iv \| ciphertext \| mac -#### Asymmetric Encryption \(ECIES\) +### Asymmetric Encryption \(ECIES\) -1. Takes data to encrypt, plaintext, and the public key of the recipient, pubKeyTo -2. Generate an ephemeral keypair, ephemPubKey and ephemPrivKey -3. Derive 32 bytes of key material, k, from ECDH between ephemPrivKey and pubKeyTousing ConcatKDF \(specified as NIST 800-56C Rev 1 One Step KDF\) with SHA-256 for H\(x\) -4. The encryption key, ke, is the first 128 bits of k -5. The MAC key, km, is SHA-256 of the second 128 bits of k -6. Encrypt the plaintext symmetrically with AES-128-CTR using ke, km, and a random iv -7. Return ephemPubKey \| AES-128-CTR-HMAC\(ke, km, plaintext\) where the public key needs to be uncompressed \(current limitation with decrypt\). \ No newline at end of file +1. Takes data to encrypt, plaintext, and the public key of the recipient, pu eyTo +2. Generate an ephemeral keypair, ephemPubKey and ephemPrivKey +3. Derive 32 bytes of key material, k, from ECDH between ephemPrivKey and pu eyTousing ConcatKDF \(specified as NIST 800-56C Rev 1 One Step KDF\) wi SHA-256 for H\(x\) +4. The encryption key, ke, is the first 128 bits of k +5. The MAC key, km, is SHA-256 of the second 128 bits of k +6. Encrypt the plaintext symmetrically with AES-128-CTR using ke, km, and a ndom iv +7. Return ephemPubKey \| AES-128-CTR-HMAC\(ke, km, plaintext\) where the public key needs to be uncompressed \(current limitation with decrypt\). From 9be9d3e6ea9cee846e8dc485f4e4fa92feec48fd Mon Sep 17 00:00:00 2001 From: Victoria Peschke Date: Thu, 24 Jul 2025 18:24:51 +0200 Subject: [PATCH 4/4] Fix typos --- .../protocol/transaction/tx-comment-encryption.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/what-is-celo/using-celo/protocol/transaction/tx-comment-encryption.md b/docs/what-is-celo/using-celo/protocol/transaction/tx-comment-encryption.md index bcf0e43077..b0d549d4bf 100644 --- a/docs/what-is-celo/using-celo/protocol/transaction/tx-comment-encryption.md +++ b/docs/what-is-celo/using-celo/protocol/transaction/tx-comment-encryption.md @@ -30,10 +30,10 @@ A 128 bit randomly generated session key, sk, is generated and used to symmetric ### Asymmetric Encryption \(ECIES\) -1. Takes data to encrypt, plaintext, and the public key of the recipient, pu eyTo +1. Takes data to encrypt, plaintext, and the public key of the recipient, pubKeyTo 2. Generate an ephemeral keypair, ephemPubKey and ephemPrivKey -3. Derive 32 bytes of key material, k, from ECDH between ephemPrivKey and pu eyTousing ConcatKDF \(specified as NIST 800-56C Rev 1 One Step KDF\) wi SHA-256 for H\(x\) +3. Derive 32 bytes of key material, k, from ECDH between ephemPrivKey and pubKeyTousing ConcatKDF \(specified as NIST 800-56C Rev 1 One Step KDF\) with SHA-256 for H\(x\) 4. The encryption key, ke, is the first 128 bits of k 5. The MAC key, km, is SHA-256 of the second 128 bits of k -6. Encrypt the plaintext symmetrically with AES-128-CTR using ke, km, and a ndom iv +6. Encrypt the plaintext symmetrically with AES-128-CTR using ke, km, and a random iv 7. Return ephemPubKey \| AES-128-CTR-HMAC\(ke, km, plaintext\) where the public key needs to be uncompressed \(current limitation with decrypt\).