Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

💅 Tip about jq; docker compose cleanup #1490

Merged
merged 2 commits into from
Jul 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading