Remote Participants in Canton

Hello,

I am tring to setup 2 remote participants with 1 domain in canton, DAML 2.1.1

Should i use 3VM, one for each participant and one for the domain?

The conf file on each participant must contain the references of the domain and itself, while the conf file of the domain must contain the remote participants and itself ?

How can I then connect the participants to the domain?

As I only want persistence in the domain, can I let the participants storage in memory?

Thank you

1 Like

Hi Derek,

A remote participant is essentially just a connection to a participant node (docs here). So you will need to run two participant nodes, and possibly connect to those two local participant nodes with two remote participant nodes.

Should i use 3VM, one for each participant and one for the domain?

Using 3 VMs is one option to run the two participant nodes and the domain node. Another option is to run all three nodes as separate JVM processes on the same machine (this will also isolate the nodes). A third option is to run all nodes in a single JVM process on the same machine (this is the default behaviour you’ll get if you specify all the local nodes in the same config file).

The conf file on each participant must contain the references of the domain and itself, while the conf file of the domain must contain the remote participants and itself ?

The configuration for a domain does not include information on participant nodes, though the config file you use to start a domain might contain additional configuration to also start a participant node or connect to a remove participant node.

Similarly, the configuration for a participant nodes not include information on domain nodes. A participant node can connect to a domain using the participant.domains.connect command even if the domain is not present in the config file used to start a participant. However, it is quite common to include a remote domain in the config file used to start a participant, as the participant can then connect to this domain without specifying an address etc.

You might find the documentation on static configuration useful, and might also want to take a look at the Canton examples (found inside the release bundle).

How can I then connect the participants to the domain?

This depends on how your network is set up. I’m not sure what your requirements are. In the simplest case where the participants and domains all run in a single JVM process (from one config file), the connection will (by default) happen automatically.

As I only want persistence in the domain, can I let the participants storage in memory?

Yes, this is possible. There is more documentation here.

2 Likes

Hello Phobe, thanks for the anwser,

I want my network to have the following flowchart:
image

I need to run an application for each participant, that’s why I need VMs.

Do these conf files make sense?

Another question, hyperledger fabric only works in enterprise edition?

Thank you

1 Like

Hi Derek

Your conf files look good to me :slight_smile: let me know if you have any trouble running them.

Hyperledger Fabric is only available in the enterprise edition, yes.

Phoebe

1 Like

Hi Phoebe,

I am now trying to run my files in each VM.

I get this error in VM representing participant:

and this error in VM representing domain:

This is my config file for Participant1:
image

and for mydomain
image

Any clue?

Hi Derek

Thanks for getting back in touch! In my experience, the problem you’re seeing is most commonly caused by a network misconfiguration that prevents the HTTP connections between nodes from being created.

As a first basic check, have you tried running ping 192.168.129.132 from the VM that is representing the participant?

Phoebe

Hello Phobe,

yes, ping works, (checked with wireshark)

i am now trying this command in participant node but it doesnt work either:

what other network configurations do you recommend?

Thank you

Hi Derek,

I suggest you try grpcurl -plaintext 192.168.129.132:10018 from the participant node’s VM.

You should get something like this

🌸 grpcurl -plaintext 127.0.0.1:5012 list
com.digitalasset.canton.crypto.admin.v0.VaultService
com.digitalasset.canton.domain.api.v0.DomainTimeService
com.digitalasset.canton.health.admin.v0.StatusService
com.digitalasset.canton.participant.admin.v0.DomainConnectivityService
com.digitalasset.canton.participant.admin.v0.EnterpriseParticipantReplicationService
com.digitalasset.canton.participant.admin.v0.InspectionService
com.digitalasset.canton.participant.admin.v0.PackageService
com.digitalasset.canton.participant.admin.v0.PartyNameManagementService
com.digitalasset.canton.participant.admin.v0.PingService
com.digitalasset.canton.participant.admin.v0.PruningService
com.digitalasset.canton.participant.admin.v0.ResourceManagementService
com.digitalasset.canton.participant.admin.v0.TransferService
com.digitalasset.canton.topology.admin.v0.InitializationService
com.digitalasset.canton.topology.admin.v0.TopologyAggregationService
com.digitalasset.canton.topology.admin.v0.TopologyManagerReadService
com.digitalasset.canton.topology.admin.v0.TopologyManagerWriteService
grpc.reflection.v1alpha.ServerReflection

If this doesn’t go through, I’d expect the issue to be something about your network. If you’re using docker, make sure the correct ports are exposed as expected. I’d also suggest checking there isn’t a firewall getting in the way.

Phoebe

1 Like

Hello,

The problem was the participant and domain conf file, the following files work for me:

Participant:
image

Domain:
image

For connecting the participant with domain i use this command:
participant1.domains.connect(“mydomain”,“http://192.168.61.129:10018”)

@Derek Please beware that by default, all Canton APIs bind to localhost: Installing Canton — Daml SDK 2.2.0 documentation

In order to make them available beyond the current host, you need to set the address to 0.0.0.0 everywhere where you are setting a port. Setting it to the host IP works as well, but is fragile as that IP might change.

We do that to avoid showing up in blog posts such as MongoDB Databases May Be Exposed by Security Misconfigurations