Regarding storage persistence of schema and credential definations
Hey team,
I am facing an issue regarding the schemas and credential definitions being deleted or not stored after 3 - 4 days.
let me walk you guys through the exact scenario, I created a schema and with respect to that a schema credential definitions, now when i query the schema-by-id API the result is success and i can see the schema which is the expected result. Same goes to credential definitions.
Now when i try to get this schemas after around 3 to 4 days from the ledger it returns 404: No ledger found.
The ACA-py version used in my project is pretty much old i.e 0.8.2, and i also went through your release notes which mentioned some storage related issues resolved in later version but i am still not able to confirm as if it's the same issue that i am facing.
Below are the args that i am passing to start the acapy servers.
aca-py start \
--auto-provision \
--arg-file ${MEDIATOR_ARG_FILE} \
--label "${MEDIATOR_AGENT_LABEL}" \
--inbound-transport http 0.0.0.0 ${MEDIATOR_AGENT_HTTP_IN_PORT} \
--inbound-transport ws 0.0.0.0 ${MEDIATOR_AGENT_WS_IN_PORT} \
--outbound-transport ws \
--outbound-transport http \
--wallet-type indy \
--wallet-storage-type postgres_storage \
--admin 0.0.0.0 ${MEDIATOR_AGENT_HTTP_ADMIN_PORT} \
--admin-api-key ${MEDIATOR_AGENT_ADMIN_API_KEY} \
--endpoint ${MEDIATOR_URL} wss://${MEDIATOR_URL#*://*}
and also i am using this ledger http://prod.bcovrin.vonx.io/
Can anyone help me rather guide than confirm that i am thinking in the right direction. Also let me know if you need more details on this. :) happy to help
Are you able to use the built in ledger browser and find your schema and cred-def?
@WadeBarnes Yes i can see my cred-def and schemas there.
Good. Where are you defining (passing in) the genesis info for your agent? What are the settings?
@WadeBarnes below is the config that is passed to the agent
{
label: 'xxxx-agent',
walletConfig: { id: 'ssi-wallet-id', key: 'ssi-wallet-key' },
indyLedgers: [
{
id: 'BCOVRIN_PROD_Genesis',
indyNamespace: 'sovrin',
genesisTransactions: '{"reqSignature":{},"txn":{"data":{"data":{"alias":"Node1","blskey":"4N8aUNHSgjQVgkpm8nhNEfDf6txHznoYREg9kirmJrkivgL4oSEimFF6nsQ6M41QvhM2Z33nves5vfSn9n1UwNFJBYtWVnHYMATn76vLuL3zU88KyeAYcHfsih3He6UHcXDxcaecHVz6jhCYz1P2UZn2bDVruL5wXpehgBfBaLKm3Ba","blskey_pop":"RahHYiCvoNCtPTrVtP7nMC5eTYrsUA8WjXbdhNc8debh1agE9bGiJxWBXYNFbnJXoXhWFMvyqhqhRoq737YQemH5ik9oL7R4NTTCz2LEZhkgLJzB3QRQqJyBNyv7acbdHrAT8nQ9UkLbaVL9NBpnWXBTw4LEMePaSHEw66RzPNdAX1","client_ip":"159.203.24.151","client_port":9702,"node_ip":"159.203.24.151","node_port":9701,"services":["VALIDATOR"]},"dest":"Gw6pDLhcBcoQesN72qfotTgFa7cbuqZpkX3Xo6pLhPhv"},"metadata":{"from":"Th7MpTaRZVRYnPiabds81Y"},"type":"0"},"txnMetadata":{"seqNo":1,"txnId":"fea82e10e894419fe2bea7d96296a6d46f50f93f9eeda954ec461b2ed2950b62"},"ver":"1"}\n' +
' {"reqSignature":{},"txn":{"data":{"data":{"alias":"Node2","blskey":"37rAPpXVoxzKhz7d9gkUe52XuXryuLXoM6P6LbWDB7LSbG62Lsb33sfG7zqS8TK1MXwuCHj1FKNzVpsnafmqLG1vXN88rt38mNFs9TENzm4QHdBzsvCuoBnPH7rpYYDo9DZNJePaDvRvqJKByCabubJz3XXKbEeshzpz4Ma5QYpJqjk","blskey_pop":"Qr658mWZ2YC8JXGXwMDQTzuZCWF7NK9EwxphGmcBvCh6ybUuLxbG65nsX4JvD4SPNtkJ2w9ug1yLTj6fgmuDg41TgECXjLCij3RMsV8CwewBVgVN67wsA45DFWvqvLtu4rjNnE9JbdFTc1Z4WCPA3Xan44K1HoHAq9EVeaRYs8zoF5","client_ip":"159.203.24.151","client_port":9704,"node_ip":"159.203.24.151","node_port":9703,"services":["VALIDATOR"]},"dest":"8ECVSk179mjsjKRLWiQtssMLgp6EPhWXtaYyStWPSGAb"},"metadata":{"from":"EbP4aYNeTHL6q385GuVpRV"},"type":"0"},"txnMetadata":{"seqNo":2,"txnId":"1ac8aece2a18ced660fef8694b61aac3af08ba875ce3026a160acbc3a3af35fc"},"ver":"1"}\n' +
' {"reqSignature":{},"txn":{"data":{"data":{"alias":"Node3","blskey":"3WFpdbg7C5cnLYZwFZevJqhubkFALBfCBBok15GdrKMUhUjGsk3jV6QKj6MZgEubF7oqCafxNdkm7eswgA4sdKTRc82tLGzZBd6vNqU8dupzup6uYUf32KTHTPQbuUM8Yk4QFXjEf2Usu2TJcNkdgpyeUSX42u5LqdDDpNSWUK5deC5","blskey_pop":"QwDeb2CkNSx6r8QC8vGQK3GRv7Yndn84TGNijX8YXHPiagXajyfTjoR87rXUu4G4QLk2cF8NNyqWiYMus1623dELWwx57rLCFqGh7N4ZRbGDRP4fnVcaKg1BcUxQ866Ven4gw8y4N56S5HzxXNBZtLYmhGHvDtk6PFkFwCvxYrNYjh","client_ip":"159.203.24.151","client_port":9706,"node_ip":"159.203.24.151","node_port":9705,"services":["VALIDATOR"]},"dest":"DKVxG2fXXTU8yT5N7hGEbXB3dfdAnYv1JczDUHpmDxya"},"metadata":{"from":"4cU41vWW82ArfxJxHkzXPG"},"type":"0"},"txnMetadata":{"seqNo":3,"txnId":"7e9f355dffa78ed24668f0e0e369fd8c224076571c51e2ea8be5f26479edebe4"},"ver":"1"}\n' +
' {"reqSignature":{},"txn":{"data":{"data":{"alias":"Node4","blskey":"2zN3bHM1m4rLz54MJHYSwvqzPchYp8jkHswveCLAEJVcX6Mm1wHQD1SkPYMzUDTZvWvhuE6VNAkK3KxVeEmsanSmvjVkReDeBEMxeDaayjcZjFGPydyey1qxBHmTvAnBKoPydvuTAqx5f7YNNRAdeLmUi99gERUU7TD8KfAa6MpQ9bw","blskey_pop":"RPLagxaR5xdimFzwmzYnz4ZhWtYQEj8iR5ZU53T2gitPCyCHQneUn2Huc4oeLd2B2HzkGnjAff4hWTJT6C7qHYB1Mv2wU5iHHGFWkhnTX9WsEAbunJCV2qcaXScKj4tTfvdDKfLiVuU2av6hbsMztirRze7LvYBkRHV3tGwyCptsrP","client_ip":"159.203.24.151","client_port":9708,"node_ip":"159.203.24.151","node_port":9707,"services":["VALIDATOR"]},"dest":"4PS3EDQ3dW1tci1Bp6543CfuuebjFrg36kLAUcskGfaA"},"metadata":{"from":"TWwCRQRZ2ZHMJFn9TzLp7W"},"type":"0"},"txnMetadata":{"seqNo":4,"txnId":"aa5e817d7cc626170eca175822029339a444eb0ee8f0bd20d3b0b76e566fb008"},"ver":"1"}',
isProduction: false
}
],
publicDidSeed: '09434281059582403190679971947289',
endpoints: [ <my-defined-endpoint> ],
autoAcceptConnections: true,
autoAcceptCredentials: 'contentApproved'
}
and below are the aca-py configs
{
"config": {
"admin.admin_insecure_mode": false,
"admin.enabled": true,
"admin.host": "0.0.0.0",
"admin.port": "3002",
"admin.webhook_urls": [],
"admin.admin_client_max_request_size": 1,
"debug.connections": true,
"debug.print_connections_invitation": true,
"debug.invite_label": "Mediator",
"debug.invite_multi_use": true,
"debug.auto_accept_invites": true,
"debug.auto_accept_requests": true,
"default_endpoint": "localhost:2015",
"additional_endpoints": [
"wss://localhost:2015"
],
"ledger.disabled": true,
"log.json_fmt": false,
"auto_ping_connection": true,
"trace.target": "log",
"trace.tag": "",
"trace.label": "Mediator",
"auto_provision": true,
"transport.inbound_configs": [
[
"http",
"0.0.0.0",
"3000"
],
[
"ws",
"0.0.0.0",
"3001"
]
],
"transport.outbound_configs": [
"ws",
"http"
],
"transport.enable_undelivered_queue": true,
"default_label": "Mediator",
"transport.max_message_size": 2097152,
"transport.max_outbound_retry": 4,
"transport.ws.heartbeat_interval": 3,
"transport.ws.timeout_interval": 15,
"mediation.open": true,
"wallet.name": "mediator",
"wallet.storage_type": "postgres_storage",
"wallet.type": "indy",
"wallet.storage_config": "{\"url\":\"db:5432\",\"wallet_scheme\":\"DatabasePerWallet\"}",
"endorser.author": false,
"endorser.endorser": false,
"endorser.auto_endorse": false,
"endorser.auto_write": false,
"endorser.auto_create_rev_reg": false,
"endorser.auto_promote_author_did": false,
"ledger.read_only": false
}
}
I would suggest switching to use the genesis URL rather than embedding the genesis file in the config. You're likely running into issues with the formatting of the genesis file. Incorrect formatting such as additional whitespace can thrown things off.
okay @WadeBarnes , thanks for helping, i will make this change and let you know..... i guess...after 3 days or so XD.
while we wait for 3 to 4 days for checking, can you explain how is it working for the first time i create cred-definition.
If the genesis file are not correct, then it should not work for the first time too, right?
while we wait for 3 to 4 days for checking, can you explain how is it working for the first time i create cred-definition.
If the genesis file are not correct, then it should not work for the first time too, right?
You are correct. If there was an issue with the genesis file to start with, you should not have been able to connect to the ledger in the first place. This leads me to suspect that something changed along the way and some formatting issue was introduced into the genesis file, such that it looked correct (and the same) but was different enough to cause it not to be processes correctly. Something as simple as CrLf instead of just Lf for a line endings has been known to cause such issues.
Did it work? @smartdeepp or does the problem persist? Do connections still work? Do you find alles entries in the Postgres database?