From 59116ae5d1b14797187acc0defb1306f93b2df9c Mon Sep 17 00:00:00 2001 From: zhangsoledad <787953403@qq.com> Date: Wed, 12 Mar 2025 23:26:20 +0800 Subject: [PATCH] Fix inconsistent naming in RFCs and update the status of some RFCs --- README.md | 18 +++++++- rfcs/0009-vm-syscalls/0009-vm-syscalls.md | 4 +- .../0021-ckb-address-format.md | 2 +- .../0027-block-structure.md | 12 ++--- .../0028-change-since-relative-timestamp.md | 2 +- ...ript-multiple-matches-on-identical-code.md | 2 +- ...-ensure-index-less-than-length-in-since.md | 2 +- .../0031-variable-length-header-field.md | 4 +- .../0032-ckb-vm-version-selection.md | 4 +- .../0033-ckb-vm-version-1.md | 4 +- rfcs/0034-vm-syscalls-2/0034-vm-syscalls-2.md | 4 +- .../0035-ckb-p2p-protocol-upgrade.md} | 2 +- .../0035-ckb-p2p-protocol-upgrade.zh-CN.md} | 0 .../0036-remove-header-deps-immature-rule.md | 2 +- .../0037-ckb-mirana-2021.md} | 46 +++++++++---------- .../0046-syscalls-summary.md | 12 ++--- ...e-block-header-version-reservation-rule.md | 4 +- .../0049-ckb-vm-version-2.md | 2 +- rfcs/0050-vm-syscalls-3/0050-vm-syscalls-3.md | 2 +- .../0051-ckb-meepo-2024.md} | 34 ++++++-------- 20 files changed, 86 insertions(+), 76 deletions(-) rename rfcs/{0035-ckb2021-p2p-protocol-upgrade/0035-ckb2021-p2p-protocol-upgrade.md => 0035-ckb-p2p-protocol-upgrade/0035-ckb-p2p-protocol-upgrade.md} (99%) rename rfcs/{0035-ckb2021-p2p-protocol-upgrade/0035-ckb2021-p2p-protocol-upgrade.zh-CN.md => 0035-ckb-p2p-protocol-upgrade/0035-ckb-p2p-protocol-upgrade.zh-CN.md} (100%) rename rfcs/{0037-ckb2021/0037-ckb2021.md => 0037-ckb-mirana-2021/0037-ckb-mirana-2021.md} (61%) rename rfcs/{0051-ckb2023/0051-ckb2023.md => 0051-ckb-meepo-2024/0051-ckb-meepo-2024.md} (51%) diff --git a/README.md b/README.md index 37bec883d..8ab75189d 100644 --- a/README.md +++ b/README.md @@ -79,14 +79,28 @@ The maintainers of RFCs and the community will review the PR, and you should upd | [24](rfcs/0024-ckb-genesis-script-list) | [CKB Genesis Script List](rfcs/0024-ckb-genesis-script-list/0024-ckb-genesis-script-list.md) | Dylan Duan | Informational | Final | [25](rfcs/0025-simple-udt) | [Simple UDT](rfcs/0025-simple-udt/0025-simple-udt.md) | Xuejie Xiao | Standards Track | Proposal | [26](rfcs/0026-anyone-can-pay) | [Anyone-Can-Pay Lock](rfcs/0026-anyone-can-pay/0026-anyone-can-pay.md) | Xuejie Xiao | Standards Track | Proposal -| [27](rfcs/0027-block-structure) | [CKB Block Structure](rfcs/0027-block-structure/0027-block-structure.md) | Ian Yang | Informational | Draft -| [37](rfcs/0037-ckb2021) | [CKB Consensus Change (Edition CKB2021)](rfcs/0037-ckb2021/0037-ckb2021.md) | Ian Yang | Informational | Draft +| [27](rfcs/0027-block-structure) | [CKB Block Structure](rfcs/0027-block-structure/0027-block-structure.md) | Ian Yang | Informational | Final +| [28](rfcs/0028-change-since-relative-timestamp) | [Change Since Relative Timestamp](rfcs/0028-change-since-relative-timestamp/0028-change-since-relative-timestamp.md) | Ian Yang | Standards Track | Active +| [29](rfcs/0029-allow-script-multiple-matches-on-identical-code) | [Allow Multiple Cell Dep Matches](rfcs/0029-allow-script-multiple-matches-on-identical-code/0029-allow-script-multiple-matches-on-identical-code.md) | Ian Yang | Standards Track | Active +| [30](rfcs/0030-ensure-index-less-than-length-in-since) | [Ensure That Index Is Less Than Length In the Input Since Field](rfcs/0030-ensure-index-less-than-length-in-since/0030-ensure-index-less-than-length-in-since.md) | Ian Yang | Standards Track | Active +| [31](rfcs/0031-variable-length-header-field) | [Add a variable length field in the block](rfcs/0031-variable-length-header-field/0031-variable-length-header-field.md) | Ian Yang | Standards Track | Active +| [32](rfcs/0032-ckb-vm-version-selection) | [CKB VM Version Selection](rfcs/0032-ckb-vm-version-selection/0032-ckb-vm-version-selection.md) | Ian Yang | Standards Track | Active +| [33](rfcs/0033-ckb-vm-version-1) | [CKB VM version1](rfcs/0033-ckb-vm-version-1/0033-ckb-vm-version-1.md) | Wanbiao Ye| Standards Track | Active +| [34](rfcs/0034-vm-syscalls-2) | [CKB Block Structure](rfcs/0034-vm-syscalls-2/0034-vm-syscalls-2.md) | Wanbiao Ye | Standards Track | Active +| [35](rfcs/0035-ckb-p2p-protocol-upgrade) | [CKB P2P protocol upgrade](rfcs/0035-ckb-p2p-protocol-upgrade/0035-ckb-p2p-protocol-upgrade.md) | Chao Luo, Ian Yang | Standards Track | Active +| [36](rfcs/0036-remove-header-deps-immature-rule) | [Remove Header Deps Immature Rule](rfcs/0036-remove-header-deps-immature-rule/0036-remove-header-deps-immature-rule.md) | Ian Yang | Standards Track | Active +| [37](rfcs/ckb-mirana-2021) | [CKB Consensus Change (CKB Edition Mirana)](rfcs/0037-ckb-mirana-2021/0037-ckb-mirana-2021.md) | Ian Yang | Informational | Draft | [39](rfcs/0039-cheque) | [Cheque Lock](rfcs/0039-cheque/0039-cheque.md) | Dylan Duan | Standards Track | Proposal | | [42](rfcs/0042-omnilock) | [Omnilock](rfcs/0042-omnilock/0042-omnilock.md) | Xu Jiandong | Standards Track | Proposal | [43](rfcs/0043-ckb-softfork-activation) | [CKB Softfork Activation](rfcs/0043-ckb-softfork-activation/0043-ckb-softfork-activation.md) | Dingwei Zhang | Standards Track | Proposal | [44](rfcs/0044-ckb-light-client) | [CKB Light Client Protocol](rfcs/0044-ckb-light-client/0044-ckb-light-client.md) | Boyu Yang | Standards Track | Proposal | [45](rfcs/0045-client-block-filter) | [CKB Client Side Block Filter Protocol](rfcs/0045-client-block-filter/0045-client-block-filter.md) | Quake Wang | Standards Track | Proposal | [46](rfcs/0046-syscalls-summary) | [CKB VM Syscalls Summary](rfcs/0046-syscalls-summary/0046-syscalls-summary.md) | Shan | Informational | Draft +| [48](rfcs/0048-remove-block-header-version-reservation-rule) | [Remove Block Header Version Reservation Rule](rfcs/0048-remove-block-header-version-reservation-rule/0048-remove-block-header-version-reservation-rule.md) | Dingwei Zhang | Standards Track | Proposal +| [49](rfcs/0049-ckb-vm-version-2) | [CKB VM version2](rfcs/0049-ckb-vm-version-2/0049-ckb-vm-version-2.md) | Wanbiao Ye | Standards Track | Proposal +| [50](rfcs/0050-vm-syscalls-3) | [VM Syscalls 3](rfcs/0050-vm-syscalls-3/0050-vm-syscalls-3.md) | Xuejie Xiao , Jiandong Xu, Wanbiao Ye, Dingwei Zhang | Standards Track | Proposal +| [51](rfcs/0051-ckb-meepo-2024) | [CKB Edition Meepo (2024)](rfcs/0051-ckb-meepo-2024/0051-ckb-meepo-2024.md) | Dingwei Zhang | Standards Track | Proposal +| [52](rfcs/0052-extensible-udt) | [Extensible UDT](rfcs/0052-extensible-udt/0052-extensible-udt.md) | Xuejie Xiao, Xu Jiandong | Standards Track | Proposal ## License This repository is being licensed under terms of [MIT license](LICENSE). diff --git a/rfcs/0009-vm-syscalls/0009-vm-syscalls.md b/rfcs/0009-vm-syscalls/0009-vm-syscalls.md index 902435762..a8a3e3999 100644 --- a/rfcs/0009-vm-syscalls/0009-vm-syscalls.md +++ b/rfcs/0009-vm-syscalls/0009-vm-syscalls.md @@ -10,7 +10,7 @@ Created: 2018-12-14 ## Abstract -This document describes all the RISC-V VM syscalls implemented in CKB Lina. Note that 3 new syscalls have been added to ckb2021 [2]. +This document describes all the RISC-V VM syscalls implemented in CKB Lina. Note that 3 new syscalls have been added to CKB Edition Mirana [2]. ## Introduction @@ -446,7 +446,7 @@ In case of errors, `addr` and `index` will not contain meaningful data to use. Attention that all the blocks referenced in header deps must be 4 epochs ago, otherwise the header is immature and the transaction must wait. For example, if the block is the first block in epoch 4, a transaction with its header as a header dep can only be included in the first block of epoch 8 and later blocks. -This rule will be removed since ckb2021 as proposed in [RFC36]. +This rule will be removed since CKB Edition Mirana as proposed in [RFC36]. [RFC36]: ../0036-remove-header-deps-immature-rule/0036-remove-header-deps-immature-rule.md diff --git a/rfcs/0021-ckb-address-format/0021-ckb-address-format.md b/rfcs/0021-ckb-address-format/0021-ckb-address-format.md index 6a837e54e..86fa367ff 100644 --- a/rfcs/0021-ckb-address-format/0021-ckb-address-format.md +++ b/rfcs/0021-ckb-address-format/0021-ckb-address-format.md @@ -88,7 +88,7 @@ payload = 0x02/0x04 | code_hash | args The first byte identifies the lock script's hash_type, 0x02 for "Data", 0x04 for "Type". -Two reasons have caused this address format to be deprecated. First, a [flaw](https://github.com/sipa/bech32/issues/51) of Bech32 enables attackers to generate valid but unexpected addresses by deleting or inserting characters into certain full addresses. Last, the hard fork of [ckb2021](https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0037-ckb2021/0037-ckb2021.md) requires a new field to indicate the CKB VM version for each script group. +Two reasons have caused this address format to be deprecated. First, a [flaw](https://github.com/sipa/bech32/issues/51) of Bech32 enables attackers to generate valid but unexpected addresses by deleting or inserting characters into certain full addresses. Last, the hard fork of [CKB Edition Mirana](https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0037-ckb-mirana-2021/0037-ckb-mirana-2021.md) requires a new field to indicate the CKB VM version for each script group. ## Wrap to Address diff --git a/rfcs/0027-block-structure/0027-block-structure.md b/rfcs/0027-block-structure/0027-block-structure.md index 69d4c5e6e..bb8a182b1 100644 --- a/rfcs/0027-block-structure/0027-block-structure.md +++ b/rfcs/0027-block-structure/0027-block-structure.md @@ -1,7 +1,7 @@ --- Number: "0027" Category: Informational -Status: Draft +Status: Final Author: Ian Yang <@doitian> Created: 2020-04-30 --- @@ -72,7 +72,7 @@ The header contains commitments on the body fields to ensure data integrity. CKB ## Header -To ease PoW computation, the header is split into `raw` and `nonce`. +To ease PoW computation, the header is split into `raw` and `nonce`. ``` struct Header { @@ -130,11 +130,11 @@ The header `compact_target` is the encoded form of the target threshold as it ap It is similar to `nBits` in bitcoin, the original `nBits` implementation inherits properties from a signed data class, allowing the target threshold to be negative if the high bit of the significant is set. This is useless—the header hash is treated as an unsigned number, so it can never be equal to or lower than a negative target threshold. -In CKB, the "compact" format is a representation of a whole number N using an unsigned 32bit number similar to a floating-point format. +In CKB, the "compact" format is a representation of a whole number N using an unsigned 32bit number similar to a floating-point format. * The most significant 8 bits are the unsigned exponent of base 256. -* This exponent can be thought of as "number of bytes of N" in which the first 3 bytes are the mantissa. -* The lower 24 bits are the mantissa. +* This exponent can be thought of as "number of bytes of N" in which the first 3 bytes are the mantissa. +* The lower 24 bits are the mantissa. ``` N = mantissa * 256^(exponent-3) @@ -388,7 +388,7 @@ if __name__ == '__main__': unittest.main() ``` -## CKB Merkle Tree +## CKB Merkle Tree CKB Merkle Tree is a [CBMT](https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0006-merkle-tree/0006-merkle-tree.md) using following merge function: diff --git a/rfcs/0028-change-since-relative-timestamp/0028-change-since-relative-timestamp.md b/rfcs/0028-change-since-relative-timestamp/0028-change-since-relative-timestamp.md index dd066de57..116435fd9 100644 --- a/rfcs/0028-change-since-relative-timestamp/0028-change-since-relative-timestamp.md +++ b/rfcs/0028-change-since-relative-timestamp/0028-change-since-relative-timestamp.md @@ -1,7 +1,7 @@ --- Number: "0028" Category: Standards Track -Status: Draft +Status: Active Author: Ian Yang <@doitian> Created: 2021-02-03 --- diff --git a/rfcs/0029-allow-script-multiple-matches-on-identical-code/0029-allow-script-multiple-matches-on-identical-code.md b/rfcs/0029-allow-script-multiple-matches-on-identical-code/0029-allow-script-multiple-matches-on-identical-code.md index 0a98be11a..b7162c658 100644 --- a/rfcs/0029-allow-script-multiple-matches-on-identical-code/0029-allow-script-multiple-matches-on-identical-code.md +++ b/rfcs/0029-allow-script-multiple-matches-on-identical-code/0029-allow-script-multiple-matches-on-identical-code.md @@ -1,7 +1,7 @@ --- Number: "0029" Category: Standards Track -Status: Proposal +Status: Active Author: Ian Yang <@doitian> Created: 2021-02-03 --- diff --git a/rfcs/0030-ensure-index-less-than-length-in-since/0030-ensure-index-less-than-length-in-since.md b/rfcs/0030-ensure-index-less-than-length-in-since/0030-ensure-index-less-than-length-in-since.md index 0b4b29289..5908a90d3 100644 --- a/rfcs/0030-ensure-index-less-than-length-in-since/0030-ensure-index-less-than-length-in-since.md +++ b/rfcs/0030-ensure-index-less-than-length-in-since/0030-ensure-index-less-than-length-in-since.md @@ -1,7 +1,7 @@ --- Number: "0030" Category: Standards Track -Status: Proposal +Status: Active Author: Ian Yang <@doitian> Created: 2021-02-04 --- diff --git a/rfcs/0031-variable-length-header-field/0031-variable-length-header-field.md b/rfcs/0031-variable-length-header-field/0031-variable-length-header-field.md index 638b7c4f3..76475fbef 100644 --- a/rfcs/0031-variable-length-header-field/0031-variable-length-header-field.md +++ b/rfcs/0031-variable-length-header-field/0031-variable-length-header-field.md @@ -1,7 +1,7 @@ --- Number: "0031" Category: Standards Track -Status: Proposal +Status: Active Author: Ian Yang <@doitian> Created: 2021-02-07 --- @@ -47,7 +47,7 @@ The `extra_hash` is defined as: * When `extension` is empty, `extra_hash` is the same as the `uncles_hash`. * Otherwise `extra_hash = ckbhash(uncles_hash || ckbhash(extension))` -Since epoch B, consensus will define the schema of `extension` and verify the content. This is a soft fork if the `extension` is at most 96 bytes, because nodes deployed since epoch A do not verify the content of `extension`. +Since epoch B, consensus will define the schema of `extension` and verify the content. This is a soft fork if the `extension` is at most 96 bytes, because nodes deployed since epoch A do not verify the content of `extension`. ### P2P Protocols Changes diff --git a/rfcs/0032-ckb-vm-version-selection/0032-ckb-vm-version-selection.md b/rfcs/0032-ckb-vm-version-selection/0032-ckb-vm-version-selection.md index 751fb89d7..a498f33a7 100644 --- a/rfcs/0032-ckb-vm-version-selection/0032-ckb-vm-version-selection.md +++ b/rfcs/0032-ckb-vm-version-selection/0032-ckb-vm-version-selection.md @@ -1,7 +1,7 @@ --- Number: "0032" Category: Standards Track -Status: Proposal +Status: Active Author: Ian Yang <@doitian> Created: 2021-04-26 --- @@ -76,7 +76,7 @@ In [nervosnetwork/ckb](https://github.com/nervosnetwork/ckb), the `hash_type` is This RFC depends on [rfc33], [rfc34], and [rfc35]. The 4 RFCs must be activated together at the same epoch. -[rfc35]: ../0035-ckb2021-p2p-protocol-upgrade/0035-ckb2021-p2p-protocol-upgrade.md +[rfc35]: ../0035-ckb-p2p-protocol-upgrade/0035-ckb-p2p-protocol-upgrade.md The first two RFCs, [rfc33] and [rfc34] are the specification of VM version 1. The [rfc35] proposes to run two versions of transaction relay protocols during the fork, because the VM selection algorithm depends on which epoch the transaction belongs to, thus it is not deterministic for transactions still in the memory pool. diff --git a/rfcs/0033-ckb-vm-version-1/0033-ckb-vm-version-1.md b/rfcs/0033-ckb-vm-version-1/0033-ckb-vm-version-1.md index cf9c32ede..8fbe9c901 100644 --- a/rfcs/0033-ckb-vm-version-1/0033-ckb-vm-version-1.md +++ b/rfcs/0033-ckb-vm-version-1/0033-ckb-vm-version-1.md @@ -1,7 +1,7 @@ --- Number: "0033" -Category: Informational -Status: Draft +Category: Standards Track +Status: Active Author: Wanbiao Ye Created: 2021-05-25 --- diff --git a/rfcs/0034-vm-syscalls-2/0034-vm-syscalls-2.md b/rfcs/0034-vm-syscalls-2/0034-vm-syscalls-2.md index 96cbfd2b6..5cc29c059 100644 --- a/rfcs/0034-vm-syscalls-2/0034-vm-syscalls-2.md +++ b/rfcs/0034-vm-syscalls-2/0034-vm-syscalls-2.md @@ -1,7 +1,7 @@ --- Number: "0034" Category: Standards Track -Status: Proposal +Status: Active Author: Wanbiao Ye Created: 2021-05-25 --- @@ -10,7 +10,7 @@ Created: 2021-05-25 ## Abstract -This document describes the addition of the syscalls during the ckb2021. These syscalls are only available since ckb-vm version 1 and ckb2021 [2]. +This document describes the addition of the syscalls during the CKB Edition Mirana. These syscalls are only available since ckb-vm version 1 and CKB Edition Mirana [2]. - [VM Version] - [Current Cycles] diff --git a/rfcs/0035-ckb2021-p2p-protocol-upgrade/0035-ckb2021-p2p-protocol-upgrade.md b/rfcs/0035-ckb-p2p-protocol-upgrade/0035-ckb-p2p-protocol-upgrade.md similarity index 99% rename from rfcs/0035-ckb2021-p2p-protocol-upgrade/0035-ckb2021-p2p-protocol-upgrade.md rename to rfcs/0035-ckb-p2p-protocol-upgrade/0035-ckb-p2p-protocol-upgrade.md index db653c090..4c025213e 100644 --- a/rfcs/0035-ckb2021-p2p-protocol-upgrade/0035-ckb2021-p2p-protocol-upgrade.md +++ b/rfcs/0035-ckb-p2p-protocol-upgrade/0035-ckb-p2p-protocol-upgrade.md @@ -1,7 +1,7 @@ --- Number: "0035" Category: Standards Track -Status: Proposal +Status: Active Author: Chao Luo <@driftluo>, Ian Yang <@doitian> Created: 2021-07-01 --- diff --git a/rfcs/0035-ckb2021-p2p-protocol-upgrade/0035-ckb2021-p2p-protocol-upgrade.zh-CN.md b/rfcs/0035-ckb-p2p-protocol-upgrade/0035-ckb-p2p-protocol-upgrade.zh-CN.md similarity index 100% rename from rfcs/0035-ckb2021-p2p-protocol-upgrade/0035-ckb2021-p2p-protocol-upgrade.zh-CN.md rename to rfcs/0035-ckb-p2p-protocol-upgrade/0035-ckb-p2p-protocol-upgrade.zh-CN.md diff --git a/rfcs/0036-remove-header-deps-immature-rule/0036-remove-header-deps-immature-rule.md b/rfcs/0036-remove-header-deps-immature-rule/0036-remove-header-deps-immature-rule.md index 8dcb11555..c82407f60 100644 --- a/rfcs/0036-remove-header-deps-immature-rule/0036-remove-header-deps-immature-rule.md +++ b/rfcs/0036-remove-header-deps-immature-rule/0036-remove-header-deps-immature-rule.md @@ -1,7 +1,7 @@ --- Number: "0036" Category: Standards Track -Status: Proposal +Status: Active Author: Ian Yang <@doitian> Created: 2021-02-07 --- diff --git a/rfcs/0037-ckb2021/0037-ckb2021.md b/rfcs/0037-ckb-mirana-2021/0037-ckb-mirana-2021.md similarity index 61% rename from rfcs/0037-ckb2021/0037-ckb2021.md rename to rfcs/0037-ckb-mirana-2021/0037-ckb-mirana-2021.md index 45ef2d7c9..2209a64ca 100644 --- a/rfcs/0037-ckb2021/0037-ckb2021.md +++ b/rfcs/0037-ckb-mirana-2021/0037-ckb-mirana-2021.md @@ -1,30 +1,30 @@ --- Number: "0037" -Category: Informational -Status: Draft +Category: Standards Track +Status: Active Author: Ian Yang <@doitian> Created: 2021-07-24 --- -# CKB Consensus Change (Edition CKB2021) +# CKB Consensus Change (CKB Edition Mirana) -The current edition of CKB consensus rules is CKB2019. CKB2021 refers to the new edition of CKB consensus rules after its first hardfork. The purpose of a hard fork is to upgrade and update the rules encoded in the network. The changes are not backward compatible. This document outlines the changes in this upgrade. +The current edition of CKB consensus rules is CKB Edition Lina (2019). CKB Edition Mirana (2021) refers to the new edition of CKB consensus rules after its first hardfork. The purpose of a hard fork is to upgrade and update the rules encoded in the network. The changes are not backward compatible. This document outlines the changes in this upgrade. -## What's in CKB2021 +## What's in CKB Edition Mirana -CKB2021 includes both new features and bug fixes. All changes are proposed via RFCs. The appendix has a list of all the RFCs related to CKB2021. + CKB Edition Mirana includes both new features and bug fixes. All changes are proposed via RFCs. The appendix has a list of all the RFCs related to CKB Edition Mirana. -The upgrade is divided into three categories. +The upgrade is divided into three categories. -First, CKB VM gets a major upgrade. CKB2021 will bundle CKB VM v1, in addition to the v0 in CKB2019. Scripts will be executed on v1 unless users opt in to use v0 by setting the script hash type to `data`. +First, CKB VM gets a major upgrade. CKB Edition Mirana will bundle CKB VM v1, in addition to the v0 in CKB Edition Lina. Scripts will be executed on v1 unless users opt in to use v0 by setting the script hash type to `data`. -Second, CKB2021 adds a new field `extension` in the block. This is reserved for future upgrades such as flyclient. +Second, CKB Edition Mirana adds a new field `extension` in the block. This is reserved for future upgrades such as flyclient. Lastly, there are a bunch of consensus patches to fix bugs and make the consensus rules more robust. ### CKB VM v1 -Since CKB2021, there will be multiple VM versions available. [RFC32] introduces a CKB VM version mechanism. It piggybacks on the `hash_type` field in the Script structure. +Since CKB Edition Mirana, there will be multiple VM versions available. [RFC32] introduces a CKB VM version mechanism. It piggybacks on the `hash_type` field in the Script structure. | `hash_type` | JSON representation | matches by | VM version | | ----------- | ---------- | ---------------- | ---------- | @@ -38,17 +38,17 @@ The new VM version adds new features and performance optimizations. It has fixed CKB VM v1 supports [RISC-V B extension](https://github.com/riscv/riscv-bitmanip) and [macro-op fusion](https://en.wikichip.org/wiki/macro-operation_fusion). One major rationale behind the changes in CKB-VM is about reducing overheads. RISC-V B extension allows developers to map RISC-V instructions directly with native instructions provided by x86-64 CPUs, while macro-op fusion goes even deeper to exploit modern micro-architectures in CPUs. All those efforts make crypto algorithms more efficiently on CKB-VM, unlocking more potential use cases of Nervos CKB. For example, the BLS signature verification lock consumes too many cycles on CKB now. With the help of B extension, together with macro-op, it's possible to bring the cycles consumption down to a feasible rate. -Given the same transaction, different VM versions may consume different cycles, even give different verification results. [RFC35] proposes to use separate transaction relay protocols for each VM version to help the smooth transition of the CKB2021 activation. +Given the same transaction, different VM versions may consume different cycles, even give different verification results. [RFC35] proposes to use separate transaction relay protocols for each VM version to help the smooth transition of the CKB Edition Mirana activation. ### Extension Field [RFC31] proposes adding an optional variable length field to the block. -Many extensions require adding new fields into the block. For example, PoA for testnet requires 65 bytes for each signature, and flyclient needs to add a 64 bytes hash. But there's not enough reserved bits in the header for these extensions. The RFC proposes a solution to add a variable length field in the block. +Many extensions require adding new fields into the block. For example, PoA for testnet requires 65 bytes for each signature, and flyclient needs to add a 64 bytes hash. But there's not enough reserved bits in the header for these extensions. The RFC proposes a solution to add a variable length field in the block. Although the field is added to the block body, nodes can synchronize the block header and this field together without overhead. -CKB2021 will not parse and verify the field after the activation. Instead, it enables a future soft fork to give the definition of the extension field. For example, flyclient can store the hash in the extension field. + CKB Edition Mirana will not parse and verify the field after the activation. Instead, it enables a future soft fork to give the definition of the extension field. For example, flyclient can store the hash in the extension field. ### Consensus Patches @@ -60,28 +60,28 @@ CKB2021 will not parse and verify the field after the activation. Instead, it en [RFC36] removes header deps immature rule, allowing developers to choose how long to wait until a header can be used as a dep header. -## CKB2021 Timeline +## CKB Edition Mirana Timeline The mainnet upgrade is divided into three phases. -* **Stage 1 - Code Preview**: An RC version of 0.100.0 is ready for preview on July 16 2021 via nervosnetwork/ckb [releases](https://github.com/nervosnetwork/ckb/releases). It will introduce the incompatible changes to help developers to adapt their tools and apps to CKB2021. But this version does not activate the consensus incompatible changes in CKB2021. Developers can test the new rules by running a dev chain locally. +* **Stage 1 - Code Preview**: An RC version of 0.100.0 is ready for preview on July 16 2021 via nervosnetwork/ckb [releases](https://github.com/nervosnetwork/ckb/releases). It will introduce the incompatible changes to help developers to adapt their tools and apps to CKB Edition Mirana. But this version does not activate the consensus incompatible changes in CKB Edition Mirana. Developers can test the new rules by running a dev chain locally. -* **Stage 2 - Testnet Activation**: With the release of CKB 0.101.0, CKB2021 is set to activate on Aggron testnet on October 24th, 2021. Pudge is the successor guardian of the testnet after activation. Thank you Aggron, Ogre Magi! Look who's coming for dinner, Pudge! +* **Stage 2 - Testnet Activation**: With the release of CKB 0.101.0, CKB Edition Mirana is set to activate on Aggron testnet on October 24th, 2021. Pudge is the successor guardian of the testnet after activation. Thank you Aggron, Ogre Magi! Look who's coming for dinner, Pudge! -* **Stage 3 - Mainnet Activation**: With the release of CKB 0.103.0, CKB2021 will be set to activate on Lina mainnet. The exact mainnet activation time will be determined after Stage 2 passed successfully. Mirana will be the successor guardian of CKB mainnet after activation. Thank you Lina, our flame burns brighter. The moon lights our way, Mirana! +* **Stage 3 - Mainnet Activation**: With the release of CKB 0.103.0, CKB Edition Mirana will be set to activate on Lina mainnet. The exact mainnet activation time will be determined after Stage 2 passed successfully. Mirana will be the successor guardian of CKB mainnet after activation. Thank you Lina, our flame burns brighter. The moon lights our way, Mirana! ## Upgrade Strategies First, the SDK, Tool, and dApps authors must adapt to any 0.100.0 rc version. -There are two strategies for ecosystem developers to upgrade to the CKB2021 consensus. Choose the former one if the developers can pause the app during the fork activation, otherwise, use the latter one. +There are two strategies for ecosystem developers to upgrade to the CKB Edition Mirana consensus. Choose the former one if the developers can pause the app during the fork activation, otherwise, use the latter one. -- Release two different versions or use the feature switcher. Manually deploy the newer version or enable the feature CKB2021 after the fork activation. -- Use feature switcher and enable the feature CKB2021 automatically when the chain grows into the activation epoch. The activation epoch is different in the testnet and the mainnet, which is available via the updated `get_consensus` RPC. +- Release two different versions or use the feature switcher. Manually deploy the newer version or enable the feature CKB Edition Mirana after the fork activation. +- Use feature switcher and enable the feature CKB Edition Mirana automatically when the chain grows into the activation epoch. The activation epoch is different in the testnet and the mainnet, which is available via the updated `get_consensus` RPC. ## Appendix -### CKB2021 RFCs List +### CKB Edition Mirana RFCs List * [RFC28]: Use Block Timestamp as Start Timestamp in Since. * [RFC29]: Allow multiple matches on dep cells via type script hash when these cells have the same data. @@ -92,7 +92,7 @@ There are two strategies for ecosystem developers to upgrade to the CKB2021 cons * [RFC34]: CKB VM syscalls bundle 2. * [RFC35]: P2P protocol upgrade. * [RFC36]: Remove header deps immature rule. -* RFC37: This RFC, CKB2021 overview. +* RFC37: This RFC, CKB Edition Mirana overview. [RFC28]: ../0028-change-since-relative-timestamp/0028-change-since-relative-timestamp.md [RFC29]: ../0029-allow-script-multiple-matches-on-identical-code/0029-allow-script-multiple-matches-on-identical-code.md @@ -101,5 +101,5 @@ There are two strategies for ecosystem developers to upgrade to the CKB2021 cons [RFC32]: ../0032-ckb-vm-version-selection/0032-ckb-vm-version-selection.md [RFC33]: ../0033-ckb-vm-version-1/0033-ckb-vm-version-1.md [RFC34]: ../0034-vm-syscalls-2/0034-vm-syscalls-2.md -[RFC35]: ../0035-ckb2021-p2p-protocol-upgrade/0035-ckb2021-p2p-protocol-upgrade.md +[RFC35]: ../0035-ckb-p2p-protocol-upgrade/0035-ckb-p2p-protocol-upgrade.md [RFC36]: ../0036-remove-header-deps-immature-rule/0036-remove-header-deps-immature-rule.md diff --git a/rfcs/0046-syscalls-summary/0046-syscalls-summary.md b/rfcs/0046-syscalls-summary/0046-syscalls-summary.md index 70894763f..40cb0e92b 100644 --- a/rfcs/0046-syscalls-summary/0046-syscalls-summary.md +++ b/rfcs/0046-syscalls-summary/0046-syscalls-summary.md @@ -32,16 +32,16 @@ This RFC aims to provide a comprehensive summary of all CKB VM syscalls as speci | 2 | 2041 | [ckb_vm_version](https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0034-vm-syscalls-2/0034-vm-syscalls-2.md#vm-version) | Return the version of CKB VM being used to execute the current script. | | 2 | 2042 | [ckb_current_cycles](https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0034-vm-syscalls-2/0034-vm-syscalls-2.md#current-cycles) | Return the number of cycles consumed by the currently running script *immediately before* executing this syscall. This syscall will consume an additional 500 cycles. | | 2 | 2043 | [ckb_exec](https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0034-vm-syscalls-2/0034-vm-syscalls-2.md#exec) | Run a script executable from the specified cell using the current VM context. This replaces the original calling running script executable with the new specified script executable. This is similar to the [exec call](https://en.wikipedia.org/wiki/Exec_(system_call)) found in several operating systems. | -| | | ckb_spawn | (To be added in CKB2023.) Run a script executable from the specified cell using the current VM context, but return to the original calling script executable upon termination. This is similar to the [spawn function](https://en.wikipedia.org/wiki/Spawn_(computing)) found in several operating systems and programming languages. | -| | | ckb_get_memory_limit | (To be added in CKB2023.) Return the maximum amount of memory available to the current script being executed. | -| | | ckb_set_content | (To be added in CKB2023.) Set the content of the designated memory region that can be read by the parent (calling) script which executed the current script via the spawn function. | -| | | ckb_load_extension | (To be added in CKB2023.) Load the extention field data and copy it using partial loading. | +| | | ckb_spawn | (To be added in CKB Edition Meepo.) Run a script executable from the specified cell using the current VM context, but return to the original calling script executable upon termination. This is similar to the [spawn function](https://en.wikipedia.org/wiki/Spawn_(computing)) found in several operating systems and programming languages. | +| | | ckb_get_memory_limit | (To be added in CKB Edition Meepo.) Return the maximum amount of memory available to the current script being executed. | +| | | ckb_set_content | (To be added in CKB Edition Meepo.) Set the content of the designated memory region that can be read by the parent (calling) script which executed the current script via the spawn function. | +| | | ckb_load_extension | (To be added in CKB Edition Meepo.) Load the extention field data and copy it using partial loading. | ## Constants ### Return Codes -These are the return codes used by the CKB VM syscalls. +These are the return codes used by the CKB VM syscalls. | Const No. | C Example | Description | | --------- | ---------------------- | ------------------------------------------------- | @@ -53,7 +53,7 @@ These are the return codes used by the CKB VM syscalls. ### Source -These are the sources for syscalls that query the transaction for input cells, output cells, dep cells, and header deps. +These are the sources for syscalls that query the transaction for input cells, output cells, dep cells, and header deps. | Const No. | C Example | Description | | ------------------ | ----------------------- | ------------------------------------------------------------------------------------------- | diff --git a/rfcs/0048-remove-block-header-version-reservation-rule/0048-remove-block-header-version-reservation-rule.md b/rfcs/0048-remove-block-header-version-reservation-rule/0048-remove-block-header-version-reservation-rule.md index a58262172..e3ee4dbaa 100644 --- a/rfcs/0048-remove-block-header-version-reservation-rule/0048-remove-block-header-version-reservation-rule.md +++ b/rfcs/0048-remove-block-header-version-reservation-rule/0048-remove-block-header-version-reservation-rule.md @@ -1,7 +1,7 @@ --- Number: "0048" Category: Standards Track -Status: Draft +Status: Proposal Author: Dingwei Zhang Created: 2023-04-17 --- @@ -15,7 +15,7 @@ This rfc proposes to remove this reservation and allow for the use of CKB softfo ## Motivation -The version field in the CKB block header currently has no real meaning, as the consensus rule forces it to be 0 in CKB2021 and earlier. This means that it cannot be used to signal CKB softfork activation [RFC43]. To address this issue, This rfc proposes to remove this reservation and allow for the use of version bits in the block header. +The version field in the CKB block header currently has no real meaning, as the consensus rule forces it to be 0 in CKB Edition Mirana and earlier. This means that it cannot be used to signal CKB softfork activation [RFC43]. To address this issue, This rfc proposes to remove this reservation and allow for the use of version bits in the block header. ## Specification diff --git a/rfcs/0049-ckb-vm-version-2/0049-ckb-vm-version-2.md b/rfcs/0049-ckb-vm-version-2/0049-ckb-vm-version-2.md index 4342ed32b..3d8d785f3 100644 --- a/rfcs/0049-ckb-vm-version-2/0049-ckb-vm-version-2.md +++ b/rfcs/0049-ckb-vm-version-2/0049-ckb-vm-version-2.md @@ -1,7 +1,7 @@ --- Number: "0049" Category: Standards Track -Status: Draft +Status: Proposal Author: Wanbiao Ye Created: 2023-04-17 --- diff --git a/rfcs/0050-vm-syscalls-3/0050-vm-syscalls-3.md b/rfcs/0050-vm-syscalls-3/0050-vm-syscalls-3.md index 63f60b4cc..4717f1a92 100644 --- a/rfcs/0050-vm-syscalls-3/0050-vm-syscalls-3.md +++ b/rfcs/0050-vm-syscalls-3/0050-vm-syscalls-3.md @@ -1,7 +1,7 @@ --- Number: "0050" Category: Standards Track -Status: Draft +Status: Proposal Author: Xuejie Xiao , Jiandong Xu, Wanbiao Ye , Dingwei Zhang Created: 2023-04-17 --- diff --git a/rfcs/0051-ckb2023/0051-ckb2023.md b/rfcs/0051-ckb-meepo-2024/0051-ckb-meepo-2024.md similarity index 51% rename from rfcs/0051-ckb2023/0051-ckb2023.md rename to rfcs/0051-ckb-meepo-2024/0051-ckb-meepo-2024.md index fddffdc48..f3558581d 100644 --- a/rfcs/0051-ckb2023/0051-ckb2023.md +++ b/rfcs/0051-ckb-meepo-2024/0051-ckb-meepo-2024.md @@ -1,22 +1,22 @@ --- Number: "0051" Category: Standards Track -Status: Draft +Status: Proposal Author: Dingwei Zhang Created: 2023-04-17 --- -# CKB Consensus Change (Edition CKB2023) +# CKB Consensus Change (CKB Edition Meepo) -The current edition of CKB consensus rules is CKB2021. CKB2023 refers to the new edition of CKB consensus rules after its second hardfork, The purpose of a hard fork is to upgrade and update the rules encoded in the network. The changes are not backward compatible. This document outlines the changes in this upgrade. +The current edition of CKB consensus rules is CKB Edition Mirana (2021). CKB Edition Meepo (2024) refers to the new edition of CKB consensus rules after its second hardfork, The purpose of a hard fork is to upgrade and update the rules encoded in the network. The changes are not backward compatible. This document outlines the changes in this upgrade. -## What's in CKB2023 -CKB2023 will bring significant changes to the consensus rules, these changes include the removal of the reservation rule on version field in the block header, the introduction of a new version of the virtual machine (VM) with new syscalls and standard extensions, and the optimization of performance with new mops. This RFC provides a detailed overview of these changes. +## What's in CKB Edition Meepo +CKB Edition Meepo will bring significant changes to the consensus rules, these changes include the removal of the reservation rule on version field in the block header, the introduction of a new version of the virtual machine (VM) with new syscalls and standard extensions, and the optimization of performance with new mops. This RFC provides a detailed overview of these changes. ### CKB VM v2 -Since CKB2023, there will be multiple VM versions available. [RFC32] introduces a CKB VM version mechanism. It piggybacks on the `hash_type` field in the Script structure. +Since CKB Edition Meepo (2024) , there will be multiple VM versions available. [RFC32] introduces a CKB VM version mechanism. It piggybacks on the `hash_type` field in the Script structure. | `hash_type` | JSON representation | matches by | VM version | | ----------- | ---------- | ---------------- | ---------- | @@ -37,35 +37,31 @@ CKB VM v2 bring the following features: ### Remove Block Header Version Reservation Rule -In CKB2021, the version field of the block header is reserved and only allowed to be 0. In the 2023 edition this reservation will be removed to allow for the use of [RFC0043] +In CKB Edition Mirana, the version field of the block header is reserved and only allowed to be 0. In the 2023 edition this reservation will be removed to allow for the use of [RFC0043] -## CKB2023 Timeline +## CKB Edition Meepo (2024) Timeline -The mainnet upgrade is divided into three phases. +* **Testnet Activation**: CKB Edition Meepo has been released on the testnet with version v0.119.0 and activated at epoch 9690 on October 25, 2024. -* **Stage 1 - Code Preview**: An RC version of 0.200.0 is ready for preview on June 30 2023 via nervosnetwork/ckb [releases](https://github.com/nervosnetwork/ckb/releases). It will introduce the incompatible changes to help developers to adapt their tools and apps to CKB2023. But this version does not activate the consensus incompatible changes in CKB2023. Developers can test the new rules by running a dev chain locally. - -* **Stage 2 - Testnet Activation**: - -* **Stage 3 - Mainnet Activation**: +* **Mainnet Activation**: CKB Edition Meepo has been released on the mainnet with version v0.200.0 and will activate at epoch 12293 on July 1, 2025. ## Upgrade Strategies First, the SDK, Tool, and dApps authors must adapt to any 0.200.0 rc version. -There are two strategies for ecosystem developers to upgrade to the CKB2023 consensus. Choose the former one if the developers can pause the app during the fork activation, otherwise, use the latter one. +There are two strategies for ecosystem developers to upgrade to the CKB Edition Meepo consensus. Choose the former one if the developers can pause the app during the fork activation, otherwise, use the latter one. -- Release two different versions or use the feature switcher. Manually deploy the newer version or enable the feature CKB2023 after the fork activation. -- Use feature switcher and enable the feature CKB2023 automatically when the chain grows into the activation epoch. The activation epoch is different in the testnet and the mainnet, which is available via the updated `get_consensus` RPC. +- Release two different versions or use the feature switcher. Manually deploy the newer version or enable the feature CKB Edition Meepo after the fork activation. +- Use feature switcher and enable the feature CKB Edition Meepo automatically when the chain grows into the activation epoch. The activation epoch is different in the testnet and the mainnet, which is available via the updated `get_consensus` RPC. ## Appendix -### CKB2023 RFCs List +### CKB Edition Meepo RFCs List * [RFC0048]: Remove Block Header Version Reservation Rule. * [RFC0050]: CKB VM Syscalls 3. * [RFC0049]: CKB VM version2. -* RFC0051: This RFC, CKB2023 overview. +* RFC0051: This RFC, CKB Edition Meepo overview. [RFC0043]: ../0043-ckb-softfork-activation/0043-ckb-softfork-activation.md [RFC0048]: ../0048-remove-block-header-version-reservation-rule/0048-remove-block-header-version-reservation-rule.md