Important

This feature is only available in Canton Enterprise

# Enterprise Domain Integrations¶

The Canton Enterprise edition provides the following domain integrations in addition to the PostgreSQL-based domain in the Canton Community edition.

## Connecting Canton to an external sequencer¶

Canton can be configured to use a sequencer running externally as a sequencer node. Independently of which kind of sequencer has been set up, the steps to connect to it from domains and participants are the same.

Canton Sequencer nodes start a Canton Sequencer GRPC server that exposes public and admin apis. In order for a Canton domain to connect to a sequencer node, it has to be configured as an external sequencer. See Canton config file sample below as an example:

canton.domains.<mydomain>.sequencer {
type = external
connections = [{
type = grpc
host = "<url>"
port = "<port>"
admin-port = "<admin-port>"
transport-security = false
authentication-required = false
}]
}


When using multiple sequencers, you have to define the extra connections under the connections list.

On top of that, in order to specify which sequencer the domain and participant nodes will use, you need to define a sequencer selection policy. The 3 kinds of policy are:

• first: first from the connections list is picked

• random: random one is picked

• prefer: you can specify a preferred host or port. Both are optional, and if both are left undefined the first connection is picked.

For the domain you can define the policy in config as follows:

canton.domains.<mydomain>.sequencer {
type = external
sequencer-selection-policy {
type = prefer
host = fabric.sequencer
port = 3000
}
}


In the case of the domain node, if the policy is not defined, it will default to first.

In the case of the participant node, it is possible to define a policy when connecting to a domain as follows:

participant1.domains.connect_local(domain, sequencerSelectionPolicy = SequencerConnectionSelectionPolicy.Prefer(host = Some("fabric.sequencer"), port = Some(3000)))
participant2.domains.connect_local(domain, sequencerSelectionPolicy = SequencerConnectionSelectionPolicy.Random)


If the policy is not set, it defaults to first.

## Configuring a Sequencer in Embedded mode¶

The Fabric and Ethereum Sequencers as seen in their respective pages, as well as the Postgres Sequencer, can be setup as external Sequencer nodes as follows:

canton.sequencers.<mysequencer> {
public-api.port=5018
admin-api.port=5019
storage.type=memory
sequencer {
type = ... # either "postgres", "fabric", or "ethereum"
config {
# sequencer type specific config
}
}
}


Sequencers configured in this manner run independently of the domain node. As shown in the previous section, domains can connect to such sequencers running externally by configuring external sequencer(s) and pointing to the sequencer’s GRPC public and admin api addresses.

However, it is also possible to configure an embedded sequencer (that runs inside a domain node) as follows:

canton.domains.<mydomain>.sequencer {
type = "embedded"
sequencer {
type = ... # either "postgres", "fabric", or "ethereum"
config {
# sequencer type specific config
}
}
}


In this case, the sequencer’s GRPC public and admin api addresses will be the same as the domain node’s. Note that it is still possible to set extra external sequencers for the domain by adding connections to canton.domains.<mydomain>.sequencer.other-sequencers just like it’s done for the case of solely external sequencers with canton.domains.<mydomain>.sequencer.connections.

Note that if no sequencer configuration is provided as part of the domain configuration, it will by default start an embedded Postgres sequencer.

The advantage of setting up a sequencer in an embedded way is that it simplifies the configuration (since the sequencer reuses the domain’s public and admin api and storage and thus there is no need to specifify these parameters) in cases where the topology is such that the sequencer runs in the same environment as the domain.