Unexpected conversion exception: Requested name cannot be different from id hint

With Daml SDK 2.9.6, the following Daml Script…

setup : Script ()
setup = script do
  alice <- allocateParty "Alice"
  bob <- allocatePartyWithHint "Bob Smith" (PartyIdHint "Bob")
  
  partyDetails <- listKnownParties
  forA_ partyDetails \pd -> do
    debug pd
  
  pure()

… creates parties with displayNames:

  PartyDetails {party = 'Alice', displayName = Some "Alice", isLocal = True}
  PartyDetails {party = 'Bob', displayName = Some "Bob Smith", isLocal = True}

In contrast, with a Daml SDK 3.3 snapshot, I’m getting this error…

Script execution failed:
  CRASH: Unexpected conversion exception:
  Requested name 'Bob Smith' cannot be different from id hint 'Bob'

If I edit the Daml Script to make the name and id hint the same…

  bob <- allocatePartyWithHint "Bob" (PartyIdHint "Bob")

…then the script runs successfully:

  PartyDetails {party = 'Alice-9cefe94d', isLocal = True}
  PartyDetails {party = 'Bob', isLocal = True}

What should I know about these changes?

  • Looks like displayName is no longer a thing.
  • The 9cefe94d in Alice-9cefe94d was unexpected. Is Daml Script adding that? Or Sandbox? or would the corresponding Ledger API call have the same behavior?