该文章Github地址:https://github.com/AntonyCheng/blockchain-notes【有条件的情况下推荐直接访问GitHub以获取最新的代码更新】
在此介绍一下作者开源的SpringBoot项目初始化模板(Github仓库地址:https://github.com/AntonyCheng/spring-boot-init-template【有条件的情况下推荐直接访问GitHub以获取最新的代码更新】& CSDN文章地址:https://blog.csdn.net/AntonyCheng/article/details/136555245),该模板集成了最常见的开发组件,同时基于修改配置文件实现组件的装载,除了这些,模板中还有非常丰富的整合示例,同时单体架构也非常适合SpringBoot框架入门,如果觉得有意义或者有帮助,欢迎Star & Issues & PR!article GitHub address & #xff1a; [Recommend direct access to GitHub to get the latest code update]
with the author's open source initialization template for the SpringBoot project xff08; Github warehouse address xfft_a;
分布式系统:弱中心化是区块链思想的核心;
P2P网络:为区块链提供了网络层基础架构;
P2P network: provides network-level infrastructure for block chainsxff1b;
共识算法:区块链技术的核心,实现了数据的一致存储;
Consensus algorithm: core of block chain technologyxff0c; consistent storage of dataxff1b;
密码学:为区块链数据的传输和访问安全性,完整性和无法抵赖性提供了技术支撑;
cryptography: provides technical support for the transmission of block chain data and access to securityxff0c; integrity and non-deficitabilityxff1b;
分布式数据库:区块链的物理载体;
智能合约:为区块链应用提供了无限可能;
Smart Contract: offers unlimited possibilities for block chain applicationxff1b;
电子现金:最近几十年来的解决方案为区块链研发提供基础;
Electronic cash: solutions in recent decades have provided the basis for block chain development xff1b;
政府信用担保发行:货币滥发贬值;
Government credit guarantee issuance xff1a; currency depreciation xff1b;
银行体系提供金融服务:金融危机;
Financial services provided by the banking system xff1a; financial crisis xff1b;
中本聪(可能不是一个人,也可能也是一个人)在2008年提出比特币:一种点对点的电子现金系统;
xff08; may not be a person xff0c; may also be a person xff09; introduced Bitcoin xff1a in 2008; a point-to-point electronic cash system xff1b;
总共将发行2100万个比特币,目前已生成1600万个,总市场规模在1400+亿美元左右;
A total of 21 million bitcoins xff0c will be issued; 16 million xff0c are currently generated; the total market size is 140043; and around $1 billion xff1b;
迄今为止最成功的区块链应用,十多年来没有出现过一次服务暂停现象,任何交易均可被追溯,但是交易者却是匿名的;
The most successful block chain application to date xff0c; there has been no suspension of services xff0c in over a decade; any transaction can be traced xff0c; but the dealer is anonymous xff1b;
电子货币 | 民间数字货币 | |
---|---|---|
定价属性 | 以主权货币计价 | 以其自身价值计价 |
价值属性 | 受到货币政策影响 | 由供需决定 |
发行 | 央行 | 算法 |
记账 | 多个账本 | 单个账本 |
流通 | 信息流和资金流分离 | 信息流和资金流合一 |
具体案例 | 微信支付,支付宝 | 比特币 |
共识层:
超级账本(Hyperledger)是首个面向企业应用场景的分布式账本平台,包括了:IBM、Intel、Cisco、DAH、摩根大通、R3等在内的众多科技和金融巨头的贡献参与,在银行,供应链等领域得到了广泛的关注和发展,目前已经拥有超过200家企业成员;
Superbooks & #xff08; Hyperledger) the first distributed account platform for business applications & #xff0c; including : IBM, Intel, Cisco, DAH, Morgan Chase, R3 and so on; #xff0c; in banks & #xff0c; wide interest and development in areas such as the supply chain & #xff0c; already having over 200 business members & #xff1b;
2015年12月,由开源世界的旗舰组织Linux基金会牵头,30家初始企业成员共同宣布 Hyperledger联合项目成立。
December 2015 xff0c; led by the Open Source World flagship organization Linux Foundation xff0c; 30 initial business members jointly announced the establishment of the Hyperledger joint project.
成立之初,IBM贡献了4万多行已有的 OpenBlockchain 代码,DigitalAsset则贡献了企业和开发者相关资源,R3 贡献了新的金融交易架构,Intel也贡献了分布式账本相关的代码。
At its inception xff0c; IBM contributed more than 40,000 lines of OpenBlockchain code & #xff0c; DigitalAsset contributed business and developers-related resources xff0c; R3 contributed new financial transaction architecture xff0c; and Intel contributed code related to distributed books.
作为一个联合项目,旗下由面向不同的场景的子项目构成:包括==Fabric==、Sawtooth、lroha、Blockchain Explorer、 Cello、Indy、 Composer、 Burrow等8大顶级项目。
As a joint project & #xff0c; under the flag is made up of sub-projects for different scenarios: 8 top projects including & #61; & #61;
所有项目都遵循 Apache v2 许可,并约定共同遵守如下的基本原则:
All projects are subject to the Apache v2 permit xff0c; and agree to observe jointly the following basic principles xff1a;
- 重视模块化设计:包括交易、合同、一致性、身份、存储等技术场景;
- 重视代码可读性:保障新功能和模块都可以很容易添加和扩展;
- 可持续的演化路线:随着需求的深入和更多的应用场景,不断增加和演化新的项目;
Hyperledger Sawtooth 是一个创建、部署和运行分布式账本的模块化平台。它包含一个 新奇的共识算法,叫做经历时间证明 (Proof of ElapsedTime,简写POET),面向大型分布式验证器群,消耗最少的资源。
Hyperledger Iroha 是为了将分布式账本技术简单容易地与基础架构型项目集成而设计的一个区块链框架项目。
Hyperledger Indy 是特别为去中心化的身份而建立的一种分布式账本。它提供了基于区块链或者其它分布式账本互操作来创建和使用独立数字身份的工具、代码库和可以重用的组件。
Hyperledger Burrow 是一个支持许可的智能合约机,burrow提供了一个模块化的区块链客户端,带一个经许可的智能合约解释器,它部分建立在以太坊虚拟机(EVM)规范的基础上。
Hyperledger Fabric 是一个带有准入机制的企业级联盟链项目,它的前身是IBM贡献的OpenBlockchain。
在社区开发过程中,需要了解一下社区写作过程中所需要使用的工具:
During community development & #xff0c; need to know about tools to be used in community writing & #xff1a;
- Linux Foundation ID
- Jira–任务和进度管理
- Gerrit–代码仓库和Review管理
- RocketChat–在线沟通
安装环境:推荐在Linux或者MacoS环境中开发Hyperledger 项目代码。
Install environment & #xff1a; recommend the development of Hyperledger project codes in Linux or Marcos environments.
- Git:用来从Gerrit仓库获取代码并进行版本管理
- Golang:配置Golang运行环境
- 用来支持容器环境Docker;
Hyperledger Fabric是一个提供分布式账本解决方案的平台。HyperledgerFabric由模块化架构支撑,并具备极佳的保密性、可伸缩性、灵活性和可扩展性。
Hyperledger Fabric is a platform to provide distributed book solutions. HyperledgerFabric is supported by a modular architecture xff0c; it has excellent confidentiality, scalability, flexibility and scalability.
Hyperledger Fabric被设计成支持不同的模块组件直接拔插启用,并能适应在经济生态系统中错综复杂的各种场景。
Hyperledger Fabric has been designed to support different module components for direct extraction and activation of xff0c; and to adapt to complex scenarios in economic ecosystems.
商业积分,利用区块链多方发行扩大参与者、使积分自由流通,吸引用户再次消费。
Commercial credits & #xff0c; expansion of participants using multiple distribution of block chains & free circulation of credits & #xff0c; attracting consumers to consume again.
跨境支付与结算,减少机构之间的信任成本,降低手续费。
Cross-border payments and settlements xff0c; reduced trust costs between agencies xff0c; reduced fees.
数据存证,版权保护,鉴别数据真伪。
Data repository xff0c; copyright protection xff0c; identification of data authenticity.
成员服务 (Membership Services),成员服务用来在许可的区块链网络上认证、授权和管理身份。
member services (Membership Services), member services are used to authenticate, authorize and manage identity on a licensed block chain network.
排序或者共识服务(Ordering Service) ,确认交易并将交易排序放入block。
Sorting or Consensus Service & #xff0c; confirming transactions and sorting them into Block.
账本 (Ledger) ,交易状态的持久化。
book of accounts (Ledger) & #xff0c; sustainable state of transactions.
节点 (Node),一个网络实体用来维护Ledger,执行合约的容器。
node (Node), a network entity to maintain Ledger, packaging to execute the contract.
SDK,用来和区块链网络进行交互。
SDK, used to interact with block chain networks.
Fabric1.X的架构优势
链码(Chaincode) 执行信任的可伸缩性,将用户自己开发的链码和系统提供的Order服务拆分,用户开发的链码和系统提供的Order服务不再是一一对应的关系,Order也可以适当容忍错误的出现,增强了系统的鲁棒性;
The chain code (Chaincode) implements trust scalable xff0c; splits the chain code developed by the user and the Order service provided by the system xff0c; the chain code developed by the user and the Order service provided by the system are no longer a matching relationship xff0c; order can also properly tolerate errors xff0c; enhances the robustness of the system xff1b;
性能提升,拆分链码和Order的串行执行,在原有架构中,当链码执行非常耗时的时候,Order将会处于闲置状态,不利于提高系统的吞吐量,拆分以后链码和Order可以并行执行发送交易;
Performance upgrades & #xff0c; splitting chain codes and Order's serial execution & #xff0c; xff0c in the original structure; xff0c when the chain code is executed very time-consumingly xff0c; order will be in idle state xff0c; is not conducive to increasing the volume of the system's throughput xff0c; chain numbers after splitting and Order will be able to execute the dispatch transaction xff1b in parallel;
共识机制可以单独实现(Order);
The consensus mechanism can be achieved separately (Order & #xff1b);
应用向单个或多个Peer节点发送对交易的背书请求;
Applying endorsement requests for transactions xff1b to individual or multiple Peer nodes;
背书节点执 ChainCode,但并不将结果提交到本地账本,只是将结果返回给应;
The endorsement node ChainCode, however, the results are not submitted to the local account book xff0c; only the results are returned to xff1b;
应收集所有背书节点的结果后,将结果播给Orderer;
The results of all endorsement nodes should be collected after xff0c; the results should be broadcast to Orderer;
Order执共识过程,并成Block,通过消息通道批量的将Block发布给Peer节点;
The Order Consensus Implementation Process & #xff0c; and Block & #xff0c; Block was released to Peer node & #xff1b in batches via the message channel;
各个Peer节点验证交易,并提交到本地账本中。
Each Peer node validates the transaction & #xff0c; and is submitted to the local account book.
注册有任何问题请添加 微信:MVIP619 拉你进入群
打开微信扫一扫
添加客服
进入交流群
发表评论