Hi, I have canton config like below
canton {
features {
enable-testing-commands=yes
}
domain-managers {
myDomain1 {
storage {
type = memory
}
admin-api.port = 5019
}
myDomain2 {
storage {
type = memory
}
admin-api.port = 5020
}
}
mediators.mediator1 {}
mediators.mediator2 {}
participants {
participant1 {
storage {
type = memory
}
admin-api {
port= 5012
address = “0.0.0.0”
}
ledger-api {
port = 5011
address = “0.0.0.0”
}
}
participant2 {
storage {
type = memory
}
admin-api {
port= 5022
address = "0.0.0.0"
}
ledger-api {
port = 5021
address = "0.0.0.0"
}
}
participant3 {
storage {
type = memory
}
admin-api {
port= 5032
address = "0.0.0.0"
}
ledger-api {
port = 5031
address = "0.0.0.0"
}
}
}
sequencers.ethereumSequencer1 {
public-api.port = 3001
admin-api.port = 4001
storage {
type = memory
}
sequencer {
type = "ethereum"
config {
ethereum-client {
type = "besu"
}
client-conf {
client-host="besu-1"
client-port=8550
}
authorization-enabled=false
contract {
type = "automatic-deployment"
}
}
}
}
}
demo.canton script like below:
import java.time.Duration
nodes.local.start()
myDomain1.setup.bootstrap_domain(List(sequencers.all(0)), List(mediator1))
myDomain2.setup.bootstrap_domain(List(sequencers.all(1)), List(mediator2))
println(s"Initialized local nodes: ${nodes.local.map(_.name).mkString(", “)}”)
println(“Running demo script”)
participant1.domains.connect_local(sequencers.all(0))
participant1.domains.connect_local(sequencers.all(1))
participant2.domains.connect_local(sequencers.all(1))
participant3.domains.connect_local(sequencers.all(0))
utils.retry_until_true {
participant2.domains.active(myDomain2)
}
val pingTime = participant1.health.ping(participant3, timeout = 60.seconds)
println(s"participant1 pings participant3 in $pingTime")
println("*“30)
println(s"Successfully initialized Canton-on-Fabric")
println("”*30)
When I run the canton, I have this error:
Compiling /canton/Main.sc
WARN o.h.f.s.h.Config - Failed to load any configuration from: config.properties. Using toolkit defaults
Initialized local nodes: participant3, participant1, participant2, myDomain2, myDomain1, fabricSequencer2, fabricSequencer1, ethereumSequencer1, mediator2, mediator1
Running demo script
ERROR c.d.c.c.EnterpriseConsoleEnvironment - Request failed for participant1.
GrpcRequestRefusedByServer: FAILED_PRECONDITION/INCOMPATIBLE_UNIQUE_CONTRACT_KEYS_MODE(9,e678035e): Cannot connect to domain fabricSequencer1 as the participant has UCK semantics enabled and has already been connected to other domains: myDomain1::122088838680…
Request: ConnectDomain(Domain ‘fabricSequencer1’,false)
CorrelationId: e678035eed7bf4f6a911645804a4080a
Context: Map(participant → participant1, domain → fabricSequencer1)
Command ParticipantAdministration$domains$.connect_local invoked from Main.sc:13
ERROR c.d.c.ConsoleInteractiveRunner - Running bootstrap script failed with an exception (Command execution failed.)!
I refer Error codes — Daml SDK 2.2.0 documentation as below:
INCOMPATIBLE_UNIQUE_CONTRACT_KEYS_MODE
- Explanation: This error indicates that the domain this participant is trying to connect to is a domain where unique contract keys are supported, while this participant is already connected to other domains. Multiple domains and unique contract keys are mutually exclusive features.
- Resolution: Use isolated participants for domains that require unique keys.
- Category: InvalidGivenCurrentSystemStateOther
- Conveyance: This error is logged with log-level INFO on the server side. This error is exposed on the API with grpc-status FAILED_PRECONDITION including a detailed error message
- Scaladocs: [INCOMPATIBLE_UNIQUE_CONTRACT_KEYS_MODE]
Could you advice how can a participant connect to 2 different domain, with one domain connecting to fabric sequencer, the other connecting to ethereum ? thanks!