Skip to content

Commit ed61714

Browse files
committed
Prepare Release 13.2.0.0
1 parent 8639b55 commit ed61714

File tree

3 files changed

+44
-12
lines changed

3 files changed

+44
-12
lines changed

config/mainnet-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ EnableLogging: True
1212
# config, it will likely lead to db-sync throwing up weird error messages from
1313
# the consensus layer.
1414
# The path to the node config file is relative to this config file.
15-
NodeConfigFile: /nix/store/33r8vqnrlhbpk6vifd1hphphg8v6fc89-config-0-0.json
15+
NodeConfigFile: /nix/store/8lnh50vcc13zq5av67sakyj23ybgssnh-config-0-0.json
1616

1717
# ------------------------------------------------------------------------------
1818
# Logging configuration follows.

doc/migrations.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,23 @@ This is `a.b.c.d`. where
88
different values.
99
- `d`: no semantic change to the db.
1010

11+
## Upgrading to 13.2.0.0
12+
13+
In order to upgrade from 13.1.x.x to 13.2.0.x resyncing is not necessary and no special
14+
flags are required from the user. DBSync will automatically perform the new migrations under `schema`
15+
directory. Details about these migrations can be found in the release `Changelog.md`, in the `schema.md`
16+
annotated as `13.2` or in the schema files directly. New stage 1 files starts from 1-10 and stage 2 starts from 2-26.
17+
These migrations takes a couple minutes, mosty because the instant rewards are moved from the `reward` table to a
18+
new `instant_reward` table. After that there is a ledger replay (read below), which takes a few hours.
19+
20+
Upgrading from 13.0.x to 13.2.0.x should be possible but hasn't been tested.
21+
22+
### Ledger replay
23+
24+
Release 13.2.0.0 drops the ledger snaphot serialisation compatibility. This means it's not able to
25+
parse older ledger snapshots. DBSync will delete any existing snapshot and will replay the ledger
26+
rules from genesis. This doesn't mean a rollback to genesis. No db data are deleted.
27+
1128
## Upgrading to 13.1.1.x
1229

1330
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

doc/schema.md

Lines changed: 26 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1+
Resolving dependencies...
2+
Up to date
13
# Schema Documentation for cardano-db-sync
24

3-
Schema version: 13.2.0.0 (from branch **kderme/sancho-3-0-0** which may not accurately reflect the version number)
5+
Schema version: 13.2.0.0 (from branch **kderme/optimizations** which may not accurately reflect the version number)
46
**Note:** This file is auto-generated from the documentation in cardano-db/src/Cardano/Db/Schema.hs by the command `cabal run -- gen-schema-docs doc/schema.md`. This document should only be updated during the release process and updated on the release branch.
57

68
### `schema_version`
@@ -124,7 +126,6 @@ A table for transaction outputs.
124126
| `tx_id` | integer (64) | The Tx table index of the transaction that contains this transaction output. |
125127
| `index` | txindex | The index of this transaction output with the transaction. |
126128
| `address` | string | The human readable encoding of the output address. Will be Base58 for Byron era addresses and Bech32 for Shelley era. |
127-
| `address_raw` | blob | The raw binary address. |
128129
| `address_has_script` | boolean | Flag which shows if this address is locked by a script. |
129130
| `payment_cred` | hash28type | The payment credential part of the Shelley address. (NULL for Byron addresses). For a script-locked address, this is the script hash. |
130131
| `stake_address_id` | integer (64) | The StakeAddress table index for the stake address part of the Shelley address. (NULL for Byron addresses). |
@@ -145,7 +146,6 @@ A table for transaction collateral outputs. New in v13.
145146
| `tx_id` | integer (64) | The Tx table index of the transaction that contains this transaction output. |
146147
| `index` | txindex | The index of this transaction output with the transaction. |
147148
| `address` | string | The human readable encoding of the output address. Will be Base58 for Byron era addresses and Bech32 for Shelley era. |
148-
| `address_raw` | blob | The raw binary address. |
149149
| `address_has_script` | boolean | Flag which shows if this address is locked by a script. |
150150
| `payment_cred` | hash28type | The payment credential part of the Shelley address. (NULL for Byron addresses). For a script-locked address, this is the script hash. |
151151
| `stake_address_id` | integer (64) | The StakeAddress table index for the stake address part of the Shelley address. (NULL for Byron addresses). |
@@ -383,19 +383,34 @@ A table for metadata attached to a transaction.
383383

384384
### `reward`
385385

386-
A table for earned rewards. It includes 5 types of rewards. The rewards are inserted incrementally and this procedure is finalised when the spendable epoch comes. Before the epoch comes, some entries may be missing.
386+
A table for earned staking rewards. After 13.2 release it includes only 3 types of rewards: member, leader and refund, since the other 2 types have moved to a separate table instant_reward. The rewards are inserted incrementally and this procedure is finalised when the spendable epoch comes. Before the epoch comes, some entries may be missing.
387387

388388
* Primary Id: `id`
389389

390390
| Column name | Type | Description |
391391
|-|-|-|
392392
| `id` | integer (64) | |
393393
| `addr_id` | integer (64) | The StakeAddress table index for the stake address that earned the reward. |
394-
| `type` | rewardtype | The source of the rewards; pool `member`, pool `leader`, `treasury` or `reserves` payment and pool deposits `refunds` |
394+
| `type` | rewardtype | The type of the rewards |
395395
| `amount` | lovelace | The reward amount (in Lovelace). |
396-
| `earned_epoch` | integer (64) | The epoch in which the reward was earned. For `pool` and `leader` rewards spendable in epoch `N`, this will be `N - 2`, for `treasury` and `reserves` `N - 1` and for `refund` N. |
396+
| `earned_epoch` | integer (64) | The epoch in which the reward was earned. For `pool` and `leader` rewards spendable in epoch `N`, this will be `N - 2`, `refund` N. |
397+
| `spendable_epoch` | integer (64) | The epoch in which the reward is actually distributed and can be spent. |
398+
| `pool_id` | integer (64) | The PoolHash table index for the pool the stake address was delegated to when the reward is earned or for the pool that there is a deposit refund. |
399+
400+
### `instant_reward`
401+
402+
A table for earned instant rewards. It includes only 2 types of rewards: reserves and treasury. This table only exists for historic reasons, since instant rewards are depredated after Conway. New in 13.2
403+
404+
* Primary Id: `id`
405+
406+
| Column name | Type | Description |
407+
|-|-|-|
408+
| `id` | integer (64) | |
409+
| `addr_id` | integer (64) | The StakeAddress table index for the stake address that earned the reward. |
410+
| `type` | rewardtype | The type of the rewards. |
411+
| `amount` | lovelace | The reward amount (in Lovelace). |
412+
| `earned_epoch` | integer (64) | The epoch in which the reward was earned. For rewards spendable in epoch `N`, this will be `N - 1`. |
397413
| `spendable_epoch` | integer (64) | The epoch in which the reward is actually distributed and can be spent. |
398-
| `pool_id` | integer (64) | The PoolHash table index for the pool the stake address was delegated to when the reward is earned or for the pool that there is a deposit refund. Will be NULL for payments from the treasury or the reserves. |
399414

400415
### `withdrawal`
401416

@@ -790,8 +805,8 @@ A table for every committee hot key registration. New in 13.2-Conway.
790805
| `id` | integer (64) | |
791806
| `tx_id` | integer (64) | The Tx table index of the tx that includes this certificate. |
792807
| `cert_index` | integer (32) | The index of this registration within the certificates of this transaction. |
793-
| `cold_key` | bytea | The registered cold hey hash. TODO: should this reference DrepHashId or some separate hash table? |
794-
| `hot_key` | bytea | The registered hot hey hash |
808+
| `cold_key` | hash28type | The registered cold hey hash. TODO: should this reference DrepHashId or some separate hash table? |
809+
| `hot_key` | hash28type | The registered hot hey hash |
795810

796811
### `committee_de_registration`
797812

@@ -804,7 +819,7 @@ A table for every committee key de-registration. New in 13.2-Conway.
804819
| `id` | integer (64) | |
805820
| `tx_id` | integer (64) | The Tx table index of the tx that includes this certificate. |
806821
| `cert_index` | integer (32) | The index of this deregistration within the certificates of this transaction. |
807-
| `cold_key` | bytea | The deregistered cold key hash |
822+
| `cold_key` | hash28type | The deregistered cold key hash |
808823
| `voting_anchor_id` | integer (64) | The Voting anchor reference id |
809824

810825
### `drep_registration`
@@ -882,7 +897,7 @@ A table for new committee proposed on a GovActionProposal. New in 13.2-Conway.
882897
|-|-|-|
883898
| `id` | integer (64) | |
884899
| `gov_action_proposal_id` | integer (64) | The GovActionProposal table index for this new committee. |
885-
| `quorum_nominator` | integer (64) | The proposed quorum nominator. |
900+
| `quorum_numerator` | integer (64) | The proposed quorum nominator. |
886901
| `quorum_denominator` | integer (64) | The proposed quorum denominator. |
887902
| `deleted_members` | string | The removed members of the committee. This is now given in a text as a description, but may change. TODO: Conway. |
888903
| `added_members` | string | The new members of the committee. This is now given in a text as a description, but may change. TODO: Conway. |

0 commit comments

Comments
 (0)