From bceb30471f72725592c45a14aa162635e0106566 Mon Sep 17 00:00:00 2001 From: Noon Date: Tue, 9 Jul 2024 13:25:57 +0100 Subject: [PATCH] :nail_care: Tip about jq; docker compose cleanup (#1490) - Fixes #1488 - Fixes #1489 --- * [x] CHANGELOG updated or not needed * [x] Documentation updated or not needed * [x] Haddocks updated or not needed * [x] No new TODOs introduced or explained herafter --- .github/workflows/ci-nix.yaml | 4 ++++ demo/docker-compose.yaml | 2 -- docs/docs/getting-started.md | 15 +++++++++++++-- sample-node-config/aws/docker/docker-compose.yaml | 2 -- sample-node-config/gcp/docker-compose.yaml | 2 -- 5 files changed, 17 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci-nix.yaml b/.github/workflows/ci-nix.yaml index 83e4d777098..f0e723a4e24 100644 --- a/.github/workflows/ci-nix.yaml +++ b/.github/workflows/ci-nix.yaml @@ -15,6 +15,10 @@ on: # Everyday at 4:00 AM - cron: "0 4 * * *" +permissions: + checks: write + pull-requests: write + jobs: build-test: name: "Build & test" diff --git a/demo/docker-compose.yaml b/demo/docker-compose.yaml index 2c28370a973..7a73f63b91d 100644 --- a/demo/docker-compose.yaml +++ b/demo/docker-compose.yaml @@ -1,5 +1,3 @@ -version: "3.9" - services: cardano-node: image: ghcr.io/intersectmbo/cardano-node:8.9.1 diff --git a/docs/docs/getting-started.md b/docs/docs/getting-started.md index 735baddad4b..d793758f1df 100644 --- a/docs/docs/getting-started.md +++ b/docs/docs/getting-started.md @@ -36,7 +36,7 @@ For convenience, we provide a script `./run-docker.sh`, which combines all the f ## Set up the devnet -Next, prepare the devnet configuration to bootstrap a local Cardano blockchain. +Next, prepare the devnet configuration to bootstrap a local Cardano blockchain. **Note** that we use a simplified variant of Cardano that does not require any stake pools. ```shell @@ -56,10 +56,21 @@ docker compose logs cardano-node -f You should see traces containing `TraceAdoptedBlock`, which means that the devnet is producing blocks .. nice! + :::info Do not wait too long between these two commands. If you get `TraceNoLedgerView` errors from the Cardano node, the genesis start time is too far in the past, and you need to update them by running `prepare-devnet.sh` again. ::: +:::tip +You can use [jq](https://jqlang.github.io/jq/) to follow the logs and see the node update kinds with the +following command: + +``` +docker compose logs -f --no-log-prefix cardano-node | jq -Rr 'fromjson? | .data.val.kind' +``` +::: + + Next, we need to give Alice, Bob, and Carol some UTXOs for committing and ada for paying fees. To do this, use the `seed-devnet.sh` script, which uses the `cardano-cli` within the already running `cardano-node` container: ```shell @@ -86,4 +97,4 @@ This will start a full-blown terminal interface loaded with signing keys corresp Using the terminal interface of any node, you can now `[i]nit` the Hydra head and `[c]ommit` pre-distributed funds to it. Note that these steps are near-instant as the devnet is producing blocks much faster than a public testnet or the mainnet. After committing from all nodes, the head will automatically open, and you can also use the `hydra-tui` or the API to create new transactions and submit them to the Hydra head. -![](./open-head.png) \ No newline at end of file +![](./open-head.png) diff --git a/sample-node-config/aws/docker/docker-compose.yaml b/sample-node-config/aws/docker/docker-compose.yaml index 99928ece98c..d547ed15d22 100644 --- a/sample-node-config/aws/docker/docker-compose.yaml +++ b/sample-node-config/aws/docker/docker-compose.yaml @@ -1,5 +1,3 @@ -version: "3.9" - # Note: awslogs-group value depends on `key_name` under terraform.tfvars services: diff --git a/sample-node-config/gcp/docker-compose.yaml b/sample-node-config/gcp/docker-compose.yaml index 03e090b55f6..3ea67e906ee 100644 --- a/sample-node-config/gcp/docker-compose.yaml +++ b/sample-node-config/gcp/docker-compose.yaml @@ -1,5 +1,3 @@ -version: "3.9" - services: cardano-node: image: inputoutput/cardano-node:latest