Skip to content

Commit

Permalink
Bump to 13.1.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
kderme committed May 17, 2023
1 parent 517e396 commit e684bed
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 10 deletions.
2 changes: 1 addition & 1 deletion cardano-chain-gen/cardano-chain-gen.cabal
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cabal-version: 3.0

name: cardano-chain-gen
version: 13.1.0.2
version: 13.1.1.0
synopsis: A fake chain generator for testing cardano DB sync.
description: A fake chain generator for testing cardano DB sync.
homepage: https://github.com/input-output-hk/cardano-db-sync
Expand Down
2 changes: 1 addition & 1 deletion cardano-db-sync/cardano-db-sync.cabal
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cabal-version: 3.0

name: cardano-db-sync
version: 13.1.0.2
version: 13.1.1.0
synopsis: The Cardano DB Sync node
description: A Cardano node that follows the Cardano chain and inserts data from the
chain into a PostgresQL database.
Expand Down
2 changes: 1 addition & 1 deletion cardano-db-tool/cardano-db-tool.cabal
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cabal-version: 3.0

name: cardano-db-tool
version: 13.1.0.2
version: 13.1.1.0
synopsis: Utilities to manage the cardano-db-sync databases.
description: Utilities and executable, used to manage and validate the
PostgreSQL db and the ledger database of the cardano-db-sync node
Expand Down
2 changes: 1 addition & 1 deletion cardano-db/cardano-db.cabal
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cabal-version: 3.0

name: cardano-db
version: 13.1.0.2
version: 13.1.1.0
synopsis: A base PostgreSQL component for the cardano-db-sync node.
description: Code for the Cardano DB Sync node that is shared between the
cardano-db-node and other components.
Expand Down
2 changes: 1 addition & 1 deletion cardano-db/test/cardano-db-test.cabal
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cabal-version: 3.0

name: cardano-db-test
version: 13.1.0.2
version: 13.1.1.0
synopsis: Tests for the base functionality of the cardano-db library
description: Code for the Cardano DB Sync node that is shared between the
cardano-db-node and other components.
Expand Down
2 changes: 1 addition & 1 deletion cardano-smash-server/cardano-smash-server.cabal
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cabal-version: 3.0

name: cardano-smash-server
version: 13.1.0.2
version: 13.1.1.0
synopsis: The Cardano smash server
description: Please see the README on GitHub at
<https://github.com/input-output-hk/cardano-db-sync/cardano-smash-server/#readme>
Expand Down
22 changes: 20 additions & 2 deletions doc/migrations.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,38 @@
# Migrations

Release `13.1.0.0` introduces a new way to enumerate releases, based on how it affects the db.
Release `13.1.0.0` first introduces a new way to enumerate releases, based on how it affects the db.
This is `a.b.c.d`. where
- `a`: schema breaking change, needs resync from genesis.
- `b`: schema change with a migraton.
- `c`: semantic change without a schema change. Resyncing would result in a semanticaly different db, ie
different values.
- `d`: no semantic change to the db.

## Upgrading to 13.1.1.x

In order to upgrade from 13.0.x or 13.1.0.x to 13.1.1.x resyncing is not necessary and no special
flags are required from the user. DBSync will automatically spawn a fixing procedure, which fixes
old values related to plutus data and scripts. This process when upgrading from 13.0.x takes a few
hours and can be skipped with `skip-fix`. Ather that, if upgrading from 13.0.x schema migrations
will run on top of the existing db. Finally a ledger replay follows.

### Ledger replay

Release 13.1.1.x drops the ledger snaphot serialisation compatibility. This means it's not able to
parse older ledger snapshots. DBSync will delete any existing snapshot and will replay the ledger
rules from genesis. This doesn't mean a rollback to genesis. No db data are deleted.

During the ledger replay DBSync updates only some values of the db at the `ada_pots` table, as it
fixes in place the issue [#942].

## Upgrading to 13.1.0.x

In order to upgrade from 13.0.x to 13.1.0.x resyncing is not necessary and requires no special flags
from the user. DBSync will automatically spawn a fixing procedure, which fixes old values
related to plutus data. After that schema migrations will run on top of the existing db.

Release `13.1.0.x` uses 4 stages of migrations.
## Migrations stages
Release `13.1.0.x` and later uses 4 stages of migrations.
- `stage 1`: introduces basic postgres types. These cannot be modified or extended.
- `stage 2`: introduces basic tables and their constraints. `13.1.0.x` brings many
changes here, as it removes foreign, unique keys and a few fields. These files cannot
Expand Down
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ services:
max-file: "10"

cardano-node:
image: inputoutput/cardano-node:1.35.5
image: inputoutput/cardano-node:8.0.0
environment:
- NETWORK=${NETWORK:-mainnet}
volumes:
Expand All @@ -53,7 +53,7 @@ services:
max-file: "10"

cardano-db-sync:
image: inputoutput/cardano-db-sync:13.1.0.2
image: inputoutput/cardano-db-sync:13.1.1.0
environment:
- NETWORK=${NETWORK:-mainnet}
- POSTGRES_HOST=postgres
Expand Down

0 comments on commit e684bed

Please sign in to comment.