'Must the Flow code be the same in all nodes?

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?



Solution 1:[1]

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.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Joel