hyperledger / indy-plenum

Plenum Byzantine Fault Tolerant Protocol
https://wiki.hyperledger.org/display/indy
Apache License 2.0
215 stars 370 forks source link

Tests using the sdk fail on the master branch #721

Closed lovesh closed 6 years ago

lovesh commented 6 years ago

Tests (majority) on master branch that require indy-sdk fail on the call to open_pool_ledger which is calling indy_open_pool_ledger. Easiest way to reproduce is to run plenum/test/sdk/test_sdk_bindings.py. The same tests work on older branches, the difference being the format of genesis files. Failing test have this genesis file (new txn format)

{"reqSignature":{},"txn":{"data":{"data":{"alias":"Alpha","blskey":"p2LdkcuVLnqidf9PAM1josFLfSTSTYuGqaSBx2Dq72Z5Kt2axQicYyqkQ6ZfcwzHpmLevmcXVwD4EC32wTbusvYxb5D1MJBfu67SQqxRTcK7pRBQXYiaPrzqUo9odhAgrwNPSbHcBJM6s5cNUPvjZZDuSJvhjC7tKFV9FGqyX4Zs4u","client_ip":"127.0.0.1","client_port":6152,"node_ip":"127.0.0.1","node_port":6151,"services":["VALIDATOR"]},"dest":"JpYerf4CssDrH76z7jyQPJLnZ1vwYgvKbvcp16AB5RQ"},"metadata":{"from":"MSjKTWkPLtYoPEaTF1TUDb"},"type":"0"},"txnMetadata":{"seqNo":1,"txnId":"b1a96dd646bccaa24cef7a3db22a6f995f05658f4f1c3272913e258c03e6fb24"},"ver":"1"}
{"reqSignature":{},"txn":{"data":{"data":{"alias":"Beta","blskey":"2JY8jXAiy3ffLu1ggSaiFTBpmb9X7wUZEedg7G3mJSU1vCnqFzYAofGR9SGEvb1C3p88Kdm2CPAdMyMc5v9KxL26vfeeHzRa2N5EHwV1JpPH5kcdYYkFhgNf8wxFAvJ9vPS1aCVms41ZC17GeovJLh4L2iACNd7ttPyS5M6a9Uux9oz","client_ip":"127.0.0.1","client_port":6154,"node_ip":"127.0.0.1","node_port":6153,"services":["VALIDATOR"]},"dest":"DG5M4zFm33Shrhjj6JB7nmx9BoNJUq219UXDfvwBDPe2"},"metadata":{"from":"E4rYSWBUA12j5ScG6mie1p"},"type":"0"},"txnMetadata":{"seqNo":2,"txnId":"703390318bd55aef50b7823d2b90a846debff99e6e3d401a24a921b733912a6d"},"ver":"1"}
{"reqSignature":{},"txn":{"data":{"data":{"alias":"Gamma","blskey":"1JwRChBPGQTtp4m4aNBRrf2kG3mzgxtRUTAscx8iV9uDih34pKWnEA54CoNq3DhAgEURQCN6VKrSZUb6zzzLBHhQt7HBdw2kbfUR3Fap2jqE6TEDamFQpqced2GRVcDo5wgVVKydsf1rFundAk7jMSk7mLrf7zBBN9xBx2yaUkvueN","client_ip":"127.0.0.1","client_port":6156,"node_ip":"127.0.0.1","node_port":6155,"services":["VALIDATOR"]},"dest":"AtDfpKFe1RPgcr5nnYBw1Wxkgyn8Zjyh5MzFoEUTeoV3"},"metadata":{"from":"QxzxUA7gePtb9t46n1YgsC"},"type":"0"},"txnMetadata":{"seqNo":3,"txnId":"a8ab3d5805c9214bc66b794f599cbccd5a5958dc5a6a322ee81e3a68344c6db7"},"ver":"1"}
{"reqSignature":{},"txn":{"data":{"data":{"alias":"Delta","blskey":"4kkk7y7NQVzcfvY4SAe1HBMYnFohAJ2ygLeJd3nC77SFv2mJAmebH3BGbrGPHamLZMAFWQJNHEM81P62RfZjnb5SER6cQk1MNMeQCR3GVbEXDQRhhMQj2KqfHNFvDajrdQtyppc4MZ58r6QeiYH3R68mGSWbiWwmPZuiqgbSdSmweqc","client_ip":"127.0.0.1","client_port":6158,"node_ip":"127.0.0.1","node_port":6157,"services":["VALIDATOR"]},"dest":"4yC546FFzorLPgTNTc6V43DnpFrR8uHvtunBxb2Suaa2"},"metadata":{"from":"WMStfRmANynUmdpa1QYKDw"},"type":"0"},"txnMetadata":{"seqNo":4,"txnId":"18833da39fb9b7f8c917fe0220daf9cf12e6524df8fb16e39f04dbe827e2d200"},"ver":"1"}

Passing tests have this genesis file (old txn format)

{"data":{"alias":"Alpha","blskey":"p2LdkcuVLnqidf9PAM1josFLfSTSTYuGqaSBx2Dq72Z5Kt2axQicYyqkQ6ZfcwzHpmLevmcXVwD4EC32wTbusvYxb5D1MJBfu67SQqxRTcK7pRBQXYiaPrzqUo9odhAgrwNPSbHcBJM6s5cNUPvjZZDuSJvhjC7tKFV9FGqyX4Zs4u","client_ip":"127.0.0.1","client_port":6144,"node_ip":"127.0.0.1","node_port":6143,"services":["VALIDATOR"]},"dest":"JpYerf4CssDrH76z7jyQPJLnZ1vwYgvKbvcp16AB5RQ","identifier":"MSjKTWkPLtYoPEaTF1TUDb","type":"0"}
{"data":{"alias":"Beta","blskey":"2JY8jXAiy3ffLu1ggSaiFTBpmb9X7wUZEedg7G3mJSU1vCnqFzYAofGR9SGEvb1C3p88Kdm2CPAdMyMc5v9KxL26vfeeHzRa2N5EHwV1JpPH5kcdYYkFhgNf8wxFAvJ9vPS1aCVms41ZC17GeovJLh4L2iACNd7ttPyS5M6a9Uux9oz","client_ip":"127.0.0.1","client_port":6146,"node_ip":"127.0.0.1","node_port":6145,"services":["VALIDATOR"]},"dest":"DG5M4zFm33Shrhjj6JB7nmx9BoNJUq219UXDfvwBDPe2","identifier":"E4rYSWBUA12j5ScG6mie1p","type":"0"}
{"data":{"alias":"Gamma","blskey":"1JwRChBPGQTtp4m4aNBRrf2kG3mzgxtRUTAscx8iV9uDih34pKWnEA54CoNq3DhAgEURQCN6VKrSZUb6zzzLBHhQt7HBdw2kbfUR3Fap2jqE6TEDamFQpqced2GRVcDo5wgVVKydsf1rFundAk7jMSk7mLrf7zBBN9xBx2yaUkvueN","client_ip":"127.0.0.1","client_port":6148,"node_ip":"127.0.0.1","node_port":6147,"services":["VALIDATOR"]},"dest":"AtDfpKFe1RPgcr5nnYBw1Wxkgyn8Zjyh5MzFoEUTeoV3","identifier":"QxzxUA7gePtb9t46n1YgsC","type":"0"}
{"data":{"alias":"Delta","blskey":"4kkk7y7NQVzcfvY4SAe1HBMYnFohAJ2ygLeJd3nC77SFv2mJAmebH3BGbrGPHamLZMAFWQJNHEM81P62RfZjnb5SER6cQk1MNMeQCR3GVbEXDQRhhMQj2KqfHNFvDajrdQtyppc4MZ58r6QeiYH3R68mGSWbiWwmPZuiqgbSdSmweqc","client_ip":"127.0.0.1","client_port":6150,"node_ip":"127.0.0.1","node_port":6149,"services":["VALIDATOR"]},"dest":"4yC546FFzorLPgTNTc6V43DnpFrR8uHvtunBxb2Suaa2","identifier":"WMStfRmANynUmdpa1QYKDw","type":"0"}

It looks like indy-sdk is not able to parse new txn format

By using the libindy.so and libindy-crypto.so build from master branch from respective repositories, i get the error _load_cdll: Can't load libindy: .... libindy.so: undefined symbol: crypto_pwhash while running plenum tests (try running the file mentioned above). I have libsodium18 and libsodium18-dev installed, do i need a newer version of libsodium for crypto_pwhash?

ashcherbakov commented 6 years ago

What version of libindy do you use? Please note, that SDK needs to be updated locally from time to time. The version is pinned in setup files. The required version of SDK: