Must the Flow code be the same in all nodes?

80 views Asked by At

As the Contract code, must the Flow code be the same on all nodes?

Supposing it's allowed to have different code, how does Corda handle that, in the sense of compatibility, versioning, etc?

1

There are 1 answers

0
Joel On BEST ANSWER

The flow code can be different on each node, as long as each part of the flow follows the required sequence of sends and receives.

For example, if the initiator does:

  • Send a String
  • Send an Integer
  • Receive a String

Then the responder must:

  • Receive a String
  • Receive an Integer
  • Send a String

If the sequence doesn't match, an exception will be thrown.

We are also implementing flow versioning in Corda V1. See https://docs.corda.net/head/versioning.html#flow-versioning.