计算机和网络安全 09
货币 (Currencies)
货币的属性 (Properties of Currencies)
设计一种货币时,需要具备以下属性:
- ||可分割性 (Divisibility)||:货币单位应能够被细分为具有同等购买力的单位。黄金是可分割的,而 iPhone 不是。
- ||同质性 (Fungibility)||:各个货币单位可以相互交换。每张 10 美元的钞票都是一样的,而钻石则不同。
- ||稀缺性 (Scarcity)||:应对货币的预计供应速度有合理的限制。
- ||可识别性 (Recognisability)||:验证一块货币是否真实不应困难。
中心化数字货币的局限性 (Limitations of Centralised Digital Currency)
- 案例 (Example):Alice 在她的 PayPal 账户中有 100 美元,想从 Bob 那里购买价值 25 美元的商品。
- Alice 请求 PayPal 服务器将 25 美元转给 Bob。Alice 告诉 Bob 交易已处理。
- Bob 通过 PayPal 服务器查询并确认他收到了 25 美元,然后将商品发送给 Alice。
- 优点 (Advantages) :
- 交易可以被撤销,例如在欺诈性交易的情况下。
- 交易安全,不会发生双重支付或欺诈。
- 缺点 (Disadvantages):
- PayPal 服务器是单点故障。没有 PayPal 服务器,Alice 和 Bob 无法进行交易。
- PayPal 可以自行决定转移或移动资金。
比特币 (Bitcoin)
比特币是第一个成功的“加密货币”(Crypto Currency),也是点对点分布式区块链技术的首次广泛应用。
- 白皮书由中本聪 (Satoshi Nakamoto) 于 2008 年发布:《比特币:一种点对点的电子现金系统》(Bitcoin: A Peer-to-Peer Electronic Cash System)。
- 比特币使用公钥加密 (public key encryption) 来保护交易安全。
- 公钥 (public key) 类似于银行账号。
- 私钥 (private key) 类似于 PIN/密码。
- 区块链 (blockchain) 取代了中心服务器的地位。
- 交易被宣告到点对点 (peer-to-peer) 网络。
- 网络中的所有节点都可以看到所有交易。
- 比特币矿工 (Bitcoin miners) 因运营区块链而获得奖励。
- 下一个区块的创建者将获得一些新铸造的比特币。
- 下一个区块的创建者将获得在上一时间段内处理的交易的交易费。
比特币钱包 (Bitcoin Wallet)
创建一个公钥/私钥对 (public/private keypair)。
- 公钥 (Public key):类似于银行账号。将此号码提供给他人,允许他们向你转移比特币。它用于创建比特币地址 (Bitcoin address)。
- 私钥 (Private key):允许你从相应的地址转移资金。
公钥加密与签名 (Public Key Crypto and Signatures)
生成一个加密和解密密钥对。区块链地址是公钥,区块链钱包是私钥。
- 任何人都可以使用公钥验证你的签名。
- 只有你可以用你的私钥签署交易。
比特币交易 (Bitcoin Transactions)
在比特币中,发送者向区块链网络(一个分布式权威机构)提交一笔交易。
- 如果有效,网络将同意接收者是新的所有者。
- 交易的收款人必须能够“证明”比特币的前所有者在任何时候都没有双重支付 (double spend) 它。
- 在比特币中,这是通过让网络中的每个人都了解所有先前的交易来实现的。
- 为了在没有可信第三方的情况下实现这一点:
- 交易必须公开宣布。
- 所有参与者必须就交易顺序的单一历史达成一致(All participants must agree on a single history of the transaction order)。
区块链网络 (Blockchain Network)
区块链的概念包含一系列相互依赖的区块,这些区块存储着一致的信息历史。
- 每个区块包含 (Each block contains) :
- ==一组交易 (Tx.: A set of transactions)。==
- ==区块哈希 (Block hash):连接区块的区块标识符。==
- ==时间戳 (Timestamp):区块“完成”的时间。==
- ==工作量证明 (Proof of Work - PoW):由矿工计算的哈希解决方案。==
- 数据只能通过新区块追加 (Data is appended only - with a new block)。
- 区块链必须明确记录所有交易。
- 它必须显示这些交易发生的顺序;因此它必须实现某种所有观察者都同意的时间戳形式。
- 区块链必须难以修改。
- 特别是,修改现有区块链以至于可以修改、添加或删除过去的交易应该很困难。
- 区块链通过将工作分成称为区块 (blocks) 的块来实现这两个目标,这些区块平均每 10 分钟处理一次。
- 这个时间限制以及修改先前区块的难度是通过工作量证明函数来实现的。
区块链时间戳 (Blockchain Timestamp)
区块链可以被认为实现了一个时间戳服务器 (timestamp server),它从时间步 $n$ 获取一组项目,并将它们组合成一个区块 $B_{n}$。
- ==当前区块的哈希值 $H_{n}$ 是当前区块内容和前一个哈希值 $H_{n-1}$ 的函数 :== $$H_{n} = \text{Hash}(H_{n-1} || B_{n})$$
- 要修改先前的项目,必须重新计算修改之后的所有哈希值。
区块链工作量证明 (Blockchain Proof of Work)
单纯的哈希计算速度很快(事实上,大多数哈希算法都设计得很快)。
- ==工作量证明通过在区块 $B_{n}$ 中包含一个随机数 (nonce) 来使哈希计算更耗时。==
- ==必须更改随机数,直到 $\text{Hash}(H_{n-1} || B_{n})$ 以特定数量的零位开始。==
- 哈希格式示例 :
- 简单 (Trivial): 00XXXXXXXXXXX
- 容易 (Easy): 0000XXXXXXXXX
- 更难 (Harder): 000000XXXXXXX
- 哈希格式示例 :
点对点区块链网络 (Peer-to-Peer Blockchain Network)
所有比特币客户端都通过 P2P 网络共享最新的区块信息。
- 其中一些客户端也是矿工,负责挖掘新区块并将交易包含在区块中。
- 新交易由客户端在网络上宣布并包含在新区块中。
交易流程 (Transaction Flow)
-
客户端向网络发送交易 (Clients send transactions to the network):发送者编写一笔交易 Tx. 并将其广播到网络。
-
矿工将交易包含在下一个区块中 (Miners include transactions in the next block):矿工将 Tx. 包含在他们正在处理的下一个区块中。
-
一个矿工首先解决 POW 生成新区块 (A miner generates new block by solving POW first):一个矿工解决了一个包含 Tx. 的区块,并向网络宣布这个新区块。
-
新区块和交易被网络确认 (New block and transactions are confirmed by network):接收者观察区块以查看 Tx. 是否已确认。经过几个区块后,接收者接受资金已经到账。
交易确认 (Transaction Confirmation)
在工作量证明中,竞争的矿工之间有时可能会出现平局 (ties)。
- 当其中一个竞争的矿工解决了下一个区块时,冲突就会解决。
- 任何时候最长的链都是最具权威性的 (The longest chain at any time is the most authoritative)。
- 交易确认:在“确信”你的交易将是永久且不可辩驳的之前,等待一定数量的区块。
- 对于比特币而言,六个确认区块(约一小时)通常被认为非常安全 (Six confirmed blocks (≈ one hour) is generally considered very safe for Bitcoin)。
挖矿激励 (Incentives for Mining)
如果你解决了工作量证明并挖出了下一个区块,你将获得两个重要奖励 :
- 挖矿奖励 (Mining reward):本质上是奖励给成功矿工的“区块中的免费资金”。
- 这是创造新比特币的唯一途径。
- 开始时每个区块 50 BTC,大约每四年减半。
- 最终将降至零。(目前为每个区块 3.125 BTC)
- 交易费 (Transaction fees):激励矿工将你的交易包含在内。
- 成功的矿工将获得区块中每笔交易相关的交易费。
- 从长远来看,一旦“挖矿奖励”枯竭,这些费用将推动挖矿。
工作量证明难度 (Proof of Work Difficulty)
SHA256 算法输出 256 位,这应该“大约是一个随机的比特串”,意味着每个比特成为 0 或 1 的概率相等。
- 任何哈希以 10 个零位开始的概率是 $2^{-10} \approx 0.1%$ 。
- 任何哈希以 50 个零位开始的概率是 $2^{-50} \approx 10^{-13}%$。
- 考虑到整个网络的哈希速度(通过区块挖掘速度计算),比特币将每 2016 个区块(约两周)调整所需的零位数,以尝试使接下来的 2016 个区块也花费两周时间。
挖矿硬件 (Mining Hardware)
比特币挖矿(类似于密码破解)可以在专用硬件上比在通用 CPU 上快得多。
- 按专业化程度递增排序,挖矿硬件分为:CPU、GPU、FPGA 或 ASIC。
- ASIC (Application-Specific Integrated Circuit) 是完全定制的硬件,生产成本非常高昂。
- ASIC 和 FPGA (Field-Programmable Gate Array) 的功耗远低于 CPU 或 GPU。
- 硬件类型与哈希速率对比表 :
- 多核 CPU (Multi-Core CPU): 35 百万哈希/秒
- 普通 GPU (Average GPU): 200 百万哈希/秒
- 多卡 GPU (Multi-Card GPU): 2000 百万哈希/秒
- FPGA: 400 百万哈希/秒
- $1,000 ASIC: 10,000 百万哈希/秒
- $30,000 ASIC: 14,000,000 百万哈希/秒
- 硬件类型与哈希速率对比表 :
比特币安全 (Bitcoin Security)
比特币的安全性体现在三个方面 :
- 公钥认证 (public-key authentication) (||ECDSA, 椭圆曲线数字签名算法||) 的强度,用于保护账户。
- SHA256 在工作量证明函数中的强度。
- 通用的安全开源编程,设计为可升级。
潜在攻击 (Potential Attacks)
- ||不当验证 (Improper verification)||:在交易进入区块链之前未对其进行正确验证。
- ||区块链分叉 (Blockchain Forks)||:由于重大的软件错误,区块链暂时分叉成两条独立的链。新版比特币客户端产生的交易不被旧版客户端接受,导致区块链分裂,并产生了“双重支付”的现实案例。
- ||网络控制 (Control of Network)||:如果攻击者拥有超过网络 50%的算力,攻击者可以进行双重支付,并拒绝其他人的交易获得确认。
区块链安全 (Blockchain Security)
硬件密钥安全 (Hardware Key Security)
将密钥物理存储在硬件中更安全,因为破解硬件很困难。
- 硬件安全面临的挑战 :
- 硬件仍然依赖软件:需要更复杂的硬件来应对。案例:Trezor 硬件钱包。
- 可能给用户带来虚假的安全感,例如成为银行卡盗刷 (card skimming) 的受害者。
- 携带硬件不太方便,例如将卡片存放在钱包中或将 RSA 令牌挂在钥匙链上。解决方案:标准化与合作。案例:YubiKeys。
- 开发硬件成本高昂。需要在允许灵活性和可升级性的同时整合解决方案。
分布式密钥解决方案 (Distributed Key Solutions)
由于我们不能相信人们会妥善保管自己的密钥,我们需要将风险分散给多个人。同时破解 5 个人,或让 5 个人都丢失密钥,比一个人更难。
- 将密钥复制给 5 个人降低了丢失密钥的可能性,但增加了被盗或滥用的可能性。如何分配密钥的责任 ?
- 需要破解 2 或 3 个人。
- 如果一个人丢失了密钥,其他人可以“重置”或“重新发行”他们的密钥。
- 多重签名 (Multi-signature) 是一种强制执行复杂密钥要求的技术。在多重签名场景中,一组 n 个人拥有各自独立的密钥,并自行管理。
- Shamir 秘密共享 (Shamir’s Secret Sharing, SSS) 原理 可用于密钥分割 (key splitting),将一个秘密分成 m 份,只需要其中 n 份即可重建原始秘密。
加密货币交易所 (Cryptocurrency Exchanges)
许多人将他们的加密货币存储在交易所,以平衡安全性与可用性。
- 认证方式 :
- 密码 (Password)
- 多因素认证 (MFA - Multi-Factor Authentication)
- 电子邮件地址 (E-mail address)
- 是黑客的常见目标,加密货币交易所负责确保安全。案例:Mt. Gox。
信任 (Trust)
区块链系统通常被称为“无需信任的”(trustless),或者说它们“消除了信任第三方的需要”。
- ==事实上,区块链并非消除信任,而是转移信任 (blockchains do not remove trust, they move trust)==。
- 用户不再信任中心化实体(例如银行)以诚信方式执行某些操作,而是信任整个计算机网络以诚信方式执行某些操作。
- 网络比中心化权威机构复杂得多,并且有许多故障点。
- 去中心化系统中的许多攻击和安全考虑都使用博弈论 (game theoretic) 解决方案来解决。通过仔细选择激励结构,可以避免拒绝服务 (Denial-of-Service - DoS) 攻击。案例:以太坊网络的 DoS 攻击。
去中心化 (Decentralisation)
公共区块链的一个主要卖点是其去中心化特性。
- 衡量区块链网络中心化程度有多种不同方法。我们将讨论以下指标 :
- 挖矿算力控制 (Control of Mining Power)
- 网络节点位置 (Location of Network Nodes)
- 节点软件多样性 (Diversity of Node Software)
去中心化:挖矿 (Decentralisation: Mining)
挖矿是一场效率游戏;两个极端是 :
- 矿场 (Mining Farm):如果你在水电站租用场地来容纳一个装满矿机的仓库,你的运营成本会很低。你可能也买得起 ASIC。
- 个人 (Individuals):如果你住在悉尼的公寓里,电费非常昂贵,规模经济不具竞争力。挖矿的激励较小。
- ==矿工控制网络,而经济因素鼓励他们合并和中心化。==
去中心化:网络 (Decentralisation: Network)
构成底层点对点网络的节点通常托管在类似的情况下,例如 :
- 托管在亚马逊 AWS (Amazon AWS) 上。
- 位于具有经济优势的特定地区。
- 大规模中断会对网络可用性产生严重影响。想象一下亚马逊 AWS 中断,AWS 上的所有挖矿算力突然从网络中掉线。
- 结果 :
- 连接不良的 P2P 网络。
- 非常长的出块时间。
- 失去哈希算力 = 出块变慢…直到网络调整。
去中心化:软件 (Decentralisation: Software)
软件单一化 (software monoculture) 可能是一件危险的事情。
- 区块链网络根据明确定义的协议运行,但软件实现各不相同。
- 以太坊 (Ethereum) 有用以下语言编写的客户端 :
- C++: Aleth (cpp-ethereum)
- Go: go-ethereum (geth)
- Rust: parity
- Python: pyethapp
- Java: ethereumj
超越比特币 (Beyond Bitcoin)
区块链 = 时间戳服务器 (Blockchain = Timestamp Server)
从本质上讲,区块链只是一个去中心化的、仅追加的时间戳服务器。
- 它不能 (It does not) :
- 消除信任的需要 (Remove the need for trust)。
- 大规模处理交易 (Process transactions at scale)。
- 提供高效的计算或信息传输 (Provide efficient computation or information transfer)。
- 它可以 (It can) :
- 转移信任 (Move trust)。
- 提高数据完整性 (Improve data integrity)。
- 加强不可否认性 (Strengthen non-repudiation)。
- 提供可验证的事件顺序 (Provide a verifiable order of events)。
公有链 vs 私有链 (Public vs Private Blockchains)
- 公有链 (Public Blockchains):将信任从中心化组织转移到去中心化的(由人操作的)计算机群体。
- 公开访问(不一定公开可读)。
- 例子:比特币 (Bitcoin)、以太坊 (Ethereum)、门罗币 (Monero)。
- 私有链 (Private Blockchains):提高大型组织或组织群体内的效率和数据完整性。
- 只有经过验证的各方才能参与网络。
- 例子:Eris Industries, Rubix。
公有链 (Public Blockchains)
- 属性 (Properties) :
- 任何人都可以参与。
- 有时,任何人都可以读取。
- 由众多参与者保障安全,参与者越多越好。
- 用例 (Use Cases) :
- 避免审查 (Censorship avoidance)。
- 防止腐败 (Prevent corruption)。
- 将信任从组织中移开 (Move trust away from organisations)。
- 发展中经济体 (Developing Economies):
- 在发达国家,组织更受信任 -> 对加密货币的需求较小。
- 在发展中国家,组织不那么可靠 -> 使用加密货币可以更安全地进行交易。
私有链 (Private Blockchains)
- 属性 (Properties) :
- 只有授权方可以参与或读取。
- 也称为“许可链”(permissioned blockchain)。
- 通过授权列表保障安全。
- 去中心化程度不高 (Not very decentralised)。
- 用例 (Use Cases) :
- 更严格的审计追踪 (More rigorous audit trails)。
- 防止腐败/提高完整性 (Prevent corruption/improve integrity)。
- 改善合作与透明度 (Improve cooperation & transparency)。
- 更高效的、仅追加的数据库 (More efficient, append-only database)。
以太坊 (Ethereum)
以太坊通过创建一个分布式超级计算机 (distributed supercomputer) 的概念,扩展了分布式支付网络的概念。
- 执行“智能合约”(smart contracts);这些是由其源代码管理的独立应用程序,用 Solidity 语言编写。
- 允许在区块链上部署分布式应用程序 (distributed apps),而无需创建全新的区块链基础设施。
- 部署和执行智能合约通过交易完成,这些交易伴随着以“燃料”(gas) 计算的交易费。
- 以太坊的内部货币是“以太币”(ether),处理交易的节点将获得相应的“燃料”量的“以太币”作为报酬。
- 交易就像一次公路旅行。根据旅行的类型(上坡、下坡),它将需要一定量的燃料。由于燃料价格波动,同样的旅行在不同时间进行的成本(以美元计)也会不同。
智能合约 (Smart Contracts)
智能合约是区块链上的程序。
- 与常规程序一样,智能合约具有 :
- 代码 (Code)
- 输入 (Inputs)
- 输出 (Outputs)
- 数据存储 (Data storage)
- 与常规程序不同,智能合约由网络中的所有节点执行。
- ==任何人都可以向智能合约发送消息(输入),导致网络中的所有节点就该消息和代码所导致的状态变化达成一致。==
- 智能合约的特点:
- ==完全由其初始代码定义(代码是公开的)。==
- ==不可修改(除非其代码明确允许)。==
- ==可以从网络上的任何人接收输入。==
- 由于智能合约可以完全封装简单的业务逻辑,它们可以用于创建去中心化自治组织 (Decentralized Autonomous Organisations - DAOs)。
可能的考点及示例考题 (Potential Exam Points and Sample Questions)
可能的考法 (Potential Examination Methods)
- 概念辨析 (Conceptual Distinctions):例如,比较中心化与去中心化货币、公有链与私有链的异同。
- 机制解释 (Mechanism Explanations):例如,解释工作量证明的原理、比特币交易的确认过程。
- 安全性分析 (Security Analysis):例如,讨论比特币或区块链面临的潜在安全风险及应对措施(如 51%攻击、硬件钱包、多重签名)。
- 应用场景 (Application Scenarios):例如,阐述智能合约的定义、特点及其在 DAO 中的应用。
- 名词解释 (Definition of Terms):例如,解释什么是哈希、随机数、燃料 (gas) 等。
示例考题 (Sample Exam Questions)
问题 1 (Question 1):
- 中文:解释什么是比特币中的“工作量证明”(Proof of Work),以及它如何确保比特币网络的安全性和一致性?
- English: Explain what “Proof of Work” is in Bitcoin and how it ensures the security and consistency of the Bitcoin network.
参考答案 1 (Reference Answer 1):
-
中文: 工作量证明 (Proof of Work - PoW) 是比特币网络中使用的一种共识机制,用于验证交易并创建新的区块。它要求矿工执行大量的计算工作,即找到一个特定的随机数 (nonce),使得将该随机数与区块数据一起进行哈希运算后,得到的哈希值满足预设的难度目标(例如,以特定数量的零开头)。 确保安全性:首先解决 PoW 难题的矿工有权将下一个区块添加到区块链中,并获得新铸造的比特币和交易费作为奖励。由于找到这个随机数需要大量的计算能力和时间,这使得恶意行为者难以通过篡改交易历史或进行双重支付来攻击网络,因为他们需要拥有超过网络总算力 50%的算力才能有效地重写区块链。这种高昂的成本使得攻击在经济上不可行。 确保一致性:PoW 机制通过“最长链原则”确保网络的一致性。当网络中出现多个有效的分叉链时,节点会选择并扩展包含最多累积工作量证明(通常是最长的链)的那条链。这使得整个网络最终会就单一的、权威的交易历史达成共识。平均每 10 分钟产生一个新区块的时间间隔也是由 PoW 的难度动态调整机制来维持的。
-
English: Proof of Work (PoW) is a consensus mechanism used in the Bitcoin network to validate transactions and create new blocks. It requires miners to perform a significant amount of computational work, specifically to find a particular nonce, such that when this nonce is hashed along with the block’s data, the resulting hash value meets a predefined difficulty target (e.g., starting with a certain number of zeros). Ensuring Security: The miner who first solves the PoW puzzle gets the right to add the next block to the blockchain and is rewarded with newly minted bitcoins and transaction fees. Because finding this nonce requires substantial computational power and time, it makes it difficult for malicious actors to attack the network by tampering with transaction history or double-spending, as they would need to possess more than 50% of the network’s total computing power to effectively rewrite the blockchain. This high cost makes such attacks economically infeasible. Ensuring Consistency: The PoW mechanism ensures network consistency through the “longest chain rule”. When multiple valid forked chains appear in the network, nodes will choose and extend the chain that contains the most cumulative proof of work (typically the longest one). This leads the entire network to eventually converge on a single, authoritative transaction history. The average 10-minute interval for generating a new block is also maintained by PoW’s dynamic difficulty adjustment mechanism.
问题 2 (Question 2):
- 中文:什么是智能合约 (Smart Contract)?以太坊 (Ethereum) 中的智能合约是如何运作的,它们与传统合约有何不同?
- English: What is a Smart Contract? How do smart contracts in Ethereum operate, and how do they differ from traditional contracts?
参考答案 2 (Reference Answer 2):
-
中文: 智能合约是一种在区块链上运行的计算机程序。它根据预先设定的代码自动执行、控制或记录法律上相关事件和行为。智能合约具有代码、输入、输出和数据存储等特性。 在以太坊中,智能合约是用 Solidity 等语言编写的,并部署到以太坊区块链上。一旦部署,智能合约的代码通常是不可变的(除非代码本身包含修改逻辑)。任何人都可以通过发送交易来与智能合约进行交互(即提供输入)。当智能合约收到一个消息(输入)时,网络中的所有节点都会执行其代码,并就由此产生的状态变化达成共识。执行智能合约需要支付“燃料”(gas) 作为交易费用,以补偿执行计算的节点。 与传统合约的主要区别在于:
- 执行方式 (Execution):传统合约依赖于人工执行和法律体系的强制执行,而智能合约是自动执行的,代码即法律。
- 信任需求 (Trust Requirement):传统合约通常需要信任中介机构(如律师、银行),而智能合约旨在减少对中介的依赖,信任基于代码和区块链的不可篡改性。
- 透明度 (Transparency):智能合约的代码通常是公开的,任何人都可以审查。传统合约的条款可能不公开。
- 不可篡改性 (Immutability):一旦部署,智能合约通常难以修改,而传统合约可以通过双方同意进行修改。
- 效率和成本 (Efficiency and Cost):智能合约可以提高效率并降低交易成本,因为它们减少了人工干预和中介环节。
-
English: A smart contract is a computer program that runs on a blockchain. It automatically executes, controls, or documents legally relevant events and actions according to predefined code. A smart contract has features like code, inputs, outputs, and data storage. In Ethereum, smart contracts are written in languages like Solidity and deployed to the Ethereum blockchain. Once deployed, the code of a smart contract is typically immutable (unless the code itself includes logic for modification). Anyone can interact with a smart contract (i.e., provide input) by sending a transaction to it. When a smart contract receives a message (input), all nodes in the network execute its code and reach a consensus on the resulting state change. Executing a smart contract requires paying “gas” as a transaction fee to compensate the nodes performing the computation. The main differences from traditional contracts are:
- Execution: Traditional contracts rely on manual execution and enforcement by the legal system, whereas smart contracts are self-executing, where code is law.
- Trust Requirement: Traditional contracts often require trust in intermediaries (like lawyers, banks), while smart contracts aim to reduce reliance on intermediaries, with trust based on the code and the immutability of the blockchain.
- Transparency: The code of smart contracts is usually public and auditable by anyone. Terms of traditional contracts may not be public.
- Immutability: Once deployed, smart contracts are generally difficult to modify, whereas traditional contracts can be amended by mutual agreement.
- Efficiency and Cost: Smart contracts can improve efficiency and reduce transaction costs by minimizing manual intervention and intermediaries.
问题 3 (Question 3):
- 中文:讨论区块链技术中“去中心化”(Decentralisation) 的概念。衡量区块链网络去中心化程度的关键指标有哪些?为什么挖矿算力的中心化是一个潜在问题?
- English: Discuss the concept of “Decentralisation” in blockchain technology. What are the key metrics for measuring the degree of decentralisation in a blockchain network? Why is the centralisation of mining power a potential concern?
参考答案 3 (Reference Answer 3):
-
中文: 去中心化是区块链技术的核心特征之一,指的是控制权和决策权从一个中心化的实体(如政府、银行或公司)分散到一个分布式的网络中。在区块链的背景下,这意味着没有单一的故障点,数据由网络中的多个参与者共同维护和验证,而不是由单一权威机构控制。 衡量区块链网络去中心化程度的关键指标包括 :
-
挖矿算力控制 (Control of Mining Power):指网络中挖矿能力(哈希算力)的分布情况。如果少数矿池或实体控制了大部分算力,则网络趋于中心化。
-
网络节点位置 (Location of Network Nodes):指运行区块链软件的节点的地理分布和托管情况。如果大量节点集中在特定地理区域或由少数云服务提供商托管,则可能存在中心化风险。
-
节点软件多样性 (Diversity of Node Software):指网络中运行的不同客户端软件实现的数量和分布。软件单一化可能导致整个网络因特定软件的漏洞而瘫痪。 挖矿算力的中心化是一个潜在问题,因为 :
- 51%攻击风险 (Risk of 51% Attack):如果单个实体或协作团体控制了网络超过 50%的挖矿算力,他们理论上可以进行双重支付、阻止或逆转交易,从而破坏区块链的完整性和不可篡改性。
- 审查风险 (Censorship Risk):拥有多数算力的矿工可以选择性地处理或忽略某些交易,从而实现交易审查。
- 网络治理影响 (Influence on Network Governance):集中的算力可能导致少数大型矿工在网络升级和协议变更等治理决策中拥有过大的影响力。 经济因素,如对高效专用硬件 (ASIC) 的需求和对廉价电力的追求,往往会鼓励挖矿操作的规模化和集中化,这与去中心化的理想背道而驰。
-
-
English: Decentralisation is one of the core features of blockchain technology, referring to the distribution of control and decision-making from a centralized entity (like a government, bank, or corporation) to a distributed network. In the context of blockchain, this means there is no single point of failure, and data is collectively maintained and validated by multiple participants in the network, rather than being controlled by a single authority. Key metrics for measuring the degree of decentralisation in a blockchain network include:
-
Control of Mining Power: Refers to the distribution of mining capability (hash power) in the network. If a few mining pools or entities control the majority of the hash power, the network tends to be centralized.
-
Location of Network Nodes: Refers to the geographical distribution and hosting of nodes running the blockchain software. If a large number of nodes are concentrated in specific geographical areas or hosted by a few cloud service providers, there could be centralisation risks.
-
Diversity of Node Software: Refers to the number and distribution of different client software implementations running on the network. A software monoculture can lead to the entire network being crippled by a vulnerability in that specific software. The centralisation of mining power is a potential concern because:
- Risk of 51% Attack: If a single entity or a collaborating group controls more than 50% of the network’s mining power, they could theoretically perform double-spending, block or reverse transactions, thereby undermining the integrity and immutability of the blockchain.
- Censorship Risk: Miners with majority hash power could selectively process or ignore certain transactions, thus enabling transaction censorship.
- Influence on Network Governance: Concentrated mining power can lead to a few large miners having undue influence in governance decisions, such as network upgrades and protocol changes. Economic factors, such as the need for efficient specialized hardware (ASICs) and the pursuit of cheap electricity, tend to encourage the scaling and centralisation of mining operations, which runs counter to the ideal of decentralisation.
-