Remove hostNotaryServiceLocally config property – nodes need to specify the correct notary service type in extraAdvertisedServiceIds

This commit is contained in:
Andrius Dagys 2016-10-05 15:25:39 +01:00
parent 3b187a2171
commit e5c0c975bd
7 changed files with 2 additions and 17 deletions

View File

@ -5,7 +5,6 @@ keyStorePassword : "cordacadevpass"
trustStorePassword : "trustpass"
artemisAddress : "localhost:31337"
webAddress : "localhost:31339"
hostNotaryServiceLocally: false
extraAdvertisedServiceIds: "corda.interest_rates"
networkMapAddress : "localhost:12345"
useHTTPS : false

View File

@ -5,7 +5,6 @@ keyStorePassword : "cordacadevpass"
trustStorePassword : "trustpass"
artemisAddress : "localhost:31338"
webAddress : "localhost:31340"
hostNotaryServiceLocally: false
extraAdvertisedServiceIds: "corda.interest_rates"
networkMapAddress : "localhost:12345"
useHTTPS : false

View File

@ -5,6 +5,5 @@ keyStorePassword : "cordacadevpass"
trustStorePassword : "trustpass"
artemisAddress : "localhost:12345"
webAddress : "localhost:12346"
hostNotaryServiceLocally: true
extraAdvertisedServiceIds: ""
extraAdvertisedServiceIds: "corda.notary.simple"
useHTTPS : false

View File

@ -38,7 +38,6 @@ General node configuration file for hosting the IRSDemo services.
}
artemisAddress : "localhost:31337"
webAddress : "localhost:31339"
hostNotaryServiceLocally: false
extraAdvertisedServiceIds: "corda.interest_rates"
networkMapAddress : "localhost:12345"
useHTTPS : false
@ -54,7 +53,6 @@ NetworkMapService plus Simple Notary configuration file.
trustStorePassword : "trustpass"
artemisAddress : "localhost:12345"
webAddress : "localhost:12346"
hostNotaryServiceLocally: true
extraAdvertisedServiceIds: ""
useHTTPS : false
@ -90,9 +88,7 @@ Configuration File Fields
.. note:: If HTTPS is enabled then the browser security checks will require that the accessing url host name is one of either the machine name, fully qualified machine name, or server IP address to line up with the Subject Alternative Names contained within the development certificates. This is addition to requiring the ``/config/dev/corda_dev_ca.cer`` root certificate be installed as a Trusted CA.
:hostNotaryServiceLocally: If true the Node will host and advertise a verifying Notary service.
:extraAdvertisedServiceIds: A list of ServiceType id strings to be advertised to the NetworkMapService and thus be available when other nodes query the NetworkMapCache for supporting nodes. This can also include plugin services loaded from .jar files in the
:extraAdvertisedServiceIds: A list of ServiceType id strings to be advertised to the NetworkMapService and thus be available when other nodes query the NetworkMapCache for supporting nodes. This can also include plugin services loaded from .jar files in the
:networkMapAddress: If `null`, or missing the node is declaring itself as the NetworkMapService host. Otherwise the configuration value is the remote HostAndPort string for the ArtemisMQ service on the hosting node.

View File

@ -14,7 +14,6 @@ import com.r3corda.node.services.messaging.ArtemisMessagingServer
import com.r3corda.node.services.messaging.NodeMessagingClient
import com.r3corda.node.services.network.InMemoryNetworkMapCache
import com.r3corda.node.services.network.NetworkMapService
import com.r3corda.node.services.transactions.NotaryService
import com.r3corda.node.utilities.AffinityExecutor
import com.typesafe.config.Config
import com.typesafe.config.ConfigRenderOptions
@ -292,7 +291,6 @@ class DriverDSL(
val name = providedName ?: "${pickA(name)}-${messagingAddress.port}"
val nodeDirectory = "$baseDirectory/$name"
val useNotary = advertisedServices.any { it.type.isSubTypeOf(NotaryService.Type) }
val config = NodeConfiguration.loadConfig(
baseDirectoryPath = Paths.get(nodeDirectory),
@ -302,7 +300,6 @@ class DriverDSL(
"basedir" to Paths.get(nodeDirectory).normalize().toString(),
"artemisAddress" to messagingAddress.toString(),
"webAddress" to apiAddress.toString(),
"hostNotaryServiceLocally" to useNotary.toString(),
"extraAdvertisedServiceIds" to advertisedServices.joinToString(","),
"networkMapAddress" to networkMapAddress.toString()
)
@ -408,7 +405,6 @@ class DriverDSL(
"basedir" to Paths.get(nodeDirectory).normalize().toString(),
"artemisAddress" to networkMapAddress.toString(),
"webAddress" to apiAddress.toString(),
"hostNotaryServiceLocally" to "false",
"extraAdvertisedServiceIds" to ""
)
)

View File

@ -9,7 +9,6 @@ import com.r3corda.node.internal.Node
import com.r3corda.node.serialization.NodeClock
import com.r3corda.node.services.messaging.NodeMessagingClient
import com.r3corda.node.services.network.NetworkMapService
import com.r3corda.node.services.transactions.SimpleNotaryService
import com.typesafe.config.Config
import com.typesafe.config.ConfigFactory
import com.typesafe.config.ConfigParseOptions
@ -139,13 +138,11 @@ class FullNodeConfiguration(conf: Config) : NodeConfiguration {
val webAddress: HostAndPort by conf
val messagingServerAddress: HostAndPort? = if (conf.hasPath("messagingServerAddress")) HostAndPort.fromString(conf.getString("messagingServerAddress")) else null
val networkMapAddress: HostAndPort? = if (conf.hasPath("networkMapAddress")) HostAndPort.fromString(conf.getString("networkMapAddress")) else null
val hostNotaryServiceLocally: Boolean by conf
val extraAdvertisedServiceIds: String by conf
val clock: Clock = NodeClock()
fun createNode(): Node {
val advertisedServices = mutableSetOf<ServiceInfo>()
if (hostNotaryServiceLocally) advertisedServices.add(ServiceInfo(SimpleNotaryService.Type))
if (!extraAdvertisedServiceIds.isNullOrEmpty()) {
for (serviceId in extraAdvertisedServiceIds.split(",")) {
advertisedServices.add(ServiceInfo.parse(serviceId))

View File

@ -11,6 +11,5 @@ dataSourceProperties = {
"dataSource.password" = ""
}
devMode = true
hostNotaryServiceLocally = false
certificateSigningService = "https://cordaci-netperm.corda.r3cev.com"
useHTTPS = false