CPKs, CPBs, and CPIs management in Corda 5
- This topic has 2 replies, 2 voices, and was last updated 3 days, 21 hours ago by .
-
Topic
-
Hello, I am new to the Java/Kotlin world and have just started working with Corda 5. I am trying to understand how CPKs, CPBs, and CPIs are managed, but I’m having some difficulty. I have been looking at package documentation and how Graddle tasks work on the CSDE. The following questions arise.
- CPKs generation: On tutorials, when CPBs need to be generated, “jar” task is being executed, followed by the “cpb” task (./gradlew cpb). As I understand cpb task generates CPKs from Jars, but, how can I manually generate these CPKs?
- CPIs generation: On CSDE example templates, I have seen that when “graddle cpb” is executed, a “cpb” for the “contracts” submodule and another one for “workflows” submodule are generated. However, the “3-buildCPIs” script only uses the CPB from “workflows” submodule. So, what is the other CPB for?
- Package signing: As I understand from the documentation, packages are always signed with one of the generated keys. Is it necessary to always use the same key? On the CSDE, the “3-buildCPIs” task signs with the key stored in the “workspace” directory. However, what key is using “cpb” task (./gradlew cpb) to sign? can i add a path to my keys?
- Multiple CPBs: Is it possible to pass multiple CPBs in CPI generation commands?
I hope these are not too obvious questions. I find the CSDE very useful, but I would like to understand how to generate/organize my CPKs, CPBs, and CPIs and what strategies I should follow to correctly manage these files in a production environment, taking advantage of the decoupling offered by Corda 5
Any help or additional information you can provide would be greatly appreciated.
I also wanted to take this opportunity to congratulate Corda team to the work done in Corda 5. The proposed architecture seems to be very promising.
Thank you!
- You must be logged in to reply to this topic.
Subscribe to our newsletter to stay up to date on the latest developer news, tools, and articles.