Rust-Ckb v0.100.0-rc3: Nervos CKB — is a public permissionless blockchain, the common knowledge layer of Nervos network.

icon
Latest Release: v0.100.0-rc3

Nervos CKB - The Common Knowledge Base

Version Telegram Group Nervos Talk

master develop
TravisCI TravisCI

About CKB

CKB is the layer 1 of Nervos Network, a public/permissionless blockchain. CKB uses Proof of Work and improved Nakamoto consensus to achieve maximized performance on average hardware and internet condition, without sacrificing decentralization and security which are the core value of blockchain.

CKB supports scripting in any programming language with its own CKB-VM, a virtual machine fully compatible with RISC-V ISA. CKB is a General Verification Network, its programming model focuses on state verification, leaves state generation to layer 2 applications/protocols.

Nervos project defines a suite of scalable and interoperable blockchain protocols to create a self-evolving distributed economy, CKB is among them.

Notice: The ckb process will send stack trace to sentry on Rust panics. This is enabled by default before mainnet, which can be opted out by setting the option dsn to empty in the config file.

Join a Network

  • Mainnet Lina: Use the latest release and run ckb init --chain mainnet to initialize the node.
  • Testnet Aggron: Use the latest release and run ckb init --chain testnet to initialize the node.

See more networks to join in the wiki.

Mining

CKB uses the Eaglesong mining algorithm. Please check here for more information.

License FOSSA Status

Nervos CKB is released under the terms of the MIT license. See COPYING for more information or see https://opensource.org/licenses/MIT.

Development Process

This project is still in development, and it's NOT in production-ready status. The board also lists some known issues that we are currently working on.

The master branch is regularly built and tested, however, it is not guaranteed to be completely stable; The develop branch is the work branch to merge new features, and it's not stable. The CHANGELOG is available in Releases and CHANGELOG.md in the master branch.

How to Contribute

The contribution workflow is described in CONTRIBUTING.md, and security policy is described in SECURITY.md. To propose new protocol or standard for Nervos, see Nervos RFC.


Documentations

Latest version is hosted in GitHub.

The default branch in GitHub is develop, if you are looking for docs for the Mainnet Lina or Testnet Aggron, switch to the branch master.

You can find a more comprehensive document website at https://docs.nervos.org.

Comments

  • ci: include nodes data directories of the failed test case in Artifacts when the integration test failed.
    ci: include nodes data directories of the failed test case in Artifacts when the integration test failed.

    Aug 4, 2021

    E.g. https://github.com/nervosnetwork/ckb/runs/3238295004

    Now only the control node log file is uploaded. It's better to upload all the nodes data directories as well to help root causing.

    t:enhancement 
    Reply
  • Documentation: List well known lock scripts and describe process to disable functionality of well_known_scripts_only,
    Documentation: List well known lock scripts and describe process to disable functionality of well_known_scripts_only,

    Sep 24, 2021

    Feature Request

    Is your feature request related to a problem? Please describe.

    There is not enough information about the new default functionality for well_known_scripts_only for developers to upgrade properly.

    Describe the solution you'd like

    Within the documentation, it would be helpful if the well-known lock scripts were listed for the Testnet and Mainnet. It would also be highly beneficial to describe how to disable this functionality since this is a breaking change.

    t:enhancement 
    Reply
  • ci: trigger ci on push specific branches
    ci: trigger ci on push specific branches

    Oct 23, 2021

    What problem does this PR solve?

    ci: trigger ci on push specific branches

    Check List

    Tests

    • tests

    Release note

    None: Exclude this PR from the release note.
    
    Reply
  • chore(deps): bump serde_json from 1.0.74 to 1.0.75
    chore(deps): bump serde_json from 1.0.74 to 1.0.75

    Jan 18, 2022

    Bumps serde_json from 1.0.74 to 1.0.75.

    Commits
    • a22b686 Release 1.0.75
    • 36c43bf Merge pull request #848 from serde-rs/num
    • d541381 Deserialize small numbers as integers in arbitrary_precision
    • 0ca5a69 Add regression test for issue 845
    • 6691977 Disable buggy iter_not_returning_iterator lint
    • aebe84c Raise toolchain version for preserve_order to rust 1.46
    • 3f45930 Set miriflags once for whole miri job
    • c79d9ad Run miri also with some features enabled
    • See full diff in compare view

    Dependabot compatibility score

    You can trigger a rebase of this PR by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies rust 
    Reply
  • Revert chain_root field
    Revert chain_root field

    Sep 19, 2019

    Need more research on light client protocol, revert the chain_root for now, we can make a hard-fork to add it back after we decide the light client protocol.

    revert https://github.com/nervosnetwork/ckb/pull/1518

    s:ready-to-merge 
    Reply
  • feat: Optimize block download tasks with a simple task scheduler
    feat: Optimize block download tasks with a simple task scheduler

    Apr 3, 2020

    This implementation aims to optimize the task scheduling of the download block.

    It contains a simple task counter to allocate the number of tasks for each node, record and filter the relatively good nodes for download.

    After about a week of testing and continuous adjustments, the current PR data is relatively satisfactory, but the possibility of continued adjustments in the future is not ruled out

    This PR changes a number of things, including but not limited:

    1. Raise the maximum inflight block limit per node to 32-128, but the default is 16, and dynamically adjust this data
    2. Remove redundant designs where the same block can be requested from two nodes
    3. ~When inserting a orphan block, the countdown for 1 second at the tip + 1 corresponding to trace_number, if still not completed, clear the task and send it to another node for download (exponentially decreasing the task limit of the corresponding node)~
    4. Split the getBlockTransaction task from the getBlocks task, keeping the design that getBlockTransaction can request from 2 nodes
    5. Clearing out nodes that are peer_best_known < tip in IBD time
    6. Separating the block fetch process
    7. Clearing nodes that do not respond to getblock requests for 30 seconds
    8. mark timeout on all < tip +1 block request if request window > tip + 512
    9. Reduce the consumption of checking the maximum timeout time, from check all inflight to check all Less than tip + 20

    Test machine configuration: 2 core 8G RAM IP Location on Hong Kong

    $ cat /proc/cpuinfo | grep name | cut -f2 -d: | uniq -c
    2  Intel(R) Xeon(R) Platinum 8175M CPU @ 2.50GHz
    

    before:

    | net state | outbound | average speed | CPU occupancy | Bandwidth consumption | - | - | - | - | - | | relatively good | 8 peer | 102-120 block/s | average 70.49%, max 92.77% | average 4 Mbps, max 7.12 Mbps | relatively poor | 8 peer | 93-100 block/s | average 49.99%, max 74.37% | average 4 Mbps, max 7.12 Mbps

    after:

    | net state | outbound | average speed | CPU occupancy | Bandwidth consumption | - | - | - | - | - | | relatively good | 8 peer | 219-240 block/s | average 78.34%, max 93.17% | average 2Mbps, max 5.52 Mbps | relatively poor | 8 peer | 200-220 block/s | average 70.06%, max 85.83% | average 3 Mbps, max 19.55 Mbps

    Reply
  • refactory tx-pool
    refactory tx-pool

    Feb 20, 2021

                                                                                                                                                                                                           
    Reply
  • feat: upgrade tokio for tx-pool
    feat: upgrade tokio for tx-pool

    Jan 4, 2020

                                                                                                                                                                                                            s:hold pinned 
    Reply
  • [ᚬmaster] develop CI trigger
    [ᚬmaster] develop CI trigger

    Apr 16, 2020

    This PR acts as the automation trigger for develop branch.

    Reply
  • [ᚬmaster] develop CI trigger
    [ᚬmaster] develop CI trigger

    Nov 23, 2020

    This PR acts as the automation trigger for develop branch.

    Previous PRs: #2019

    Reply