mirror of
https://github.com/corda/corda.git
synced 2025-01-30 16:14:39 +00:00
Renames Controller to NetworkMapAndNotary, in line with templates and example CorDapp.
This commit is contained in:
parent
371cb0a081
commit
471907366b
@ -78,9 +78,9 @@ nodes. Here is an example ``Cordform`` task called ``deployNodes`` that creates
|
|||||||
|
|
||||||
task deployNodes(type: net.corda.plugins.Cordform, dependsOn: ['jar']) {
|
task deployNodes(type: net.corda.plugins.Cordform, dependsOn: ['jar']) {
|
||||||
directory "./build/nodes"
|
directory "./build/nodes"
|
||||||
networkMap "O=Controller,L=London,C=GB"
|
networkMap "O=NetworkMapAndNotary,L=London,C=GB"
|
||||||
node {
|
node {
|
||||||
name "O=Controller,L=London,C=GB"
|
name "O=NetworkMapAndNotary,L=London,C=GB"
|
||||||
// The notary will offer a validating notary service.
|
// The notary will offer a validating notary service.
|
||||||
notary = [validating : true]
|
notary = [validating : true]
|
||||||
p2pPort 10002
|
p2pPort 10002
|
||||||
@ -114,7 +114,7 @@ nodes. Here is an example ``Cordform`` task called ``deployNodes`` that creates
|
|||||||
|
|
||||||
Running this task will create three nodes in the ``build/nodes`` folder:
|
Running this task will create three nodes in the ``build/nodes`` folder:
|
||||||
|
|
||||||
* A ``Controller`` node that:
|
* A ``NetworkMapAndNotary`` node that:
|
||||||
|
|
||||||
* Serves as the network map
|
* Serves as the network map
|
||||||
* Offers a validating notary service
|
* Offers a validating notary service
|
||||||
@ -123,7 +123,7 @@ Running this task will create three nodes in the ``build/nodes`` folder:
|
|||||||
|
|
||||||
* ``PartyA`` and ``PartyB`` nodes that:
|
* ``PartyA`` and ``PartyB`` nodes that:
|
||||||
|
|
||||||
* Are pointing at the ``Controller`` as the network map service
|
* Are pointing at the ``NetworkMapAndNotary`` as the network map service
|
||||||
* Are not offering any services
|
* Are not offering any services
|
||||||
* Will have a webserver (since ``webPort`` is defined)
|
* Will have a webserver (since ``webPort`` is defined)
|
||||||
* Are running the ``corda-finance`` CorDapp
|
* Are running the ``corda-finance`` CorDapp
|
||||||
|
@ -13,7 +13,7 @@ Deploying our CorDapp
|
|||||||
---------------------
|
---------------------
|
||||||
Let's take a look at the nodes we're going to deploy. Open the project's ``build.gradle`` file and scroll down to the
|
Let's take a look at the nodes we're going to deploy. Open the project's ``build.gradle`` file and scroll down to the
|
||||||
``task deployNodes`` section. This section defines three nodes. There are two standard nodes (``PartyA`` and
|
``task deployNodes`` section. This section defines three nodes. There are two standard nodes (``PartyA`` and
|
||||||
``PartyB``), plus a special Controller node that is running the network map service and advertises a validating notary
|
``PartyB``), plus a special network map/notary node that is running the network map service and advertises a validating notary
|
||||||
service.
|
service.
|
||||||
|
|
||||||
.. code:: bash
|
.. code:: bash
|
||||||
@ -21,7 +21,7 @@ service.
|
|||||||
task deployNodes(type: net.corda.plugins.Cordform, dependsOn: ['jar']) {
|
task deployNodes(type: net.corda.plugins.Cordform, dependsOn: ['jar']) {
|
||||||
directory "./build/nodes"
|
directory "./build/nodes"
|
||||||
node {
|
node {
|
||||||
name "O=Controller,L=London,C=GB"
|
name "O=NetworkMapAndNotary,L=London,C=GB"
|
||||||
notary = [validating : true]
|
notary = [validating : true]
|
||||||
p2pPort 10002
|
p2pPort 10002
|
||||||
rpcPort 10003
|
rpcPort 10003
|
||||||
@ -142,7 +142,7 @@ The vaults of PartyA and PartyB should both display the following output:
|
|||||||
- "C=GB,L=London,O=PartyA"
|
- "C=GB,L=London,O=PartyA"
|
||||||
- "C=US,L=New York,O=PartyB"
|
- "C=US,L=New York,O=PartyB"
|
||||||
contract: "com.template.contract.IOUContract"
|
contract: "com.template.contract.IOUContract"
|
||||||
notary: "C=GB,L=London,O=Controller,CN=corda.notary.validating"
|
notary: "C=GB,L=London,O=NetworkMapAndNotary,CN=corda.notary.validating"
|
||||||
encumbrance: null
|
encumbrance: null
|
||||||
constraint:
|
constraint:
|
||||||
attachmentId: "F578320232CAB87BB1E919F3E5DB9D81B7346F9D7EA6D9155DC0F7BA8E472552"
|
attachmentId: "F578320232CAB87BB1E919F3E5DB9D81B7346F9D7EA6D9155DC0F7BA8E472552"
|
||||||
@ -157,7 +157,7 @@ The vaults of PartyA and PartyB should both display the following output:
|
|||||||
recordedTime: 1506415268.875000000
|
recordedTime: 1506415268.875000000
|
||||||
consumedTime: null
|
consumedTime: null
|
||||||
status: "UNCONSUMED"
|
status: "UNCONSUMED"
|
||||||
notary: "C=GB,L=London,O=Controller,CN=corda.notary.validating"
|
notary: "C=GB,L=London,O=NetworkMapAndNotary,CN=corda.notary.validating"
|
||||||
lockId: null
|
lockId: null
|
||||||
lockUpdateTime: 1506415269.548000000
|
lockUpdateTime: 1506415269.548000000
|
||||||
totalStatesAvailable: -1
|
totalStatesAvailable: -1
|
||||||
|
@ -17,7 +17,7 @@ if:
|
|||||||
|
|
||||||
We will deploy the CorDapp on 4 test nodes:
|
We will deploy the CorDapp on 4 test nodes:
|
||||||
|
|
||||||
* **Controller**, which hosts a validating notary service
|
* **NetworkMapAndNotary**, which hosts a validating notary service
|
||||||
* **PartyA**
|
* **PartyA**
|
||||||
* **PartyB**
|
* **PartyB**
|
||||||
* **PartyC**
|
* **PartyC**
|
||||||
@ -252,7 +252,7 @@ For each node, the ``runnodes`` script creates a node tab/window:
|
|||||||
|
|
||||||
Fri Jul 07 10:33:47 BST 2017>>>
|
Fri Jul 07 10:33:47 BST 2017>>>
|
||||||
|
|
||||||
For every node except the controller, the script also creates a webserver terminal tab/window:
|
For every node except the network map/notary, the script also creates a webserver terminal tab/window:
|
||||||
|
|
||||||
.. sourcecode:: none
|
.. sourcecode:: none
|
||||||
|
|
||||||
@ -276,7 +276,7 @@ IntelliJ
|
|||||||
|
|
||||||
The node driver defined in ``/src/test/kotlin/com/example/Main.kt`` allows you to specify how many nodes you would like
|
The node driver defined in ``/src/test/kotlin/com/example/Main.kt`` allows you to specify how many nodes you would like
|
||||||
to run and the configuration settings for each node. For the example CorDapp, the driver starts up four nodes
|
to run and the configuration settings for each node. For the example CorDapp, the driver starts up four nodes
|
||||||
and adds an RPC user for all but the "Controller" node (which serves as the notary):
|
and adds an RPC user for all but the network map/notary node:
|
||||||
|
|
||||||
.. sourcecode:: kotlin
|
.. sourcecode:: kotlin
|
||||||
|
|
||||||
@ -284,7 +284,7 @@ IntelliJ
|
|||||||
// No permissions required as we are not invoking flows.
|
// No permissions required as we are not invoking flows.
|
||||||
val user = User("user1", "test", permissions = setOf())
|
val user = User("user1", "test", permissions = setOf())
|
||||||
driver(isDebug = true, waitForNodesToFinish = true) {
|
driver(isDebug = true, waitForNodesToFinish = true) {
|
||||||
startNode(getX500Name(O="Controller",L="London",C='GB"), setOf(ServiceInfo(ValidatingNotaryService.type)))
|
startNode(getX500Name(O="NetworkMapAndNotary",L="London",C='GB"), setOf(ServiceInfo(ValidatingNotaryService.type)))
|
||||||
val (nodeA, nodeB, nodeC) = Futures.allAsList(
|
val (nodeA, nodeB, nodeC) = Futures.allAsList(
|
||||||
startNode(getX500Name(O="PartyA",L="London",C="GB"), rpcUsers = listOf(user)),
|
startNode(getX500Name(O="PartyA",L="London",C="GB"), rpcUsers = listOf(user)),
|
||||||
startNode(getX500Name(O="PartyB",L="New York",C="US"), rpcUsers = listOf(user)),
|
startNode(getX500Name(O="PartyB",L="New York",C="US"), rpcUsers = listOf(user)),
|
||||||
@ -475,15 +475,15 @@ The nodes can be split across machines and configured to communicate across the
|
|||||||
|
|
||||||
After deploying the nodes, navigate to the build folder (``kotlin-source/build/nodes``) and move some of the individual
|
After deploying the nodes, navigate to the build folder (``kotlin-source/build/nodes``) and move some of the individual
|
||||||
node folders to a different machine (e.g. using a USB key). It is important that none of the nodes - including the
|
node folders to a different machine (e.g. using a USB key). It is important that none of the nodes - including the
|
||||||
controller node - end up on more than one machine. Each computer should also have a copy of ``runnodes`` and
|
network map/notary node - end up on more than one machine. Each computer should also have a copy of ``runnodes`` and
|
||||||
``runnodes.bat``.
|
``runnodes.bat``.
|
||||||
|
|
||||||
For example, you may end up with the following layout:
|
For example, you may end up with the following layout:
|
||||||
|
|
||||||
* Machine 1: ``controller``, ``nodea``, ``runnodes``, ``runnodes.bat``
|
* Machine 1: ``NetworkMapAndNotary``, ``PartyA``, ``runnodes``, ``runnodes.bat``
|
||||||
* Machine 2: ``nodeb``, ``nodec``, ``runnodes``, ``runnodes.bat``
|
* Machine 2: ``PartyB``, ``PartyC``, ``runnodes``, ``runnodes.bat``
|
||||||
|
|
||||||
You must now edit the configuration file for each node, including the controller. Open each node's config file,
|
You must now edit the configuration file for each node, including the network map/notary. Open each node's config file,
|
||||||
and make the following changes:
|
and make the following changes:
|
||||||
|
|
||||||
* Change the Artemis messaging address to the machine's IP address (e.g. ``p2pAddress="10.18.0.166:10006"``)
|
* Change the Artemis messaging address to the machine's IP address (e.g. ``p2pAddress="10.18.0.166:10006"``)
|
||||||
@ -504,7 +504,7 @@ Debugging is done via IntelliJ as follows:
|
|||||||
// No permissions required as we are not invoking flows.
|
// No permissions required as we are not invoking flows.
|
||||||
val user = User("user1", "test", permissions = setOf())
|
val user = User("user1", "test", permissions = setOf())
|
||||||
driver(isDebug = true, waitForNodesToFinish = true) {
|
driver(isDebug = true, waitForNodesToFinish = true) {
|
||||||
startNode(getX500Name(O="Controller",L="London",C="GB"), setOf(ServiceInfo(ValidatingNotaryService.type)))
|
startNode(getX500Name(O="NetworkMapAndNotary",L="London",C="GB"), setOf(ServiceInfo(ValidatingNotaryService.type)))
|
||||||
val (nodeA, nodeB, nodeC) = Futures.allAsList(
|
val (nodeA, nodeB, nodeC) = Futures.allAsList(
|
||||||
startNode(getX500Name(O="PartyA",L=London,C=GB"), rpcUsers = listOf(user)),
|
startNode(getX500Name(O="PartyA",L=London,C=GB"), rpcUsers = listOf(user)),
|
||||||
startNode(getX500Name(O="PartyB",L=New York,C=US"), rpcUsers = listOf(user)),
|
startNode(getX500Name(O="PartyB",L=New York,C=US"), rpcUsers = listOf(user)),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user