Flow failed in case when cordapp folder contains contracts jars with the same version and hash but different names.

Description

Steps to reproduce:
1. Download corda-finance-contracts.*.jar;
2. Put in a cordapp folder and rename (e.g. corda-finance-contracts.*V1.jar );
3. Copy and paste this contract to the same folder;
4. Rename on (e.g. corda-finance-contracts.*V2.jar);
5. Try to register node.
6. Connect to node's shell and try to Issue and transfer some cash

Expected result:
As per we should not get any errors in case when hashes and versions of cordapp are the same

Actual result:
We are not receiving any warnings. But running flow from this cordapps failed

Reproducible on Corda OS 4.4-RC02
Not reproducible on Corda ENT 4.4-RC02

Activity

Show:
sachin.gokhale@r3.com
February 10, 2020, 4:22 PM

Hi Adel, Can you please look into this, it needs to be fixed for OS 4.4

Adel El-Beik
February 10, 2020, 5:20 PM

Hi Alexey, how is this scenario different from CORDA-3243, that case has passed QA, but this one hasn’t. What is the difference?

Alexey Shirin
February 10, 2020, 7:05 PM

Hi The main difference is that here were used cordapps with the same hashes and versions but different names. In original issue (3242) cordapps had different hashes because of using different version id during building JAR or some meaningless changes in cordapp’s source code.

Adel El-Beik
March 2, 2020, 10:36 AM

This is fixed now. The behaviour now is that the node will not start if it detects duplicate cordapps. An error message will be shown to the user. This is the behaviour on OS and ENT.

Alexey Shirin
March 10, 2020, 9:49 AM

Fixed and successfully tested in v4.4-RC05

 

Test case #1 Node registration in case when cordapps folder contains two identical cordapps with different names

Corda OS 4.4-RC05

[INFO] [main] cordapp.JarScanningCordappLoader. - Scanning CorDapp in file:/home/alexey.shirin/cenm12/Party1/cordapps/corda-finance-contracts_V1.jar
[INFO] [main] cordapp.JarScanningCordappLoader. - Scanning CorDapp in file:/home/alexey.shirin/cenm12/Party1/cordapps/corda-finance-contracts_V2.jar
[ERROR] [main] internal.NodeStartupLogging. - Exception during node startup: The CorDapp (name: Corda Finance Demo, file: corda-finance-contracts_V1) is installed multiple times on the node. The following files correspond to the exact same content: [corda-finance-contracts_V2] [errorCode=iw8d4e, moreInformationAt=https://errors.corda.net/OS/4.4-RC05/iw8d4e]

Corda ENT 4.4-RC05

[INFO] [main] cordapp.JarScanningCordappLoader. - Scanning CorDapp in file:/home/alexey.shirin/cenm12/Party3/cordapps/corda-finance-contracts_V1.jar
[INFO] [main] cordapp.JarScanningCordappLoader. - Scanning CorDapp in file:/home/alexey.shirin/cenm12/Party3/cordapps/corda-finance-contracts_V2.jar
[ERROR] [main] internal.NodeStartupLogging. - Exception during node startup: The CorDapp (name: Corda Finance Demo, file: corda-finance-contracts_V1) is installed multiple times on the node. The following files correspond to the exact same content: [corda-finance-contracts_V2] [errorCode=iw8d4e, moreInformationAt=https://errors.corda.net/ENT/4.4-RC05/iw8d4e]

 

Test case #2 Node startup in case when cordapps folder contains two identical cordapps with different names

Corda OS 4.4-RC05

[ERROR] 12:36:58+0300 [main] internal.NodeStartupLogging. - Exception during node startup: The CorDapp (name: Corda Finance Demo, file: corda-finance-contracts_V1) is installed multiple times on the node. The following files correspond to the exact same content: [corda-finance-contracts_V2] [errorCode=iw8d4e, moreInformationAt=https://errors.corda.net/OS/4.4-RC05/iw8d4e]

 

Corda ENT 4.4-RC05

[ERROR] 12:37:29+0300 [main] internal.NodeStartupLogging. - Exception during node startup: The CorDapp (name: Corda Finance Demo, file: corda-finance-contracts_V1) is installed multiple times on the node. The following files correspond to the exact same content: [corda-finance-contracts_V2] [errorCode=iw8d4e, moreInformationAt=https://errors.corda.net/ENT/4.4-RC05/iw8d4e]

 

Versions used:

Corda OS 4.4-RC05

Corda ENT 4.4-RC05

 

Assignee

Alexey Shirin

Reporter

Alexey Shirin

Labels

Sprint

None

Epic Link

None

Priority

Medium

Severity

Medium

CVSS Score

None

CVSS Vector

None

Due Date

None

Engineering Teams

Kernel

Fix versions

Affects versions

Ported to...

None

Story Points / Dev Days

5
Configure