I’m trying to allocate a party with the canton CLI, but it doesn’t work. Steps I’ve taken:
- download Canton community, unzip it
- run:
^[[Adanielporterl6md6v:canton-community-2.0.0 danielportbin/canton -c examples/01-simple-topology/simple-topology.conf
_____ _
/ ____| | |
| | __ _ _ __ | |_ ___ _ __
| | / _` | '_ \| __/ _ \| '_ \
| |___| (_| | | | | || (_) | | | |
\_____\__,_|_| |_|\__\___/|_| |_|
Welcome to Canton!
Type `help` to get started. `exit` to leave.
@ participant1.ledger_api.parties.allocate("daniel", "hello")
ERROR c.d.c.e.CommunityConsoleEnvironment - Request failed for participant1.
GrpcClientGaveUp: DEADLINE_EXCEEDED/deadline exceeded after 53.999115819s. [closed=[], open=[[buffered_nanos=2647004, remote_addr=/127.0.0.1:5011]]]
Request: AllocateParty(daniel,hello)
Command BaseLedgerApiAdministration$ledger_api$parties$.allocate invoked from cmd0.sc:1
com.digitalasset.canton.console.CommandFailure: Command execution failed.
Unclear why this fails, but the “correct” way to do it seems to be to run participant1.parties.enable("Daniel")
, and probably to set the display name separately.
Party allocation via the ledger API participant1.ledger_api.parties.allocate
hangs if the allocating participant is not connected to a domain and the participant is by default configured to wait for the party to appear on a domain before it is considered allocated. You can change the configuration canton.participants.participant1.parameters.party-notification.type
from via-domain
to eager
to disable the waiting.
1 Like
Two follow up questions:
(a) So what happens to a party if am on a participant node, and I
- am not connected to a domain
-
enable
a party
- connect to that domain?
(b) is this documented somewhere clearly in the docs? Understanding this distinction between allocate party and enable party strikes me important operationally as I’m in the process of trying to bootstrap participant nodes w/ users and parties.
Thanks!
(a) When the participant connects to the domain, the party allocation will become visible on the ledger API, e.g., by reading all the parties over the parties endpoint.
(b) The config option is documented in https://docs.daml.com/2.0.0/canton/scaladoc/com/digitalasset/canton/participant/config/ParticipantNodeParameterConfig.html under the parameter partyChangeNotification
. I admit that this is not easy to find.
The current behavior is motivated by the idea that you need less synchronization if the participant is about to connect to a domain and you concurrently try to allocate a party. Both are typically the first things to do when you start a fresh participant node. When the party allocation has succeeded, you can be sure that you can use it on the participant until the participant disconnects from the domain again. This is explained in the documentation of the two options Eager
and ViaDomain
.
1 Like