When deploying Corda nodes across the network, which JARs have to be exactly the same?

故事扮演 提交于 2020-01-03 06:26:06

问题


Several questions on Corda deployment:

  1. Upon deployment, do all the JAR files in all Corda nodes have to be exactly the same - same build, same version, same hash, etc.. ? Does it mean all parties have to agree on the same code base beforehand?

  2. How to implement your own node's logic variant? Is it possible to only share the JARs containing interface of the flow and have different JARs for implementation? Can we drop JAR into plugin directory as required without synchronizing with other nodes?

  3. How do the first-time deployment and follow-up code (JAR) updates work for individual node? Please explain the typical deployment steps.

I have read the documentations but still not so clear about real-world production deployment scenario.


回答1:


For 1. and 2.: See https://docs.corda.net/writing-a-cordapp.html#structure. The JARs containing the code for states and contracts must be identical across participants, since everyone must be in consensus about what is being agreed on the ledger and whether a given ledger update is valid. However, the flow logic can vary across nodes. As a result, CorDapps should be split into several JARs - some which will be shared and identical across nodes (contract and state definitions), and some which will be different (flow definitions, possibly other supporting classes)

For 3.: Here are instructions regarding the deployment of a node: https://docs.corda.net/deploying-a-node.html



来源:https://stackoverflow.com/questions/47885339/when-deploying-corda-nodes-across-the-network-which-jars-have-to-be-exactly-the

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!