docs for additional-node-infos (#2107)

* docs for additional-node-infos
This commit is contained in:
Alberto Arri 2017-11-24 13:27:30 +00:00 committed by GitHub
parent ce9b6c1f18
commit ffd693719a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 22 additions and 2 deletions

View File

@ -6,4 +6,5 @@ Corda networks
setting-up-a-corda-network setting-up-a-corda-network
permissioning permissioning
versioning network-map
versioning

View File

@ -1,6 +1,14 @@
Network Map Network Map
=========== ===========
The network map stores a collection of ``NodeInfo`` objects, each representing another node with which the node can interact.
There two sources from which a Corda node can retrieve ``NodeInfo`` objects:
1. the REST protocol with the network map service, which also provides a publishing API,
2. the ``additional-node-infos`` directory.
Protocol Design Protocol Design
--------------- ---------------
The node info publishing protocol: The node info publishing protocol:
@ -35,4 +43,15 @@ Network Map service REST API:
| GET | /api/network-map/parameters/{hash}| Retrieve ``NetworkParameters`` object with the same hash. | | GET | /api/network-map/parameters/{hash}| Retrieve ``NetworkParameters`` object with the same hash. |
+----------------+-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ +----------------+-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+
TODO: Access control of the network map will be added in the future. TODO: Access control of the network map will be added in the future.
The ``additional-node-infos`` directory
---------------------------------------
Each Corda node reads, and continuously polls, the files contained in a directory named ``additional-node-infos`` inside the node base directory.
Nodes expect to find a serialized ``SignedData<NodeInfo>`` object, the same object which is sent to network map server.
Whenever a node starts it writes on disk a file containing its own ``NodeInfo``, this file is called ``nodeInfo-XXX`` where ``XXX`` is a long string.
Hence if an operator wants node A to see node B they can pick B's ``NodeInfo`` file from B base directory and drop it into A's ``additional-node-infos`` directory.