CorDapp versioning: PartyA is unable to build the transaction to PartyB after contracts upgrade for PartyA and Notary

Description

According to Detail from the https://r3-cev.atlassian.net/browse/R3T-1550:
After contracts upgrade for PartyA and Notary from V1 to V2, PartyA should successfully send a transaction to PartyB.
Currently PartyA unable to sent cash transaction after contract upgrade

Steps to reproduce:
1. Build the release/4 Corda OS branch to compile the finance contract and workflow jars
2. Rename corda-finance-contracts-4.1-RC03.jar to corda-finance-contracts-4.1-RC03_V1.jar
3. Edit finance/contracts/src/main/kotlin/net/corda/finance/contracts/asset/Cash.kt to have the following state;

  • data class State(

  • override val amount: Amount<Issued<Currency>>,

  • /** There must be a MoveCommand signed by this key to claim the amount. */

  • override val owner: AbstractParty,

  • val foobar: Int? = 5

Then edit finance/contracts/build.gradle file for the contract to increase the version number to 2

  • contract {

  • name "Corda Finance Demo"

  • versionId 2

  • vendor "R3"

  • licence "Open Source (Apache 2)"


4. Clean and rebuilt the release/4 Corda OS branch to compile the new finance contract jar
5. Rename corda-finance-contracts-4.1-RC03.jar to corda-finance-contracts-4.1-RC03_V2.jar
6. Use the network bootstrapper to start up the Notary, PartyA and PartyB nodes as described in the test steps
7. Issue cash on PartyA using the v1 contract
8. Install the v2 contract on the Notary and PartyA by removing v1 from the cordapps directory and replacing with v2
9. Whitelist upload v2 to PartyB which still has the v1 loaded (via "run uploadAttachment jar: "path/to/corda-finance-contracts-4.3-RC01-V2".jar")
10. Pay cash from PartyA to PartyB

Expected results:
Cash transaction successfully passed

Actual results:
The test fails at step 10, where PartyA is unable to build the transaction
☂java.lang.NoSuchMethodError: net.corda.finance.contracts.asset.Cash$State.copy(Lnet/corda/core/contracts/Amount;Lnet/corda/core/identity/AbstractPartyLnet/corda/finance/contracts/asset/Cash$State;

Logs screenshots and new contract versions are atached "Logs_screenshots_cordappVersions.tar.gz"

Status

Assignee

Roman Vasiliev

Reporter

Roman Vasiliev

Labels

Priority

High

Fix versions

Ported to...

Corda 4.3

Feature Team

Kernel Group

Severity

Medium

Sprint

None

Affects versions

Corda 4.3 RC01
Configure