Creating a New Version of a CorDapp
This section describes how to create a new version of a Corda-deployed CorDapp Corda Distributed Application. A Java (or any JVM targeting language) application built using the Corda build toolchain and CorDapp API to solve some problem that is best solved in a decentralized manner. . You must do this in such a way that Corda can recognize the upgrade as a new version of the same application. Typically, you might want to upgrade your CorDapp to fix bugs, create new functionality, or change existing functionality.
Corda must be able to interpret that the two versions are considered the same application. This maintains continuity of any state it has preserved internally relating to that application’s operation.
This section contains the following:
CorDapp Upgrade Overview
The following users are involved in upgrading a Corda-deployed CorDapp:
- CorDapp Developer: makes the required changes to the code and creates a new CPK Corda Package. A signed ZIP/JAR library of Java code packaged to be portable with all of its dependencies and version information contained within it. , ensuring that the CPK is identifiable across versions. The CorDapp Developer builds a CPB from the CPK files to enable the Network Operator to create a CPI.
- Network Operator: creates the new CPI, incrementing the
--cpi-version
. - Cluster Administrator: uploads the new CPI to the virtual nodes.
Identifying CorDapps Across Versions
 CPKs
Corda Package. A signed ZIP/JAR library of Java code packaged to be portable with all of its dependencies and version information contained within it.
are identified across versions by the value of their Corda CPK CorDapp Name
metadata field. Keeping the same value for Corda CPK CorDapp Name
while making other changes to the CPK indicates to Corda that you consider the CPK to be a new version of the same CPK. As well as the value of Corda CPK CorDapp Name
, the set of CPK signers must also be kept the same across versions.
Any data internally serialized by Corda is tagged with both Corda CPK CorDapp Name
and the set of signers that signed the CPK. On deserialization, the tag is checked against the current version of the CPK’s Corda CPK CorDapp Name
and set of signers. If both of these match, Corda considers this data as deserializable for the CPK.
Was this page helpful?
Thanks for your feedback!
Chat with us
Chat with us on our #docs channel on slack. You can also join a lot of other slack channels there and have access to 1-on-1 communication with members of the R3 team and the online community.
Propose documentation improvements directly
Help us to improve the docs by contributing directly. It's simple - just fork this repository and raise a PR of your own - R3's Technical Writers will review it and apply the relevant suggestions.
We're sorry this page wasn't helpful. Let us know how we can make it better!
Chat with us
Chat with us on our #docs channel on slack. You can also join a lot of other slack channels there and have access to 1-on-1 communication with members of the R3 team and the online community.
Create an issue
Create a new GitHub issue in this repository - submit technical feedback, draw attention to a potential documentation bug, or share ideas for improvement and general feedback.
Propose documentation improvements directly
Help us to improve the docs by contributing directly. It's simple - just fork this repository and raise a PR of your own - R3's Technical Writers will review it and apply the relevant suggestions.