Skip to content
CCPEDIAby Unity Nodes
App Development

Open a Canton Console to a Docker Compose-hosted CN validator node?

2 posts167 viewsLast activity Jan 2025

  1. WallaceKellyOP

    I have a 0.3.5 bundle of the Docker-Compose Based Deployment of a Validator Node running on my workstation. How do I open a Canton Console for remote administration of the participant node within that network.

  2. WallaceKelly

    Here is what I’m doing on my Mac. I’d welcome simplifying suggestions.

    1. In the docker-compose/validator folder, run source .env to set the environment variable IMAGE_REPO.
    2. Set the IMAGE_TAG environment variable, as was done when setting up the Docker Compose cluster.
    3. Create a canton-console.conf file with the following:
       canton {
         features.enable-preview-commands = yes
         remote-participants {
           participant {
             ledger-api {
               address = participant
               port = 5001
             }
             admin-api {
               address = participant
               port = 5002
             }
           }
         }
       }
      
    4. Identify the Docker network name with the following. For me, the network name is splice-validator_splice_validator.
      docker inspect splice-validator-participant-1 \
        | jq '.[0].NetworkSettings.Networks | keys.[0]'
      
    5. Launch the Canton Console with something like the following:
       docker run -it --rm \
         --network splice-validator_splice_validator \
         --volume ./:/host/ \
         --entrypoint '/app/bin/canton' \
         ${IMAGE_REPO}canton:${IMAGE_TAG} \
         -Dlogback.statusListenerClass=ch.qos.logback.core.status.NopStatusListener \
         --log-level-root WARN \
         --config /host/canton-console.conf
      
    6. Confirm success by running participant.health.status within the Canton Console.
    Sample results
     docker run -it --rm \
       --network splice-validator_splice_validator \
       --volume ./:/host/ \
       --entrypoint '/app/bin/canton' \
       ${IMAGE_REPO}canton:${IMAGE_TAG} \
       -Dlogback.statusListenerClass=ch.qos.logback.core.status.NopStatusListener \
       --log-level-root WARN \
       --config /host/canton-console.conf
    
     Compiling (synthetic)/ammonite/predef/ArgsPredef.sc
     Compiling /app/(console)
       _____            _
      / ____|          | |
     | |     __ _ _ __ | |_ ___  _ __
     | |    / _` | '_ \| __/ _ \| '_ \
     | |___| (_| | | | | || (_) | | | |
      \_____\__,_|_| |_|\__\___/|_| |_|
    
       Welcome to Canton!
       Type `help` to get started. `exit` to leave.
    
    
     @ participant.health.status
    
     res0: NodeStatus[ParticipantStatus] = Participant id: PAR::da-wallace-1::12209...
     Uptime: 1h 41m 14.15722s
     Ports:
       ledger: 5001
       admin: 5002
     Connected domains:
       global-domain::122084177677...
     Unhealthy domains: None
     Active: true
     Components:
       db-storage : Ok()
       sync-domain : Ok()
       sync-domain-ephemeral : Ok()
       sequencer-client : Ok()
       acs-commitment-processor : Ok()
     Version: 3.2.0-SNAPSHOT
     Supported protocol version(s): 32