-
Notifications
You must be signed in to change notification settings - Fork 234
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
2756: feat(hardfork): ckb2021 hardfork features (vm related part) r=doitian,quake a=yangby-cryptape ### Changes - New hardfork Features - [CKB-RFCs PR 236: RFC: ckb vm version1 changes](nervosnetwork/rfcs#236) - [CKB-RFCs PR 237: RFC: vm syscalls 2](nervosnetwork/rfcs#237) - [CKB-RFCs PR 238: CKB VM version selection](nervosnetwork/rfcs#238) - All changes are followed to the latest RFCs, except: - Add a "edition" field to all configuration files: CKB chain specification or app configurations. #### CKB Chain Edition - If no `edition` field, the default edition is `"2019"`. - After this PR, the default files created by `ckb init` will be edition `"2021"` files. But the public chains will still use the edition `"2019"` CKB chain specification as the built-in spec. At present, there are only to public chains: "mainnet" and "testnet". - The edition `"2019"` doesn't support hardfork parameters. - How to upgrade from edition `"2019"` to `"2021"`? Modify your spec file (default is `specs/dev.toml`), `ckb.toml` and `ckb-miner.toml`: - Update all `hash_type = "data"` to `hash_type.kind = "data"` and `hash_type.vm_version = 0`. - Update all `hash_type = "type"` to `hash_type.kind = "type"`. - Insert `edition = "2021"` into the head of the files. After upgrade the edition of chain specification, the first time to run the CKB, you have to use `--overwrite-spec` parameter. The details of this parameter can be found with `ckb run --help`. ### BREAKING CHANGES - The field `hash_type` in `Script` is changed from a `String` to an `Object` for all JSON RPC methods. The details can be found in the latest RFCs. - The argument `--ba-hash-type` for `ckb init` is split into two arguments: `--ba-hash-type-kind` and `--ba-hash-type-vm-version`. More details can be found with `ckb-release init --help`. Co-authored-by: mohanson <[email protected]> Co-authored-by: Boyu Yang <[email protected]>
- Loading branch information
Showing
83 changed files
with
2,792 additions
and
482 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.