The fix here is to cleanup the error message and make it easier to read.
After following the steps below, the state is successfully sent by PartyA (which has the v2 cordapp) but fails to be recorded in PartyB (which has the v1 cordapp) - after investigation we believe this is the correct behaviour. However, the error message could be more helpful. Also, it could b eclearer that installing the upgraded cordapp will cause the state to be processed (which happens, I tested that scenario successfully).
1. Download TestNetwork.zip (from test template) and unzip into a directory.
2. Download the network bootstrapper for the version of corda under test and copy into the directory from:
or (for Enterprise)
3. Download the relevant finance-workflows cordapp for the version of corda under test and copy into the directory from:
or (for Enterprise)
4. Download v1 of the attached (signed) finance contracts cordapp and place in the directory.
5. From unzipped directory run:
java -jar corda-tools-network-bootstrapper-xxxx.jar --network-parameter-overrides=network-parameters.conf
6. Edit Notary\node.conf, PartyA\node.conf, PartyB\node.conf and set devmode = false.
7. Start up the nodes with:
Notary: java -jar corda.jar
PartyA: java -jar corda.jar --sshd --sshd-port=22244
PartyB: java -jar corda.jar --sshd --sshd-port=22245
8. SSH into PartyA on port 22244, user: user1 password: test
>>ssh -o StrictHostKeyChecking=no user1@localhost -p 22244
9. Issue 10GBP of cash to yourself:
flow start CashIssueFlow amount: "10 GBP", issuerBankPartyRef: "1234" , notary: Notary
10. Stop PartyA.
Delete the V1 finance app from the cordapps directory and replace with the V2 (signed) finance cordapp.
Re-start PartyA: java corda.jar --sshd --sshd-port=22244
11. Pay 5GBP of cash to PartyB from PartyA
flow start CashPaymentFlow amount: "5 GBP", recipient: PartyB, anonymous: false
Flow completes successfully on PartyA.
On PartyB run:
run vaultQuery contractStateType: net.corda.finance.contracts.asset.Cash$State
There are no states in the vault, and there should be 5GBP from PartyA.
Error in PartyB is: