MOAC墨客(公有链)技术白皮书

合集下载

区块链技术白皮书分布式账本智能合约和去中心化应用开发

区块链技术白皮书分布式账本智能合约和去中心化应用开发

区块链技术白皮书分布式账本智能合约和去中心化应用开发1. 引言区块链技术随着比特币的发展而逐渐为人们所了解,这项技术具有分布式账本、智能合约和去中心化应用开发等特点,极大地改变了传统的中心化交易模式。

本白皮书旨在深入介绍区块链技术中的分布式账本、智能合约以及去中心化应用开发等关键概念和原理。

2. 分布式账本2.1 概述分布式账本是区块链技术的核心概念之一,它使用点对点网络,将交易记录以区块的形式链式连接起来,并经过加密和验证确认,从而实现交易的透明、可追溯和安全的特性。

2.2 工作原理分布式账本通过共识算法确保节点间的数据一致性,在区块链网络中,每个节点都保存了完整的账本副本,并使用加密算法对交易进行验证和记录。

一旦交易得到验证并被打包成区块,便会广播到所有节点中,同时进行共识验证,确保大部分节点认可并接受该区块,最后被添加进整个区块链中。

3. 智能合约3.1 定义智能合约是基于区块链技术的可编程合约,它能够自动执行、验证和执行合约的交易,并在特定条件满足时自动触发相应的操作。

智能合约主要由代码和数据组成,可以实现去中心化的合约执行。

3.2 实现原理智能合约使用区块链的分布式账本作为存储和执行环境,以及节点的计算能力作为合约执行的基础。

通过使用一种特定的编程语言和编译器,将合约代码转化为字节码,并通过区块链网络进行部署和执行。

当满足合约条件时,智能合约可以自动触发事务的执行。

4. 去中心化应用开发4.1 概述去中心化应用(DApp)是一种基于区块链技术的应用程序,它不依赖于中心化的服务器,而是通过区块链网络中的节点来实现数据存储和交互。

DApp具有去中心化、透明、安全和可靠等特点。

4.2 开发框架为了实现去中心化应用,需要使用特定的开发框架。

目前比较流行的DApp开发框架包括以太坊、EOS等。

这些框架提供了一系列的API 和工具,用于开发智能合约和基于区块链的应用程序。

4.3 开发流程去中心化应用的开发流程包括需求分析、智能合约编写、前端界面设计和测试等步骤。

区块链技术的比较:公有链、私有链和联盟链

区块链技术的比较:公有链、私有链和联盟链

区块链技术的比较:公有链、私有链和联盟链区块链技术已经成为近年来最受关注的新兴技术之一,其在金融、供应链、医疗、物联网等领域的应用逐渐扩大。

在区块链技术中,按照参与者的身份和权限不同,可以分为公有链、私有链和联盟链。

本文将对这三种不同类型的区块链进行比较,以便读者更好地了解它们的特点和应用场景。

公有链是最为人熟知的区块链形式,它是一种无需许可的区块链网络,任何人都可以加入并参与其中。

这一点正是公有链的特点之一,也是其最为重要的特点之一,因为它突破了传统中央化的思维,让每个人都有可能成为网络的一部分。

公有链通常采用工作量证明(Proof of Work)或权益证明(Proof of Stake)等共识机制,确保网络的安全性和去中心化。

公有链上的所有交易记录都是公开可见的,任何人都可以查看和验证。

与公有链相对应的是私有链,私有链是一种需要许可的区块链网络,只有被授权的用户才能加入,进行交易和参与验证。

私有链通常用于企业内部的信息管理和交易处理,它可以确保数据的私密性和安全性,也更有利于企业内部的协作和合作。

与公有链相比,私有链通常拥有更高的性能和更灵活的智能合约机制,因为它可以更好地满足内部业务的需求。

联盟链是介于公有链和私有链之间的一种区块链形式。

它是由一组组织共同管理的区块链网络,这些组织通常是同一行业或相互信任的合作伙伴,它们共同管理和验证网络上的交易。

与私有链相比,联盟链拥有更多的透明度和可信度,因为其交易记录可以被所有参与组织验证和审核,但与公有链相比,联盟链的许可机制更为严格,只有被授权的成员才能加入。

在实际应用中,不同类型的区块链技术都有各自的优势和适用场景。

公有链通常用于加密货币交易和开放式应用,它们可以为任何人提供开放的金融服务和去中心化的应用平台。

而私有链更适合企业内部的数据管理和商业交易处理,它可以确保企业数据的安全和私密性,同时也为企业合作提供更好的技术支持。

联盟链则更适合于供应链管理、跨国合作和金融交易等场景,它可以为不同组织之间的合作提供可信的交易记录和智能合约支持。

虚拟货币技术白皮书

虚拟货币技术白皮书

虚拟货币技术白皮书摘要本白皮书旨在探讨虚拟货币技术的发展趋势、应用场景以及相关的技术挑战。

我们将介绍虚拟货币的基本概念和原理,并分析其在金融领域、供应链管理和数字资产交易等方面的应用。

此外,我们还将讨论虚拟货币技术面临的安全和隐私问题,并提出相应的解决方案。

最后,我们将展望虚拟货币技术的未来发展方向。

1. 引言虚拟货币是指基于密码学技术和分布式账本技术实现的一种数字化货币,它不依赖于中央银行或政府机构发行和管理。

虚拟货币技术的兴起使得人们可以在无需第三方信任的情况下进行安全、快速的价值交换,具有巨大的潜力和广泛的应用前景。

2. 虚拟货币的基本原理虚拟货币的基本原理包括去中心化、分布式账本和密码学技术。

去中心化是指虚拟货币系统没有中央机构控制和管理,而是由网络中的节点共同参与验证和记录交易。

分布式账本是指虚拟货币系统中的交易记录被保存在多个节点上,确保交易的透明性和可追溯性。

密码学技术则用于保护虚拟货币系统的安全性和隐私性,包括数字签名、哈希函数和加密算法等。

3. 虚拟货币的应用场景虚拟货币技术在金融领域、供应链管理和数字资产交易等方面有着广泛的应用场景。

在金融领域,虚拟货币可以提供更快速、低成本的跨境支付服务,同时减少汇款中的中间环节和费用。

在供应链管理方面,虚拟货币可以实现对物流和资金流的实时追踪和管理,提高供应链的透明度和效率。

在数字资产交易方面,虚拟货币可以作为一种新型的资产交易方式,为数字资产的流通和交易提供更加便捷和安全的解决方案。

4. 虚拟货币技术的挑战虚拟货币技术在应用过程中面临着一些挑战,包括安全性、隐私性和监管等方面。

由于虚拟货币系统的去中心化特性,其安全性容易受到网络攻击和欺诈行为的威胁。

此外,虚拟货币系统中的交易记录被保存在分布式账本上,如何保护用户的隐私成为一个重要问题。

同时,虚拟货币技术的监管也需要相应的法律法规和监管机构来确保其合规性和稳定性。

5. 虚拟货币技术的解决方案为了应对虚拟货币技术所面临的挑战,我们可以采取一些解决方案。

区块链技术的比较:公有链、私有链和联盟链

区块链技术的比较:公有链、私有链和联盟链

区块链技术的比较:公有链、私有链和联盟链区块链技术是一种基于分布式账本的技术,可以实现去中心化、安全可信、不可篡改的数据存储和交易机制。

区块链网络可以被划分为公有链、私有链和联盟链三种类型,它们各有特点和适用范围。

一、公有链(Public Blockchain)公有链是最为普遍的区块链类型,也是最为典型的区块链类型。

公有链是完全去中心化的,任何人都可以加入并参与其中。

公有链上的交易和数据是透明、公开的,所有参与者都可以查看和验证,这也是公有链的一个重要特性。

公有链上的交易需要进行共识机制的验证,以确保每一笔交易都是可信的,被公认为可行的共识机制有PoW、PoS 等。

公有链上的代币通常是公开发行和流通的,比如比特币、以太坊等。

公有链在货币发行、交易和资产管理方面有较强的优势。

优点:1.去中心化,没有单一控制中心,任何人都可以参与其中,保证了公平和透明。

2.透明和公开,所有的交易和数据都可以公开查看和验证,降低了欺诈和不当行为的发生。

3.去信任化,无需信任第三方,自动执行智能合约来减少交易成本。

缺点:1.匿名性带来的安全隐患,很难准确追溯实施交易的真实身份。

二、私有链(Private Blockchain)私有链是面向特定组织或个人的区块链网络,具有较强的控制性和隐私性。

在私有链上,参与者必须得到授权以便加入网络,交易和数据对外部不透明,只有授权的参与者可以进行查看和验证。

私有链可以根据需求自定义共识机制,如PBFT、Raft等,来提高交易速度和效率。

私有链上的代币通常是发行给特定组织或个人的,主要用于区块链网络内部的交易和资产管理。

优点:1.较强的控制性,可以根据实际需求自定义共识机制和权限控制,提高了交易速度和效率。

2.较高的隐私性,只有授权参与者才能查看和验证交易和数据,保护了商业机密和个人隐私。

3.降低了交易成本,使用自动执行智能合约来取代中心化的交易验证机构。

缺点:1.依赖中心化控制,可能会存在单点故障或滥用权限等风险。

2023-区块链白皮书2020年-1

2023-区块链白皮书2020年-1

区块链白皮书2020年区块链是一种新兴技术,被广泛应用于数字货币,智能合约和认证等领域。

为了推动区块链的发展和应用,区块链白皮书2020年应运而生。

该白皮书从多个角度探讨了区块链技术的进展和应用。

第一步,白皮书介绍了区块链技术的基本原理和优势。

区块链是一种去中心化的数字数据库,可以将交易记录以块的形式保存,形成不可篡改的链式结构。

区块链技术具有高度安全性和透明度,使得区块链可以应用于金融和医疗等领域,提高效率和降低成本。

第二步,白皮书探讨了区块链技术在数字货币和资产管理中的应用。

数字货币已经成为区块链技术最成功的应用之一。

由于区块链技术具有高度的安全性和可追溯性,数字货币可以有效避免传统货币交易中的一些问题。

此外,区块链技术也可以用于资产管理,它可以提供更安全的交易和记录方式,减少欺诈和误差。

第三步,白皮书探讨了区块链技术在智能合约和供应链管理中的应用。

智能合约可以帮助各方协商和执行合同,从而减少人为介入和误操作。

供应链管理也可以通过区块链技术实现更高效和安全的交易和记录方式。

例如,通过区块链技术,可以记录货物的来源,质量,运输和交付等信息,有效避免诸如假货和盗窃等问题。

第四步,白皮书探讨了区块链技术的发展趋势和前景。

虽然区块链技术已经取得了一定的进展,但是仍然存在一些挑战,如扩容问题,监管合规问题等。

然而,随着技术的不断发展和应用场景的不断增加,区块链技术的未来发展前景仍然十分广阔。

综上所述,区块链白皮书2020年是一份十分重要的技术文章,探讨了区块链技术的发展和应用。

该白皮书对于推动区块链技术的发展和应用有着重要的作用。

我们相信,通过不断的探索和创新,区块链技术的应用范围和影响力将会逐步扩大。

墨客MOAC技术路线图:通过分片来匹配Visa交易规模

墨客MOAC技术路线图:通过分片来匹配Visa交易规模

墨客MOAC技术路线图:通过分片来匹配Visa交易规模Mother of All Chain (MOAC) Blockchain (简称“MoacChain”,中文音译为“墨客MOAC链”,又称“众链之母”)是一个开源的区块链平台,通过分层配置结构实现在P2P网络上支持多种子区块链,由硅谷顶级区块链专家团队研发,突破了异步合约调用、合约分片处理和跨链操作等当前业界难题,平台的扩展能力和对合约的处理速度远远优于当前的智能合约平台,是一款真正可以部署商业应用的区块链产品。

墨客MOAC产生的原因,是基于目前最火热的智能合约平台以太坊的速度和扩展能力不足,无法应付大批的代币项目应用的需求。

相对于以太坊每秒7-14次交易处理,墨客MOAC可以做到100倍,在优化条件下,甚至到1000倍。

那么墨客MOAC作为“优化的以太坊”,技术上是如何实现的呢?分层验证首先是采取了分层,其他系统要么坚持pow,要么坚持pos,要么混合pow+pos,都无法有效利用两者的优点,和避免两者的缺点。

墨客MOAC采取底层物理网用pow,上层智能合约的逻辑网用pos,使得两者的优点都能兼顾,可以称为pop(pos over pow)。

分片技术以太坊最新分片理念,主链基本不变,加个validator management contract合约管理sharding的接口和分配。

sharding里面什么样子主链不关心,主链只关心最后你header的hash对了就行。

但是技术上要实现分片,根据以太坊的路线规划要到2019年才能出来。

相对于以太坊的单一网,墨客MOAC成功突破并采取了分片sharding技术,可以将墨客MOAC分为无数逻辑子网,使得并行计算成为可能,解决了业界一大难题,大幅度提高处理速度,为此可达到Visa级别的交易规模。

异步调用以太坊的同步智能合约调用,智能合约的返回和区块共识绑定在同一个区块,导致智能合约处理的总额受到区块时间限制。

区块链应用白皮书

区块链应用白皮书

区块链应用白皮书区块链应用白皮书是一份详细阐述区块链技术应用在不同领域的报告文件。

以下是一份可能的区块链应用白皮书的框架:一、引言1.区块链技术概述2.区块链技术的应用场景和潜力3.区块链技术对各行业的影响和价值二、区块链技术概述1.区块链技术的基本原理2.区块链的类型:公有链、联盟链、私有链3.区块链的技术组件:分布式账本、加密技术、共识机制、智能合约三、区块链技术的应用场景和潜力1.金融领域:跨境支付、供应链金融、数字货币、证券发行与交易、保险、征信等2.供应链管理:商品追溯、质量管控、物流跟踪等3.医疗健康:电子病历共享、药品溯源、医疗数据管理、患者权益保障等4.公共服务:身份认证、学历认证、房产登记、投票等5.物联网:设备互连、数据安全共享等6.版权保护:数字版权管理、知识产权保护等7.其他领域:公益事业、版权保护等四、区块链技术对各行业的影响和价值1.对金融业的影响:降低交易成本、提高交易效率、增强信用体系等2.对供应链的影响:提高透明度、降低风险、增强协作等3.对医疗健康的影响:提高数据安全性和互操作性、降低医疗成本等4.对公共服务的影响:提高服务效率、增强透明度、降低腐败等5.对物联网的影响:提高设备互操作性、降低安全风险等6.对其他领域的影响:提高透明度和可信度、降低成本等五、区块链技术的挑战和风险1.技术成熟度和可扩展性2.数据隐私和安全问题3.法律法规和监管政策4.社会接受度和教育程度5.技术成本和投入产出比六、结论和建议1.区块链技术的未来发展趋势和前景2.区块链技术应用的下一步重点领域和发展方向3.对政府、企业和研究机构的建议和行动计划。

Moac墨客白皮书

Moac墨客白皮书

Technical White Paper ofMOAC – Mother of All ChainsJune 8th, 2017[Abstract]MOAC is to design a scalable and resilient Blockchain that supports transactions, data access, control flow in a layered structure. It creates the framework to allow users to execute Smart Contract in an efficient way. It also provides the architecture to spawn sub blockchains using underlying infrastructure quickly and easily. It is a Blockchain platform with necessary plumbing parts available to sub blockchains, providing solution for idea test, private chain deployment, complex task processing, decentralized applications etc.[Background]Blockchain technology has been evolving very quickly since the introduction of Bitcoin in 2008. Over the past nine years, many Blockchain techniques have been explored to try out various ideas, in the hope to expand the Blockchain usage, performance and applications.At the same time, the token value of Blockchain plays a vital role in the adoption of the blockchains. It helps to incentive more participants to join the ecosystem, also acts extremely useful to augment the existing payment system in a more efficient way. However, as Blockchain in its still early stage, it suffers from couples of problem. .1.Difficult to try new ideaNew idea means a new Blockchain. It requires extensive overhead to implement a new Blockchain idea, by setting up servers, develop teams, establishing community, attracting new users, etc.2.Difficult to upgradeOnce Blockchain has been deployed and in production, it is very difficult toadd/modify/delete features. Any of those is either soft fork or hard fork. Either fork requires tremendous effort and economic consequences.3.Incompatible among chainsDifferent chains have different schemes, such as consensus protocol, currency features, and adoption requirements. These schemes prevent the interconnection or exchange among multiple chains.4.Split participant groupFor each Blockchain, the user base is different. Mining rigs and validators are dedicated for that chain only. No two blockchains can share any of them.Also, as most cryptocurrencies’ value increases dramatically in the last year, applications based on existing blockchain platforms suffer from higher fees and longer latencies.[MOAC solution]OverviewOver the past several years, multiple consensus protocols have been adopted and tried out including POW, POS, BFT, and hybrid of those. However, not a single protocol can solve all problems. Typically, POW can be deployed in a large scale network and scales very well. It is the most verified consensus protocol among all. But it suffers from problems like large power consumption, low throughput, high latency, and higher barrier to participate. POS (DPOS) is better on power consumption and could be configured to perform faster. However, the protocol is complex to implement, and economical consequence has not been fully tested in large scale. And it typically deploys in a smaller network scale. BFT family is normally used in a much smaller scenario and can perform much better in term of throughput and latency. So its usage is mostly focused on private chain or enterprise applications.To be able to deploy in a large network scale and benefit from more participants and decentralization, while keeping the high throughput and low latency, MOAC introduces the layered consensus stacks to make above goals practical. It is the Blockchain for blockchains. MOAC itself will be deployed in public network with large number of validators. It provides following:yered configuration structure2.Transaction, Smart Contract and Data Access support3.Data flow, control flow and processing units, to form a distributed Von Neumannarchitecture.4.Validators could be configured to support multiple overlapping sub blockchains.5.Pluggable validation scheme to support injection of user defined protocols, make it easy todeploy new sub blockchains using existing validators.6.Encourage user with smaller processing power to participate in the validation process.Consensus ProtocolWe realize simply extend any current consensus protocol won’t be able to meet all the requirements. Typical solution of combining two types of different consensus protocols results in multiple chains or side chains. This is the approach we want to avoid, as it introduces more problems than solve them. Our solution to the consensus dilemma is to build a layered consensus stack, but to keep everything synced in a single Blockchain.For the underlying layer, we utilize POW as the main consensus protocol, because POW is a widely tested protocol and most robust solution to a large scale network setup. Currently MOAC uses POW similar to Ethereum.The drawback of POW is compensated in the top layer. Only critical transactions and control flow transactions are processed in the POW layer. The top layer adopts POS consensus protocol with sharding technique to provide faster and higher throughput solution.Each POW node has one Smart Contract Server node. The Smart Contract Server (SCS) identity is fully verifiable by the corresponding POW node. Each SCS node will present holding stake to be able to process the top layer user requests.Note that SCS processes Smart Contract calls. All transaction in the top layer is in form of Smart Contract calls. Not all SCS will process single transaction at the same time. Rather, part of selected SCS will process specific transaction.The selection of SCS is through initialization of Smart Contract call or Flush call. The init/flush call is actually passed to the POW and achieves consensus in underlying layer. The init/flush call will include the selection criteria including percentage of processing nodes. Then each POW will invoke that call on its SCS with an EHDRand algorithm. SCS will determine if itself is selected to process this Smart Contract. Note this is a deterministic process and SCS participation can be verified by anyone.Once group of SCS is selected for certain Smart Contract, they will communicate with each other to form a small consensus group. This group will process the following Smart Contract calls on that Smart Contract. Also, the behavior on how they reach the consensus among them could be specified by the init/flush call. Effectively these SCS nodes form a sub Blockchain and perform the consensus based on the predefined protocol or user defined protocol. Please note the consensus protocol is different from the actual Smart Contract code.Smart Contract state is saved in each SCS. However, that is not on the actual global Blockchain. To achieve the benefit of global Blockchain, the state needs to flush into the underlying Blockchain periodically or on demand.When flushing, in the consensus mode, SCS node will initiate a data store request on the underlying POW nodes. The current state will be written into the Blockchain and referenceable by a HASH. Note all POW node will do the same operation. For those nodes who are not part of the consensus group, they will not do anything. The participating SCS will get the proposed state and verify it with its own state. If it can prove that the proposed state is incorrect, it will initiate another data store request with corrected state and referencing the incorrect state hash. If norebuttal data store request is initiated for predefined rounds, SCS node will initiate the final flush Smart Contract call with the correct state hash. The involved transactions in the correct state will be processed at every POW node. The SCS node who sends out the incorrect state will forfeit its stake.In MOAC, most transactions will be processed in the top layer, while only small portion of control flow transactions are processed in the POW layer. This is feasible because top layerprovides fast, flexible and low cost service, while POW layer provides slow, reliant and expensive service.Layered Architecture1. P2P network layer. This layer defines p2p protocol.2. Blockchain layer. This layer handle all operation related to Blockchain operation, likeconsensus, data access, etc.3. TX layer. This layer handles TX request and reply. It also processes the Control flow TXrequest and if necessary, invokes Smart Contract related operations.4. Smart Contract layer. This layer performs smart contract execution inside virtual machineand also keeps a temporary contract state.5. API handles end-user input and gets the output from lower layers. Contract VM API TX request stateTX Layer / Event handling Blockchain and data store P2P Smart Contract Req InterfaceMOAC topologyThe POW consensus node participates in a volunteer way. Each node contributes its computing power to solve the computation-intensive problem and verifies the validity of transactions in the agreed transaction set.Besides the POW consensus on transaction and data store set, each POW node is associated with one Smart Contract Server. SCS node could be local to the POW node, or it could be a remote node. The Smart Contract Server (SCS) identity is fully verifiable by the corresponding POW node.Smart contract request (create/invoke/flush) is enclosed in the Control flow TX c and is firstprocessed in underlying layer. Then, each POW node sends the contract request to its SCS via an asynchronous call. SCS will send additional Control flow TX c and Data Store TX s to underlying layer if needed.Execution of smart contract is in an efficient sharded way. All the SCS can be configured at run time to process different sections of smart contracts. The whole system throughput could be 10x-100x faster than that of traditional way. The sharded execution group marshals the sharding state into underlying Blockchain through Control flow TX c and Data Store TX s .Wallet/AddressWallet and address are interchangeable in this document. Address holds the balance of the digital currency. Each address has its corresponding secret key. Secret key is used to sign the TX originated by this address.POW Consensus nodes TX/Control Flow Data Flow …… invoke Sub chain #1 Sub chain #2 Sub Chain request / Smart Contract callSmart ContractIdentification for smart contract is same as normal wallet. It has a unique public address. One difference is that contract secret key is discarded at creation. So no one can distribute the balance of a contract to anyone else, other than the consensus protocol.Contract holds four basic elements: {code, state, [call], balance}. Code is generated by user. State holds current internal information. Balance is the digital currency the contract has. It also stores history of function calls on that contract.TransactionTransaction is the basic operation inside the system. Each address can send/receive balanceto/from other addresses. And there are also Smart Contract based TXs. These TXs are used to trigger the work flow of Smart Contract.Three basic transaction types in the system: Payment Transaction TX p, Data Store TX s, Control flow TX c. They are processed in the underlying POW consensus nodes. All nodes agree on the same world state.a)Payment TX: {sender->receiver:amount}Basic transaction to move fund from one to another. Sender will need to sign thetransaction using secret key. The signature is verifiable by anyone.b)Data store TX {sender->contract_address: data to store}This transaction type processed in POW node will not validate any balance related operation.c)Control flow TX1)Contract init TX {code, sender, init_amount, execution type, sharding config}User sends the init TX to start a new contract. In the contract, user will need to specifythe contract code, init fund, execution type: fast or normal, sharding config.2)Contract Flush TX {contract_address, flush_target_state, flush_steps}Flush TX is to allow POW node agree on the already executed bulk transactions andflush them into the Blockchain.3)Contract Payment TX {sender->contract_address: amount}This is similar to normal payment TX, except that POW node will notify contract serverabout the balance update and who made the contribution.Sub BlockchainMOAC system can perform regular payment transactions, data store transactions and Smart Contract (control flow) transactions. Moreover, it is very convenient to utilize the provided architecture to spawn sub blockchains.User can configure sub chain using Smart Contract to define sub chain properties (% of participant nodes, consensus protocol, policy, state storage, etc.). The creation of sub chain is accomplished through Control flow TX c. Once sub chain is established, each participant SCS will adopt the pluggable protocol in its execution. Any following requests on the sub chain will be validated by the selected % of SCS.The block generation of the sub chain is configured to either on-demand or on set time schedule. The on-demand feature is preferred, as it only generate blocks when needed, thus saving valuable resources.The sub chain deployment can be as easy as sending couples of Smart Contract calls. However, it inherits the secure and robust underlying Blockchain properties. And, it can reuse the large pool of existing validators and benefit from the decentralized setup.The sub chain could utilize Flush contract call to randomly reselect SCS nodes, to achieve better decentralization and security.Upgrade sub chain is also easy by just redeploying to a new set of SCS with updated chain property.Transaction FeeThere are two types of compensation payments that nodes can receive from contributing their computational power. Firstly, the POW nodes will get rewarded for each block they mine. This is similar to what currently BITCOIN does. Secondly, the SCS server can be rewarded for their participation of sub chains and their processing work of Smart contracts. Note that this kind of service may not be power-intensive. For example, if a sub chain is based on POS, the SCS can just spend very limited resource for the validation.This is a big incentive to regular PC users or even mobile users. For the pure POW network, there is almost no chance for regular user to benefit from mining. However, in MOAC setup, user can setup a light weight POW node. Although this light weight POW node has almost no chance to win in mining contest, but, he/she can setup an SCS associated with that POW node, and gets rewarded for the SCS works it provides. This will encourage more users to join the consensus system and provide more SCS processing power. On the other hand, the Smart Contract owner or sub chain creator will need to pay the fee for all SCS working, but is very cost-effective considering the benefit and low startup costs. The whole process will promote a more distributed ecosystem and benefit all parties.Payment scheduleBlock is mined every 10s, with reward of 2 MOAC coins per block. The reward schedule halves every 3,000,000 blocks, equivalent to approx. one year. After block 18,000,000, the reward will be constant of 0.1 MOAC per block. See below. We define 1 MOAC = 1,000,000 Sand. 1 Sand = 1,000 Xiao.1-3,000,000 2 MOAC3,000,001-6,000,000 1 MOAC6,000,001-12,000,000 0.5 MOAC12,000,001-15,000,000 0.25 MOAC15,000,001-18,000,000 0.125 MOAC18,000,001- 0.1 MOACTransaction fee is paid in two ways. One is through Transaction. The other is for Smart Contract or sub chain.Transaction Type Fee Pay toPayment TX p20 Sand POW minerData Store TX s20 Sand POW minerControl flow TX c50 Sand POW minerSmart Contract Call 1 Xiao To each SCSSmart Contract Call cost is set lower than underlying transaction in purpose, thus encouraging the usage of SCS. This can alleviate the pressure on the underlying layer, and also benefit the SCS providers.[Summary]To summarize, MOAC utilizes layered architecture to combine the POW feature of robust and scalability and the POS feature of fast performance, quick response, without their shortcomings. The Smart Contract layer forms a platform for complex task and various sub blockchains. The POW nodes together with SCS nodes, construct the flexible and scalable framework that can be reused across many applications. MOAC Blockchain could be valuable to both light weight participants and compute intensive participants.[Reference]MOAC coin total amount increases over years:[DISCLAIMER]This draft Technical Whitepaper is for information purposes only. Moac.io does not guarantee the accuracy of the conclusions reached in this paper, and the whitepaper is provided “as is”with no representations and warranties, express or implied, whatsoever, including, but not limited to: (i) warranties of merchantability, fitness for a particular purpose, title or non-infringement; (ii) that the contents of this whitepaper are free from error or suitable for any purpose; and (iii) that such contents will not infringe third-party rights. All warranties are expressly disclaimed. Moac.io and its affiliates expressly disclaim all liability for and damages of any kind arising out of the use, reference to, or reliance on any information contained in this whitepaper, even if advised of the possibility of such damages. In no event will Moac.io or its affiliates be liable to any person or entity for any direct, indirect, special or consequential damages for the use of, reference to, or reliance on this whitepaper or any of the content contained herein.。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

众链之母(MOAC)技术白皮书June 2017[目标]MOAC项目旨在提供一种可扩展且有弹性的区块链,通过分层化的结构来支持数字资产交易,数据访问,和流程控制。

它创建了一个框架以允许用户用高效的方式执行智能合约。

它还提供了开发的体系结构,采用底层基础设施来快速简便地产生子区块链。

它是一个区块链平台,可以为子区块链的架设提供必要的部件,同时为新想法的测试,私有链的部署,复杂任务的处理和智能合约的应用提供解决方案。

[当前的问题]自从2008年中本聪的比特币项目引入了区块链技术以来,这项技术的发展非常迅猛。

在过去近十年的时间里,开发者们以极大的热情来探索区块链技术这个新领域,试图拓展区块链的应用,提高区块链的效率和促进区块链的商业化。

区块链系统中的原生数字货币在区块链推广中起到了至关重要的作用,比如比特币系统的比特币,以太坊系统的以太币等。

这些原生数字货币不仅推动了更多的参与者来进入区块链生态系统,也为当前存在的支付系统提供了更有效的方案。

当然,目前区块链技术还处于发展的早期阶段,现有区块链系统都有以下一个或多个问题。

1.难以尝试新的想法新的想法意味着要建立一个新的区块链系统。

这意味着有大量的额外开销和精力要用来设置服务器,培训开发团队,建立社区,吸引新用户等。

2.难以升级一旦区块链被部署和进入生产模式,很难在功能上进行添加/修改/删除。

区块链修改的结果就是会造成区块链系统的软分叉或者硬分叉。

而每个分叉都需要大量的精力来处理,也必须承受由此带来的经济后果。

3.区块链系统之间不相容不同的区块链有不同的模式,如共识协议,货币特征和适用要求。

模式的差异阻止了多个链之间的互连或互换。

4.分裂的用户群对于每个区块链,用户群是不同的。

一个区块链系统的矿机和验证节点仅能用于该区块链。

没有两个区块链可以共享它们。

5.性能瓶颈区块链作为分布式系统,与传统中心化的系统相比在吞吐量,响应时间等性能上还是有较大差距。

而在维持分布式拜占庭容错性的前提下,提高性能是非常困难的。

还有一点,当大多数原生数字货币的价值迅速增长的时候,基于它们开发的各种应用的手续费也相应增长,网络延迟时间也在增长。

[解决方案]过去几年来,包括工作量证明(POW),权益证明(POS)和授权权益证明(DPOS),拜占庭容错性(BFT),以及由这些方法结合的多种共识方案已被尝试和应用。

但是,没有一个协议可以解决所有的问题。

通常,POW可以部署在大型网络中,并且可以很好地扩展。

它是验证最为广泛的共识协议。

但是它受到像大量电力消耗,低吞吐量,高延迟和高参与障碍这样的问题的困扰。

POS和DPOS虽然没有大量的电力消耗,并且执行速度更快。

但是,这类协议实施比较复杂,通常以较小的网络规模部署,并且未得到大规模的全面测试。

通常BFT系列的使用要在小得多的系统上,并且可以在吞吐量和延迟方面表现更好,所以大都是用于私有链或企业内部应用。

为了能够在大型网络中部署分布式系统,吸引更多的参与者,同时保持高吞吐量和低延迟时间,MOAC提出了用分层的共识堆栈技术来解决问题的方案。

它是区块链的区块链。

MOAC本身将部署在具有大量验证节点的公共网络中。

它提供以下内容:1.分层配置结构2.交易,智能合约和数据访问支持3.数据存储,流程控制和处理单元,形成一个分布式的冯·诺依曼(Von Neumann)架构。

4.验证节点可以配置为多个重叠的子区块链服务。

5.可插拔验证方案,支持注入式的用户协议,可以使用现有验证节点来轻松部署新的子区块链。

1.鼓励具有较小处理能力的用户参与验证过程。

2.使用分流方案来提高系统性能。

[共识协议]我们意识到仅仅在任何目前的共识协议基础上拓展将无法满足所有的要求。

已有的解决方案是通常是采取多个链或侧链的方式来结合两种不同共识协议的。

这是我们想避免的方法,因为这种方式会引入更多问题。

我们解决共识困境的是建立一个分层的共识堆栈,并保持一切都在同一个区块链上同步。

我们利用POW作为底层的主要共识协议,因为POW是一个经过广泛测试,并具有抗攻击性和拓展性的解决方案。

目前MOAC使用类似于以太坊的POW协议。

MOAC在设计了顶层补偿了POW的缺点。

只有关键的交易和控制流程交易在POW层中处理。

顶层采用POS协议和分片技术提供更快更高的吞吐量解决方案。

每个POW节点都有一个智能合约服务器(Smart Contract Server - SCS)节点。

SCS身份是由相应的POW节点完全验证。

每个SCS节点将能够处理顶层的用户请求。

SCS处理智能合约的调用。

顶层的所有交易都是以智能合约调用的形式进行。

并非所有SCS都将同时处理单个事务。

相反,部分选定的SCS将处理特定的事务。

SCS的选择是通过初始化智能合约调用或刷新调用(init / flush)。

init / flush调用实际上是传递交易给POW节点,并在底层达成共识。

init / flush调用将会设定如何选择合约的SCS,以及处理节点的百分比。

然后每个SCS的相应POW节点都会使用EHDRand算法在其SCS上调用该调用。

SCS可以决定是否选择处理这个智能合约。

注意这是一个确定性的过程,SCS的参与可以被任何人验证。

一旦选定了智能合约的SCS组合,它们将相互通信并形成一个小的共识组。

该组将处理智能合约的所有调用过程。

此外,他们如何达成共识的行为可以由init / flush指定。

这些SCS节点会形成一个子区块链并执行基于预定协议或用户自定义协议的共识。

请注意共识协议与实际的智能合约代码不同。

智能合约的状态保存在每个SCS中。

但是,这并不是保存在完整的区块链系统中。

而为了达成完整的共识,合约状态需要定时或按要求写入底层的POW节点。

在共识模式下,当刷新(flush)时,SCS节点将接受来自底层POW节点的数据存储请求。

当前状态将被写入区块链系统并生成相应的HASH。

注意所有POW节点将执行相同的操作。

对于那些不参与此次刷新的智能合约的SCS,它们不会做任何事情。

参加智能合约的SCS将获得的提交状态并用自己的状态进行验证。

如果可以证明之前提交的状态是不正确的,它将会发起更新一个具有正确状态的数据存储请求并引用不正确状态的HASH。

如果之前提交的状态没有争议的数据存储请求,SCS节点将最后刷新具有正确状态HASH的智能合约。

同时每个POW节点也会处理与合约状态相关的交易。

发出不正确状态的SCS节点将会被取消权益。

在MOAC中,大多数交易将在顶层处理,而只有一小部分流程控制在POW层中处理。

这是可行的,因为顶层提供快速,灵活和低成本的服务,而POW层提供缓慢,但可靠和完整的服务。

[分层结构]1.P2P网络层:这个层定义了基础的p2p协议。

2.区块链层:该层处理与区块链操作相关的所有操作,如共识,数据访问等。

3. 交易(TX )层: 该层处理TX 请求和回复。

它还处理控制类TX 请求,并在必要时调用与智能合同相关的操作。

4. 智能合同层: 该层执行虚拟机内的智能合同执行,并保持临时合同状态。

5. API 层:API 用于处理终端用户输入并获取下层的输出及返回。

MOAC 拓扑结构 POW 共识节点采取志愿参与的方式。

每个节点贡献其计算能力来解决计算密集型问题,并验证约定交易集中交易的有效性。

除了POW 对交易和数据存储集的共识之外,每个POW 节点都会与一个智能合约服务器(Smart Contract Server - SCS )相关联。

SCS 节点可以是POW 节点的本地节点,也可以是一个远程节点。

SCS 的身份可以由相应的POW 节点来完全验证。

智能合约服务器(SCS )身份可由相应的POW 节点完全验证。

智能合同请求(创建/调用/刷新)包含在流程控制TXc 中,并首先在底层中处理。

然后每个POW 节点通过异步调用向其SCS 发送合约请求。

合约请求在SCS 中处理。

如果需要,SCS 将向底层发送附加的控制流TXc 和数据存储TXs 。

智能合约 虚拟机APITX 状态 交易层/事件处理 区块链和数据存储 P2P合约请求 接口 TX/ 流程控制TX 可插拔协议 子区块链 #1 合约调用/子区块链请求执行智能合约的方式是通过高效的分片技术实现。

所有SCS 都可以在运行时进行配置,以处理不同部分的智能合同。

整个系统吞吐量可以比传统方式快10倍 - 100倍。

分片的执行组通过控制流TXc 和数据存储TXs 将分片状态记录到底层块链中。

[钱包/地址]钱包和地址两个名称在本文档中是可互换的。

每个钱包/地址是由一个私钥生成的,并保存有数字货币的余额,可以接收和发送交易。

钱包/地址对于区块链的用户是可见的。

私钥则是用于签署起源于这个地址的交易,仅对拥有者可见。

[智能合约]每个智能合约与普通钱包相同,都有一个独特的公共地址。

区别在于智能合约的私钥在合约创建完成时就会被丢弃,所以除了共识机制外,没有人可以在智能合约创建后发送里面的数字货币。

智能合约有四个基本要素:{代码,状态,[调用],余额}。

代码由用户生成。

状态持有合约当前的内部信息。

余额是合同中的数字货币。

它也是存储该合同的调用历史。

[交易]交易是MOAC 系统内的基本操作。

每个地址可以与其他地址之间交换数字货币。

还有基于智能合同的流程控制交易(TXc )。

这些TXc 用于控制智能合约的工作流程。

MOAC 系统中的三种存在基本交易类型:支付交易TXp ,数据存储TXs ,流程控制TXc 。

它们都是在底层的POW 共识节点中被处理。

所有节点共识并保持同样的系统状态。

a )支付交易(TXp ):{sender-> receiver :数字货币金额}将数字货币从一个地址转移到另一个地址的基本交易。

发送地址将需要使用私钥签署交易,而签名的真实性可由任何人核实。

b )数据存储(TXs ): {sender-> contract_address :要存储的数据}在POW 节点处理的此交易类型不会验证任何与余额相关的操作。

c )流程控制(TXc ):POW 共识节点 数据存储TX …… 节点 …… 调用1)Contract init TX {code,sender,init_amount,execution type,sharding config}用户发送init TX启动新的智能合约。

在智能合约中,用户需要指定合约代码,初始资金,执行类型:快速或正常,分片配置。

2)Contract Flush TX {contract_address,flush_target_state,flush_steps}Flush TX是允许POW节点同意已经执行的批量事务,并将它们写入区块链。

3)Contract Payment TX {sender-> contract_address:类似支付交易。

相关文档
最新文档