Skip to content

Commit 593aba6

Browse files
Merge pull request #932 from cardano-foundation/chore/prepare-8-4-0
chore: prepare 8.4.0
2 parents c2c5ec0 + 8801941 commit 593aba6

File tree

26 files changed

+13366
-239
lines changed

26 files changed

+13366
-239
lines changed

.env.docker-compose

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
## Main variables
2+
NETWORK=mainnet
3+
COMPOSE_PROFILES=token-registry
4+
5+
## Postgres Variables
6+
POSTGRES_VERSION=14.10-alpine
7+
POSTGRES_PORT=5432
8+
DB_PATH=postgres14-data
9+
10+
## Cardano Node Variables
11+
CARDANO_NODE_VERSION=10.5.1
12+
CARDANO_NODE_DIR=node-ipc
13+
CARDANO_NODE_DB=node-db
14+
15+
## Mithril variables
16+
MITHRIL_SYNC=true
17+
MITHRIL_VERSION=2537.0
18+
SNAPSHOT_DIGEST=latest
19+
# if not set standard values will be used
20+
AGGREGATOR_ENDPOINT=
21+
# if not set standard values will be used
22+
GENESIS_VERIFICATION_KEY=
23+
ANCILLARY_VERIFICATION_KEY=
24+
25+
## Ogmios Variables
26+
OGMIOS_VERSION=v6.14.0
27+
OGMIOS_PORT=1337
28+
29+
## DB Sync Variables
30+
# RESTORE_SNAPSHOT=path/to/snapshot/tgz
31+
CARDANO_DB_SYNC_VERSION=13.6.0.5
32+
CARDANO_DB_SYNC_DIR=db-sync-data
33+
34+
## Hasura Variables
35+
HASURA_PORT=8090
36+
CARDANO_GRAPHQL_VERSION=8.3.3
37+
38+
## Token Registry Variables
39+
TOKEN_REGISTRY_VERSION=1.3.0
40+
TOKEN_REGISTRY_PORT=8080
41+
42+
## Background Variables
43+
LOGGER_MIN_SEVERITY=info
44+
METADATA_SERVER_URI=http://token-metadata-registry:${TOKEN_REGISTRY_PORT}
45+
CHAIN_FOLLOWER_START_SLOT=0
46+
CHAIN_FOLLOWER_START_ID=
47+
48+
## Server Variables
49+
API_PORT=3100

.env.docker-compose-preprod

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
## Main variables
2+
NETWORK=preprod
3+
COMPOSE_PROFILES=token-registry
4+
5+
## Postgres Variables
6+
POSTGRES_VERSION=14.10-alpine
7+
POSTGRES_PORT=5433
8+
DB_PATH=/opt/graph-ql-preprod/sql_data
9+
10+
## Cardano Node Variables
11+
CARDANO_NODE_VERSION=10.5.1
12+
CARDANO_NODE_DIR=/opt/graph-ql-preprod/node_data
13+
CARDANO_NODE_DB=${CARDANO_NODE_DIR}/db
14+
15+
## Mithril Variables
16+
MITHRIL_SYNC=true
17+
MITHRIL_VERSION=2537.0
18+
SNAPSHOT_DIGEST=latest
19+
# if not set standard values will be used
20+
AGGREGATOR_ENDPOINT=
21+
# if not set standard values will be used
22+
GENESIS_VERIFICATION_KEY=
23+
ANCILLARY_VERIFICATION_KEY=
24+
25+
## Ogmios Variables
26+
OGMIOS_VERSION=v6.14.0
27+
OGMIOS_PORT=1338
28+
29+
## DB Sync Variables
30+
# RESTORE_SNAPSHOT=path/to/snapshot/tgz
31+
CARDANO_DB_SYNC_VERSION=13.6.0.5
32+
CARDANO_DB_SYNC_DIR=/opt/graph-ql-preprod/db-sync-data
33+
34+
## Hasura Variables
35+
HASURA_PORT=8091
36+
CARDANO_GRAPHQL_VERSION=8.3.3
37+
38+
## Token Registry Variables
39+
TOKEN_REGISTRY_VERSION=1.3.0
40+
TOKEN_REGISTRY_PORT=8080
41+
42+
## Background Variables
43+
LOGGER_MIN_SEVERITY=info
44+
METADATA_SERVER_URI=http://token-metadata-registry:${TOKEN_REGISTRY_PORT}
45+
CHAIN_FOLLOWER_START_SLOT=0
46+
CHAIN_FOLLOWER_START_ID=
47+
48+
## Server Variables
49+
API_PORT=3101
50+
51+
52+

Dockerfile

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -57,15 +57,14 @@ ENV \
5757
POSTGRES_USER_FILE=/run/secrets/postgres_user
5858
WORKDIR /src
5959

60+
# BACKGROUND
6061
FROM ubuntu-nodejs AS background
6162
ARG NETWORK=mainnet
6263
# using local token registry as default
6364
ARG METADATA_SERVER_URI="http://token-metadata-registry:8091"
6465
RUN apt-get update -y && apt-get install lsb-release -y
65-
RUN curl --proto '=https' --tlsv1.2 -sSf -L https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - &&\
66-
echo "deb http://apt.postgresql.org/pub/repos/apt/ `lsb_release -cs`-pgdg main" | tee /etc/apt/sources.list.d/pgdg.list &&\
67-
apt-get update && apt-get install -y --no-install-recommends \
68-
ca-certificates
66+
RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates \
67+
&& rm -rf /var/lib/apt/lists/*
6968
COPY --from=downloader /usr/local/bin/hasura /usr/local/bin/hasura
7069
COPY --from=downloader /root/.hasura/plugins/bin/hasura-cli_ext /usr/local/bin/hasura-cli_ext
7170
ENV \
@@ -92,6 +91,7 @@ COPY --from=cardano-graphql-production-deps /app/packages/api-cardano-db-hasura/
9291
WORKDIR /app/packages/api-cardano-db-hasura/dist
9392
CMD ["node", "background.js"]
9493

94+
# SERVER
9595
FROM ubuntu-nodejs AS server
9696
ARG NETWORK=mainnet
9797
ENV \
@@ -116,7 +116,3 @@ COPY config/network/${NETWORK}/cardano-node /config/cardano-node/
116116
WORKDIR /app/packages/server/dist
117117
EXPOSE 3100
118118
CMD ["node", "index.js"]
119-
120-
FROM cardanofoundation/cf-token-metadata-registry-api:latest AS token-registry
121-
ADD scripts/token-registry-init.sh /app/entrypoint.sh
122-
ENTRYPOINT sh /app/entrypoint.sh

README.md

Lines changed: 14 additions & 89 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,7 @@ Boot the [docker compose stack] using a convention for container and volume scop
5454
optionally hitting the remote cache to speed up the build. The containers are detached, so you can terminate the log
5555
console session freely. See [Docker Compose docs] to tailor for your use-case
5656

57-
##### Node snapshots
58-
If you want to speed up the node syncing processes you can use a snapshot. The snapshot is a compressed file that contains the database of a node at a certain block.
59-
You can download snapshots using Mithril, which are available for mainnet, preprod, and preview networks.
60-
A detailed explanation can be found [here](https://mithril.network/doc/manual/getting-started/bootstrap-cardano-node)
57+
##### DB Sync snapshots
6158
<details open>
6259
<summary><i>mainnet</i></summary>
6360
Get the most recent weekly snapshot link from https://update-cardano-mainnet.iohk.io/cardano-db-sync/index.html#13.6/ , and set it as `RESTORE_SNAPSHOT` below, or omit if you wish to sync from genesis.
@@ -69,64 +66,20 @@ Example - RESTORE_SNAPSHOT=https://update-cardano-mainnet.iohk.io/cardano-db-syn
6966
> We will provide a fix as soon as possible.
7067
7168
``` console
72-
DOCKER_BUILDKIT=1 \
73-
COMPOSE_DOCKER_CLI_BUILD=1 \
74-
RESTORE_SNAPSHOT=use latest snapshot file from above link (.tgz file) \
75-
docker compose up -d --build &&\
76-
docker compose logs -f
77-
```
78-
</details>
79-
80-
<details>
81-
<summary><i>preprod</i></summary>
82-
83-
``` console
84-
DOCKER_BUILDKIT=1 \
85-
COMPOSE_DOCKER_CLI_BUILD=1 \
86-
NETWORK=preprod \
87-
API_PORT=3101 \
88-
HASURA_PORT=8091 \
89-
OGMIOS_PORT=1338 \
90-
POSTGRES_PORT=5433 \
91-
docker compose -p preprod up -d --build &&\
92-
docker compose -p preprod logs -f
69+
docker compose --env-file .env.docker-compose up -d --build
9370
```
9471

9572
</details>
9673

9774
<details>
98-
<summary><i>preview</i></summary>
75+
<summary><i>preprod</i></summary>
9976

10077
``` console
101-
DOCKER_BUILDKIT=1 \
102-
COMPOSE_DOCKER_CLI_BUILD=1 \
103-
NETWORK=preview \
104-
API_PORT=3102 \
105-
HASURA_PORT=8092 \
106-
OGMIOS_PORT=1339 \
107-
POSTGRES_PORT=5434 \
108-
docker compose -p preview up -d --build &&\
109-
docker compose -p preview logs -f
78+
docker compose --env-file .env.docker-compose-preprod up -d --build
11079
```
11180

11281
</details>
11382

114-
<details>
115-
<summary><i>sanchonet</i></summary>
116-
117-
``` console
118-
DOCKER_BUILDKIT=1 \
119-
COMPOSE_DOCKER_CLI_BUILD=1 \
120-
NETWORK=sanchonet \
121-
API_PORT=3102 \
122-
HASURA_PORT=8092 \
123-
OGMIOS_PORT=1339 \
124-
POSTGRES_PORT=5434 \
125-
docker compose -p preview up -d --build &&\
126-
docker compose -p preview logs -f
127-
```
128-
</details>
129-
13083
#### B) Pull and Run via Docker Compose
13184
Pull images from Docker Hub and run using a convention for container and volume scoping based on the network. The
13285
containers are detached, so you can terminate the log console session freely. See [Docker Compose docs] to tailor for
@@ -136,38 +89,16 @@ your use-case.
13689
<summary><i>mainnet</i></summary>
13790

13891
``` console
139-
export NETWORK=mainnet &&\
140-
docker compose up -d &&\
141-
docker compose logs -f
142-
```
143-
</details>
144-
145-
<details>
146-
<summary><i>preprod</i></summary>
147-
148-
``` console
149-
export NETWORK=preprod &&\
150-
API_PORT=3101 \
151-
HASURA_PORT=8091 \
152-
OGMIOS_PORT=1338 \
153-
POSTGRES_PORT=5433 \
154-
docker compose -p ${NETWORK} up -d &&\
155-
docker compose -p ${NETWORK} logs -f
92+
docker compose --env-file .env.docker-compose up -d
15693
```
15794

15895
</details>
15996

16097
<details>
161-
<summary><i>preview</i></summary>
98+
<summary><i>preprod</i></summary>
16299

163100
``` console
164-
export NETWORK=preview &&\
165-
API_PORT=3102 \
166-
HASURA_PORT=8092 \
167-
OGMIOS_PORT=1339 \
168-
POSTGRES_PORT=5434 \
169-
docker compose -p ${NETWORK} up -d &&\
170-
docker compose -p ${NETWORK} logs -f
101+
docker compose --env-file .env.docker-compose-preprod up -d
171102
```
172103

173104
</details>
@@ -179,36 +110,30 @@ The following commands will not remove volumes, however should you wish to do so
179110
<summary><i>mainnet</i></summary>
180111

181112
``` console
182-
docker compose down
113+
docker compose --env-file .env.docker-compose down
183114
```
184115
</details>
185116

186117
<details>
187118
<summary><i>preprod</i></summary>
188119

189120
``` console
190-
docker compose -p preprod down
121+
docker compose --env-file .env.docker-compose-preprod down
191122
```
192123

193124
</details>
194125

195-
<details>
196-
<summary><i>preview</i></summary>
197-
198-
``` console
199-
docker compose -p preview down
200-
```
201-
202-
</details>
126+
### Disable Token Metadata Registry
127+
The local Token Metadata Registry synchronization process can be disabled by removing the `COMPOSE_PROFILES` variable from the `.env.docker-compose` file.
203128

204129
### Use global Token Metadata Registry
205-
The public Token metadata registry has a limit of daily requests, this can lead to long sync times, when resyncing from scratch.
130+
The public Token Metadata Registry has a limit of daily requests, this can lead to long sync times, when resyncing from scratch.
206131
If it's still needed to run with the global environment it's possible by removing the `token-metadata-registry` from `docker-compose.yml`.
207-
And start it with for Mainnet:
132+
And change the variable in `.env.docker-compose` for Mainnet:
208133
```
209134
METADATA_SERVER_URI="https://tokens.cardano.org" docker compose up -d
210135
```
211-
For other networks:
136+
For Preprod `.env.docker-compose-preprod` (other networks):
212137
```
213138
METADATA_SERVER_URI="https://metadata.world.dev.cardano.org"
214139
```

config/network/mainnet/cardano-db-sync/config.json

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,8 @@
66
"NodeConfigFile": "../cardano-node/config.json",
77
"PrometheusPort": 8080,
88
"RequiresNetworkMagic": "RequiresNoMagic",
9-
"defaultBackends": [
10-
"KatipBK"
11-
],
12-
"defaultScribes": [
13-
[
14-
"StdoutSK",
15-
"stdout"
16-
]
17-
],
9+
"defaultBackends": ["KatipBK"],
10+
"defaultScribes": [["StdoutSK", "stdout"]],
1811
"minSeverity": "Info",
1912
"options": {
2013
"cfokey": {
@@ -84,10 +77,7 @@
8477
"subtrace": "NoTrace"
8578
},
8679
"benchmark": {
87-
"contents": [
88-
"GhcRtsStats",
89-
"MonotonicClock"
90-
],
80+
"contents": ["GhcRtsStats", "MonotonicClock"],
9181
"subtrace": "ObservableTrace"
9282
},
9383
"cardano.epoch-validation.utxo-stats": {
@@ -100,10 +90,7 @@
10090
"rpLogLimitBytes": 5000000,
10191
"rpMaxAgeHours": 24
10292
},
103-
"setupBackends": [
104-
"AggregationBK",
105-
"KatipBK"
106-
],
93+
"setupBackends": ["AggregationBK", "KatipBK"],
10794
"setupScribes": [
10895
{
10996
"scFormat": "ScText",

0 commit comments

Comments
 (0)