@ouwenkg ouwenkg released this Feb 19, 2019 · 12 commits to develop since this release

After the Lunar New Year, we are pleased to announce that CITA v0.21 is coming!

In this new version, we spent a lot of time on optimization. We refactored the executor module to make it more simple and readable, removed some useless dependencies and updated script to simplify user usage.
Fixing bug is also essential.
Moreover, We have added a few new features, such as contract auto-execution, which gives chain owners more flexible management, enable parsing hostname directly in network.toml.

The most exciting news is that our new documentation site is online, providing a more detailed description and friendly interface to help everyone use CITA.


农历中国年后,期待已久的新版本 CITA v0.21 来了 !

在新版本中,我们花费很多时间在项目优化方面。重构了复杂难懂的 Executor 模块,去掉了一些无用的依赖,重写了部分脚本简化用户使用。 修复 bug 是必不可少的,与此同时我们也增加了少许新特性,例如合约自动执行功能,为链的拥有者提供了更灵活的管理方式。

令人兴奋的是我们的新版文档网站上线了,提供了更详细的说明和更友好的界面来帮助大家使用 CITA,欢迎大家使用 CITA 来做一些酷酷的事情。

Knife-Shaved-Noodles

CHANGELOG

CITA-Framework

  • [Optimization] Upgrade default rust toolchain to stable. @yangby
  • [Optimization] Remove useless dependencies. @yangby
  • [Optimization] Compact block Relay. @u2 @yangby

Executor

  • [Feature] Automatic execution. @kaikai
  • [Optimization] Enable changing size of global cache in StateDB. @lhf
  • [Refactor] Decouple executor and postman. @keroro520 @WPF
  • [Configuration] Deprecate --genesis command option, instead place into executor.toml. @keroro520
  • [Configuration] Add argument about timestamp uint in executor.toml to compatibility with Ethereum.@zhiwei
  • [Optimization] Change state db type to ensure safe reference. @WPF
  • [Optimization] Remove unused code in state db. @WPF
  • [Optimization] Add more tests in executor and postman. @WPF
  • [Optimization] Add block priority in postman. @keroro520
  • [Refactor] Decouple global sysconfig from transactionOptions. @kaikai
  • [Optimization] Deprecate some dangerous clone usage in block and state. @keroro520
  • [Optimization] Remove cached latest hashes. @zhiwei
  • [Fix] Fix problem in zk privacy. @zhiwei
  • [Fix] Fix defects in snapshot. @keroro520

Chain

  • [Optimization] Rename crypto enum. @zhiwei

Auth

  • [Optimization] Introduce a quick check for history heights. @zhiwei

Network

  • [Feature] Enable parsing hostname directly in network.toml. @driftluo
  • [Fix] Fix bug for network not send all msg. @jerry-yu

Consensus

  • [Optimization] Add a min-heap timer. @KaoImin
  • [Optimization] Optimize wait time for proposal, prevote and precommit. @jerry-yu

RPC

  • [Fix] The chainIdV1 in the response of getMetaData is hex string, so it should have 0x-prefix. @yangby
  • [Optimization] Split libproto operations from Jsonrpc. @zeroqn
  • [Feature] Add from field in Gettransaction rpc interface. @zeroqn
  • [Optimization] Upgrade hyper version and split Service and Server. @zeroqn
  • [Fix] Fix getFilterChanges interface, the hash array returned in the case of a block filter starts from the next block. @WPF

System Contract

  • [Feature] Change default quotaPrice to 1000000. @WPF
  • [Optimization] Take interfaces and test contracts out as a dependent submodule. @kaikai

Scripts

  • [Feature] Store their own address for each node. @yangby
  • [Configuration] Rename checkPermission to checkCallPermission. @kaikai
  • [Feature] Check the maximum number of consensus nodes. @zhiwei
  • [Configuration] Optimize usage of backup and clean command. @keroro520
  • [Optimization] Add exit info about creating genesis. @kaikai
  • [Feature] Support start 4 nodes in docker compose. @zhiwei

Test

  • [Optimization] Split large CI jobs. @u2
  • [Optimization] Add test about amend operation. @zhiwei
  • [Optimization] Add test to ensure genesis compatibility. @kaikai
  • [Optimization] Add test about snapshot. @keroro520

Doc

Tool

  • [Optimization] Split util module into standalone crates. @yangby
  • [Refactor] Combing the snapshot logic and rewrite snapshot_tools. @keroro520

更新日志

CITA-Framework

  • [Optimization] 升级默认的 Rust toolchain 到稳定版 @yangby
  • [Optimization] 移除无用的依赖. @yangby
  • [Optimization] Compact block Relay. @u2 @yangby

Executor

  • [Feature] 自动执行功能 @kaikai
  • [Optimization] StateDB 全局缓存大小可修改 @lhf
  • [Refactor] 接耦 executor 和 postman @keroro520 @WPF
  • [Configuration] 去掉 --genesis 命令行项,在 executor.toml 配置中指定 @keroro520
  • [Configuration] 在executor.toml 添加关于时间戳的参数,以保持对以太坊的兼容 @zhiwei
  • [Optimization] 为了保证安全引用改变 state db 类型 @WPF
  • [Optimization] 移除 state db 无用的代码. @WPF
  • [Optimization] executor 和 postman 中添加更多的测试 @WPF
  • [Optimization] postman 中添加块优先级 @keroro520
  • [Refactor] 从 transactionOptions 解耦出 global sysconfig @kaikai
  • [Optimization] Deprecate some dangerous clone usage in block and state. @keroro520
  • [Optimization] 移除最新哈希的缓存 @zhiwei
  • [Fix] 修复zk privacy 问题 @zhiwei
  • [Fix] 修复快照缺陷. @keroro520

Chain

  • [Optimization] 重命名 crypto 枚举. @zhiwei

Auth

  • [Optimization] 采用历史高度的快速检查 @zhiwei

Network

  • [Feature] 在 network.toml 直接解析主机名. @driftluo
  • [Fix] 修复 network 没有发送所有消息的 bug @jerry-yu

Consensus

  • [Optimization] 添加一个最小堆计时器 @KaoImin
  • [Optimization] 优化 proposal, prevote 和 precommit 的等待时间 @jerry-yu

RPC

  • [Fix] getMetaData 返回的 chainIdV1 是一个字符串,应包含 0x前缀 @yangby
  • [Optimization] Split libproto operations from Jsonrpc. @zeroqn
  • [Feature] 在 Gettransaction rpc 接口中添加 from 字段 @zeroqn
  • [Optimization] 更新 hyper 版本并拆分 ServiceServer @zeroqn
  • [Fix] 修复 getFilterChanges 接口,当 block filter 从下一个块开始监听时返回包含当前块的哈希数组 @WPF

System Contract

  • [Feature] 默认 quotaPrice 改为 1000000. @WPF
  • [Optimization] 合约接口和测试合约作为单独的 submodule @kaikai

Scripts

  • [Feature] 保存每个节点的地址 @yangby
  • [Configuration] 重命名 checkPermissioncheckCallPermission @kaikai
  • [Feature] 检查共识节点的最大个数 @zhiwei
  • [Configuration] 优化 backupclean 命令的用法 @keroro520
  • [Optimization] 添加生成创世文件的错误信息 @kaikai
  • [Feature] 支持用 docker compose 启动四个节点. @zhiwei

Test

  • [Optimization] 拆分大的 CI 任务. @u2
  • [Optimization] 添加关于 amend 操作的测试 @zhiwei
  • [Optimization] 添加创世文件兼容性的测试 @kaikai
  • [Optimization] 添加关于快照的测试 @keroro520

Doc

  • [Doc] 完成系统合约接口的文档 @kaikai
  • [Doc] 更新 executor.toml 中的 crypto 类型和时间戳配置. @zhiwei
  • [Doc] cita-bft 共识更多细节描述 @KaoImin
  • [Doc] 更新 readme 中的 SDK 信息. @zhouyun-zoe
  • [Doc] 添加节点命令的描述 @WPF
  • [Doc] 添加一个新的 文档网站 @zhouyun-zoe

Tool

  • [Optimization] 把 util 模块拆分为独立的 crates @yangby
  • [Refactor] 梳理快照逻辑并重写 snapshot_tools @keroro520

Upgrade Note

Older version upgrades the v0.21 version requires node configuration modifications.

  • Adding the following three configurations in each node's executor.toml

The old version executor.toml:

Journaldb_type = "archive"
Prooftype = 2
Grpc_port = 5000

The new version executor.toml:

Journaldb_type = "archive"
Prooftype = 2
Grpc_port = 5000
Genesis_path = "./genesis.json"
Statedb_cache_size = 5242880
Eth_compatibility = false
  • Modifying cita-execuror configuration item in each node's forever.toml:

The old version forever.toml:

[[process]]
Name = "cita-executor"
Command = "cita-executor"
Args = ["-g","genesis.json","-c","executor.toml"]
Pidfile = ".cita-executor.pid"
Respawn = 3

The new version forever.toml:

[[process]]
Name = "cita-executor"
Command = "cita-executor"
Args = ["-c","executor.toml"]
Pidfile = ".cita-executor.pid"
Respawn = 3

After completing the above modifications, following Upgrade Instructions.


升级提示

旧版本升级 v0.21 最新版本所需节点配置修改如下:

  • 新版本节点 executor.toml 添加如下三项配置:

旧版本如下:

journaldb_type = "archive"
prooftype = 2
grpc_port = 5000

新版本如下:

journaldb_type = "archive"
prooftype = 2
grpc_port = 5000
genesis_path = "./genesis.json"
statedb_cache_size = 5242880
eth_compatibility = false
  • 新版本节点 forever.toml 关于 cita-execuror 配置项:

旧版本如下:

[[process]]
name = "cita-executor"
command = "cita-executor"
args = ["-g","genesis.json","-c","executor.toml"]
pidfile = ".cita-executor.pid"
respawn = 3

新版本如下:

[[process]]
name = "cita-executor"
command = "cita-executor"
args = ["-c","executor.toml"]
pidfile = ".cita-executor.pid"
respawn = 3 

完成上述修改后,按照升级操作说明 操作即可。

Assets 6
Jan 30, 2019
Merged in new-docs (pull request #1604)
[Docs]add new docs website[skip ci]

Approved-by: kaikaifeng <kaikai@cryptape.com>

@kaikai1024 kaikai1024 released this Jan 31, 2019 · 549 commits to develop since this release

Fix the bug of version 0.19 that ordinary nodes can't sync blocks from the consensus nodes with a special situation.

Check the details at issue 201.

Assets 6

@rink1969 rink1969 released this Nov 27, 2018 · 331 commits to master since this release

CHANGELOG

Fixed a bug that getting blockhash in solidity contract will get uncertain result.

pragma solidity ^0.4.24;
contract Test {
    bytes32 public hash;

    function testblockhash() public {
        hash = blockhash(block.number-1);
    }
}

Deploy this contract, then send transaction to call testblockhash.
Once one of the nodes receives the transaction, the chain will stop growing.

It is recommended that users of previous versions upgrade to the latest version.

Assets 7

@yangby-cryptape yangby-cryptape released this Nov 15, 2018 · 341 commits to develop since this release

CHANGELOG

Fixed a bug that Network could not process domain names.

Assets 6

@yangby-cryptape yangby-cryptape released this Nov 9, 2018

CHANGELOG

We are pleased to announce that CITA v0.20 is released! In this season of eating crabs, we brought a new version of Mitten Crab.
In this new version, we finally supported the fork! This means that our following version will always be forward compatible. At the same time, the new version also supports for TLS communication encryption based on self-signed certificates, so the communication between nodes will become more secure. In the new version, we further optimized the network, upgraded the related infrastructure (rustc compiler and rocksdb, etc.), fixed some bugs, and added a lot of documentation.

Mitten Crab

Compatibility

  • This new version changes the log format of BFT wal. So it is necessary for each consensus node to be upgraded one by one (the interval should be more than 30s).
  • If you need to upgrade all the nodes at the same time, follow the steps below:
    • Stop all the nodes;
    • Upgrade all the nodes;
    • Use the bft-wal tool to manually convert the log format of BFT wal;
    • Restart all the nodes.
    DATA_PATH=./test-chain/0/data ./bin/bft-wal

Protocol

Bootstrap

  • [Optimization] Force the use of --super_admin to configure the administrator account when using create_cita_config.py to create a new chain.

Framework

  • [Upgrade] Upgrade rustc to nightly-2018-10-05, and update the docker image (latest image cita/cita-run:ubuntu-18.04-20181009).

Executor

  • [Deprecated] Deprecate the use of delay_block_number.
  • [Refactor] Use BlockID explicitly in methods that require the use of BlockID instead of using a fuzzy Default value.
  • [Refactor] Refactor duplicated codes in both of Executor and Chain.
  • [Refactor] Refactor some unsafe codes.

Chain

  • [Upgrade] Upgrade RocksDB.

Auth

  • [Feature] Add the check of the version field in the transaction.

Network

  • [Refactor] Refactor network client.
  • [Upgrade] Upgrade network server.
  • [Feature] Support for TLS communication encryption based on self-signed certificate.
  • [Fix] Parsing will stop immediately when the body of messages between nodes is too large.

RPC

  • [Fix] Fix the problem that the website returned by the getMetaData interface is incorrect.
  • [Fix] The error information returned by the sendRawTransaction interface may be inconsistent when there are duplicate transactions.
  • [Feature] Add the pending type in the BlockTag type.
  • [Fix] The exit code caused by the configuration file exception is corrected to 2.

System Contract

  • [Fix] Fix user authentication problem inside the group when the permission management is enabled.

Test

  • [Optimization] Optimize the efficiency of system contract testing.

Doc

  • [Docs] Add system contract interface documents.
  • [Docs] Add more English document.
Assets 6
Nov 3, 2018
Merged in translate-user-management (pull request #1437)
Translate user management docs [skip ci]

Approved-by: kaikaifeng <kaikai@cryptape.com>
Approved-by: WPF <wpf@cryptape.com>
Approved-by: zhangyaning <u2@cryptape.com>

@kaikai1024 kaikai1024 released this Sep 30, 2018 · 546 commits to master since this release

Kind of late... But happy Mid-Autumn Festival! Believe you all having had a wonderful time with family~

This weekend, we brought a new version, named Osmanthus Cake(桂花糕 in Chinese) to everyone!

In this version, we add several system contracts to help you better manage the system. One is called emergency braking. Once the emergency braking mode is activated, only the transactions sent by the admin account can be accepted by the chain. It can be used in some extreme conditions, such as the operators of the chain need to carry out some upgrades and maintenance without others to interfere.

Another is the version manager, which is prepared for the subsequent fork of CITA to solve the data compatibility problem.

We also add the quota price manager contract according to the feedback from customers and the market. Now, quota price can be set by the admin account in this version when building a public permissioned blockchain, check the document for more details.

Moreover, we put lots of efforts to improve CITA quality and stability in this month - more comprehensive testing under production environment and more detailed documentation.

Egg Fried Rice

CHANGELOG

CITA-Framework

  • [refactoring] Improve the user experience of CITA scripts

Executor

  • [feature] Support superadmin to set quota price
  • [feature] Support that the block reward can be chosen to return to the certain address
  • [optimization] SysConfig reload based on whether there is a parameter change
  • [fix] Fix loading problem of SystemConfig configuration
  • [fix] Fix the situation that the transfer cannot be successful if the charge mode is enabled
  • [fix] Fix the situation that account balance may overflow when transferring in charge mode

Chain

  • [feature] Add the cache_size entry to the configuration file

Auth

  • [feature] Modify the judgment logic of the transaction under emergency braking situation

RPC

  • [feature] GetMetaData support query economic model and protocol version number
  • [optimization] Modify some ErrorMessage

Contract

  • [feature] Isolate some permissions (send_tx, create_contract) to make them can be set separately in configuration
  • [fix] Eliminate compilation warnings for system contracts
  • [fix] Eliminate errors and warnings detected by Solium on system contracts
  • [feature] Add Emergency braking system contract
  • [feature] Add version control system contract
  • [feature] Add quota price manager system contract

Test

  • [ci] Increase the specification check of system contracts
  • [ci] Add clippy for code review
  • [optimization] Clean up smart contract unit tests that are no longer maintained
  • [ci] Fix the problem of sporadic stuck in JSON Mock test

Doc

  • [doc] Replace txtool with cita-cli in document
  • [doc] Modify ‘amend’ operation related documents
Assets 6
Sep 30, 2018

@driftluo driftluo released this Aug 30, 2018 · 692 commits to develop since this release

We are pleased to announce the release of CITA v0.18!

As the v1.0 release is getting closer, the focus is increasingly on ensuring the stability and reliability of CITA services. During this month's development, we pay lots of efforts on destructive testing to ensure that CITA can provide more reliable services.

In terms of feature, we further improved the usability of the cross-chain by adding the sidechain exit mechanism, in which two RPC interfaces were added to cross-check the data of the side chain.

We also add a system contract to do the batch transaction. when you want to make multiple calls to other contracts and the calls need to be in a strict order, this system contract can be used to ensure that the order of the transactions is exactly the same as expected.

Cryptographic Algorithm of CITA also made some changes. After combing the dependencies, we replace the sha3 algorithm of the C library with Keccak. Library of China Cryptographic Algorithm is also replaced by a new rust implementation with better performance, completed by a collaborative effort between the Cryptape Technology LLC. and BEIHANG KNOC LAB.

v0.18 remains compatible with v0.17. So you can upgrade from v0.17 to v0.18 by following the instructions below.

  1. Compared to v0.17, the v0.18 system contract has been modified. Users can choose to upgrade only binary, that is, replace all executable files in the bin folder in the distribution directory.
  2. scripts/config_tool/config_example/auth.toml added wal_enable, default value is false
  3. For existing nodes, add a line to each node's auth.toml configuration file: wal_enable = false

ps. This release is converted from Egg Fried Rice which is v0.18 release master's favorite homemade meal!
Egg Fried Rice

Change Log:

CITA-Framework

  1. [feature] Replaced sha3 with Keccak algorithm library
  2. [feature] New Library of China Cryptographic Algorithm
  3. [optimize] Remove useless code and dependencies
  4. [optimize] Add more CI

Executor

  1. [fix] Fix potential deadlock, multi-threaded data inconsistency
  2. [fix] Fix state machine state homing problem
  3. [fix] Fix Transaction decode logic error
  4. [fix] Fix blacklist problems that accounts cannot be removed from blacklist automatically when they come to have tokens
  5. [optimize] Add the monitor of chain status
  6. [feature] Modify some log levels
  7. [fix] Automatic synchronization when the Executor state is inconsistent with Chain
  8. [optimize] Optimize state synchronization speed between Executor and Chain
  9. [feature] Add the acquisition and verification of the state certificate

Chain

  1. [optimize] Add a notification of Executor status
  2. [fix] Fix the problem about saving the latest proof when syncing
  3. [fix] Fix some usability issues in the snapshot

Network

  1. [refactoring] Refactoring synchronization logic
  2. [feature] Output status log
  3. [fix] Close the connection to the deleted node when the Network configuration file is hot updated

Bft

  1. [fix] Fix the problem about saving temporary proof

Auth

  1. [feature] Transaction's value field validation is modified to be required to U256 or [u8;32], otherwise, an invalid value is returned.
  2. [fix] Transaction's to field validation is more strict, passing invalid parameters will return an error directly

RPC

  1. [feature] Separate the JSON-RPC type definition library for the client to use

System Contract

  1. [feature] Add cross-chain management contract to the process of state proof
  2. [feature] Supports batch transaction

Doc

  1. [feature] Update the cross-chain document with more description about sidechain exit mechanism.
Assets 6