mirror of
https://github.com/corda/corda.git
synced 2025-06-19 07:38:22 +00:00
Remove hostNotaryServiceLocally config property – nodes need to specify the correct notary service type in extraAdvertisedServiceIds
This commit is contained in:
@ -5,7 +5,6 @@ keyStorePassword : "cordacadevpass"
|
|||||||
trustStorePassword : "trustpass"
|
trustStorePassword : "trustpass"
|
||||||
artemisAddress : "localhost:31337"
|
artemisAddress : "localhost:31337"
|
||||||
webAddress : "localhost:31339"
|
webAddress : "localhost:31339"
|
||||||
hostNotaryServiceLocally: false
|
|
||||||
extraAdvertisedServiceIds: "corda.interest_rates"
|
extraAdvertisedServiceIds: "corda.interest_rates"
|
||||||
networkMapAddress : "localhost:12345"
|
networkMapAddress : "localhost:12345"
|
||||||
useHTTPS : false
|
useHTTPS : false
|
||||||
|
@ -5,7 +5,6 @@ keyStorePassword : "cordacadevpass"
|
|||||||
trustStorePassword : "trustpass"
|
trustStorePassword : "trustpass"
|
||||||
artemisAddress : "localhost:31338"
|
artemisAddress : "localhost:31338"
|
||||||
webAddress : "localhost:31340"
|
webAddress : "localhost:31340"
|
||||||
hostNotaryServiceLocally: false
|
|
||||||
extraAdvertisedServiceIds: "corda.interest_rates"
|
extraAdvertisedServiceIds: "corda.interest_rates"
|
||||||
networkMapAddress : "localhost:12345"
|
networkMapAddress : "localhost:12345"
|
||||||
useHTTPS : false
|
useHTTPS : false
|
||||||
|
@ -5,6 +5,5 @@ keyStorePassword : "cordacadevpass"
|
|||||||
trustStorePassword : "trustpass"
|
trustStorePassword : "trustpass"
|
||||||
artemisAddress : "localhost:12345"
|
artemisAddress : "localhost:12345"
|
||||||
webAddress : "localhost:12346"
|
webAddress : "localhost:12346"
|
||||||
hostNotaryServiceLocally: true
|
extraAdvertisedServiceIds: "corda.notary.simple"
|
||||||
extraAdvertisedServiceIds: ""
|
|
||||||
useHTTPS : false
|
useHTTPS : false
|
@ -38,7 +38,6 @@ General node configuration file for hosting the IRSDemo services.
|
|||||||
}
|
}
|
||||||
artemisAddress : "localhost:31337"
|
artemisAddress : "localhost:31337"
|
||||||
webAddress : "localhost:31339"
|
webAddress : "localhost:31339"
|
||||||
hostNotaryServiceLocally: false
|
|
||||||
extraAdvertisedServiceIds: "corda.interest_rates"
|
extraAdvertisedServiceIds: "corda.interest_rates"
|
||||||
networkMapAddress : "localhost:12345"
|
networkMapAddress : "localhost:12345"
|
||||||
useHTTPS : false
|
useHTTPS : false
|
||||||
@ -54,7 +53,6 @@ NetworkMapService plus Simple Notary configuration file.
|
|||||||
trustStorePassword : "trustpass"
|
trustStorePassword : "trustpass"
|
||||||
artemisAddress : "localhost:12345"
|
artemisAddress : "localhost:12345"
|
||||||
webAddress : "localhost:12346"
|
webAddress : "localhost:12346"
|
||||||
hostNotaryServiceLocally: true
|
|
||||||
extraAdvertisedServiceIds: ""
|
extraAdvertisedServiceIds: ""
|
||||||
useHTTPS : false
|
useHTTPS : false
|
||||||
|
|
||||||
@ -90,8 +88,6 @@ 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.
|
.. 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.
|
: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.
|
||||||
|
@ -14,7 +14,6 @@ import com.r3corda.node.services.messaging.ArtemisMessagingServer
|
|||||||
import com.r3corda.node.services.messaging.NodeMessagingClient
|
import com.r3corda.node.services.messaging.NodeMessagingClient
|
||||||
import com.r3corda.node.services.network.InMemoryNetworkMapCache
|
import com.r3corda.node.services.network.InMemoryNetworkMapCache
|
||||||
import com.r3corda.node.services.network.NetworkMapService
|
import com.r3corda.node.services.network.NetworkMapService
|
||||||
import com.r3corda.node.services.transactions.NotaryService
|
|
||||||
import com.r3corda.node.utilities.AffinityExecutor
|
import com.r3corda.node.utilities.AffinityExecutor
|
||||||
import com.typesafe.config.Config
|
import com.typesafe.config.Config
|
||||||
import com.typesafe.config.ConfigRenderOptions
|
import com.typesafe.config.ConfigRenderOptions
|
||||||
@ -292,7 +291,6 @@ class DriverDSL(
|
|||||||
val name = providedName ?: "${pickA(name)}-${messagingAddress.port}"
|
val name = providedName ?: "${pickA(name)}-${messagingAddress.port}"
|
||||||
|
|
||||||
val nodeDirectory = "$baseDirectory/$name"
|
val nodeDirectory = "$baseDirectory/$name"
|
||||||
val useNotary = advertisedServices.any { it.type.isSubTypeOf(NotaryService.Type) }
|
|
||||||
|
|
||||||
val config = NodeConfiguration.loadConfig(
|
val config = NodeConfiguration.loadConfig(
|
||||||
baseDirectoryPath = Paths.get(nodeDirectory),
|
baseDirectoryPath = Paths.get(nodeDirectory),
|
||||||
@ -302,7 +300,6 @@ class DriverDSL(
|
|||||||
"basedir" to Paths.get(nodeDirectory).normalize().toString(),
|
"basedir" to Paths.get(nodeDirectory).normalize().toString(),
|
||||||
"artemisAddress" to messagingAddress.toString(),
|
"artemisAddress" to messagingAddress.toString(),
|
||||||
"webAddress" to apiAddress.toString(),
|
"webAddress" to apiAddress.toString(),
|
||||||
"hostNotaryServiceLocally" to useNotary.toString(),
|
|
||||||
"extraAdvertisedServiceIds" to advertisedServices.joinToString(","),
|
"extraAdvertisedServiceIds" to advertisedServices.joinToString(","),
|
||||||
"networkMapAddress" to networkMapAddress.toString()
|
"networkMapAddress" to networkMapAddress.toString()
|
||||||
)
|
)
|
||||||
@ -408,7 +405,6 @@ class DriverDSL(
|
|||||||
"basedir" to Paths.get(nodeDirectory).normalize().toString(),
|
"basedir" to Paths.get(nodeDirectory).normalize().toString(),
|
||||||
"artemisAddress" to networkMapAddress.toString(),
|
"artemisAddress" to networkMapAddress.toString(),
|
||||||
"webAddress" to apiAddress.toString(),
|
"webAddress" to apiAddress.toString(),
|
||||||
"hostNotaryServiceLocally" to "false",
|
|
||||||
"extraAdvertisedServiceIds" to ""
|
"extraAdvertisedServiceIds" to ""
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
@ -9,7 +9,6 @@ import com.r3corda.node.internal.Node
|
|||||||
import com.r3corda.node.serialization.NodeClock
|
import com.r3corda.node.serialization.NodeClock
|
||||||
import com.r3corda.node.services.messaging.NodeMessagingClient
|
import com.r3corda.node.services.messaging.NodeMessagingClient
|
||||||
import com.r3corda.node.services.network.NetworkMapService
|
import com.r3corda.node.services.network.NetworkMapService
|
||||||
import com.r3corda.node.services.transactions.SimpleNotaryService
|
|
||||||
import com.typesafe.config.Config
|
import com.typesafe.config.Config
|
||||||
import com.typesafe.config.ConfigFactory
|
import com.typesafe.config.ConfigFactory
|
||||||
import com.typesafe.config.ConfigParseOptions
|
import com.typesafe.config.ConfigParseOptions
|
||||||
@ -139,13 +138,11 @@ class FullNodeConfiguration(conf: Config) : NodeConfiguration {
|
|||||||
val webAddress: HostAndPort by conf
|
val webAddress: HostAndPort by conf
|
||||||
val messagingServerAddress: HostAndPort? = if (conf.hasPath("messagingServerAddress")) HostAndPort.fromString(conf.getString("messagingServerAddress")) else null
|
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 networkMapAddress: HostAndPort? = if (conf.hasPath("networkMapAddress")) HostAndPort.fromString(conf.getString("networkMapAddress")) else null
|
||||||
val hostNotaryServiceLocally: Boolean by conf
|
|
||||||
val extraAdvertisedServiceIds: String by conf
|
val extraAdvertisedServiceIds: String by conf
|
||||||
val clock: Clock = NodeClock()
|
val clock: Clock = NodeClock()
|
||||||
|
|
||||||
fun createNode(): Node {
|
fun createNode(): Node {
|
||||||
val advertisedServices = mutableSetOf<ServiceInfo>()
|
val advertisedServices = mutableSetOf<ServiceInfo>()
|
||||||
if (hostNotaryServiceLocally) advertisedServices.add(ServiceInfo(SimpleNotaryService.Type))
|
|
||||||
if (!extraAdvertisedServiceIds.isNullOrEmpty()) {
|
if (!extraAdvertisedServiceIds.isNullOrEmpty()) {
|
||||||
for (serviceId in extraAdvertisedServiceIds.split(",")) {
|
for (serviceId in extraAdvertisedServiceIds.split(",")) {
|
||||||
advertisedServices.add(ServiceInfo.parse(serviceId))
|
advertisedServices.add(ServiceInfo.parse(serviceId))
|
||||||
|
@ -11,6 +11,5 @@ dataSourceProperties = {
|
|||||||
"dataSource.password" = ""
|
"dataSource.password" = ""
|
||||||
}
|
}
|
||||||
devMode = true
|
devMode = true
|
||||||
hostNotaryServiceLocally = false
|
|
||||||
certificateSigningService = "https://cordaci-netperm.corda.r3cev.com"
|
certificateSigningService = "https://cordaci-netperm.corda.r3cev.com"
|
||||||
useHTTPS = false
|
useHTTPS = false
|
Reference in New Issue
Block a user