What is a "known" party in the context of the HTTP JSON API "fetch all known parties" endpoint?

Hi @Alex_Matson,

/v1/parties and the underlying gRPC endpoint on the party management service return all parties that have been allocated on the ledger. There are now two cases:

  1. Your ledger runs without implicit party allocation. This is the case on most ledgers apart from sandbox. In this case, all parties have to be allocated explicitly. If you reference a party that hasn’t been allocated you will get an error. Note that this only applies to references in places where the party has a “semantic meaning” so signatories, observers and controllers. You can always have a template field of type Party and reference something abitrary there.

  2. Your ledger runs with implicit party allocation. You can still allocate parties explicitly in this mode and they will be returned. However, now if you reference a party that hasn’t been allocated before you won’t get an error, instead the party will be allocated implicitly and the command succeeds. So implicit party allocation is roughly equivalent to calling allocate immediately before submitting a command if the party hasn’t been allocated before.

So to answer your follow up question, parties always appear immediately after they have been allocated. The difference with implicit party allocation is that in addition to allocating parties explicitly you can also not allocate them upfront and instead they will be allocated the first time they are used.

It is also worth pointing out that implicit party allocation is primarily a development time feature. I don’t recommend using that in production, it’s very easy to mistype a party id somewhere.

2 Likes