net.corda.nodeapi.exceptions.DuplicateContractClassException appears in case of transaction between nodes with different versions (new to old)

Description

Steps to reproduce:

1) create a network - java -jar corda-tools-network-bootstrapper-4.1.jar --dir nodes

  • 4x nodes created Notary, PartyA, PartyB, PartyC

Bootstrapping local test network in /home/dmitry.tatarinov/Documents/4095_Workaround/nodes
Generating node directory for PartyC
Generating node directory for PartyB
Generating node directory for PartyA
Generating node directory for Notary
Nodes found in the following sub-directories: [PartyB, PartyA, Notary, PartyC]
Found the following CorDapps: []
Waiting for all nodes to generate their node-info files...
... still waiting. If this is taking longer than usual, check the node logs.
Distributing all node-info files to all nodes
Loading existing network parameters... none found
Gathering notary identities
Generating contract implementations whitelist
New NetworkParameters {
minimumPlatformVersion=4
notaries=[NotaryInfo(identity=O=Notary, L=London, C=GB, validating=false)]
maxMessageSize=10485760
maxTransactionSize=524288000
whitelistedContractImplementations {

}
eventHorizon=PT720H
packageOwnership {

}
modifiedTime=2019-09-24T11:38:33.434Z
epoch=1
}
Bootstrapping complete!

2) change Cordapps for PartyC
corda-confidential-identities
corda-confidential-identities
corda-finance-workflows
from 4.1 version to OS 4.3-RC01
3) change corda.jar for for PartyC from 4.1 version to OS 4.3-RC01
4) run all 4x nodes - all up and running
5) connect to PartyA and issue 1000 USD

Tue Sep 24 15:13:01 MSK 2019>>> flow start CashIssueFlow amount: 1000 USD, issuerBankPartyRef: 1234, notary: Notary

✓ Starting
Generating anonymous identities
✓ Generating transaction
✓ Signing transaction
✓ Finalising transaction
Requesting signature by notary service
Requesting signature by Notary service
Validating response from Notary service
✓ Broadcasting transaction to participants
▶︎ Done
Flow completed with result: Result(stx=SignedTransaction(id=84A7EF0EC9008D73279BD68E164A688A346D65727BA5ED872FD78AF11055D56F), recipient=O=PartyA, L=London, C=GB)

6) start CashPaymentFlow from PartyA to PartyC - Flow completed

Tue Sep 24 15:13:21 MSK 2019>>> flow start CashPaymentFlow amount: 500 USD, recipient: PartyC

✓ Starting
✓ Generating anonymous identities
✓ Generating our anonymous identity
✓ Signing our anonymous identity
✓ Awaiting counterparty's anonymous identity
✓ Verifying counterparty's anonymous identity
✓ Generating transaction
✓ Signing transaction
✓ Finalising transaction
✓ Requesting signature by notary service
✓ Requesting signature by Notary service
✓ Validating response from Notary service
✓ Broadcasting transaction to participants
▶︎ Done
Flow completed with result: Result(stx=SignedTransaction(id=CE7123A32B097B0CE0094A765EF5134148198048FD8979725543C9952FF688AC), recipient=Anonymous(DL3Rud1udjYwr9taRPBFLnYpKLNGf6rxuRqcgTLN1vQSvJ))

7) connect to PartyC and start CashPaymentFlow from PartyC to PartyB - Flow hangs on "Broadcasting transaction to participants"step

Tue Sep 24 15:15:14 MSK 2019>>> flow start CashPaymentFlow amount: 500 USD, recipient: PartyB

✓ Starting
✓ Generating anonymous identities
✓ Generating our anonymous identity
✓ Signing our anonymous identity
✓ Awaiting counterparty's anonymous identity
✓ Verifying counterparty's anonymous identity
✓ Generating transaction
✓ Signing transaction
✓ Finalising transaction
✓ Requesting signature by notary service
✓ Requesting signature by Notary service
✓ Validating response from Notary service
▶︎ Broadcasting transaction to participants
Done
Received disconnect from 127.0.0.1 port 2225:2: User session has timed out idling after 600000 ms.
Disconnected from 127.0.0.1 port 2225

in logs the following exception is logged:

INFO ] 2019-09-24T12:15:43,490Z [Node thread-1] statemachine.StaffedFlowHospital.invoke - Error 1 of 1: {fiber-id=10000001, flow-id=7533817a-3e3d-4f43-b937-7124babb9041, invocation_id=117ea3a3-375c-452d-a667-7b12e2b0a004, invocation_timestamp=2019-09-24T12:15:37.768Z, origin=O=PartyC, L=Moscow, C=RU, session_id=117ea3a3-375c-452d-a667-7b12e2b0a004, session_timestamp=2019-09-24T12:15:37.768Z, thread-id=137, tx_id=FAF96C222DE3F8820CA77CB3201E100F2839CBB80AB3829A6749486390C553F0}
net.corda.nodeapi.exceptions.DuplicateContractClassException: Contract net.corda.finance.contracts.CommercialPaper version '1' already present in the attachments [818D8CDD035C64B19B1DDF623305D805D81A0793B9ED7CE089F3422512328CBC]

Please find all nodes logs in attachment

Status

Assignee

Unassigned

Reporter

Dmitry Tatarinov

Labels

Priority

Medium

Fix versions

Ported to...

None

Feature Team

Kernel Group

Severity

Medium

Affected OS

Linux

Affects versions

Corda 4.3 RC01
Configure