---
title: "成为区块链开发者：你需要知道什么"
description: "在区块链上开发你需要知道什么"
---

# 成为区块链开发者：你需要知道什么

设想一下你回到了上世纪90年代末，互联网即将成为家喻户晓的东西，而你有机会提前入局。

假设你有一个机会，成为Yahoo最早的12名员工之一。你会接受吗？
以你现在所知道的，很可能会接受。

虽然我们无法回到过去，但幸运的是，对于站在科技创新前沿的人来说，仍然存在大量绝佳的机会。说实话，我们现在正处于历史上类似的时刻。

加密货币，以及基于区块链的技术，比如DeFi（去中心化金融）、NFT（非同质化代币）和[DAO](https://www.alchemy.com/dapps/top/daos)（去中心化自治组织），在2022年我们做生意和互动的方式中继续扮演着重要角色。

数以千亿计的投资资金正持续涌入加密领域，且没有放缓的迹象。

以下仅列举了一些正在打造Web3未来的新兴公司。

<EmbeddedTable
  table={{
    columns: [
      { key: "1", width: 200, title: "Layer", dataType: "object" },
      { key: "2", width: 200, title: "Category", dataType: "object" },
      { key: "3", width: 200, title: "Projects/Services", dataType: "object" },
    ],
    data: [
      {
        "1": { title: "<p>Decentralized Applications</p>", tooltip: "", icon: "" },
        "2": { title: "<p>DeFi</p>", tooltip: "", icon: "" },
        "3": { title: "<p>UNISWAP, AAVE, SUSHISWAP</p>", tooltip: "", icon: "" },
        id: 0,
      },
      {
        "1": { title: "<p>Decentralized Applications</p>", tooltip: "", icon: "" },
        "2": { title: "<p>Identity & Auth.</p>", tooltip: "", icon: "" },
        "3": { title: "<p>ENS, METAMASK, ARGENT</p>", tooltip: "", icon: "" },
        id: 1,
      },
      {
        "1": { title: "<p>Decentralized Applications</p>", tooltip: "", icon: "" },
        "2": { title: "<p>NFTs</p>", tooltip: "", icon: "" },
        "3": { title: "<p>OPENSEA, NIFTY GATEWAY, RARIBLE</p>", tooltip: "", icon: "" },
        id: 2,
      },
      {
        "1": { title: "<p>Decentralized Applications</p>", tooltip: "", icon: "" },
        "2": { title: "<p>Data</p>", tooltip: "", icon: "" },
        "3": { title: "<p>HANSEN, CHAINLINK, THE GRAPH</p>", tooltip: "", icon: "" },
        id: 3,
      },
      {
        "1": { title: "<p>Presentation Layer</p>", tooltip: "", icon: "" },
        "2": { title: "<p>Web3 Native Libraries</p>", tooltip: "", icon: "" },
        "3": { title: "<p>ETHER.JS, WEB3.JS, ALCHEMY WEB3</p>", tooltip: "", icon: "" },
        id: 4,
      },
      {
        "1": { title: "<p>Presentation Layer</p>", tooltip: "", icon: "" },
        "2": { title: "<p>Developer Environments</p>", tooltip: "", icon: "" },
        "3": { title: "<p>HARDHAT, TRUFFLE, BROWNIE</p>", tooltip: "", icon: "" },
        id: 5,
      },
      {
        "1": { title: "<p>Presentation Layer</p>", tooltip: "", icon: "" },
        "2": { title: "<p>File Storage</p>", tooltip: "", icon: "" },
        "3": { title: "<p>IPFS, FILBASE, ARWEAVE</p>", tooltip: "", icon: "" },
        id: 6,
      },
      {
        "1": { title: "<p>Blockchain Interaction Layer</p>", tooltip: "", icon: "" },
        "2": { title: "<p>Data Access</p>", tooltip: "", icon: "" },
        "3": { title: "<p>SUPERNODE, BUILD, MONITOR, NOTIFY, APIS, NFT API</p>", tooltip: "", icon: "" },
        id: 7,
      },
      {
        "1": { title: "<p>Blockchain Interaction Layer</p>", tooltip: "", icon: "" },
        "2": { title: "<p>Self-Hosted Nodes</p>", tooltip: "", icon: "" },
        "3": { title: "<p>Self-Hosted Nodes</p>", tooltip: "", icon: "" },
        id: 8,
      },
      {
        "1": { title: "<p>Blockchain Interaction Layer</p>", tooltip: "", icon: "" },
        "2": { title: "<p>Block Explorers</p>", tooltip: "", icon: "" },
        "3": { title: "<p>SNOWTRACE, ETHERSCAN, POLYGONSCAN</p>", tooltip: "", icon: "" },
        id: 9,
      },
      {
        "1": { title: "<p>Network Layer</p>", tooltip: "", icon: "" },
        "2": { title: "<p>EVM Blockchains</p>", tooltip: "", icon: "" },
        "3": { title: "<p>ETHEREUM, POLYGON, ARBITRUM, AVALANCHE, STARNET, CRONOS, OPTIMISM, ZK SYNC</p>", tooltip: "", icon: "" },
        id: 10,
      },
      {
        "1": { title: "<p>Network Layer</p>", tooltip: "", icon: "" },
        "2": { title: "<p>Non-EVM Blockchains</p>", tooltip: "", icon: "" },
        "3": { title: "<p>NEAR, FLOW, SOLANA, TERRA</p>", tooltip: "", icon: "" },
        id: 11,
      },
    ],
  }}
/>

根据加密资产价格追踪网站CoinGecko的数据，全球加密货币的总市值已接近2万亿美元（截至2022年上半年）。

<ImageBlock
  src="https://media.alchemy.com/1703830571-cryptocurrency-global-charts.png"
  alt="CoinGecko图表:全球加密货币市值接近2万亿美元"
  width={1600}
  height={688}
  caption="来源"
/>

数字先说到这里。这对你来说意味着什么？

## 区块链开发是一份好职业吗？

目前**最赚钱的职业道路之一**就是成为一名区块链开发者。根据Talent的数据，[区块链开发者的平均年薪为14.5万美元](https://www.talent.com/salary?job=blockchain+developer)。随着对区块链开发者的需求持续增长，现在正是入行的时机。

作为一名区块链开发者，你也处于一个独特的位置，可以提前把握许多机会，比如投资早期项目。

参与区块链开发能帮助你识别有可能成功的项目，避开那些没有发展势头的项目。你能实时看到什么方式有效、什么无效，并亲手参与构建Web3的未来。

## 区块链开发者需要掌握哪些知识？

作为区块链开发者，你需要掌握一些编程语言，比如Javascript、Python和[Solidity](https://www.alchemy.com/overviews/solidity)，以及一些关键概念的知识，比如区块链、共识机制、哈希函数、gas等。

如果你善于学习新技术，并且本质上是一名开发者，那么在职业上取得成功的机会不胜枚举。但你还需要具备一些技能，理解区块链开发中的一些关键概念，才能走完剩下的路。

以下是你需要重点关注的一些基础内容。

## 成为区块链开发者需要掌握的5项技能

### 1. 常见的区块链编程语言

作为区块链开发者，你很可能需要学习多种编程语言，但精通Javascript是绕不开的。

Javascript是一门通用且可移植的语言，在区块链生态系统中被广泛使用。例如，你可以直接使用Javascript库来构建与已有[智能合约](https://www.web3.university/article/a-developers-guide-to-securing-ethereum-smart-contracts)交互的[去中心化应用](https://www.alchemy.com/dapps/top/defi-dapps)。

如果你还精通其他语言就更好了：比如C++（传奇的比特币正是用这门非常灵活的语言编写的），或者Python。后者在你想专注于后端开发和高级脚本编写时非常有用。

我们强烈建议你花些时间浏览[Ethereum Javascript](https://www.web3.university/article/web3-stack)资源，帮助你快速上手。当然，你也需要投入时间学习Solidity，我们在[这里](https://www.web3.university/article/web3-stack)对此有深入介绍。

学习多种编程语言只是个开始。

### 2. 区块链技术的基础知识

理解区块链技术的基础知识对区块链开发者来说至关重要。阅读[比特币](https://ethereum.org/en/whitepaper/)和[Ethereum](https://ethereum.org/en/whitepaper/)的白皮书是必须的。但你还需要理解一些关键概念。

举例来说，重要的是要知道区块链本质上是一种**分布式账本技术（DLT）**。它是一种协议，使得一个没有中央管理者的数据库得以运作，数据块分布在多个位置或实体上。区块链确实可以用于加密货币，但其应用场景不止于此。未来，我们很可能会继续看到各类组织，甚至可能是国家，使用区块链来举行选举，决定各类政府资金的使用方式。区块链还提供了一种问责机制，因为大多数区块链是任何人都可以查看的公开账本。可以想象，随着其使用日益普及，这将如何影响政治和商业环境。虽然区块链无法解决世界上所有的问题，但我们才刚刚开始理解它们所能提供的众多强大应用场景。

### 3. 区块链共识机制

区块链和加密货币的关键性发明是共识机制。它是一种没有中央权威的去中心化点对点系统用来做出决策的流程。这是一种就将哪些交易添加到账本以及以何种顺序添加达成一致的方法。
这里有一个简单的例子：

<ImageBlock
  src="https://media.alchemy.com/1703830684-blockchain-consensus-mechanisms.png"
  alt="区块链共识机制如何保持分布式节点一致的示意图"
  width={737}
  height={663}
/>

工作量证明与权益证明

虽然区块链通常有如上所述的多种共识机制，但它们都服务于同一个目标——确保账本中的记录是可信的。

两种最主流的共识机制：

- [工作量证明（PoW）](https://ethereum.org/en/developers/docs/consensus-mechanisms/pow/)
- [**权益证明（PoS）。**](https://ethereum.org/en/developers/docs/consensus-mechanisms/pos/)

工作量证明最广为人知的是为比特币网络提供支持，它描述的是利用计算能力（通过矿工）来解决复杂数学方程的过程，从而帮助确保区块链既安全又准确。

作为回报，投入资源解决这些方程的矿工会获得比特币奖励。

虽然工作量证明为比特币提供支持，但事实证明它相当耗能，这也是许多新兴区块链（比如Solana）试图避免的问题。尽管如此，采用工作量证明的区块链往往具有较高的安全性，并提供了一种去中心化的方式来验证网络上的交易。

而权益证明则是工作量证明的一种替代方案，能耗大幅降低。权益证明不是通过消耗能源来验证交易，而是通过货币惩罚来约束验证者的正确行为。

“_能源消耗是这两种共识机制之间的一个主要区别。由于权益证明区块链不需要矿工在重复性的过程上耗费电力（争相解决同一个难题），权益证明使得网络能够以显著更低的资源消耗运行，_”[Coinbase写道。](https://www.coinbase.com/learn/crypto-basics/what-is-proof-of-work-or-proof-of-stake#:~:text=In%20proof%20of%20work%2C%20the,in%20the%20network%27s%20best%20interests.)

Ethereum最初是以工作量证明启动的，现在已经改用权益证明。

以下是两种共识机制的进一步对比。

<EmbeddedTable
  table={{
    columns: [
      { key: "1", width: 200, title: "Proof of Work", dataType: "object" },
      { key: "2", width: 200, title: "Proof of Stake", dataType: "object" },
    ],
    data: [
      {
        "1": { title: "<p>Proof of work is a requirement to define an expensive computer calculation, also called mining</p>", tooltip: "", icon: "" },
        "2": { title: "<p>Proof of stake, the creator of a new block is chosen in a deterministic way, depending on its wealth, also defined as stake.</p>", tooltip: "", icon: "" },
        id: 0,
      },
      {
        "1": { title: "<p>A reward is given to the first miner who solves each blocks problem.</p>", tooltip: "", icon: "" },
        "2": { title: "<p>The PoS system there is no block reward, so, the miners take the transaction fees.</p>", tooltip: "", icon: "" },
        id: 1,
      },
      {
        "1": { title: "<p>Network miners compete to be the first to find a solution for the mathematical problem</p>", tooltip: "", icon: "" },
        "2": { title: "<p>Proof of Stake currencies can be several thousand times more cost effective.</p>", tooltip: "", icon: "" },
        id: 2,
      },
    ],
  }}
/>

<EmbeddedTable
  table={{
    columns: [
      { key: "1", width: 200, title: "Aspect", dataType: "object" },
      { key: "2", width: 200, title: "PoS (Proof of Stake)", dataType: "object" },
      { key: "3", width: 200, title: "PoW (Proof of Work)", dataType: "object" },
    ],
    data: [
      {
        "1": { title: "<p>Full Name</p>", tooltip: "", icon: "" },
        "2": { title: "<p>Proof of Stake</p>", tooltip: "", icon: "" },
        "3": { title: "<p>Proof of Work</p>", tooltip: "", icon: "" },
        id: 0,
      },
      {
        "1": { title: "<p>How It Works</p>", tooltip: "", icon: "" },
        "2": { title: "<p>Owners of the cryptocurrency can stake their coins, then the protocol selects a validator who adds a new block of transactions and earns rewards.</p>", tooltip: "", icon: "" },
        "3": { title: "<p>The first miner to solve the puzzle (finding a target hash) gets to add a block of transactions and earn rewards.</p>", tooltip: "", icon: "" },
        id: 1,
      },
      {
        "1": { title: "<p>Energy Usage</p>", tooltip: "", icon: "" },
        "2": { title: "<p>Low</p>", tooltip: "", icon: "" },
        "3": { title: "<p>High</p>", tooltip: "", icon: "" },
        id: 2,
      },
      {
        "1": { title: "<p>Equipment & Resources Required</p>", tooltip: "", icon: "" },
        "2": { title: "<p>PoS doesn't require validators to purchase specialized equipments or to solve complex equations.</p>", tooltip: "", icon: "" },
        "3": { title: "<p>PoW requires hardwares and energy, because mining capacity depends largely on a miner's computational power.</p>", tooltip: "", icon: "" },
        id: 3,
      },
    ],
  }}
/>

网上有很多[优质资源](https://www.youtube.com/watch?v=3QCykHU89To)可以帮助你理解这两种共识机制的基础知识，我们强烈建议你花时间去学习。

当然，随着加密货币和区块链的持续演进，[更多共识机制](https://www.youtube.com/watch?v=3QCykHU89To)必然会被创造出来并投入使用。

### 4. 哈希函数

除了共识机制，你还需要理解哈希函数。

[哈希函数](https://www.youtube.com/watch?v=jmtzX-NPFDc)用于将新交易写入区块链，并确保编码的数据是安全的。

哈希运算是通过一个数学函数，将任意长度的输入数据转换为固定长度的字符串。简单来说，这意味着一段文本会通过某种算法被转换为一组固定排列的数字和字母。

这些函数最终确保了区块链的不可篡改性——即保持交易永久历史记录的能力。但这也是区块链开发比在中心化生态系统中编程更困难的原因之一。

设计这些协议需要花费很长时间，因为你需要把它们打造得近乎完美。理论上，代码上传之后，除了极少数例外情况，你无法再对其进行修改。

我们建议你尽可能多地参加在线课程，以更好地理解这项技术。

一些入门选择：

- 普林斯顿大学有一门优秀的[免费加密货币课程](https://www.coursera.org/learn/cryptocurrency)。
- 麻省理工学院也有[一些不错的课程](https://www.youtube.com/playlist?list=PLUl4u3cNGP63UUkfL0onkxF6MYgVa04Fn)。
- Vitalik Buterin（Ethereum联合创始人）的[这场讲座](https://www.youtube.com/watch?v=gjwr-7PgpN8)也很好地解释和介绍了区块链的一些技术层面内容。

除了视频讲座和课程，也有一些不错的书籍。

- [The Basics of Bitcoins and Blockchains，作者Antony Lewis](https://www.amazon.com/dp/B08RWTV6BW/ref=dp-kindle-redirect?_encoding=UTF8&btkr=1)
- [The Blockchain Developer，作者Elad Elrom](https://www.amazon.com/Blockchain-Developer-Implementing-Distributed-Blockchain-based/dp/1484248465)
- [Cryptoassets，作者Chris Burniske和Jack Tatar](https://www.amazon.com/dp/B0743MPV9R/ref=dp-kindle-redirect?_encoding=UTF8&btkr=1)

这份清单当然并不详尽，但如果你能阅读并践行以上材料，你就已经在成为区块链开发者的路上走了很远。

### 5. Gas、矿工，以及运行智能合约的成本

<ImageBlock
  src="https://media.alchemy.com/1703830895-gas-miners-cost-of-running-smart-contracts.png"
  alt="Ethereum矿工执行智能合约收取gas费用的示意图"
  width={881}
  height={465}
/>

作为区块链开发者，你还需要理解“gas”在[Ethereum生态系统](https://www.alchemy.com/dapps/ecosystem/ethereum)中扮演的角色。

以太坊虚拟机（所有交易执行计算的地方）的空间非常有限。在任何时刻，对这有限的计算空间供给的需求都在不断变化。

一场持续不断的拍卖正在进行，用户可以为“gas”付费，即Ethereum上的一个计算能力单位。

作为用户，[了解如何节省gas费用](https://newsletter.banklesshq.com/p/6-ways-to-save-on-ethereum-gas-fees?s=r)对你的加密资产组合更有利。让gas更加实惠，同时也公平地支持矿工，是加密领域许多开发者的优先事项。

## 如何与区块链开发者社区建立联系？

与区块链开发者社区建立联系的最佳方式，是加入Discord服务器和社区，在Twitter上与web3开发者和意见领袖互动，并参加web3黑客松和会议。

众所周知，会不会编程将在区块链开发者的成功中起到最大作用，但也有很多不涉及一行代码的事情可以做。

区块链创造者社区主要聚集在网络上的两个地方：Discord[和Twitter](http://www.meetbunch.com/the-twitter-guide)。最重要的讨论都发生在那里，你也可以在那里建立人脉、寻找工作机会。

与传统职场不同，你不需要在LinkedIn上放一张正装照。在Web3的世界里，最重要的是你实实在在的知识——你在区块链领域积累的“汗水股权”，主要来自实践、追踪加密领域的意见领袖、上课、参加黑客松等。

如果你发布关于加密货币和区块链的有趣内容，即便你是匿名的，用一张搞笑图片作头像，你也能结识他人并获得关注。

以下是一些你应该加入的优质Discord服务器和社区：

- [Ethereum.org](https://twitter.com/VitalikButerin)
- [Solidity](https://zpl.in/discord)
- [CryptoDevHub](https://discord.gg/FRVxrbFKT9)
- [Openzeppelin](https://zpl.in/discord)
- [Bankless](https://discord.com/invite/mMGsVgd)
- [Alchemy](https://discord.com/invite/mMGsVgd)

以下是一些值得关注的顶尖加密货币和区块链意见领袖：

- [Vitalik Buterin](https://twitter.com/VitalikButerin)
- [Arianna Simpson](https://twitter.com/ariannasimpson)
- [Elizabeth Stark](https://twitter.com/LexSokolin)
- [Lex Sokolin](https://twitter.com/LexSokolin)
- [Brian Armstrong](https://twitter.com/brian_armstrong)
- [Laura Shin](https://twitter.com/laurashin)
- [Charlie Lee](https://twitter.com/SatoshiLite)
- [Roger Ver](https://twitter.com/rogerkver)
- [Tyler Winklevoss](https://twitter.com/tyler)
- [Andreas M. Antonopoulos](https://twitter.com/aantonop)
- [Anthony Pompliano](https://twitter.com/APompliano)

此外，虽然并非人人都喜欢，但参加会议也是一种很好的方式，可以当面结识他人并建立职业关系。我们不可能一一列举，但这里有一份[详尽清单可供你参考](https://crowdcreate.us/best-crypto-blockchain-conference-events-in-2022/)。

## 你即将成为一名区块链开发者

无论你是编程新手，还是想提升自己的区块链职业发展，都绕不开一点——你需要投入实实在在的努力。
话虽如此，加密货币和区块链技术正在改变金融、商业、文化等诸多领域，机会是无穷的。

按照本指南中的建议和提示去做，将助你在成为这场全球变革前沿的开发者的路上走得更远。Alchemy是Web3领域领先的节点服务提供商之一。我们的其他产品还包括[Enhanced APIs](https://www.alchemy.com/enhanced-apis)、[Notify API](https://www.alchemy.com/notify)，以及我们最新推出的[NFT API](https://www.alchemy.com/nft-api)。
