Skip to main content
Programming

Nervos CKB Blockchain Fundamentals for Developers

Designed for JavaScript and Rust developers new to blockchain, this course teaches you how to build and interact with the Nervos CKB network from scratch.

22 lessons · about 9 hours · by Chukwuma Ebube · 0 forks

Fork this outline into your library and start learning.

Start this course

Lesson preview

First look

Blockchain State Models

# Blockchain State Models ![Conceptual diagram illustrating Blockchain State Models: In this lesson, the learner contrasted account-based ledger states with the UTXO-derived Cell Model used by Nervos CKB. Key concepts covered](https://wle2eo8sst5jftzp.public.blob.vercel-storage.com/lessons/9d880e56-3697-412f-bd06-6d3822613483/9e202fb7-6346-4f7d-82a7-01b3e41a25ac/hero-SbAOvQxMMaMvtaHVxi25rn9o9dPUnc.jpg) *Figure:…

Syllabus

22 lessons across chapters
1

Module 1: Blockchain & CKB Foundations

4 lessons
  1. Lesson 1

    Blockchain State Models

    Contrast account-based ledgers with UTXO ledgers to analyze state representation models

  2. Lesson 2

    Cryptographic Primitives & Signatures

    Analyze cryptographic primitives, hashing functions, and digital signatures in decentralized ledgers

  3. Lesson 3

    Nervos CKB Architecture Overview

    Examine the architectural design and layered structure of the Nervos CKB network

  4. Lesson 4

    Local Node Setup & ckb-cli

    Configure a local CKB development node using ckb-cli and local testnet environments

2

Module 2: The Cell Model in Practice

4 lessons
  1. Lesson 5

    Anatomy of a CKB Transaction

    Deconstruct the anatomy of a CKB transaction including inputs, outputs, cell deps, and witnesses

  2. Lesson 6

    The Cell Model & State Lifecycles

    Inspect live and dead cell lifecycles, data fields, and capacity rules under the cell model

  3. Lesson 7

    Capacity Management & CKBytes

    Calculate storage capacity requirements and manage CKByte balancing across transaction outputs

  4. Lesson 8

    Cell Dependencies & Header Deps

    Implement cell dependencies to reference shared contract code and historical state without consumption

3

Module 3: Smart Contract Development with Rust

5 lessons
  1. Lesson 9

    RISC-V Toolchain Configuration

    Configure the Rust toolchain for the RISC-V CKB-VM target (riscv64imac-unknown-none-elf)

  2. Lesson 10

    Introduction to ckb-std

    Initialize a smart contract project utilizing ckb-std v1.1.1 macros and syscall wrappers

  3. Lesson 11

    Writing Lock Scripts in Rust

    Implement a custom Lock Script in Rust to enforce signature verification and authorization rules

  4. Lesson 12

    Writing Type Scripts in Rust

    Implement a custom Type Script in Rust to govern state transition logic and validation rules

  5. Lesson 13

    Contract Compilation & Binary Optimization

    Compile Rust smart contracts into optimized CKB binary binaries and analyze binary size

4

Module 4: Testing, Debugging, & Profiling

4 lessons
  1. Lesson 14

    Script Testing with ckb-testtool

    Construct automated unit and integration tests for smart scripts using ckb-testtool

  2. Lesson 15

    Offline Debugging with ckb-debugger

    Debug failing transactions and scripts offline using ckb-standalone-debugger

  3. Lesson 16

    Cycle Profiling & Gas Optimization

    Audit smart contract execution cycles and optimize resource consumption profiles

  4. Lesson 17

    Security Auditing & Common Pitfalls

    Identify common pitfalls including account-model misconceptions and capacity leaks

5

Module 5: dApp Integration & Off-Chain Client SDKs

5 lessons
  1. Lesson 18

    TypeScript SDK & RPC Client Setup

    Initialize a TypeScript backend client using ckb-sdk v5 for RPC node interaction

  2. Lesson 19

    Wallet Integration with CCC

    Integrate frontend wallet connectors using the CCC library (@ckb-ccc/connector-react)

  3. Lesson 20

    Transaction Construction & Broadcasting

    Construct, sign, and broadcast complex transactions programmatically from client applications

  4. Lesson 21

    Querying States with CKB Indexer

    Query live cells, transaction histories, and token balances using integrated CKB indexers

  5. Lesson 22

    End-to-End dApp Integration Project

    Build an end-to-end decentralized application integrating custom Rust smart scripts with a React frontend

Forking copies the syllabus and lesson text into your private library.