Steps to reproduce:
1. Get the following files OS jars from https://ci-artifactory.corda.r3cev.com/artifactory/corda-releases/net/corda/
2. Clone Corda from repository:
git clone https://github.com/corda/corda.git
git checkout tags/M19.03-RC01
3. Create a modified finance-contracts JAR file. After clone Corda from repository go to corda/finance/:
contracts folder, in build.gradle file change from versionId 1 to versionId 2.
finance-contract module, in ./contracts/src/main/kotlin/net/corda/finance/contracts/asset/Cash.kt add:
a) parameter val foobar: Int? = 5 .
b) fun copy(amount: Amount<Issued>, owner: AbstractParty) = copy(amount = amount, owner = owner, foobar = null) .
Build the JAR file (../../gradlew jar) and rename to corda-finance-contracts-4.1-RC03-V2.jar
4. Outside test dir create SigningKey directory and generate KeyStore there.
5. Sign each finance-contract JAR by the same Code Signing key from the previous step.
6. Bootstrap corda network (PartyA / PartyB / Notary) and copy cordapps:
corda-finance-workflows-4.1-RC03.jar to PartyA and PartyB
corda-finance-contracts-4.1-RC03.jar to PartyA
corda-finance-contracts-4.1-RC03-V2.jar to PartyB
7. Start all Nodes and connect via ssh to nodes.
8. Run "uploadAttachment" from the PartyA / PartyB shell:
>>> run uploadAttachment jar: /home/maxim.shadrin/sources/4.3-RC01/PartyB/cordapps/corda-finance-contracts-4.3-RC01-V2.jar
>>> run uploadAttachment jar: /home/maxim.shadrin/sources/4.3-RC01/PartyA/cordapps/corda-finance-contracts-4.3-RC01.jar
9. Perform transactions PartyA/V1 -> PartyB/V2.
issue cash from PartyA
transfer issued cash to PartyB
11. Perform transactions PartyB/V2 -> PartyA/V1.
issue cash from PartyB:
transfer issued cash to PartyA:
Both Nodes A and B transact seamlessly, where
Node A builds transactions using V1, verifies remote transactions using V2, be able to consume the cash from V2.
Node B builds transactions using V2, verifies remote transactions using V2, be able to consume the cash from V1.
Scenario one works as expected.
Scenario two is failed at step "transfer cash to PartyA" (step 11). The node is shutting down. The logs contain the exception “Not enough money to spend: not enough money, missing 85.00 EUR” and the Java heap space error log appeared in the PartyB directory. Please see the detailed scenario in attachments.