Hello!
I was playing around with the Java Ledger API and I submitted a request to the CommandSubmissionService with a large payload, which was accepted by the CommandCompletionService.
However, when attempting to fetch the contract using the ActiveContractService, we find that we receive the error RESOURCE_EXHAUSTED: gRPC message exceeds maximum size 4194304: 5000618
This is a major problem for us as we use the ActiveContractService to cleanup and archive a user’s contracts, but we can’t archive the contracts since we can’t retrieve the contracts and we don’t have the ContractId. Furthermore, since we can only filter the ActiveContractService by party, we can no longer use the ActiveContractService for the submitter. The only resolution is to manually reset the ledger, which is not possible on a non-sandbox ledger.
Ideally, if a contract would be unable to be retrieved by the ActiveContractService, then it should not be accepted by the CommandCompletionService and/or CommandSubmissionService.
Any suggestions?
To replicate:
We have a simple smart contract of the form:
module SimpleOwnership where
import DA.Next.Set (Set)
template SimpleOwnership
with
a : Party
obs : Set Party
note : Text
where
signatory a
observer obs
ensure note /= "BadNote" || note /= "Yes"
Our command for the request only contains:
commandList.add(new SimpleOwnership(signatory, new Set<>(observerMap), args).create());
Where signatory
is “Bob”, observerMap
is empty and args
is a String of length 5,000,000.