Skip to content
CCPEDIAby Unity Nodes
Discussions/App Development/Dazl questionsForum ↗

Dazl questions

App Development4 posts150 viewsLast activity Jan 2024
NY
nycnewmanOP
Jan 2024

Few questions on dazl client

  • What is the expected format for a multi-entry key in exercise by choice? If I have a key (owner, id) : (Party, Text), what is the expect format of the key passed into the function?
  • What is the expected way to have never ending loops. Asyncio appears to recommend “while: True” loops though there appears to be xx_many options.
  • What does this mean “Not reading from transaction stream because we were only asked for a snapshot.”?
NY
nycnewman
Jan 2024
  • Multiple Key appears to be solved by usinga dictionary, i.e. {“_1”: value1, “_2”: value2}
  • However now receiving a different issue where coroutines are throwing an exception:

debug_error_string = "UNKNOWN:Error received from peer {grpc_message:"LOCAL_VERDICT_LOCKED_CONTRACTS(2,0): Rejected transaction is referring to locked contracts “, grpc_status:10, created_time:“2024-01-15T16:52:38.738088-05:00”}”

CO
cocreature
Jan 2024

LOCAL_VERDICT_LOCKED_CONTRACTS is a contention error i.e. there are multiple concurrent transaction that try to operate on the same contract or contract key. The Canton logs at least at DEBUG level should show you the contract id/key that is involved here.

NY
nycnewman
Jan 2024

Thanks @cocreature. I eventually figure out how to avoid this (was initiating multiple exercise_by_key and they were fighting over who got the contract. Still looking into the correct pattern to handle exeptions in asyncio to retry attempts.

← Back to Discussions