Skip to content

Commit e5542f8

Browse files
authored
Merge pull request #23 from kilnfi/chore/upgrade-go-1.23
chore/upgrade go 1.23
2 parents 35a9f18 + abb604e commit e5542f8

File tree

6 files changed

+41
-35
lines changed

6 files changed

+41
-35
lines changed

.github/workflows/lint.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
- uses: actions/checkout@v4
2020
- uses: actions/setup-go@v5
2121
with:
22-
go-version: 1.22
22+
go-version: 1.23
2323
- name: golangci-lint
2424
uses: golangci/golangci-lint-action@v6
2525
with:

.github/workflows/release.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
- name: Set up Go
2727
uses: actions/setup-go@v5
2828
with:
29-
go-version: 1.22
29+
go-version: 1.23
3030
- name: Run GoReleaser
3131
uses: goreleaser/goreleaser-action@v6
3232
with:

.tool-versions

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
golang 1.22.4
1+
golang 1.23.4

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Builder
2-
ARG BUILDER=golang:1.22-alpine3.19
3-
ARG RUNNER=alpine:3.19
2+
ARG BUILDER=golang:1.23-alpine3.20
3+
ARG RUNNER=alpine:3.20
44
ARG CARDANO_VERSION=10.1.3
55
ARG CNCLI_VERSION=6.5.1
66

README.md

Lines changed: 35 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,34 @@ This project use the following dependencies:
1111
- [BlockFrost](https://blockfrost.dev/). You need to have a account and a subscription.
1212
- [cncli](https://github.com/cardano-community/cncli) to calculate the slot leaders.
1313
- [cardano-cli](https://github.com/IntersectMBO/cardano-cli) to query additional data from a RPC node.
14-
- A valid RPC node
15-
- You need to download the Genesis configuration files and provide the VRF signing key for each monitored pool.
14+
- A valid RPC node.
15+
- Download the [Genesis configuration files](https://book.world.dev.cardano.org/environments.html) and provide the VRF signing key for each monitored pool.
1616

1717
## Usage
1818

19+
To start the watcher, you need to open a socket connection with your Cardano node. This can be done using the following commands:
20+
21+
### With Kubernetes
22+
```bash
23+
kubectl port-forward pod/<POD_NAME> 3002 &
24+
socat UNIX-LISTEN:/tmp/cardano.socket,fork,reuseaddr,unlink-early, TCP:127.0.0.1:3002
25+
```
26+
27+
### Without Kubernetes
28+
```bash
29+
socat UNIX-LISTEN:/tmp/cardano.socket,fork,reuseaddr,unlink-early, TCP:<IP>:<PORT>
30+
```
31+
32+
Ensure that you have downloaded the [Genesis configuration files](https://book.world.dev.cardano.org/environments.html). You also need to provide the VRF signing key for each monitored pool.
33+
34+
Then, to start the watcher, execute the following command:
35+
1936
```bash
2037
./cardano-validator-watcher [flags]
2138
```
39+
40+
If you don't specify a config path, by default, the watcher searches for a `config.yaml` file in the current directory.
41+
2242
### Flags
2343

2444
| Flag | Description | Default Value | Required |
@@ -49,17 +69,16 @@ This project use the following dependencies:
4969
The watcher uses a `config.yaml` file in the current working directory by default. Use the `--config` flag to specify a different configuration file.
5070

5171
### Full Example
52-
5372
```yaml
5473
pools:
55-
- instance: "cardano-producer-xxxx-0"
56-
id: "poolxxxxxxxxxxxx"
57-
name: "xxxx-0"
58-
key: "config/xxxx.vrf.skey"
59-
- instance: "cardano-producer-xxxx-1"
60-
id: "poolxxxxxxxxxxxx"
61-
name: "xxxx-1"
62-
key: "config/xxxxx-1.vrf.skey"
74+
- instance: "cardano-producer-pool-0"
75+
id: "pool1abcd1234efgh5678ijklmnopqrstuvwx"
76+
name: "pool-0"
77+
key: "config/pool-0.vrf.skey"
78+
- instance: "cardano-producer-pool-1"
79+
id: "pool2abcd1234efgh5678ijklmnopqrstuvwx"
80+
name: "pool-1"
81+
key: "config/pool-1.vrf.skey"
6382
exclude: true
6483
allow-empty-slots: true
6584
network: "mainnet"
@@ -95,26 +114,13 @@ cardano:
95114
96115
| Field | Description | Example |
97116
|---------------------------|-----------------------------------------------------------|---------------------------------------------------------------------|
98-
| `instance` | Name of the instance | `"mainnet-cardano-producer-kiln-0"` |
99-
| `id` | Pool ID | `"pool10rdglgh4pzvkf936p2m669qzarr9dusrhmmz9nultm3uvq4eh5k"` |
100-
| `name` | Name of the pool | `"kiln-0"` |
101-
| `key` | Path to the key file | `"config/kiln-0.vrf.skey"` |
117+
| `instance` | Name of the instance | `"cardano-producer-pool-0"` |
118+
| `id` | Pool ID | `"pool1abcd1234efgh5678ijklmnopqrstuvwx"` |
119+
| `name` | Name of the pool | `"pool-0"` |
120+
| `key` | Path to the key file | `"config/pool-0.vrf.skey"` |
102121
| `exclude` | Exclude the pool from monitoring | `true` |
103-
| `allow-empty-slots` | Pools is allowed to not have slot leaders | `"config/kiln-0.vrf.skey"` |
122+
| `allow-empty-slots` | Pools is allowed to not have slot leaders | `false` |
104123

105-
```yaml
106-
pools:
107-
- instance: "cardano-producer-xxxx-0"
108-
id: "poolxxxxxxxxxxxx"
109-
name: "xxxx-0"
110-
key: "config/xxxx.vrf.skey"
111-
- instance: "cardano-producer-xxxx-1"
112-
id: "poolxxxxxxxxxxxx"
113-
name: "xxxx-1"
114-
key: "config/xxxxx-1.vrf.skey"
115-
exclude: true
116-
allow-empty-slots: true
117-
```
118124

119125
### Global Settings
120126

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/kilnfi/cardano-validator-watcher
22

3-
go 1.22.5
3+
go 1.23
44

55
replace github.com/mitchellh/mapstructure => github.com/go-viper/mapstructure v1.6.0
66

0 commit comments

Comments
 (0)