Can the dynamic parameters be set in a conf file?
The docs describe dynamic parameters which are awesome! For example, the following can be run through the Canton console:
mydomain.service.set_reconciliation_interval(5.seconds)
mydomain.service.set_max_rate_per_participant(100)
mydomain.service.set_max_request_size(100000)
mydomain.service.set_mediator_deduplication_timeout(2.minutes)
Those could also be set through a --boostrap script at startup.
I’ve been asked, “Can those also be set in the configuration file?”
I’m going to say, “No.” I tried a couple of different ways:
Naive attempt 1
canton {
domains {
mydomain {
reconciliationInterval = 5000
maxRatePerParticipant = 100
maxRequestSize = 100000
mediatorDeduplicationTimeout = 120000
Naive attempt 2
canton {
domains {
mydomain {
service {
reconciliationInterval = 5000
maxRatePerParticipant = 100
maxRequestSize = 100000
mediatorDeduplicationTimeout = 120000
}
In both cases, I got errors with information like this:
Cannot convert configuration to a config of class
com.digitalasset.canton.config.CantonEnterpriseConfig.
Failures are:
at 'canton.domains.mydomain.maxRatePerParticipant': Unknown key.
at 'canton.domains.mydomain.maxRequestSize': Unknown key.
at 'canton.domains.mydomain.mediatorDeduplicationTimeout': Unknown key.
at 'canton.domains.mydomain.reconciliationInterva...
Please correct me if I’ve overlooked a different way.
After further testing it appears that dynamic parameters cannot be configured within the configuration file from protocol version 4 onwards.
When running the below config file:
canton {
domains {
mydomain {
init.domain-parameters {
protocol-version = 5
max-rate-per-participant = 100
}
I get the helpful error of
Failed to convert static domain params: Starting from protocol version 4, max rate per participant is a dynamic parameter that cannot be configured within the configuration file.
Hey!
We removed the ability to configure the dynamic parameters from config on purpose. If you have this ability, then the following scenario can occur:
- You set the config to
max-rate-per-participant = 100 - You start the domain manager node, which means that
max-rate-per-participant = 100 - You use the console to change
max-rate-per-participantto 200
At this point, what is in the config differs from the value used on the domain, which is quite misleading.