Skip to content

Commit 8ad98d4

Browse files
authored
Merge pull request #1256 from input-output-hk/kderme/release-cherry-picks
Cherry-pick commits for release
2 parents ca94be4 + 5a5c3ed commit 8ad98d4

File tree

10 files changed

+42
-13
lines changed

10 files changed

+42
-13
lines changed

.github/workflows/haskell.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ jobs:
1414
# From cardano-base
1515
# see https://github.com/input-output-hk/cardano-base/blob/master/.github/workflows/haskell.yml
1616
SECP256K1_REF: ac83be33d0956faf6b7f61a60ab524ef7d6a473a
17+
PKG_CONFIG_PATH: ${{ matrix.os == 'macos-latest' && '/usr/local/opt/postgresql@14/lib/postgresql@14/pkgconfig:/usr/local/opt/openssl/lib/pkgconfig' || '' }}
1718

1819
strategy:
1920
fail-fast: false
@@ -39,7 +40,7 @@ jobs:
3940
- name: Install Postgres support (MacOS)
4041
if: matrix.os == 'macos-latest'
4142
run: |
42-
brew install postgres libpq [email protected]
43+
brew install postgresql@14 libpq [email protected]
4344
brew services start postgresql
4445
sudo mkdir -p /var/run/postgresql/
4546
sudo ln -s /tmp/.s.PGSQL.5432 /var/run/postgresql/.s.PGSQL.5432
@@ -120,7 +121,7 @@ jobs:
120121
- name: Build dependencies OSX
121122
if: matrix.os == 'macos-latest'
122123
run: |
123-
PKG_CONFIG_PATH="/usr/local/opt/[email protected]/lib/pkgconfig" cabal build all --only-dependencies
124+
cabal build all --only-dependencies
124125
125126
- name: Build
126127
run: cabal build all

cardano-chain-gen/cardano-chain-gen.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ cabal-version: 2.4
33
-- http://haskell.org/cabal/users-guide/
44

55
name: cardano-chain-gen
6-
version: 13.0.4
6+
version: 13.0.5
77
synopsis: A fake chain generator for testing cardano DB sync.
88
description: A fake chain generator for testing cardano DB sync.
99
homepage: https://github.com/input-output-hk/cardano-db-sync

cardano-db-sync/CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Revision history for cardano-db-sync
22

3+
## 13.0.5
4+
* Fixed an issue where `StakeAdress` cache was not cleaned up properly and could cause crashes [#1222]
5+
* Fixed an issue where fees for txs with phase 2 failure which din't include the total_collateral fields appeared to be 0 [#1242]
6+
* Fixed an issue where `Datum` were reserialised and could be inserted in a different CBOR format [#1214]
7+
* Improved docker documentation
8+
* Made disable options like `disable-ledger` easily available through docker
9+
* Supported new networks, preview, preprod
10+
311
## 13.0.4
412
* Bump to the latest node release.
513

cardano-db-sync/cardano-db-sync.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ cabal-version: 2.4
33
-- http://haskell.org/cabal/users-guide/
44

55
name: cardano-db-sync
6-
version: 13.0.4
6+
version: 13.0.5
77
synopsis: The Cardano DB Sync node
88
description: A Cardano node that follows the Cardano chain and inserts data from the
99
chain into a PostgresQL database.

cardano-db-tool/cardano-db-tool.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ cabal-version: 2.2
33
-- http://haskell.org/cabal/users-guide/
44

55
name: cardano-db-tool
6-
version: 13.0.4
6+
version: 13.0.5
77
synopsis: Utilities to manage the cardano-db-sync databases.
88
description: Utilities and executable, used to manage and validate the
99
PostgreSQL db and the ledger database of the cardano-db-sync node

cardano-db/cardano-db.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ cabal-version: 2.2
33
-- http://haskell.org/cabal/users-guide/
44

55
name: cardano-db
6-
version: 13.0.4
6+
version: 13.0.5
77
synopsis: A base PostgreSQL component for the cardano-db-sync node.
88
description: Code for the Cardano DB Sync node that is shared between the
99
cardano-db-node and other components.

cardano-smash-server/cardano-smash-server.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ cabal-version: 2.2
33
-- http://haskell.org/cabal/users-guide/
44

55
name: cardano-smash-server
6-
version: 13.0.4
6+
version: 13.0.5
77
synopsis: The Cardano smash server
88
description: Please see the README on GitHub at
99
<https://github.com/input-output-hk/cardano-db-sync/cardano-smash-server/#readme>

doc/docker.md

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,12 @@ The PostgreSQL database is exposed on localhost port `5432`
2626
`$ psql -h 0.0.0.0 -p 5432 -U postgres -d cexplorer` (then enter secret password)
2727

2828
### To connect to another network:
29+
30+
To connect to different network (preprod or preview) use `NETWORK` environment variable:
31+
32+
2933
```
30-
NETWORK=testnet docker-compose up && docker-compose logs -f
34+
NETWORK=preprod docker-compose up && docker-compose logs -f
3135
```
3236

3337
### Take control
@@ -57,16 +61,28 @@ docker load -i $(nix-build -A dockerImage --no-out-link)
5761
## Restore from Snapshot
5862

5963
Restoring a database by running from gensis can take a number of hours, snapshots are provided for
60-
both networks (Mainnet and Testnet) to restore the postgres database. See the
64+
Mainnet to restore the postgres database. See the
6165
[latest releases](https://github.com/input-output-hk/cardano-db-sync/releases) for a recent snapshot
6266
matched with the `cardano-db-sync` version.
6367

6468
To download and restore a snapshot include `RESTORE_SNAPSHOT`:
6569

6670
```
6771
RESTORE_SNAPSHOT=https://update-cardano-mainnet.iohk.io/cardano-db-sync/db-sync-snapshot-schema-10-block-6014140-x86_64.tgz \
68-
NETWORK=testnet docker-compose up && docker-compose logs -f
72+
docker-compose up && docker-compose logs -f
73+
```
6974

75+
## Disable options
76+
77+
Consult the configuration [docs](docs/configuration.md) for what these options mean, assuming you have read that
78+
they can be accessed via env variables passed to docker-compose. Leave out any that do not make sense, eg if
79+
you just want to disable the ledger use `DISABLE_LEDGER=--disable-ledger docker-compose up`.
80+
81+
``` shell
82+
DISABLE_LEDGER=--disable-ledger \
83+
DISABLE_CACHE=--disable-cache \
84+
DISABLE_EPOCH=--disable-epoch \
85+
docker-compose up
7086
```
7187

7288
## Running Tests with Docker Postgres
@@ -139,7 +155,7 @@ inputoutput/cardano-db-sync 066b747a8bfd3791b06ea46c2e793f83ed64967f f34b029
139155
$ docker run inputoutput/cardano-db-sync:066b747a8bfd3791b06ea46c2e793f83ed64967f
140156
```
141157

142-
## Running SMASH with docker-compose
158+
## Running SMASH with docker-compose
143159

144160
Edit the docker-compose.yml to add a listening port for the postgres container
145161
e.g.

docker-compose.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,16 @@ services:
5252
max-file: "10"
5353

5454
cardano-db-sync:
55-
image: inputoutput/cardano-db-sync:13.0.4
55+
image: inputoutput/cardano-db-sync:13.0.5
5656
environment:
5757
- NETWORK=${NETWORK:-mainnet}
5858
- POSTGRES_HOST=postgres
5959
- POSTGRES_PORT=5432
6060
- RESTORE_SNAPSHOT=${RESTORE_SNAPSHOT:-}
6161
- RESTORE_RECREATE_DB=N
62+
- DISABLE_LEDGER=${DISABLE_LEDGER:-}
63+
- DISABLE_CACHE=${DISABLE_CACHE:-}
64+
- DISABLE_EPOCH=${DISABLE_EPOCH:-}
6265
depends_on:
6366
# Depend on both services to be healthy before starting.
6467
cardano-node:

nix/nixos/cardano-db-sync-service.nix

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,8 @@ in {
200200
--config ${configFile} \
201201
--socket-path "$CARDANO_NODE_SOCKET_PATH" \
202202
--schema-dir ${self.schema or (self.src + "/schema")} \
203-
--state-dir ${cfg.stateDir}
203+
--state-dir ${cfg.stateDir} \
204+
$DISABLE_LEDGER $DISABLE_CACHE $DISABLE_EPOCH
204205
'';
205206
};
206207
systemd.services.cardano-db-sync = {

0 commit comments

Comments
 (0)