0Pricing
Web3 & DApp Development Fundamentals · 课时

分布式账本

共享状态

分布式账本 是 CoddyKit 上的免费 Web3 & DApp Development Fundamentals 课时。 这是第 4 节课,共 4 节。 你可以在下方免费阅读本课时的完整内容 — 然后在浏览器中使用内置代码编辑器和全天候 AI 导师进行实践。 这是 Web3 & DApp Development Fundamentals 学习路径的一部分,你的进度在网页和 CoddyKit 应用中同步。 Web3 & DApp Development Fundamentals 课程共包含 4 节课。

本课时的部分内容尚未翻译,以英文显示。

What Is a Distributed Ledger?

A distributed ledger is a database that is replicated and synchronized across many independent computers called nodes.

There is no single master copy — every node holds the full ledger and helps keep it consistent.

Centralized vs Distributed

A traditional ledger lives on one server controlled by one party. A distributed ledger removes that single point of control and failure.

  • Centralized: one owner, one copy, one trust anchor
  • Distributed: many peers, many copies, shared trust

Nodes and Peers

A node is any computer running the blockchain software and storing a copy of the ledger. Nodes connect directly to each other as peers in a network.

There is no central server to ask — peers gossip data among themselves.

Node A <-> Node B
   ^           ^
   |           |
   v           v
Node D <-> Node C

Replication

Replication means every full node keeps an identical copy of all blocks.

If many nodes go offline, the data survives on the rest. This redundancy gives blockchains their famous resilience.

Shared State

The ledger represents a shared state — for example, every account balance. All honest nodes must agree on this state.

When a new block is applied, each node updates its state the same way, so they stay in sync.

Shared state (account balances):
  Alice: 12 ETH
  Bob:    5 ETH
  Carol:  8 ETH

Propagating Transactions

When you submit a transaction, your node broadcasts it to its peers, who relay it onward. This gossip protocol spreads it across the whole network in seconds.

Pending transactions wait in a pool called the mempool.

Reaching Agreement

Because anyone can propose blocks, nodes need a way to agree on a single version of history. This is the job of a consensus mechanism.

Consensus ensures all honest nodes converge on the same ordered chain of blocks.

Trustless by Design

Distributed ledgers are often called trustless — not because trust is absent, but because you do not need to trust any single party.

You trust the protocol and the math (hashing, signatures, consensus) instead of an intermediary.

Permissionless vs Permissioned

Ledgers differ in who may join:

  • Permissionless (Bitcoin, Ethereum) — anyone can run a node
  • Permissioned (enterprise chains) — only approved participants

Both are distributed, but they differ in openness and trust assumptions.

Resilience and Censorship Resistance

Because copies live everywhere and no one controls them all, distributed ledgers resist censorship and downtime.

Shutting one node down does nothing; the network simply routes around it.

Putting It Together

A distributed ledger is a replicated, peer-to-peer database where nodes maintain a shared, agreed-upon state.

Replication gives resilience, gossip gives reach, and consensus gives a single source of truth without a central authority.

Quick Check

Test your understanding of distributed ledgers.

Recap: Distributed Ledgers

You learned that:

  • A distributed ledger is replicated across many peer nodes
  • All nodes maintain a shared state
  • Transactions gossip across the network
  • The system is trustless and resilient
  • Consensus keeps everyone on one chain

Next course: how consensus actually works.

常见问题解答

「分布式账本」课时是免费的吗?

是的 — 「分布式账本」的完整文本可在网页上免费阅读。要进行交互式练习(内置代码编辑器和全天候 AI 导师)并解锁 Web3 & DApp Development Fundamentals 课程的其余内容,请升级到 CoddyKit PRO。 Web3 & DApp Development Fundamentals 课程共包含 4 节课。

「分布式账本」这节课中我会学到什么?

共享状态 你通过在浏览器中直接运行的动手代码来练习 Web3 & DApp Development Fundamentals,全天候 AI 导师会在你学习这节课的过程中回答你的问题。

学习 Web3 & DApp Development Fundamentals 需要有经验吗?

无需任何先前经验。CoddyKit 上的 Web3 & DApp Development Fundamentals 课程适合初学者到高级学习者,你可以从这里开始或从头开始,按照自己的节奏学习。 这是第 4 节课,共 4 节。

「分布式账本」课时需要多长时间?

大多数 CoddyKit 课程大约需要 5–10 分钟。每节课都很精短且互动,所以你能稳步进步,并在网页和应用中从离开的地方继续。

我能在这节 Web3 & DApp Development Fundamentals 课中编写并运行代码吗?

能。每节 Web3 & DApp Development Fundamentals 课都包含内置代码编辑器,你可以在浏览器中直接编写并运行真实代码,并获得即时 AI 反馈 — 无需本地设置。

此课程中的所有课时

  1. 区块与链
  2. 默克尔树
  3. 区块链中的哈希
  4. 分布式账本
← 返回 Web3 & DApp Development Fundamentals