Closed joaoluis-pdm closed 2 years ago
ethAdapter is now failing with
Server started. Listening on 3000
Error: Returned values aren't valid, did it run Out of Gas? You might also see this error if you are not using the correct ABI for the contract you are retrieving data from, requesting data from a block number that does not exist, or querying a node which is not fully synced.
Original quorum-docker is working. Find diffs:
jpsl@PDM-00781:~/develop/PharmaLedger/blockchain-node-workspace/quorum-docker$ diff -r --exclude=node_modules ../../quorum-docker . | less
Doubts about persistence of blockchain-node-worspace remains. Does stop/starting the ethAdapter looses proper smart contract address ?
Every time a sequence
npm run stop-blockchain
npm run start-blockchain
the smart contract address (or orgAccount) appears to have changed, and that is wrong.
It seems that the problem reported above is not the change of smartcontract, is the deleting of data dir in the quorum nodes. https://github.com/PharmaLedger-IMI/quorum-docker/blob/e8b03aa15523263de739985ba5981df50c179b23/quorum/docker-compose.yml shows:
...
DDIR=/qdata/dd
rm -rf $${DDIR}
mkdir -p $${DDIR}
cp -r /examples/dd$${NODE_ID}/* $${DDIR}
cp /examples/dd$${NODE_ID}/permissioned-nodes.json $${DDIR}/static-nodes.json
cp $${DDIR}/static-nodes.json $${DDIR}/permissioned-nodes.json
cat $${DDIR}/static-nodes.json
GENESIS_FILE="/examples/dd$${NODE_ID}/genesis.json"
NETWORK_ID=$$(cat $${GENESIS_FILE} | grep chainId | awk -F " " '{print $$2}' | awk -F "," '{print $$1}')
EXTRA_ARGS="${QUORUM_GETH_ARGS:-}"
geth --datadir $${DDIR} init $${GENESIS_FILE}
geth \
--emitcheckpoints --istanbul.blockperiod 1 --mine --minerthreads 1 --syncmode full \
--identity node$${NODE_ID}-${QUORUM_CONSENSUS:-istanbul} \
--datadir $${DDIR} \
...
So, DDIR
will be deleted every time the quorum node restarts again.
Also, after a reboot of ctr-dev-pl, the ethAdapter and epirus dockers seems not to be starting up.
ethAdapter works well stop/start:
jpsl@khaki:/export/home/jpsl/develop/PharmaLedger/ctr-workspace/ctr-patient/blockchain-node/quorum-docker/ethAdapter$ docker-compose stop
Stopping ethAdapter ... done
jpsl@khaki:/export/home/jpsl/develop/PharmaLedger/ctr-workspace/ctr-patient/blockchain-node/quorum-docker/ethAdapter$ docker-compose start
Starting ethAdapter ... done
and CTR is able to login again (and see the data).
Update: There where some negative tests, but they were executed on a CPU-overloaded PC and they were non-reproducible.
At this point, all dockers should restart after reboot.
Restart confirmed on Ubuntu laptop environment.
Trying out @fdamiao-pdmfc changes to https://github.com/PharmaLedger-IMI/quorum-docker/blob/e8b03aa15523263de739985ba5981df50c179b23/quorum/docker-compose.yml to init the chain only the first time that the entrypoint is running, by testing that folder /qdata/dd (mapped to host /quorum/qdata/dd[1234]) already exists.
@fdamiao-pdmfc I tryed a minimal set of changes at ee4143fd8fd996f62165033e7c4c50b61140e66a
It is working for reads. (After a docker-compose stop/start reads seem to work well).
But is not working for writes. (It is blocking a long time on writes, and I did not figure out where to find error details... besides the ECONNRESET on the ethAdapter)
@fdamiao-pdmfc proposes a workaround for the stop/start resilience:
# before starting geth for an existing DDIR
sleep 5 $${NODE_ID}
Epirus is now broken.
This could be due to 33b29526849a1230ddc90a6285c2468b2bf0dec8
v0.2.5 is the last planned version compatible with CTR.
v0.3.0 will be the next developed in master using the new smart contract and ethAdapter to be compatible with FGT.
v0.2.4 / v0.2.5 was the last version to work with CTR.
FGT needs a more recent smart contract, and so v0.3.0 is made for
psk-release 6f5ad4c50f6eea9589a5eaeaf056767c4a43d2b8 Thu Feb 17 11:50:54 2022 +0200
ethadapter a63308f5ffe1182311dc10b6e49473727b8acc99 Mon Mar 14 15:45:02 2022 +0200
epi-workspace adac48270eef5629ab2134ea3fc50be2da5e9f02 Wed Mar 16 17:05:55 2022 +0200
v0.3.0 release for
psk-release e98392eff7fd268409e642a4f5f1c995ffd5f9de Tue Mar 8 00:58:24 2022 +0000
ethadapter a63308f5ffe1182311dc10b6e49473727b8acc99 Mon Mar 14 15:45:02 2022 +0200
epi-workspace adac48270eef5629ab2134ea3fc50be2da5e9f02 Wed Mar 16 17:05:55 2022 +0200
CTR is not operation with old psk-release. Delay CTR support until needed.
This issue is considered done.
It seems to be working +/-
When building the ethAdapter docker seems not to be using a frozen version of ePi as intended.
I will create a tag v0.2.0 for this release. (Using the commit hash in FGT).