Nervos CKB Development Update #11

Ian Yang
Ian Yang
May 21 · 2 min read

Covering May 6 to May 19

This post is co-authored by Ian Yang, Xuejie Xiao, Qian Linfeng and James Chen.

TL;DR

Changes in CKB

We have released v0.11.0 and v0.12.0 last two weeks, where v0.12.0 is the release for testnet launch.

Features highlights in v0.12.0:

This is the last sprint before testnet launch. We did many performance test, and have resolved several performance issues and fixed many bugs.

The release contains two important features:

  • #718: Initial NervosDAO implementation (@xxuejie). This is a corner stone of our economic model. In order to implement DAO, we added the ability to read a block header in VM (#620) without breaking the transaction execution result certainty.
  • #579: Epoch revision (@zhangsoledad). This is a part of the NC-MAX Consensus. An epoch issues fixed amount of CKB but the blocks number in an epoch varies.

Changes in VM

By default, CKB is running on our latest assembly based CKB VM interpreter now! Compared to the old Rust based implementation, this brings 2–3x speedup on real workload.

For maximum security, we added W^X memory protection in CKB VM now. The loaded script code will be marked as executable, while all the other memory pages will be marked as writable. The running script cannot write to executable memory and vice versa. We believe this will significantly enhance the security of CKB VM.

  • #49: fix misaligned jump bug
  • #50: mulw bug in assembly based VM
  • #51: Beautify CKB VM API
  • #52: shrink VM’s memory from 16MB to 4MB
  • #53: W^X initial implementation
  • #56: Numerous performance tweaks based on current design assumption
  • #57: refactor: calculate address first before cond operation

Changes in P2P

Refactor library to limit send/receive buffer size, otherwise it will easily cause OOM when broadcast large amount of messages to peers. Carefully use tokio::timer::{Interval, Delay}, it may cause network service can not shutdown.

  • #129: Implement task priority in the framework
  • #131: Limit send buffer size
  • #135: Improve task schedule strategy
  • #141: Move notify to protocol stream
  • #144 : Gracefully shutdown network service
  • #150: Fix future task loop forever bug

Changes in Toolchains

SDKs

  • Released v0.11.0 and v0.12.0 adapting many CKB changes to be ready for testnet.
  • Updated to fully work on testnet.

CKB testnet faucet

  • Implemented GitHub authorization capacity transferring.

CKB Explorer

  • Polished UI design, finished core features
  • Launched with CKB testnet Rylai

CKB Neuron Wallet

  • Registered BIP44 cointype 309
  • Updated SDK, Electron and other dependencies to new versions
  • Implemented mnemonic seed import and wallet storage

Get started on the Rylai testnet here.

Please connect with us on Github, CKB Dev telegram or the Nervos Forumif you run into any issues or can help improve documentation.

Nervos Network

The Nervos Network is a public blockchain ecosystem and collection of protocols aiming to solve the current challenges facing blockchains like Bitcoin and Ethereum today.

Ian Yang

Written by

Ian Yang

Programmer | Learner

Nervos Network

The Nervos Network is a public blockchain ecosystem and collection of protocols aiming to solve the current challenges facing blockchains like Bitcoin and Ethereum today.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade