Hello!
We’re using the Java gRPC ledger-api bindings to allocate parties and found some issues depending on whether the partyIdHint is set or not. Here is a brief portion of the code which highlights how we are using the gRPC PartyManagementService, both with the hint and without the hint.
PartyManagementServiceOuterClass.AllocatePartyResponse response;
if (withPartyHint){
response = partyManagementServiceBlockingStub.
allocateParty(PartyManagementServiceOuterClass.AllocatePartyRequest.newBuilder().setDisplayName(party).setPartyIdHint(party).build());
} else {
response = partyManagementServiceBlockingStub
.allocateParty(PartyManagementServiceOuterClass.AllocatePartyRequest.newBuilder().setDisplayName(party).build());
}
In our scenario, we assume the displayName is the same as the partyIdHint. We found the following results, where the number of characters is the length of the displayName
and partyIdHint
(if set).
- 219 characters with no hint:
OK
- 219 characters with hint:
INTERNAL: DAML LF Ledger String is too long
- 218 characters with hint:
OK
- 256 characters with hint:
INTERNAL: DAML LF Party is too long
- 256 characters with no hint:
OK
- 255 characters with hint:
INTERNAL: DAML LF Ledger String is too long
- 255 characters with no hint:
OK
We realised that when we did not provide a partyIdHint
, it the party name defaulted to some arbitrary name which didn’t surpass the 255 character limit. However, the displayName did not seem to have any limit from what we could tell.
I guess the key thing is that there seems to be some internal limit which doesn’t let us hit the 255 character limit due to the DAML LF Ledger String
error and was wondering if this is known behavior or if there are any plans to fix it?