如果我理解正确的话,结构区块链网络中的每个对等体(以某种方式通过八卦互连)只接受来自其他对等体的传入连接,如果它们使用与Fabric CA签名的公钥的HTTPS连接.
那是对的吗?
因此,在我的理解中,Root-CA成为单点故障,因为可以修改它,从那时起,经过修改的Root-CA证书将传播到节点,最终没有节点可以相互连接.
它是否正确?
我尝试运行示例应用程序,如下所示:http://hyperledger-fabric.readthedocs.io/en/release/write_first_app.html
在运行此命令之前,一切看起来都很好: node registerUser
错误:
存储路径:/ Users/johndoe/Desktop/myProject/fabric-samples/fabcar/hfc-key-store从持久性成功加载管理员无法注册:错误:fabric-ca请求寄存器失败,错误[[{"code":0 ,"消息":"未提供身份类型.请提供身份类型"}]]
我通过运行docker logs ca.example.com命令检查日志:
2017/11/08 09:43:07 [DEBUG]成功验证'admin'
2017/11/08 09:43:07 [DEBUG]收到注册申请
2017/11/08 09:43:07 [DEBUG]收到来自admin的注册请求:&{RegistrationRequest:{Name:user1 Type:Secret:<> MaxEnrollments:1 Affiliation:org1.department1 Attributes:[] CAName:}}
2017/11/08 09:43:07 [DEBUG]'user1'注册失败:未提供身份类型.请提供身份类型
2017/11/08 09:43:07 [INFO] 172.18.0.1:60190 - "POST/api/v1/register"0
我在这里错过了吗?我成功运行node enrollAdmin.js并能够在hfc-key-store中获取生成的eCert&key material
如何完全卸载Hyperledger Composer(和底层Hyperledger Fabric),包括所有依赖项,docker镜像和node/npm模块?
我在安装时遵循了以下设置:https://hyperledger.github.io/composer/installing/development-tools.html
我已经做了以下事情:
npm uninstall -g composer-cli
npm uninstall -g composer-rest-server
npm uninstall -g generator-hyperledger-composer
npm uninstall -g yo
npm uninstall -g composer-playground
Run Code Online (Sandbox Code Playgroud) 我尝试将图像上传到分类帐中(将图像转换为 base64 字符串并将其作为交易中的 arg 传递)。
当我发送大小为 30 kb 的图像时,它工作正常,但是对于 100 kb 的图像,我的交易失败了,指出最大大小为 102400。
我的问题是交易的最大大小和块的最大大小是多少?
尝试启动第一个超级账本网络时出现此错误:
$ ./byfn.sh -m up
Starting with channel 'mychannel' and CLI timeout of '10' seconds and CLI delay of '3' seconds
Continue? [Y/n] y
proceeding ...
2018-05-13 07:33:04.240 UTC [main] main -> INFO 001 Exiting.....
LOCAL_VERSION=1.1.0
DOCKER_IMAGE_VERSION=1.1.0
Starting peer1.org1.example.com ... done
Starting peer1.org2.example.com ... done
Starting peer0.org1.example.com ... done
Starting peer0.org2.example.com ... done
Starting orderer.example.com ... done
cli is up-to-date
OCI runtime exec failed: exec failed: container_linux.go:348: starting container process caused "exec: \"scripts/script.sh\": stat scripts/script.sh: no such file or directory": …Run Code Online (Sandbox Code Playgroud) 为了避免错误和编写高效的 Hyperledger Fabric Chaincode,应该遵循哪些最佳实践?
我一直在关注 Hyperledger Fabric Multi-Org setup 的教程,我能够成功地做到这一点。现在我想根据我想要的组织名称对其进行自定义,并且在尝试连接网络时遇到以下错误。希望有人能帮我找出问题所在。提前致谢。
在https://hyperledger-fabric.readthedocs.io/en/release-1.2/endorsement-policies.html上的背书政策语法文档中, 声明主体被定义为 MSP.ROLE,其中 MSP 是 MSP ID 和 ROLE是成员、管理员、客户或同级
在显示的示例中,主要使用成员。声明“MSP.member”意味着“任何成员”,但什么是成员?目前,由于我们使用的大多数背书策略都遵循该语法,因此我们假设这意味着任何对等点?但也有“MSP.peer”的例子。
由于这是一个背书政策,它检查交易是否已被背书,何时使用“admin”和“client”?(因为管理员或客户似乎不可能为交易背书)。
是否有关于何时使用成员、管理员、客户和对等方的背书政策的明确指南?
我正在尝试使用 Fabric 1.4 中的服务发现功能。我的网络是默认的,每个组织有 2 个组织和 2 个对等点。我尝试通过服务发现功能调用链码,而不是设置特定的目标对等点。(在使用服务发现之前,我在交易提案请求对象的目标属性中设置了特定的背书者。)
为了使用服务发现,我discover: true在我的连接配置文件中设置为 peers。然后,我简单地将下面的代码添加到我的invoke函数中。
await channel.initialize({ discover: true, asLocalhost: true })
Run Code Online (Sandbox Code Playgroud)
按照fabric-node-sdk文档中的教程,我更改了每个peer的端口以在docker-compose网络中使用服务发现。
一切正常,包括创建通道、安装链代码和实例化链代码。此外,如果我不使用服务发现功能,调用链码也能正常工作。
但是,如果我await channel.initialize({ discover: true, asLocalhost: true })在我的invoke函数中添加,这个initialize函数会抛出如下错误:
Error: No endorsement plan available for {"chaincodes":[{"name":"etri-bcdms-token-chaincode"}]}
Run Code Online (Sandbox Code Playgroud)
(我在实例化过程中设置了我的背书策略)
在对等方中,打印以下日志:
Failed constructing descriptor for chaincode chaincodes:<name:"etri-bcdms-token-chaincode" > ,: cannot satisfy any principal combination
Run Code Online (Sandbox Code Playgroud)
我的调用函数的完整代码如下:
const client = this._useFabricCA
? await getUserClient(orgID, userID)
: await getOrgAdminClient(orgID)
if (!client) {
throw Error(`failed to get …Run Code Online (Sandbox Code Playgroud)