Hyperledger indy-node 入门示例

Getting Started with Libindy

原文

vagrant@agent01:~$ python /usr/local/lib/python3.5/dist-packages/indy_client/test/agent/faber.py  --port 5555 
  File "/usr/local/lib/python3.5/dist-packages/indy_client/test/agent/faber.py", line 99
    async def bootstrap_faber(agent):
            ^
SyntaxError: invalid syntax
 

agent01执行

sudo python3 /usr/local/lib/python3.5/dist-packages/indy_client/test/agent/faber.py  --port 5555 --network 10.20.30.101

Python版本不对使用 Python3执行

python3 /usr/local/lib/python3.5/dist-packages/indy_client/test/agent/thrift.py  --port 7777 --network 10.20.30.301
vagrant@agent01:~$ sudo python3 /usr/local/lib/python3.5/dist-packages/indy_client/test/agent/faber.py  --port 5555 --network 10.20.30.101
Loading module /usr/local/lib/python3.5/dist-packages/config/config-crypto-example1.py
Module loaded.
DEBUG:root:Starting ledger...
DEBUG:root:Recovering tree from transaction log
DEBUG:root:Recovered tree in 0.0369103080001878 seconds
INFO:stp_core.common.log:e5f48c updated its pool parameters: f 0, totalNodes 0,minNodesToConnect 1, quorums {'ledger_status_last_3PC': Quorum(1), 'reply': Quorum(1), 'propagate_primary': Quorum(1), 'commit': Quorum(0), 'timestamp': Quorum(1), 'propagate': Quorum(1), 'bls_signatures': Quorum(0), 'view_change_done': Quorum(0), 'observer_data': Quorum(1), 'consistency_proof': Quorum(1), 'prepare': Quorum(-1), 'election': Quorum(0), 'view_change': Quorum(0), 'ledger_status': Quorum(-1), 'f': 0, 'same_consistency_proof': Quorum(1), 'checkpoint': Quorum(-1)}
INFO:stp_core.common.log:Signing and Encryption keys were not found for AzcXADWb5Bm3KzA52giotCnRZcgD4cpaxwCmbYHLkEKi. Creating them now
INFO:stp_core.common.log:Client e5f48c found an empty node registry:
DEBUG:plugin-loader:Plugin loading started to load plugins from plugins_dir: /home/vagrant/.indy-cli/networks/10.20.30.101
DEBUG:plugin-loader:Total plugins loaded from plugins_dir /home/vagrant/.indy-cli/networks/10.20.30.101 are : 0
DEBUG:asyncio:Using selector: EpollSelector
INFO:stp_core.common.log:Starting up indy-node
INFO:stp_core.common.log:Signing and Encryption keys were not found for FaberCollege. Creating them now
DEBUG:zmq.auth:Starting ZAP at inproc://zeromq.zap.1
DEBUG:zmq.auth:Allowing 0.0.0.0
DEBUG:zmq.auth:Configure curve: *[*]
INFO:stp_core.common.log:CONNECTION: AzcXADWb5Bm3KzA52giotCnRZcgD4cpaxwCmbYHLkEKi listening for other nodes at 0.0.0.0:6001
DEBUG:zmq.auth:Starting ZAP at inproc://zeromq.zap.2
DEBUG:zmq.auth:Allowing 0.0.0.0
DEBUG:zmq.auth:Configure curve: *[*]
INFO:stp_core.common.log:Running Faber College now (port: 5555)
INFO:stp_core.common.log:Signature accepted.
INFO:stp_core.common.log:Creating identifier [Xg8i7BC3UMWVBJvKQn9qxq] in indy
ERROR:stp_core.common.log:is_connected failed; not trying any more because 120 seconds have passed; args were (<indy_client.agent.walleted_agent.WalletedAgent object at 0x7f9f696b2208>,)
ERROR:stp_core.common.log:Error while running coroutine wait_until_connected: NotConnectedToNetwork("Client hasn't finished catch-up with Pool Ledger yet or doesn't have sufficient number of connections",)
INFO:stp_core.common.log:Looper shutting down now...
INFO:stp_core.common.log:Active wallet "Faber College" saved (/home/vagrant/.indy-cli/wallets/agents/faber-college/faber college.wallet)
INFO:stp_core.common.log:Active wallet "issuer" saved (/home/vagrant/.indy-cli/wallets/agents/faber-college/issuer/issuer.wallet)
INFO:stp_core.common.log:stack AzcXADWb5Bm3KzA52giotCnRZcgD4cpaxwCmbYHLkEKi closing its listener
DEBUG:zmq.auth:Stopping ZAP at b'inproc://zeromq.zap.1'
INFO:stp_core.common.log:stack AzcXADWb5Bm3KzA52giotCnRZcgD4cpaxwCmbYHLkEKi stopped
INFO:stp_core.common.log:stack FaberCollege closing its listener
DEBUG:zmq.auth:Stopping ZAP at b'inproc://zeromq.zap.2'
INFO:stp_core.common.log:stack FaberCollege stopped
INFO:stp_core.common.log:Looper shut down in 0.037 seconds.
ERROR:stp_core.common.log:

------------------------------------------------------------------ERROR------------------------------------------------------------------
  Agent startup failed: [cause : Client hasn't finished catch-up with Pool Ledger yet or doesn't have sufficient number of connections]
------------------------------------------------------------------ERROR------------------------------------------------------------------

sys:1: RuntimeWarning: coroutine 'bootstrap_faber' was never awaited

启动失败,未找到解决方法!

indy@sandbox> send NYM dest=ULtgFQJe6bjiFbs7ke3NJD role=TRUST_ANCHOR verkey=~7TYfekw4GUagBnBVCqPjiC
indy@sandbox> send NYM dest=CzkavE58zgX7rUMrzSinLr role=TRUST_ANCHOR verkey=~WjXEvZ9xj4Tz9sLtzf7HVP
indy@sandbox> send NYM dest=H2aKRiDeq8aLZSydQMDbtf role=TRUST_ANCHOR verkey=~3sphzTb2itL2mwSeJ1Ji28
indy@sandbox> send NYM dest=ULtgFQJe6bjiFbs7ke3NJD role=TRUST_ANCHOR verkey=~7TY
fekw4GUagBnBVCqPjiC
Adding nym ULtgFQJe6bjiFbs7ke3NJD
Error: client request invalid: UnauthorizedClientRequest('Th7MpTaRZVRYnPiabds81Y is neither Trustee nor owner of ULtgFQJe6bjiFbs7ke3NJD',)
ALICE@sandbox> show connection Faber
Expanding Faber to "Faber College"
Connection (not yet accepted)
    Name: Faber College
    DID: Xg8i7BC3UMWVBJvKQn9qxq
    Trust anchor: Faber College (not yet written to Indy)
    Verification key: ~5nswJ7znpkFRni1oXTh73b
    Signing key: <hidden>
    Remote: ULtgFQJe6bjiFbs7ke3NJD
    Remote Verification key: ~5kh3FB4H3NKq7tUDqeqHc1
    Remote endpoint: 10.20.30.101:5555
    Request nonce: b1134a647eb818069c089e7694f63e6d
    Request status: not verified, remote verkey unknown
    Last synced: an hour ago

Try Next:
    sync "Faber College"
    accept request from "Faber College"

欢迎大家一起加入讨论!!!

猜你喜欢

转载自blog.csdn.net/wxb880114/article/details/80952886