Details
-
Bug
-
Status: Complete
-
Medium
-
Resolution: Done
-
None
-
None
-
None
-
None
-
OS: ubuntu16.04
Libindy: 1.3.0
Wrapper: python
indy-node: 1.2.50
indy-plenum: 1.2.29
indy-anoncred: 1.0.11
sovrin: 1.1.7
-
Sprint 18.05
Description
When I use libindy to build and submit schema request to ledger, I realize that ledger can accept the schema whose 'attr_names' is an empty list.
Reproduce steps when using libindy.
Step | Data | |
1 | Create a pool ledger config. pool.create_pool_ledger_config(pool_name, pool_config). |
pool_name = 'test_pool' pool_config = {'genesis_txn': pool_transactions_sandbox_genesis} |
2 | Open pool ledger and get 'pool_handle'. pool.open_pool_ledger(pool_name). |
pool_name = 'test_pool' |
3 | Create a wallet. wallet.create_wallet(pool_name, wallet_name, None, None, None). |
pool_name = 'test_pool' wallet_name = 'test_wallet' |
4 | Open wallet and get 'wallet_handle'. wallet.open_wallet(wallet_name, None, None). |
wallet_name = 'test_wallet' |
5 | Create and store did of default trustee as 'did_default_trustee'. signus.create_and_store_my_did(wallet_handle, did_json). |
wallet_handle in step 4. did_json = '{'seed': '000000000000000000000000Trustee1'}'. |
6 | Build schema request and store created request as 'schema_req'. ledger.build_schema_request(submitter_did, schema_json). |
submitter_did = did_default_trustee. schema_json = '{'name': 'test', 'version': '1.0', 'attr_names': []}' |
7 | Submit 'schema_req' to ledger by role steward. ledger.sign_and_submit_request(pool_handle, wallet_handle, submitter_did, schema_req). |
pool_handle in step 2. wallet_handle in step 4. submitter_did = did_default_trustee. schema_req in step 9. |
Expected result: SDK throws an error when the parameters it receives are incorrect.
Actual result: ledger accepts the request.
However, when I execute command manually in CLI to submit schema request, the program works well with 'keys' parameter that is not assigned to any value.
Reproduce steps when executing manually:
- Open command prompt.
- Execute command 'indy'.
- Execute command 'connect sandbox'.
- Execute command 'new key with seed 000000000000000000000000Trustee1'.
- Execute command 'send SCHEMA name=test version=1.0 keys='.
Expected result: the schema request cannot be sent.
Actual result: 'invalid syntax' message displays and user cannot submit schema request.