Closed joaoluis-pdm closed 2 years ago
The failing enclave seems an Enclave_Mixin / WalletDBEnclave and fails at Enclave_Mixin.storeKeySSI() in the insertRecord line. target is a WalletDBEnclave, and target.storageDB is undefined.
Putting a lot of console.log into privatesky/psknode/bundles/openDSU.js to debug environment around shared enclave creation: openDSU.zip
The build no longer gives an error. buildall-hf4.log
Test with a single MAH, creating one product and one batch worked.
Diffs in the privatesky/psknode/bundles/openDSU.js for the version that worked... openDSU.diff.txt
This problem could not be reproduced anymore... Even with the original openmDSU.js the error no longer happens.
Building the https://github.com/PharmaLedger-IMI/fgt-workspace (+/- at v0.9.5) 16604637e0d28b61e18c6af76564eaf6c5b513fb using psk-release e7c923dbaf6cbe75041bcfb1dd8600b8ddb0508d hf-adapter cdf60d1bf331b2154171ac4be5cedd900621b9dc (2022-03-15)
Annex buildallhf.log - build using hf-adapter buildallhf.log
Annex buildallnochain.log - build using simulated FS anchoring buildallnochain.log
The error in buildallhf.log happens in line 331.
The comparative correct build buildallnochain.log shows instead:
Not clear if the message before "DSU not available. Creating a new DSU for ..." belongs to /export/home/jpsl/develop/PharmaLedger/fgt-workspace/privatesky/psknode/bundles/openDSU.js getSharedEnclave() or /export/home/jpsl/develop/PharmaLedger/fgt-workspace/pdm-dsu-toolkit/services/dt/DossierBuilder.js buildDossier() ...
Confirmed that the "DSU not available. Creating a new DSU for ..." message is the one logged on fgt-workspace/privatesky/psknode/bundles/openDSU.js DossierBuilder.buildDossier() on callback after a _getSharedEnclave()