是否可以将带有机器人的daml智能合约部署到Hyperledger Fabric?

问题描述 投票:0回答:1

我基于示例“ fabl-on-fabric” https://github.com/hacera/daml-on-fabric部署了快速入门教程,此后,我尝试从dazl https://github.com/digital-asset/dazl-client/tree/master/samples/ping-pong部署pingpong示例。该示例中的机器人在daml ledger上运行良好。但是,当我尝试在光纤网络上部署此示例时,机器人无法发送交易。根据https://github.com/hacera/daml-on-fabric/blob/master/README.md的说明,一切正常。智能合约看起来像要部署在Fabric上。错误是当我尝试使用来自乒乓python文件https://github.com/digital-asset/dazl-client/blob/master/samples/ping-pong/README.md

的机器人时
I receive this error:

[  ERROR] 2020-03-10 15:40:57,475 | dazl    | A command submission failed!
Traceback (most recent call last):
  File "/home/vasisiop/.local/share/virtualenvs/ping-pong-sDNeps76/lib/python3.7/site-packages/dazl/client/_party_client_impl.py", line 415, in main_writer
    await submit_command_async(client, p, commands)
  File "/home/vasisiop/anaconda3/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/home/vasisiop/.local/share/virtualenvs/ping-pong-sDNeps76/lib/python3.7/site-packages/dazl/protocols/v1/grpc.py", line 42, in <lambda>
    lambda: self.connection.command_service.SubmitAndWait(request))
  File "/home/vasisiop/.local/share/virtualenvs/ping-pong-sDNeps76/lib/python3.7/site-packages/grpc/_channel.py", line 824, in __call__
    return _end_unary_response_blocking(state, call, False, None)
  File "/home/vasisiop/.local/share/virtualenvs/ping-pong-sDNeps76/lib/python3.7/site-packages/grpc/_channel.py", line 726, in _end_unary_response_blocking
    raise _InactiveRpcError(state)
grpc._channel._InactiveRpcError: <_InactiveRpcError of RPC that terminated with:
    status = StatusCode.INVALID_ARGUMENT
    details = "Party not known on ledger"
    debug_error_string = "{"created":"@1583847657.473821297","description":"Error received from peer ipv6:[::1]:6865","file":"src/core/lib/surface/call.cc","file_line":1056,"grpc_message":"Party not known on ledger","grpc_status":3}"
>

[  ERROR] 2020-03-10 15:40:57,476 | dazl    | An event handler in a bot has thrown an exception!
Traceback (most recent call last):
  File "/home/vasisiop/.local/share/virtualenvs/ping-pong-sDNeps76/lib/python3.7/site-packages/dazl/client/bots.py", line 157, in _handle_event
    await handler.callback(new_event)
  File "/home/vasisiop/.local/share/virtualenvs/ping-pong-sDNeps76/lib/python3.7/site-packages/dazl/client/_party_client_impl.py", line 415, in main_writer
    await submit_command_async(client, p, commands)
  File "/home/vasisiop/anaconda3/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/home/vasisiop/.local/share/virtualenvs/ping-pong-sDNeps76/lib/python3.7/site-packages/dazl/protocols/v1/grpc.py", line 42, in <lambda>
    lambda: self.connection.command_service.SubmitAndWait(request))
  File "/home/vasisiop/.local/share/virtualenvs/ping-pong-sDNeps76/lib/python3.7/site-packages/grpc/_channel.py", line 824, in __call__
    return _end_unary_response_blocking(state, call, False, None)
  File "/home/vasisiop/.local/share/virtualenvs/ping-pong-sDNeps76/lib/python3.7/site-packages/grpc/_channel.py", line 726, in _end_unary_response_blocking
    raise _InactiveRpcError(state)
grpc._channel._InactiveRpcError: <_InactiveRpcError of RPC that terminated with:
    status = StatusCode.INVALID_ARGUMENT
    details = "Party not known on ledger"
    debug_error_string = "{"created":"@1583847657.473821297","description":"Error received from peer ipv6:[::1]:6865","file":"src/core/lib/surface/call.cc","file_line":1056,"grpc_message":"Party not known on ledger","grpc_status":3}"
python virtualenv hyperledger-fabric daml
1个回答
0
投票

根据错误消息,似乎在快速入门示例中定义的参与方尚未分配到分类帐上,因此出现“分类帐上未知的参与者”错误。

您可以使用daml deploy --host = --port =来遵循https://docs.daml.com/deploy/index.html中的步骤,这将同时上传dars并在分类帐上分配各方。

[您也可以只运行分配方命令daml ledger dispatch-parties,它将基于您为daml.yaml定义的各方进行分配。

© www.soinside.com 2019 - 2024. All rights reserved.