Klaus Schulz
Klaus Schulz

Reputation: 557

Define remote Notary service

I am playing around with the Yo!-example CorDapp, version 3.0.9.

How can I deploy the contents of yo-cordapp\build\nodes\Notary to a remote server and use it as my notary instance?

I tried

task deployNodes(type: net.corda.plugins.Cordform, dependsOn: ['jar']) {
    directory "./build/nodes"
    node {
        name "O=Notary,L=RemoteNotary,C=GB"
        notary = [validating : true]
        p2pAddress("1.2.3.4")
        p2pPort 10002
        cordapps = ["$corda_release_group:corda-finance:$corda_release_version"]
    }

but this does not work since the notary service is still looked up at "localhost:10002" as I can see in the logs.

However, although I just started services for PartyA and PartyB (and explicitly no notary service) I can send a Yo! from PartyA to PartyB although there is no notary service present? Maybe I misunderstood the concept of a notary but I thought when FINALIZINGa flow the NotaryService is invoked and required to sign the transaction?

Upvotes: 1

Views: 77

Answers (1)

Joel
Joel

Reputation: 23210

A notary is only required when either of the following are true:

  • The transaction has 1+ input states
  • The transaction has a timewindow

In the case of sending a Yo!, neither applies, so the notary does not see the transaction.

In terms of allowing the nodes to see the remote notary, take a look at the documentation here: https://docs.corda.net/network-map.html. You either need to:

Upvotes: 1

Related Questions