# 面向开发者的区块链笔记 **Published by:** [axtrur](https://paragraph.com/@axtrur/) **Published on:** 2022-04-22 **URL:** https://paragraph.com/@axtrur/2SP9gJORPDAemCHdzAAU ## Content 最近看了些web3.0的文章,所以尝试把自己所理解区块链的一些概念梳理下,因为只是简单概念笔记没有知识延伸,希望大家从笔记中能延展学习到更多内容 web3.0导文 web3.0 DAPP模块拆解 https://www.preethikasireddy.com/post/the-architecture-of-a-web-3-0-application awesome https://github.com/chaozh/awesome-blockchain-cn 概念 区块链分类 公链,联盟链,侧链,私有链,应用链... 公链可以了解以太坊 联盟链可以了解hyperledger fabric和Bcos 侧链可以了解polygon 应用链可以了解tencent的至信链 区块链分层: layer2:应用扩展 layer1:链底层 layer0:数据传输 layer1概念: vm:全局虚拟计算机,状态维护与变化,API;网络每个参与者都会存储并同意其状态,任何参与者都可以请求执行VM上的任意代码;代码执行会改变VM的状态, 一般有合约的都有对应的虚拟机实现,比如以太坊虚拟机EVM 以太坊和以太坊虚拟机(EVM)兼容链的solidity libra的move hyperledger fabric的chaincode 腾讯的trustsql ... smartcontract 智能合约 是一种在网络上(比如以太坊网络)的计算机程序,它严格按照事先编写的代码来运行。智能合约一旦部署到网络中,就无法更改 consensus 共识算法 为了持续生成区块而被网络节点认可的方案 PoW:工作量证明 PoS: 权益证明 DPoS:委托权益证明 BFT:拜占庭容错 (熟悉网络的估计对这种算法感兴趣) PBFT: 实用拜占庭容错 PoST:利用经济手段约束 HotStuff:改进的BFT PoA: 权威证明,一般测试网络用得多,比如以太坊测试网络 Raft和Paxos: 估计比较熟悉,但非对等网络,感觉只适用于私有链 store 数据存储 ledger 账本:mysql, rockdb, leveldb ... block 区块 merkle树 fork 分叉 不同矿工对同一高度产生内容不同的区块 hardfork 硬分叉 softfork 软分叉 DID 去中心化身份 account 账户:用户账户(普通用户)+合约账户(合约部署地址,指向代码) wallet 钱包 metamask, coinbase, connectwallet ... 数字货币 记账技术:FT 同质化代币资产记账, NFT非同质化代币资产记账 RC协议提案标准:比如ERC以太坊协议标准:FT (ERC20), NFT (ERC721、ERC1155...) 分类 coin token 原生代币 链上等价物(比如以太坊的ETH, 比特币的BTC) token 代币 链上资产 相关术语 token mining (mint) 代币铸造 挖矿 token burning 代币燃烧 network 网络传输 P2P 传输机制 endpoint 节点 https://etherscan.io/nodetracker https://github.com/vrde/ethnode transaction 交易,流程:交易接收,交易验签,交易池+交易广播,排序,执行,共识,区块打包落盘,区块同步(不同链实现机制有区别) 交易池 交易排序 交易验签 交易广播 交易确认 ... 交易费用 transaction Fee 交易费用 https://ethgasstation.info/ https://etherscan.io/gastracker gas费用 指令费用 https://docs.google.com/spreadsheets/d/1n6mRqkBz3iWcOlRem_mO09GtSKEKrAsfO7Frgx18pNU/edit#gid=0 MEV 矿工可提取价值 IPS交易类型定义:https://github.com/ethereum/EIPs/tree/master/EIPS decentralized storage 去中心化存储 ipfs https://ipfs.io/ https://github.com/filecoin-project swarm https://www.ethswarm.org/ 扩容 (layer三层的扩容解决方案)https://ethereum.org/en/developers/docs/scaling/ https://zhuanlan.zhihu.com/p/427023123 跨链 https://medium.com/degate/an-analysis-of-cross-chain-asset-bridge-mechanisms-polygon-vs-optimistic-and-zk-rollups-bb9d43fa6942 区块链世界金融 DeFi 去中心化金融 ( 典型DeFi应用DEX 去中心化交易所) CeFi 中心化金融 (CEX) GameFi (个人理解就是Game + DeFi) DAO 分布式自治组织 是现代公司制度的一个去中心化形式 个人理解就是链上描述某种组织以及其运行机制的合约联盟集合 DAPP 去中心化应用 开发相关 开发语言(常见的后台:c, c++, go, 其他( rust, java),前端:js 入门 如何成为智能合约开发者 https://blog.chain.link/how-to-become-a-smart-contract-developer-zh/ 以太坊开发指引:https://ethereum.org/en/developers/docs/programming-languages/ 以太坊API:https://docs.ethers.io/v5/api/ solidity合约 https://blog.soliditylang.org/ https://docs.soliditylang.org/en/v0.8.13/ openzeppelin 合约库 https://openzeppelin.com/contracts/ 水龙头:领测试币 https://faucets.chain.link/ 博客文章 区块链博客:https://www.preethikasireddy.com/categories/blockchain 链社区:https://blog.chain.link/ 这个网站的文章都很赞(不只是区块链)https://medium.com/ dapp https://dapp.tools/ https://github.com/dapphub https://github.com/Dapp-Learning-DAO/Dapp-Learning 研究 Coinresear.ch区块链论文 https://www.coinresear.ch/papers/ 网站 以太坊 黄皮书:https://ethereum.github.io/yellowpaper/paper.pdf 官网:https://ethereum.org 白皮书:https://ethereum.org/en/whitepaper/ 浏览器:https://etherscan.io/ 钱包 metamask: https://metamask.io/ coinbase: https://www.coinbase.com/wallet walletConnect: https://walletconnect.com/ guarda: https://guarda.com/ 工具 脚手架 https://github.com/scaffold-eth https://github.com/paulrberg/create-eth-app 编辑器: remix https://remix.ethereum.org/ remixd https://remix-ide.readthedocs.io/en/latest/remixd.html 编译部署调试套件: DApp编译打包工具:truffle (主要) 模拟环境:ganache 测试环境opensea,调试nft:https://testnets.opensea.io/ 节点环境: 本地部署 Ganache(前身是TestRpc https://docs.nethereum.com/en/latest/ethereum-and-clients/test-rpc/ ) https://trufflesuite.com/ganache/ https://github.com/trufflesuite/ganache https://trufflesuite.com/docs/ganache/overview hardhat https://hardhat.org/ https://hardhat.org/plugins/ https://github.com/NomicFoundation/hardhat geth 以太坊私链 https://geth.ethereum.org/ 节点提供商 https://ethereum.org/zh/developers/docs/nodes-and-clients/nodes-as-a-service/#popular-node-services 主要:alchemy, infura, Pocket Network 测试环境中的以太坊公链 Ropsten(官方) POW Kovan PoA Rinkeby(官方,常用)PoA https://www.rinkeby.io/#stats Goerli PoA 正式环境以太坊公链 ## Publication Information - [axtrur](https://paragraph.com/@axtrur/): Publication homepage - [All Posts](https://paragraph.com/@axtrur/): More posts from this publication - [RSS Feed](https://api.paragraph.com/blogs/rss/@axtrur): Subscribe to updates