Oracle区块链云服务方案介绍_第1页
Oracle区块链云服务方案介绍_第2页
Oracle区块链云服务方案介绍_第3页
Oracle区块链云服务方案介绍_第4页
Oracle区块链云服务方案介绍_第5页
已阅读5页,还剩50页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

Oracle 区 块链 云服 务 - 原理和 实 践 Oracle Code Shenzhen 蒋春明 架构 师 甲骨文北京研 发 中心 May 08, 2018 Copyright 2017, Oracle and/or its affiliates. All rights reserved. | Confidential Oracle Internal/Restricted/Highly Restricted Copyright 2017, Oracle and/or its affiliates. All rights reserved. | Agenda 区 块链简 介 Hyperledger Fabric 架构 Oracle 区 块链 云 简 介 Oracle 区 块链 开 发 Copyright 2017, Oracle and/or its affiliates. All rights reserved. | 区 块链简 介 Copyright 2017, Oracle and/or its affiliates. All rights reserved. | 佛系程序 员 如何参与区 块链 ? 币 圈 公 链 链 圈 联 盟 链 公 链 上的 币 圈,投机者的天堂 -Change the word 佛系程序 员 在做 联 盟 链 技 术 -Chain the Enterprise 甲骨文区 块链 云, 为 企 业级联 盟 链应 用 而生 Copyright 2017, Oracle and/or its affiliates. All rights reserved. | 各种 链 的解 释 公 链 - 真正的完全去中心的区 块链 用 户 不用注册就能匿名参与的 链 ,无需授 权 就能 访问 网 络 的区 块链 。 公 链 的任何区 块对 外公开,任何人都可以 发 送价 值 。 比特 币 以太坊是著名公 链 ,公 链 适合玩 币 ,使人 疯 狂。 联 盟 链 - 行 业 内的可 监 管区 块链 联 盟 链仅 限于 联 盟成 员 参与,成 员 参与区 块链 运行需要按照 规则获 取 读 写 记账 的 权 限。 成 员 需要注册才可使用。 私有 链 - 机构内私有定制区 块链 私有 链仅 在机构内使用, 读 写 权 , 记账权 由 组织 内自由定制。 央行 发 行的数字 货币 就是私有 链 。 侧链 - 与比特 币 挂 钩 ,能和比特 币 区 块链 交互的区 块链 跨 链 ,上 链 , 链 上, 链 下 Copyright 2017, Oracle and/or its affiliates. All rights reserved. | 什么是区 块链 ? 就是一个区 块 的 链 (?) 顺 序的 被 hash 的 几乎不可 篡 改的 交易数据的 链 每个区 块 包含多条已排序的交易 区 块链 建立一个所有的有序地交易 链 什么是区 块链 ? 链 + 节 点网 络 + 共 识 算法( + 智能合 约 ) = 分布式 账 本 节 点网 络 Copyright 2017, Oracle and/or its affiliates. All rights reserved. | 数据 结 构 Copyright 2017, Oracle and/or its affiliates. All rights reserved. | 联 盟 链 节 点 ( 参与者 ) 需要 许 可才能参与到区 块链 网 络 动 机 企 业应 用和分布式 账 本技 术 distributed ledger technology (DLT) 提升公 链 的性能:比特 币 10 分 钟 出 块 ;以太坊 15 秒,然而 经 常阻塞。 对 于企 业应 用来 说 参与者通常都需要能 够识别 其他参与者 联 盟 链实现 : Chain, Qurum,Tendermint, Ripple, 和 Hyperledger Fabric Copyright 2017, Oracle and/or its affiliates. All rights reserved. | 区 块链 的核心目的 - 去中心 为 什么去中心? 中心化的缺点:脆弱,不透明 中介机构在 这 中 间赚 各种 钱 为 什么能去中心? 分布式技 术 密 码 学 博弈 论 去中心后的意 义 本 质 是去中介 开放,共享,去中介 区 块链 演化 (2009- 至今 ) 2009 Bitcoin 硬 编码 的加密 货币 程序,有限的基于堆 栈 的脚本 语 言 Proof-of-work ( POW )共 识 区 块链 1.0原生加密 货币 (BTC) 公 链 ,匿名加入 2014 Ethereum 区 块链 2.0 Dapps ( 智能合 约 ) , 专门 的 语 言 (Solidity)Proof-of-work ( POW )共 识 原生加密 货币 (ETH) 公 链 2017 Hyperledger Fabric Dapps (chaincodes) ,可以使用通 用 语 言 编 写 (e.g., golang, Java) 模 块 化 / 可插拔的共 识 区 块链 3.0去掉原生 货币 多 实 例部署 联 盟 链 Copyright 2017, Oracle and/or its affiliates. All rights reserved. | 区 块链 交易和分布式 应 用( Dapps ) 比特 币 交易 - 简单 的虚 拟货币转 移 交易可以不 简单 ,也可以不和加密 货币 相关 - Dapps - 智能合 约 (Ethereum) 或者 链码 (Hyperledger Fabric) A smart contract is an event driven program, with state, which runs on a replicated, shared ledger and which can take custody over assets on that ledger. Swanson2015 “ 智能合 约 ” - ( 复制 ) 状 态 机 Copyright 2017, Oracle and/or its affiliates. All rights reserved. | Copyright 2017, Oracle and/or its affiliates. All rights reserved. | Confidential Oracle Internal/Restricted/Highly Restricted 12 公 链 共 识 POW 工作量 证 明 # 2 3 5 # 2 3 5 # 2 3 6 # 2 3 6 Transactions (payload) A=hashofblock#236 B=Roothashof Merkletreeoftx hashes C=nonce Block#237 公 链 共 识 POW 工作量 证 明 POW 共 识 机制 挖 矿 ( 块 ) 在共 识 ( POW ) 之后 , 节 点 执 行智能合 约 块验证 / 智能合 约执 行 ( 每个 矿 工 ) 验证 ( 执 行 ) 负 荷中的交易 验证 哈希 满 足条件 hash of #237 EXECUTE Copyright 2017, Oracle and/or its affiliates. All rights reserved. | Hyperledger Fabric 架构 Copyright 2017, Oracle and/or its affiliates. All rights reserved. | HLF 主要部件 共享 账 本 只可添加的分布式 记录 系 统 块 + 状 态 智能合 约链码 (Chaincode) 交易的商 业逻辑 无状 态 和可 终 止 共 识 机制 验证 和排序交易 安全 访问 控制 隐 私保 护 验证 CA 证书 Copyright 2017, Oracle and/or its affiliates. All rights reserved. | HLF 节 点功能解耦 不同密集度的需求 / 负载 链码 : 计 算 密集 共享 账 本 : 存 储 密集 共 识 机制 : 网 络 密集 安全 : 信任 密集 解构全功能的 节 点 Endorser : 背 书 交易 请 求 Committer : 写 块 Orderer : 只排序,不管交易内容 CA : 认证 管理 Config Processor SystemConfig TrustModel Copyright 2017, Oracle and/or its affiliates. All rights reserved. | 排序服 务 是由一 组 Orderer 节 点运行的通信服 务 ,提供原 子的广播服 务 排序服 务 是网 络 的根源, 为 Peer 和 应 用程序提供服 务 处 理所有的配置交易来 设 定网 络 策略 (readers, writers, admins) Orderer 使用可插拔的信任引擎 (CFT 或者 BFT) 来 对 交 易 进 行排序Atomic broadcast Orderer orderer Copyright 2017, Oracle and/or its affiliates. All rights reserved. | Peer Peer 是网 络 中 维护账 本状 态 和管理 链码 的 节 点 Peer 可以是背 书节 点,提交 节 点,背 书节 点永 远 也是提交 节 点 背 书节 点 执 行和背 书 交易 提交 节 点 验证 背 书 策略和交易 结 果 Peers 组 成一个 P2P 的 gossip 网 络 peer Endorser Committer Ledger Chaincode Event blockHashSegNo+offset blockNumSegNo+offset txIdSegNo+offset 账 本 Last written key/value block Transaction Log tx array TX Reads Writes TX Reads Writes TX Reads Writes TX Reads Writes File System 可替 换 State Database Latest written key/values for use in transaction simulation Supports keyed queries, composite key queries, key range queries Key History index tracking history of a key Block index Level DB Copyright 2017, Oracle and/or its affiliates. All rights reserved. | HLF v1 逻辑视图 E O O O Orderer O C C CA SDK CC C E E V1 E 通道 : CH1 P P P账 本 X 联 合 : Y (A+C+D) ; 通道 : CH2 PP账 本 Y Copyright 2017, Oracle and/or its affiliates. All rights reserved. | O O O O O O HLF D Org C P P P 甲骨文公有云 本地部署 Copyright 2017, Oracle and/or its affiliates. All rights reserved. | Oracle 区 块链 云 应 用开 发 39 OBCS 参与者角色 应 用开 发 者 智能合 约 开 发 者 区 块链 网 络 管理者 Application Developers Client Keys SDK Smart Contract Developer REST Proxy (HLF SDK) BCS Console Blockchain Network Copyright 2017, Oracle and/or its affiliates. All rights reserved. | REST emits block cachedstate, history,txtxntxntxntxn Blockchain Ledger Applicatio n SDK Copyright 2017, Oracle and/or its affiliates. All rights reserved. | 应 用程序开 发 流程概 览 开 发 者 创 建 应 用程序和 链码 链码 部署在网 络 上,控制 账 本的状 态 应 用程序 处 理用 户 接口和提交交易到 网 络 上, 调 用 链码 网 络 能 够 触 发 事 件 ,通 过 事件 与 其他 系 统 集成 Blockchain developer develops develops Accesses event Invokes/queries emits Smart Contract D get put, delete Peer Client Applicati on S D K 背 书 策略 : “E0,E1andE2mustsign” (P3,P4arenotpartofthepolicy) E 0 E 1 E 2 Endorser Ledger Committer Application O O O OA p 用放大 镜 看交易 过 程 : 步 骤 1/7 发 起交易 应 用程序 发 起交易 客 户 端程序提交一个交易 请 求 给链码 A 。 必 须 由 peers E 0 , E 1 , E 2 背 书 Key: P 4P 3 A B

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

最新文档

评论

0/150

提交评论