mirror of
https://github.com/corda/corda.git
synced 2025-06-18 07:08:15 +00:00
CORDA-1006: Undoing the wiring of maxMessageSize as it's not correctly implemented and updating the docs to clarify its status. (#2501) (#2729)
The network parameter was just fed into Artemis' minLargeMessageSize property which isn't the same thing.
(cherry picked from commit 49f75da
)
This commit is contained in:
@ -99,13 +99,20 @@ The current set of network parameters:
|
|||||||
|
|
||||||
:minimumPlatformVersion: The minimum platform version that the nodes must be running. Any node which is below this will
|
:minimumPlatformVersion: The minimum platform version that the nodes must be running. Any node which is below this will
|
||||||
not start.
|
not start.
|
||||||
|
|
||||||
:notaries: List of identity and validation type (either validating or non-validating) of the notaries which are permitted
|
:notaries: List of identity and validation type (either validating or non-validating) of the notaries which are permitted
|
||||||
in the compatibility zone.
|
in the compatibility zone.
|
||||||
:maxMessageSize: Maximum allowed size in bytes of an individual message sent over the wire. Note that attachments are
|
|
||||||
|
:maxMessageSize: (This is currently ignored. However, it will be wired up in a future release.)
|
||||||
|
|
||||||
|
.. TODO Replace the above with this once wired: Maximum allowed size in bytes of an individual message sent over the wire. Note that attachments are
|
||||||
a special case and may be fragmented for streaming transfer, however, an individual transaction or flow message
|
a special case and may be fragmented for streaming transfer, however, an individual transaction or flow message
|
||||||
may not be larger than this value.
|
may not be larger than this value.
|
||||||
|
|
||||||
:maxTransactionSize: Maximum allowed size in bytes of a transaction. This is the size of the transaction object and its attachments.
|
:maxTransactionSize: Maximum allowed size in bytes of a transaction. This is the size of the transaction object and its attachments.
|
||||||
|
|
||||||
:modifiedTime: The time when the network parameters were last modified by the compatibility zone operator.
|
:modifiedTime: The time when the network parameters were last modified by the compatibility zone operator.
|
||||||
|
|
||||||
:epoch: Version number of the network parameters. Starting from 1, this will always increment whenever any of the
|
:epoch: Version number of the network parameters. Starting from 1, this will always increment whenever any of the
|
||||||
parameters change.
|
parameters change.
|
||||||
:whitelistedContractImplementations: List of whitelisted versions of contract code.
|
:whitelistedContractImplementations: List of whitelisted versions of contract code.
|
||||||
|
@ -92,6 +92,9 @@ open class Node(configuration: NodeConfiguration,
|
|||||||
CordappLoader.createDefaultWithTestPackages(configuration, scanPackages.split(scanPackagesSeparator))
|
CordappLoader.createDefaultWithTestPackages(configuration, scanPackages.split(scanPackagesSeparator))
|
||||||
} ?: CordappLoader.createDefault(configuration.baseDirectory)
|
} ?: CordappLoader.createDefault(configuration.baseDirectory)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO Wire up maxMessageSize
|
||||||
|
const val MAX_FILE_SIZE = 10485760
|
||||||
}
|
}
|
||||||
|
|
||||||
override val log: Logger get() = staticLog
|
override val log: Logger get() = staticLog
|
||||||
@ -165,14 +168,14 @@ open class Node(configuration: NodeConfiguration,
|
|||||||
startLocalRpcBroker(networkParameters)
|
startLocalRpcBroker(networkParameters)
|
||||||
}
|
}
|
||||||
val advertisedAddress = info.addresses[0]
|
val advertisedAddress = info.addresses[0]
|
||||||
bridgeControlListener = BridgeControlListener(configuration, serverAddress, networkParameters.maxMessageSize)
|
bridgeControlListener = BridgeControlListener(configuration, serverAddress, /*networkParameters.maxMessageSize*/MAX_FILE_SIZE)
|
||||||
|
|
||||||
printBasicNodeInfo("Advertised P2P messaging addresses", info.addresses.joinToString())
|
printBasicNodeInfo("Advertised P2P messaging addresses", info.addresses.joinToString())
|
||||||
rpcServerAddresses?.let {
|
rpcServerAddresses?.let {
|
||||||
rpcMessagingClient = RPCMessagingClient(configuration.rpcOptions.sslConfig, it.admin, networkParameters.maxMessageSize)
|
rpcMessagingClient = RPCMessagingClient(configuration.rpcOptions.sslConfig, it.admin, /*networkParameters.maxMessageSize*/MAX_FILE_SIZE)
|
||||||
}
|
}
|
||||||
verifierMessagingClient = when (configuration.verifierType) {
|
verifierMessagingClient = when (configuration.verifierType) {
|
||||||
VerifierType.OutOfProcess -> VerifierMessagingClient(configuration, serverAddress, services.monitoringService.metrics, networkParameters.maxMessageSize)
|
VerifierType.OutOfProcess -> VerifierMessagingClient(configuration, serverAddress, services.monitoringService.metrics, /*networkParameters.maxMessageSize*/MAX_FILE_SIZE)
|
||||||
VerifierType.InMemory -> null
|
VerifierType.InMemory -> null
|
||||||
}
|
}
|
||||||
require(info.legalIdentities.size in 1..2) { "Currently nodes must have a primary address and optionally one serviced address" }
|
require(info.legalIdentities.size in 1..2) { "Currently nodes must have a primary address and optionally one serviced address" }
|
||||||
@ -187,7 +190,7 @@ open class Node(configuration: NodeConfiguration,
|
|||||||
database,
|
database,
|
||||||
services.networkMapCache,
|
services.networkMapCache,
|
||||||
advertisedAddress,
|
advertisedAddress,
|
||||||
networkParameters.maxMessageSize,
|
/*networkParameters.maxMessageSize*/MAX_FILE_SIZE,
|
||||||
isDrainingModeOn = nodeProperties.flowsDrainingMode::isEnabled,
|
isDrainingModeOn = nodeProperties.flowsDrainingMode::isEnabled,
|
||||||
drainingModeWasChangedEvents = nodeProperties.flowsDrainingMode.values)
|
drainingModeWasChangedEvents = nodeProperties.flowsDrainingMode.values)
|
||||||
}
|
}
|
||||||
@ -199,24 +202,9 @@ open class Node(configuration: NodeConfiguration,
|
|||||||
val rpcBrokerDirectory: Path = baseDirectory / "brokers" / "rpc"
|
val rpcBrokerDirectory: Path = baseDirectory / "brokers" / "rpc"
|
||||||
with(rpcOptions) {
|
with(rpcOptions) {
|
||||||
rpcBroker = if (useSsl) {
|
rpcBroker = if (useSsl) {
|
||||||
ArtemisRpcBroker.withSsl(
|
ArtemisRpcBroker.withSsl(this.address!!, sslConfig, securityManager, certificateChainCheckPolicies, /*networkParameters.maxMessageSize*/MAX_FILE_SIZE, jmxMonitoringHttpPort != null, rpcBrokerDirectory)
|
||||||
this.address!!,
|
|
||||||
sslConfig,
|
|
||||||
securityManager,
|
|
||||||
certificateChainCheckPolicies,
|
|
||||||
networkParameters.maxMessageSize,
|
|
||||||
jmxMonitoringHttpPort != null,
|
|
||||||
rpcBrokerDirectory)
|
|
||||||
} else {
|
} else {
|
||||||
ArtemisRpcBroker.withoutSsl(
|
ArtemisRpcBroker.withoutSsl(this.address!!, adminAddress!!, sslConfig, securityManager, certificateChainCheckPolicies, /*networkParameters.maxMessageSize*/MAX_FILE_SIZE, jmxMonitoringHttpPort != null, rpcBrokerDirectory)
|
||||||
this.address!!,
|
|
||||||
adminAddress!!,
|
|
||||||
sslConfig,
|
|
||||||
securityManager,
|
|
||||||
certificateChainCheckPolicies,
|
|
||||||
networkParameters.maxMessageSize,
|
|
||||||
jmxMonitoringHttpPort != null,
|
|
||||||
rpcBrokerDirectory)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return rpcBroker!!.addresses
|
return rpcBroker!!.addresses
|
||||||
@ -226,7 +214,7 @@ open class Node(configuration: NodeConfiguration,
|
|||||||
|
|
||||||
private fun makeLocalMessageBroker(networkParameters: NetworkParameters): NetworkHostAndPort {
|
private fun makeLocalMessageBroker(networkParameters: NetworkParameters): NetworkHostAndPort {
|
||||||
with(configuration) {
|
with(configuration) {
|
||||||
messageBroker = ArtemisMessagingServer(this, p2pAddress.port, networkParameters.maxMessageSize)
|
messageBroker = ArtemisMessagingServer(this, p2pAddress.port, /*networkParameters.maxMessageSize*/MAX_FILE_SIZE)
|
||||||
return NetworkHostAndPort("localhost", p2pAddress.port)
|
return NetworkHostAndPort("localhost", p2pAddress.port)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user