Skip to content

Commit

Permalink
💅 Tip about jq; docker compose cleanup (#1490)
Browse files Browse the repository at this point in the history
- 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
  • Loading branch information
noonio committed Jul 9, 2024
1 parent 3e8cff2 commit bceb304
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 8 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/ci-nix.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 0 additions & 2 deletions demo/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
version: "3.9"

services:
cardano-node:
image: ghcr.io/intersectmbo/cardano-node:8.9.1
Expand Down
15 changes: 13 additions & 2 deletions docs/docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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)
![](./open-head.png)
2 changes: 0 additions & 2 deletions sample-node-config/aws/docker/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
version: "3.9"

# Note: awslogs-group value depends on `key_name` under terraform.tfvars

services:
Expand Down
2 changes: 0 additions & 2 deletions sample-node-config/gcp/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
version: "3.9"

services:
cardano-node:
image: inputoutput/cardano-node:latest
Expand Down

0 comments on commit bceb304

Please sign in to comment.