Navigator drop downs only include local parties

Background

  • I have a Canton domain setup with two participants.
  • The participant1 node has party Alice enabled.
  • The participant2 node has parties Bob and Bank enabled.
  • I have Navigator instances pointed at the two participant nodes.
  • I am using utils.generate_navigator_conf(...) to create ui-backend files.
  • When I try to create a contract, I find that Navigator’s Party drop down boxes only include “local” parties.
  • The gRPC method ListKnownParties on participant2 lists all the parties, both local and non-local (see below).

ui-backend.conf for participant2
// run with
// daml navigator server localhost 5021 -t wallclock --port 5025 -c ui-backend-participant2.conf
users {
    participant2 {
        party = "participant2::12207...fae41"
        password = password
    }

    Bob {
        party = "Bob::12207...fae41"
        password = password
    }

    Bank {
        party = "Bank::12207...fae41"
        password = password
    }
}
ListKnownParties results
{
    "party_details": [
        {
            "party": "Alice::12200...f46c5",
            "display_name": "",
            "is_local": false,
            "local_metadata": {
                "annotations": [],
                "resource_version": ""
            }
        },
        {
            "party": "Bank::12207...fae41",
            "display_name": "",
            "is_local": true,
            "local_metadata": {
                "annotations": [],
                "resource_version": ""
            }
        },
        {
            "party": "Bob::122077...fae41",
            "display_name": "",
            "is_local": true,
            "local_metadata": {
                "annotations": [],
                "resource_version": ""
            }
        },
        {
            "party": "participant1::12200...f46c5",
            "display_name": "",
            "is_local": false,
            "local_metadata": {
                "annotations": [],
                "resource_version": ""
            }
        },
        {
            "party": "participant2::12207...fae41",
            "display_name": "",
            "is_local": true,
            "local_metadata": {
                "annotations": [],
                "resource_version": ""
            }
        }
    ]
}

Questions

  1. Is Navigator’s limited list of parties expected? Am I missing a configuration that might make all known parties appear in Navigator? Maybe the ui-backend.conf file should include all the participants?

  2. Is there an easier workaround (see below) to use Navigator to create contracts with non-local parties?

Workaround

I was able to create an Iou for Alice as follows:

  1. Log into a Canton Console connected to the domain.
  2. Get a reference to the Alice party. For example,
    var alice = mydomain.parties.list("Alice").head.party
  3. Get the proto string for the party.
    alice.toProtoPrimitive
  4. Copy-and-paste the proto string from the Canton Console into the Navigator field.

Is Navigator’s limited list of parties expected?

Yes that is expected. Navigator is connected to one of the participants and you can use only the parties local to that participant there. If you want to login as the other party start a separate Navigator instance and connect it to the other participant.

This is not specific to Navigator. Navigator just acts as another ledger API client here. Your ledger API client should always be connected to the participant that hosts your party.

Just to be clear… my issue is not logging in.

Once I log in and try to create or exercise a contract that involves a party on another participant node, that party on the other participant node does not appear in the dropdown.

Oh apologies, I misunderstood. That sounds like a bug to me.

This is surely related…

case UpdatedParties(details) =>
  details.foreach { partyDetails =>
    if (partyDetails.isLocal) {
      val displayName = partyDetails.displayName.getOrElse(partyDetails.party)
      self ! Subscribe(displayName, ApiTypes.Party(partyDetails.party))
    } else {
      log.debug(s"Ignoring non-local party ${partyDetails.party}")
    }
  }

I will create a bug/feature ticket.

Created https://github.com/digital-asset/daml/issues/15918 to track.