corda/docs/source/running-a-notary.rst
Joel Dudley f0138dfe17 Tutorial refresh for v1.0 and moving of code into separate files. (#1758)
* Moves code sections in tutorials to code files.

* Removes wallet references.

* Updates repo layout doc.

* Removes remaining cordapp-tutorial references, replaced with cordapp-example.

* Fixes broken link.

* Misc docs fixes.

* Refreshes the ServiceHub and rpc ops api pages.

* Updates the cheat sheet.

* Updates cookbooks.

* Refreshes the running-a-notary tutorial.

* Updates flow-testing tutorial

* Updates tear-offs tutorial.

* Refreshes integration-testing tutorial.

* Updates to contract tutorial and accompanying code to bring inline with V1 release.

* Refreshes contract-upgrade tutorial.

* Fixed broken code sample in "writing a contract" and updated contracts dsl.

* Added contract ref to java code. Fixed broken rst markup.

* Updates transaction-building tutorial.

* Updates the client-rpc and flow-state-machines tutorials.

* Updates the oracles tutorial.

* Amended country in X500 names from "UK" to "GB"

* Update FlowCookbook.kt

* Amended cheatsheet. Minor update on contract upgrades tutoraial.

* Added `extraCordappPackagesToScan` to node driver.

* Changes to match new function signature.

* Update to reflect change in location of cash contract name.
2017-10-02 10:11:33 +01:00

1.5 KiB

Running a notary service

At present we have several prototype notary implementations:

  1. SimpleNotaryService (single node) -- commits the provided transaction input states without any validation.
  2. ValidatingNotaryService (single node) -- retrieves and validates the whole transaction history (including the given transaction) before committing.
  3. RaftNonValidatingNotaryService (distributed) -- functionally equivalent to SimpleNotaryService, but stores the committed states in a distributed collection replicated and persisted in a Raft cluster. For the consensus layer we are using the Copycat framework
  4. RaftValidatingNotaryService (distributed) -- as above, but performs validation on the transactions received

To have a node run a notary service, you need to set appropriate configuration values before starting it (see corda-configuration-file for reference).

For SimpleNotaryService, simply add the following service id to the list of advertised services:

extraAdvertisedServiceIds : [ "net.corda.notary.simple" ]

For ValidatingNotaryService, it is:

extraAdvertisedServiceIds : [ "net.corda.notary.validating" ]

Setting up a Raft notary is currently slightly more involved and is not recommended for prototyping purposes. There is work in progress to simplify it. To see it in action, however, you can try out the notary-demo.