二维码

9.1 概述 - 数据结构 - 机器学习

1529 人阅读 | 时间:2021年01月15日 01:20
9.1 概述 - 数据结构 - 机器学习 #daohang ul li t,.reed .riqi,a.shangg,a.xiatt,a.shangg:hover,a.xiatt:hover,a.shang,a.xiat,a.shang:hover,a.xiat:hover,.reed-pinglun-anniu,span.now-page,#daohangs-around,#caidan-tubiao,#daohangs,#daohangs li,#btnPost{background-color:#D10B04;} .dinglanyou1 h3{border-bottom:3px solid #D10B04;} #dibuer{border-top:2px solid #D10B04;}.cebianlan .rongqi h3{border-bottom:1px solid #D10B04;} #edtSearch{border:1px solid #D10B04;} #daohang .zuo ul li{border-right:1px solid #;} #daohang ul li t a{border-top:1px solid #;border-right:1px solid #D10B04;} #daohang ul li t a:hover{border-right:1px solid #;} #daohang .you ul li a:hover,#daohang .zuo ul li a:hover,.reed-pinglun-anniu:hover{background-color:#;} a:hover,.reed h6 a:hover,#dibuer a:hover,.reed .riqiding,.cebianlan .rongqi li a:hover,#pinglun-liebiao ul.fubens li.depth-1 dl dd span.shu a,#pinglun-liebiao ul.fubens li.depth-1 dl dd span.huifuliuyan a:hover,.reed-biaoti h6 span{color:#D10B04;} .reed .kan a{color:#0A0AF5;}.reed .kan a:hover{color:#D10101;} @media screen and (max-width:1492px){a.shang,a.xiat{background:none;} a.xiat:hover,a.shang:hover{background-color:#f9f9f9;background-image:none;text-decoration:none;}} var _hmt = _hmt || [];(function() { var hm = document.createElement("script"); hm.src = "https://hm.baidu.com/hm.js?b19db5ba3b437a9e8698d2bc8fc64334"; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(hm, s);})(); var _hmt = _hmt || []; (function() { var hm = document.createElement("script"); hm.src = "https://hm.baidu.com/hm.js?b19db5ba3b437a9e8698d2bc8fc64334"; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(hm, s); })(); var _hmt = _hmt || []; (function() { var hm = document.createElement("script"); hm.src = "https://hm.baidu.com/hm.js?2d748c9763cfc72fb7d1ccab29f0770d"; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(hm, s); })(); var _hmt = _hmt || []; (function() { var hm = document.createElement("script"); hm.src = "https://hm.baidu.com/hm.js?f6d451f3f1be23f3abf240c64c469c1b"; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(hm, s); })();

当前位置:首页 » 区块链精品文章 » 正文

(function() { var s = "_" + Math.random().toString(36).slice(2); document.write('
'); (window.slotbydup = window.slotbydup || []).push({ id: "u3646201", container: s }); })();
(function() { var s = "_" + Math.random().toString(36).slice(2); document.write('
'); (window.slotbydup = window.slotbydup || []).push({ id: "u3646162", container: s }); })();

9.1 概述

1190 人参与  2018年10月11日 11:09  分类 : 区块链精品文章  评论

第9章 支持多种语言的智能合约

智能合约(smart contract)最早是1996年尼克·萨博(Nick Szabo)在他的文章“Smart Contracts:Building Blocks for Digital Markets”中提出来的:

A smart contract is a set of promises,specified in digital form,including protocols within which the parties perform on these promises.

维基百科对智能合约做了扩展:

A smart contract is a computer protocol intended to facilitate,verify,or enforce the negotiation or performance of a contract.Smart contracts were first proposed by Nick Szabo in 1996.

Proponents of smart contracts claim that many kinds of contractual clauses may be made partially or fully self-executing,self-enforcing,or both.The aim with smart contracts is to provide security that is superior to traditional contract law and to reduce other transaction costs associated with contracting.

概括起来,智能合约有如下几个特性。

1)智能合约必须是一种合约。合约是平等的当事人之间执行约定内容的协议。参与方对合约的内容要达成一致,并且遵守合约执行的结果。相比于传统合约,不同的地方在于:智能合约是“数字形式”的,需要转换成计算机可读和可执行的代码。

2)智能合约是部分或者完全自我执行(self-executing)和自我强制(self- enforcing)的:自我执行是指合约能立即自动生效。自我强制是指合约的参与方能够根据最优的结果自行决定是否参与或者终止和关联方的关系,继续参 与得不偿失才会终止合约。整个决策过程是不需要可信的第三方干预的,这是一种有用的特性,因为第三方参与仲裁会有一些额外的开销。这是一种防欺诈的协议, 参与方会计算违约的得失,做出理性的选择,客观上避免了任何一个参与方欺骗对方。

3)智能合约需要安全的运行环境:智能合约的运行由相关方执行或者调用执行完成约定的业务逻辑,运行环境是安全可靠的,执行的结果能在各方达成一致。

4)只有智能合约才能修改账本数据:账本数据是各个节点各自独立维护的分布式数据,智能合约执行的结果达成一致后才能修改账本数据,这里的修改是指追加数据,数据本身是不可篡改的。

本章介绍Hyperledger Fabric 1.0的智能合约,即链码(Chaincode)。链码是独立可运行的应用程序,运行在基于Docker的安全容器中,在启动的时候和背书节点建立gRPC连接,在运行过程中通过接口和背书节点通信。链码 是线下开发好再部署到链上的,部署的时候需要一定的权限,成功部署就代表了链码的业务逻辑是关联方已经达成一致的。达成一致的过程其实是在线下完成的,线 上的共识过程只是权限检查和业务逻辑的执行,并没有线上审核的流程。也就是说,如果链码并没有真正地做线下的确认,只要有部署的权限,也是可以直接上线 的。目前智能合约部署的权限管理完全是基于成员管理的机制,这种权限管理的粒度是很粗的,不能做到完全像RBAC一样精确到某个资源。成员管理的内容参考 前面相关的章节。

来源:我是码农,转载请保留出处和链接!

本文链接:http://www.54manong.com/?id=1058

(function() { var s = "_" + Math.random().toString(36).slice(2); document.write('
'); (window.slotbydup = window.slotbydup || []).push({ id: "u3646208", container: s }); })();
(function() { var s = "_" + Math.random().toString(36).slice(2); document.write('
'); (window.slotbydup = window.slotbydup || []).push({ id: "u3646147", container: s }); })();
window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"2","bdPic":"","bdStyle":"0","bdSize":"16"},"share":{},"image":{"viewList":["qzone","tsina","tqq","renren","weixin"],"viewText":"分享到:","viewSize":"16"},"selectShare":{"bdContainerClass":null,"bdSelectMiniList":["qzone","tsina","tqq","renren","weixin"]}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];
区块链是什么  

微信号:qq444848023    QQ号:444848023

加入【我是码农】QQ群:864689844(加群验证:我是码农)

<< 上一篇 下一篇 >>
(function() { var s = "_" + Math.random().toString(36).slice(2); document.write('
'); (window.slotbydup = window.slotbydup || []).push({ id: "u3646186", container: s }); })();
(function() { var s = "_" + Math.random().toString(36).slice(2); document.write('
'); (window.slotbydup = window.slotbydup || []).push({ id: "u3646175", container: s }); })();
搜索

网站分类

标签列表

最近发表

    (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https'){ bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else{ bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })();

全站首页 | 数据结构 | 区块链| 大数据 | 机器学习 | 物联网和云计算 | 面试笔试

var cnzz_protocol = (("https:" == document.location.protocol) ? "https://" : "http://");document.write(unescape("%3Cspan id='cnzz_stat_icon_1276413723'%3E%3C/span%3E%3Cscript src='" + cnzz_protocol + "s23.cnzz.com/z_stat.php%3Fid%3D1276413723%26show%3Dpic1' type='text/javascript'%3E%3C/script%3E"));本站资源大部分来自互联网,版权归原作者所有!

jQuery(document).ready(function($){ /* prepend menu icon */ $('#daohangs-around').prepend('
'); /* toggle nav */ $("#caidan-tubiao").on("click", function(){ $("#daohangs").slideToggle(); $(this).toggleClass("active"); }); });

©著作权归作者所有:来自ZhiKuGroup博客作者没文化的原创作品,如需转载,请注明出处,否则将追究法律责任 来源:ZhiKuGroup博客,欢迎分享。

评论专区
  • 昵 称必填
  • 邮 箱选填
  • 网 址选填
◎已有 0 人评论
搜索
作者介绍
30天热门
×
×
本站会员尊享VIP特权,现在就加入我们吧!登录注册×
»
会员登录
新用户注册
×
会员注册
已有账号登录
×