Skip to content
CCPEDIAby Unity Nodes
App Development

Grpcurl accessing ledger-api in daml v1.18.1 and v2.0

2 posts318 views1 likesLast activity Apr 2022

  1. kctamOP

    Hi team,

    We can use grpcurl accessing a sandbox from v1.18.1. For example,

    % grpcurl -plaintext localhost:6865 list
    com.daml.ledger.api.v1.ActiveContractsService
    com.daml.ledger.api.v1.CommandCompletionService
    com.daml.ledger.api.v1.CommandService
    com.daml.ledger.api.v1.CommandSubmissionService
    com.daml.ledger.api.v1.LedgerConfigurationService
    com.daml.ledger.api.v1.LedgerIdentityService
    com.daml.ledger.api.v1.PackageService
    com.daml.ledger.api.v1.TransactionService
    com.daml.ledger.api.v1.VersionService
    com.daml.ledger.api.v1.admin.ConfigManagementService
    com.daml.ledger.api.v1.admin.PackageManagementService
    com.daml.ledger.api.v1.admin.ParticipantPruningService
    com.daml.ledger.api.v1.admin.PartyManagementService
    com.daml.ledger.api.v1.testing.ResetService
    grpc.health.v1.Health
    grpc.reflection.v1alpha.ServerReflection
    

    When we bring up sandbox with daml v2.0, this command does not work, and error message is shown in the sandbox.

    ERROR c.d.c.e.CommunityEnvironment - A fatal error has occurred in canton-env-execution-context. Terminating thread.
    java.lang.NullPointerException: null
    	at io.grpc.protobuf.services.ProtoReflectionService.getRefreshedIndex(ProtoReflectionService.java:93)
    	at io.grpc.protobuf.services.ProtoReflectionService.serverReflectionInfo(ProtoReflectionService.java:134)
    	at io.grpc.reflection.v1alpha.ServerReflectionGrpc$MethodHandlers.invoke(ServerReflectionGrpc.java:208)
    	at io.grpc.stub.ServerCalls$StreamingServerCallHandler.startCall(ServerCalls.java:235)
    	at io.grpc.Contexts.interceptCall(Contexts.java:52)
    	at com.daml.ledger.api.auth.interceptor.AuthorizationInterceptor$$anon$1.$anonfun$new$2(AuthorizationInterceptor.scala:72)
    	at scala.concurrent.impl.Promise$Transformation.run(Promise.scala:484)
    	at java.base/java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1426)
    	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
    	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
    	at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
    	at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
    	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)
    

    Kindly advise if anything we need to set in order to get back what we have in v1.18.1.

    Thanks in advance.
    kc

  2. cocreature 1

    This was a bug in SDK 2.0. It’s fixed in SDK 2.1.