0

Is there any supported way of Corda to roll out changes of a CordApp to all nodes which have an older version? Or how would I distribute even a new CordApp ?

Ideally without having everybody (each affected node owner) to do anything.

Right now it would mean update dependency in gradle , rebuild and restart node, which is rather inconvinient when my node is part of many business networks.

Is there any plan to have something analog to WebServer like tomcat where I could deploy a war file ?

1 Answers1

0

Firstly, not that you do not need to run deployNodes to create the new CorDapp JAR. Instead, you can use the Gradle jar command:

  • Unix/Mac OSX: ./gradlew jar
  • Windows: gradlew.bat jar

This will create the new CorDapp JAR under build/libs. You then install the new CorDapp by adding the new CorDapp JAR to the cordapps folder of every node that will be using the new CorDapp.

As of Corda 3, to pick up the new CorDapp, the node has to be restarted (in the future, we expect Corda to support hot-reloading of CorDapps). There are several considerations here:

  • If you are upgrading one or more existing flows:

  • If you are upgrading one or more existing states or contracts:

    • You need to keep both the old and new state and contract definitions on the classpath at once (e.g. IOUState and IOUStateV2)
    • The states and contracts don't have to be upgraded on every node at once. You will simply encounter an error if you send another node a state or contract for which they do not have the definition
    • See the docs on upgrading contracts and states for more details
  • If you're using zone constraints for your CorDapp's contracts, you need to update the compatibility zone's network parameters

    • This step is not required if you're using hash constraints or the signature constraints being introduced in Corda 4
Joel
  • 22,762
  • 5
  • 26
  • 41
  • This works for my nodes, but what about the other nodes in the network ? Drain all flows (or wait until all flows are finished) might be impractical in heavy traffic networks. Any plan to have something like a blue-green deployment ? Or a versioning concept of both CordApps / Flows which allows multiple of them live together ? – Mathias Held Nov 01 '18 at 10:02
  • Updated my answer above to address your further questions. I'm not sure what blue-green is :) – Joel Nov 01 '18 at 10:41