yeasy / blockchain_guide Goto Github PK
View Code? Open in Web Editor NEWIntroduce blockchain related technologies, from theory to practice with bitcoin, ethereum and hyperledger.
Home Page: https://yeasy.gitbook.io/blockchain_guide/
Introduce blockchain related technologies, from theory to practice with bitcoin, ethereum and hyperledger.
Home Page: https://yeasy.gitbook.io/blockchain_guide/
PDF显示为白色小方块
epub显示为带有?的小方块
我的mac系统
第四章,Paxos 算法与 Raft 算法节中,
98行原文:Raft 算法的主要设计**与 ZAB 类型,
应该改为:Raft 算法的主要设计**与 ZAB 类似。
I try convert the language to english but seems i loss many nuance and information. So it's hard to understand. could you make the english version? so all people in the whole world can read this guide.
thanks
Gun Gun Febrianza
您好:
想請問你個基本的問題
目前我把自己的 fabric 環境建立好,chaincode 也已經部屬完畢
現在我需要部屬一個 client 端的 APP (Nodejs)
但我疑惑在這
因為官方提供的 Application 的範例中,有個 cred 資料夾
裡面放了 其中一個節點的私鑰跟公鑰,這看起來是為了這個範例所產生出來的
這個看起來似乎是必要的?
還是說 如果有架設好 fabric-ca 就不需要這個公私鑰?
(以上問題可能是我理解錯誤)
At repo hyperledger/fabric-protos, transactions are defined simply as:
message Transaction {
// The payload is an array of TransactionAction. An array is necessary to
// accommodate multiple actions per transaction
repeated TransactionAction actions = 1;
}
while [at book] (https://github.com/yeasy/blockchain_guide/blob/master/fabric_design/design.md), transactions are much more complex:
message Transaction {
enum Type {
UNDEFINED = 0;
// deploy a chaincode to the network and call `Init` function
CHAINCODE_DEPLOY = 1;
// call a chaincode `Invoke` function as a transaction
CHAINCODE_INVOKE = 2;
// call a chaincode `query` function
CHAINCODE_QUERY = 3;
// terminate a chaincode; not implemented yet
CHAINCODE_TERMINATE = 4;
}
Type type = 1;
//store ChaincodeID as bytes so its encrypted value can be stored
bytes chaincodeID = 2;
bytes payload = 3;
bytes metadata = 4;
string uuid = 5;
google.protobuf.Timestamp timestamp = 6;
ConfidentialityLevel confidentialityLevel = 7;
string confidentialityProtocolVersion = 8;
bytes nonce = 9;
bytes toValidators = 10;
bytes cert = 11;
bytes signature = 12;
}
Just wonder if it is caused by version update or is the book trying to give the whole picture on this?
Besides, later in the section, it says World State is stored as a merkely tree but I could not find the source on fabric documentation, could you point me to the source of the writing?
Thank you very much!
对于fabric网络压测,如何能直接对orderer节点进行压测,不通过peer节点背书,直接构造orderer request,感谢回答
Error: got unexpected status: BAD_REQUEST -- error validating channel creation transaction for new channel 'businesschannel', could not successfully apply update to template configuration: error authorizing update: error validating DeltaSet: policy for [Group] /Channel/Application not satisfied: implicit policy evaluation failed - 0 sub-policies were satisfied, but this policy requires 1 of the 'Admins' sub-policies to be satisfied.
。
我的是 spyhole ,谢谢
您好!
我在看您的《区块链:原理、设计与应用》,10.4.1章节也提到了orderer集群。
但是具体怎么配置呢?
您的例子都是指定一个orderer,请问如何指定多个orderer。
我看有的人说就正常建立多个orderer节点,orderer都是用同一个kafka,
peer channel create -o 任意指定一个orderer就可以,后续kafka会分配给某个orderer处理。
也有人说通过HAProxy反向代理到某个orderer。
您能指点一下吗,不胜感谢。
The example chaincode occurs error messages while go build:
https://yeasy.gitbooks.io/blockchain_guide/content/hyperledger/chaincode_examples/chaincode_example03.go
root@peer0:~# ls
chaincode_example03.go
root@peer0:~# go build
# _/root
./chaincode_example03.go:57: cannot use new(SimpleChaincode) (type *SimpleChaincode) as type shim.Chaincode in argument to shim.Start:
*SimpleChaincode does not implement shim.Chaincode (wrong type for Init method)
have Init(*shim.ChaincodeStub, string, []string) ([]byte, error)
want Init(shim.ChaincodeStubInterface) peer.Response
root@peer0:~#
How can I solve this problem? Thanks a lot.
参考:Hyperledger Besu 的解释Ethereum networks have two identifiers, a network ID and a chain ID. Although they often have the same value, they have different uses.
您好,这个问题困扰我很久,因为像公有链,每个电脑都是一个节点,能够拿到全部账本。
而Fabric又应该怎么部署呢,如果三家企业想做一份儿账本,那么应该由谁来出服务器?其中的peer节点应该部署在哪家企业里?如果每家企业都要部署peer节点,那么endorsing peer和commit peer又应该怎样分配,orderer节点又放在哪里呢?
如果都放在一个地方岂不是中心化的了
未revoke身份的情况下,对同一个身份enroll两次会有何影响?
1)首次enroll的用户还能正常交互吗?
2)第二次enroll的用户是否合法?
Hi Yeasy,
I read your pdf blockchain_guide today. And it's amazing. Thanks for sharing your knowledge about blockchain and this cookbook is quite helpful to construct a overall sight in blockchain.
But there is a problem related to the PDF version. Some of the formula can not present correctly.
For example, in page 57.
多于Fomula的叛变者时有没有可能有解决方案
I have tried build-in PDF reader in Mac Chrome Version 54.0.2840.98 (64-bit) and Mac Adobe Acrobat Reader Version 2015.009.20069.
Hope it can help you.
Thanks
想在非盈利性质区块链社区转载这本书,不知道可以吗?
42页 “注:著名黑客凯文•米特尼克(Kevin D. Mitnick)所著的《反欺骗的艺术——世界传奇黑客的
经历分享》一书中分享了大量的真实社交工程欺骗案例。” 一句中使用的“社交工程”大陆一般用“社会工程”。
版主好,本人详细阅读了blockchain_guide.pdf的相关内容,对于Fabric性能这块有些疑问。性能与评测一章中提到Fabric0.6版本的单客户端连接情况下,tps 基本在 190 ~ 300 范围内。那Fabric1.0版本您测试过吗?大体性能是多少?前几天Fabric1.0已经释放了,我在本机测试了一下性能,invoke操作的tps数只有20左右,而且1000并发下,后台还会报一些错误。这个跟Fabric0.6的性能测试结果差距很大,不解是什么原因?另外,Fabric1.0中有batch操作的API吗?
付款人资金的来源交易 ID:从哪个交易的输出作为本次交易的输入;是不是应该是付款人资金的来源交易 ID:从哪个交易的输入作为本次交易的输出;
I have been following this repo for sometime now.
I have to copy things to Google translate per page and then figure things out.
Will it be possible to put forth an English version {using auto translate itself}.
Will become much easier to read. If you know a way and I can help, do let me know.
Thanks!
P
I want to know the watch only wallet of Blockchain recovery phrase.
在线等
大神你好,
阅读中发现区块链应用开发的“简介”页和“链上代码工作原理”页是空白,这个会考虑填上吗
典型应用场景 -> 金融服务小节里提到:
Abra:区块链数字钱包,无需银行账户和手续费
这句话不太准确,据我所了解,Abra是要收手续费的,拥有当地货币的teller有权决定费率。
您好!我参照您书中的"权限管理"的样例,注册用户时出现如下错误:
curl -i -H "Accept:application/json" -H "Content-Type:application/json" -X POST -d "{"enrollId":"wukai","enrollSecret":"123456"}" 127.0.0.1:5000/registrar
HTTP/1.1 401 Unauthorized
Access-Control-Allow-Headers: accept, content-type
Access-Control-Allow-Origin: *
Content-Type: application/json
Date: Wed, 13 Jul 2016 01:08:05 GMT
Content-Length: 91
{"Error": "rpc error: code = 2 desc = 'Identity lookup error: sql: no rows in result set'"}root@vp2:/#
能帮忙解决吗,谢谢!
頁碼: 300頁
錯誤: Pustate
糾正: PutState
i run chaincode_example05.go as a example and find some errors.
for example:line 368: err !- nil, it should be err != nil
line 284 getHomeById,this func undefined
is this file on edit or finished?
原文:
小结
无论如何,区块链确实是第一个试图做公开、中立、匿名化的分布式数据库的系统。它的出
现,让大家意识到除了互联网这样的基础设施外,数据库系统也可以成为公共基础设施。而
且像比特币这样的例子,给与了区块链更多的遐想空间。如果交易**无法造价**,信息**无法造
价**,世界是不是会多了一些算法来保证的公平呢?这是又一次用技术给人类发展带来进步的
福利。
“造价“应为”造假“
章节 1-4 中有这么一段:
客户端发起一项交易后,会广播到网络中并等待确认。网络中的节点会将一些等待确认的交易记录打包在一起(此外还要包括此前区块的哈希值等信息),组成一个候选区块。然后,试图找到一个 nonce 串放到区块里,使得候选区块的 hash 结果满足一定条件(比如小于某个值)。一旦算出来这个区块在格式上就合法了,就可以进行全网广播。
可能是我理解有误,对这里有几点疑问:
在某个节点“将等待确认的交易记录打包”的时候,不同的节点打包的几个交易记录可能是不一样的?这里我的理解是:比如现在整个网络中有 100 个客户端发起交易广播出来待确认,节点 A 收到 30 个就打包这 30 个组成候选区块,节点 B 收到 40 个就打包那 40 个。谁先计算完,那一批交易就算完成。
假如某个节点在打包候选区块的时候加入虚假记录(比如把别人的钱转给自己),又首先计算完成进行全网广播,岂不是形成攻击。这个行为是怎么避免的?
Hi, just wonder which license is used, is it okay to use content from this project on WeChat post? Thank you.
Hi All –
We are trying to implement Blockchain program using one of the sample program (SimpleSample.JAVA) listed out in the below link. We are able to setup the environment to execute the program in Windows10 operating system. But, when we test it from SOAPUI with URL http:\localhost:7050 with HTTP METHOD GET/POST, we get an error saying ‘- ERROR GETTING RESPONSE; ORG.APACHE.HTTP.NOHTTPRESPONSEEXCEPTION: THE TARGET SERVER FAILED TO RESPOND’.
Need your inputs on how this can be rectified to run the Blockchain program? The Blockchain program is successfully registered with the Docker. We got stuck post trying from the URL.
Linked followed for the implementation: https://www.ibm.com/developerworks/library/j-chaincode-for-java-developers/index.html
File – SIMPLESAMPLE.JAVA
With Regards,
Senthil R.
您好 请问怎么在fabric中怎么插入自定义model数据
零知识证明:例如如何证明某个数据(D0……D3)中包括给定内容 D0,很简单,构造一个默克尔树,公布 N0,N1,N4,Root,D0 拥有者可以很容易检测 D0 存在,但不知道其它内容。
为什么拥有者不直接公布 N0 ,那么,D0拥有者就可以信任对方拥有内容 D0。
因为D0拥有者不知道其他数据,N1, N4, Root 给他没用, 也无法验证正确性啊。
About zero-knowledge proof in Merkle tree.
Why not just use N0 as the proof of owning D0?
e.g., /born --> /01_history.
SUMMARY.md should also be updated.
Any project for English translation of the documentation ?
gitbook第108页非对称加密算法中,椭圆曲线算法第一句,应用最广也是强度最早(高)的系列算法
请问为什么 并且
当
版主好,我使用Fabric1.0,并用官方提供的资产转移的示例,在并发测试时报异常,异常信息如下:
java.lang.RuntimeException: java.util.concurrent.ExecutionException: org.hyperledger.fabric.sdk.exception.TransactionEventException:
Received invalid transaction event. Transaction ID 908eb057a2ccaefacf39ee95ba4c9c15e4a4173ca0877bd4f3d32ac8b71e6f09 status 11
状态码:11,的定义如下:
感觉是并发读冲突了。。这个问题您之前在做性能测试时有遇到过吗?如何解决的?
Hi @yeasy
Could provide what tools you used to evaluate Hyperledger??
I want to reproduce the experiments
Hyperledger Fabric v0.6 性能评测
2016 年 3Q,发布 Metropolis;
2017 年 1Q,发布 Serenity,发布区块链的 PoS 股权证明(Casper)版本。
根据coindesk,Metropolis 主网预计在2017年10月初发布,Serenity预计在2018年初上线。
谢谢您的邮件,我已收到,我会尽快给您回复。
Originally posted by @SirKong in #128 (comment)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.