[Implicit Cordapp Upgrades] It is possible to create an obligation from node with new contract to node with old contract

Description

Steps to reproduce:

1) Bootstrap network (Notary, PartyA, PartyB, PartyC). Node config sample attached.
2) Upgrade PartyA and PartyB contracts to version 2 and workflows to version 3.
3) Create obligation from PartyC to PartyB (old to new contract)
4) Create obligation from PartyB to PartyC (new to old contract)

Expected result:
On step 3 obligation is created, PartyB has state where new field = null

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 - state: data: !<net.corda.examples.obligation.contract.Obligation> amount: "150.00 USD" lender: "O=PartyB, L=New York, C=US" borrower: "O=PartyC, L=Paris, C=FR" paid: "0.00 USD" linearId: externalId: null id: "cc9cdf1f-e5d2-471c-92d8-34de947303db" defaulted: null contract: "net.corda.examples.obligation.contract.ObligationContract" notary: "O=Notary, L=London, C=GB" encumbrance: null constraint: !<net.corda.core.contracts.SignatureAttachmentConstraint> key: "aSq9DsNNvGhYxYyqA9wd2eduEAZ5AXWgJTbTEw3G5d2maAq8vtLE4kZHgCs5jcB1N31cx1hpsLeqG2ngSysVHqcXhbNts6SkRWDaV7xNcr6MtcbufGUchxredBb6" ref: txhash: "F7EAD188D1EFF7EBC8A43B7A6A49ABEEF8DE7265D3797C75FC52CA93CBC4E4B2" index: 0

On step 4 obligation is not created according to https://github.com/corda/samples/tree/4.3-RC01/implicit-cordapp-upgrades

1 Now demonstrate that a party using the old version of the contract cannot accept a transaction with a state on a newer version of the contract. From the shell of PartyB, run start IssueObligation amount: $100, lender: PartyC, anonymous: true. This will fail on PartyC, as it receives a state that it cannot deserialize. To fix this problem, the node needs to be upgraded to the latest version of the contract.

Actual result:
On step 3 everything goes as expected

On step 4 obligation is created w/o errors.

PartyB has state

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 - state: data: !<net.corda.examples.obligation.contract.Obligation> amount: "255.00 USD" lender: "O=PartyC, L=Paris, C=FR" borrower: "O=PartyB, L=New York, C=US" paid: "0.00 USD" linearId: externalId: null id: "6d25a35e-9267-4c89-a67e-984f47a86594" defaulted: false contract: "net.corda.examples.obligation.contract.ObligationContract" notary: "O=Notary, L=London, C=GB" encumbrance: null constraint: !<net.corda.core.contracts.SignatureAttachmentConstraint> key: "aSq9DsNNvGhYxYyqA9wd2eduEAZ5AXWgJTbTEw3G5d2maAq8vtLE4kZHgCs5jcB1N31cx1hpsLeqG2ngSysVHqcXhbNts6SkRWDaV7xNcr6MtcbufGUchxredBb6" ref: txhash: "BE7932D4E31E26A2498A234A8D6034DA3C6E2B53E14F97BFFA7B0C08C722453C" index: 0

PartyC has state

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 - state: data: !<net.corda.examples.obligation.contract.Obligation> amount: "255.00 USD" lender: "O=PartyC, L=Paris, C=FR" borrower: "O=PartyB, L=New York, C=US" paid: "0.00 USD" linearId: externalId: null id: "6d25a35e-9267-4c89-a67e-984f47a86594" contract: "net.corda.examples.obligation.contract.ObligationContract" notary: "O=Notary, L=London, C=GB" encumbrance: null constraint: !<net.corda.core.contracts.SignatureAttachmentConstraint> key: "aSq9DsNNvGhYxYyqA9wd2eduEAZ5AXWgJTbTEw3G5d2maAq8vtLE4kZHgCs5jcB1N31cx1hpsLeqG2ngSysVHqcXhbNts6SkRWDaV7xNcr6MtcbufGUchxredBb6" ref: txhash: "BE7932D4E31E26A2498A234A8D6034DA3C6E2B53E14F97BFFA7B0C08C722453C" index: 0

 

Status

Assignee

Jonathan Locke

Reporter

Dmitry Toropov

Labels

None

Priority

Medium

Fix versions

Ported to...

None

Feature Team

Kernel Group

Severity

Medium

Affects versions

Corda 4.3 RC01
Configure