Skip to content

Commit

Permalink
Version 11.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
erikd authored and jbgi committed Aug 26, 2021
1 parent e06c011 commit 07ee3b0
Show file tree
Hide file tree
Showing 12 changed files with 72 additions and 30 deletions.
7 changes: 7 additions & 0 deletions cardano-db-sync-extended/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Revision history for cardano-db-sync-extended

## 11.0.0
* Note that this release requires the database to be dropped and recreated.
* Alonzo support.
* Database changes as per cardano-db changelog.
* Add run time validation that the on-disk schema matches what the app expects (#472).
* Add partial validation of `Reward` table.

## 10.0.1
* Fix docker issue (#686).

Expand Down
2 changes: 1 addition & 1 deletion cardano-db-sync-extended/cardano-db-sync-extended.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ cabal-version: 2.4
-- http://haskell.org/cabal/users-guide/

name: cardano-db-sync-extended
version: 10.0.1
version: 11.0.0
synopsis: The Extended Cardano DB Sync node
description: A Cardano node that follows the Cardano chain and inserts data from the
chain into a PostgresQL database. It is "extended" because it maintains an
Expand Down
7 changes: 7 additions & 0 deletions cardano-db-sync/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Revision history for cardano-db-sync

## 11.0.0
* Note that this release requires the database to be dropped and recreated.
* Alonzo support.
* Database changes as per cardano-db changelog.
* Add run time validation that the on-disk schema matches what the app expects (#472).
* Add partial validation of `Reward` table.

## 10.0.1
* Fix docker issue (#686).

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
Expand Up @@ -3,7 +3,7 @@ cabal-version: 2.4
-- http://haskell.org/cabal/users-guide/

name: cardano-db-sync
version: 10.0.1
version: 11.0.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
6 changes: 6 additions & 0 deletions cardano-db-tool/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Revision history for cardano-db-tool

## 11.0.0
* Alonzo support.
* Database changes as per cardano-db changelog.
* Add a validation to ensure the sum of the AdaPots values per epoch is a constant (#718).
* Add reporting functionalities (balance, teansactions, reward history, latest rewards).

## 10.0.0
* Add helper functionality for state snapshot generation.

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
Expand Up @@ -3,7 +3,7 @@ cabal-version: 2.2
-- http://haskell.org/cabal/users-guide/

name: cardano-db-tool
version: 10.0.1
version: 11.0.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
19 changes: 19 additions & 0 deletions cardano-db/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
# Revision history for cardano-db

## 11.0.0
* Note that this release requires the database to be dropped and recreated.
* Many changed to support Alonzo release.
* Add Alonzo (smart contracts) related Redeemer and Script tables.
* Add an `epochNo` columm to StakeRegistration/Deregistration tables.
* Add instantaneous rewards to the `Reward` table. This adds two new reward sources (`treasury` and
`reserves` to the existing `owner` and `member` types) and makes the `poolId` NULLable (treasury
and reserves rewards are not associated with a pool).
* For the `EpochSyncTime` table change the `seconds` column from `double` to `Word64` and make it
non-NULLable.
* Fix the uniqueness constraint on the `CollateralTxIn` and `PoolMetadataRef` tables.
* For the `Reward` table, drop the `epochNo` column and relace it with `earnedEpoch` and
`spendableEpoch`
* Extend `ProtocolParams` and `EpochParams` tables for Alonzo.
* Add `opCertCounter` column to `Block` table.
* Drop `OrphanedRewrd` table (because it was incomplete can cannot be fixed).
* Fix `utxo_view` defined in schema (#744).
* Add `dataHash` field to the `TxOut` table.

## 10.0.1
* Fix docker issue (#686).

Expand Down
2 changes: 1 addition & 1 deletion cardano-db/cardano-db.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ cabal-version: 2.2
-- http://haskell.org/cabal/users-guide/

name: cardano-db
version: 10.0.1
version: 11.0.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
4 changes: 4 additions & 0 deletions cardano-sync/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Revision history for cardano-sync

## 11.0.0
* Alonzo support.
* Database changes as per cardano-db changelog.

## 10.0.1
* Fix docker issue (#686).

Expand Down
2 changes: 1 addition & 1 deletion cardano-sync/cardano-sync.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ cabal-version: 2.2
-- http://haskell.org/cabal/users-guide/

name: cardano-sync
version: 10.0.1
version: 11.0.0
synopsis: The Cardano Sync node
description: A Cardano node that follows the Cardano chain and inserts data from the
chain into a PostgresQL database.
Expand Down
45 changes: 22 additions & 23 deletions doc/schema.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Schema Documentation for cardano-db-sync

Schema version: 10.0.0 (from branch **kderme/scripts-tables** which may not accurately reflect the version number)
Schema version: 11.0.0 (from branch **prerelease/11.0.x** which may not accurately reflect the version number)

### `schema_version`

Expand Down Expand Up @@ -117,6 +117,7 @@ A table for transaction outputs.
| `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. |
| `stake_address_id` | integer (64) | The StakeAddress table index for the stake address part of the Shelley address. (NULL for Byron addresses). |
| `value` | lovelace | The output value (in Lovelace) of the transaction output. |
| `data_hash` | hash32type | The hash of the transaction output datum. (NULL for Txs without scripts). |

### `tx_in`

Expand All @@ -127,8 +128,8 @@ A table for transaction inputs.
| Column name | Type | Description |
|-|-|-|
| `id` | integer (64) | |
| `tx_in_id` | integer (64) | The Tx table index where this transaction is used as an input. |
| `tx_out_id` | integer (64) | The Tx table index where this transaction was created as an output. |
| `tx_in_id` | integer (64) | The Tx table index of the transaction that contains this transaction input |
| `tx_out_id` | integer (64) | The Tx table index of the transaction that contains this transaction output. |
| `tx_out_index` | txindex | The index within the transaction outputs. |
| `redeemer_id` | integer (64) | The Redeemer table index which is used to validate this input. |

Expand All @@ -141,8 +142,8 @@ A table for transaction collateral inputs.
| Column name | Type | Description |
|-|-|-|
| `id` | integer (64) | |
| `tx_in_id` | integer (64) | The Tx table index where this transaction is used as an input. |
| `tx_out_id` | integer (64) | The Tx table index where this transaction was created as an output. |
| `tx_in_id` | integer (64) | The Tx table index of the transaction that contains this transaction input |
| `tx_out_id` | integer (64) | The Tx table index of the transaction that contains this transaction output. |
| `tx_out_index` | txindex | The index within the transaction outputs. |

### `meta`
Expand Down Expand Up @@ -327,7 +328,7 @@ A table for metadata attached to a transaction.
|-|-|-|
| `id` | integer (64) | |
| `key` | word64type | The metadata key (a Word64/unsigned 64 bit number). |
| `json` | jsonb | The JSON payload. |
| `json` | jsonb | The JSON payload if it can bde decoded as JSON. |
| `bytes` | bytea | The raw bytes of the payload. |
| `tx_id` | integer (64) | The Tx table index of the transaction where this metadata was included. |

Expand All @@ -341,27 +342,12 @@ A table for rewards earned by staking. The rewards earned in epoch `N` are added
|-|-|-|
| `id` | integer (64) | |
| `addr_id` | integer (64) | The StakeAddress table index for the stake address that earned the reward. |
| `type` | rewardtype | The source of the rewards; pool `member` vs pool `owner`. |
| `type` | rewardtype | The source of the rewards; pool `member`, pool `owner`, `treasury` or `reserve` payment. |
| `amount` | lovelace | The reward amount (in Lovelace). |
| `earned_epoch` | integer (64) | The epoch in which the reward was earned. |
| `spendable_epoch` | integer (64) | |
| `pool_id` | integer (64) | The PoolHash table index for the pool the stake address was delegated to when the reward is earned. Will be NULL for payments from the treasury or the reserves. |

### `orphaned_reward`

A table for rewards earned by staking, but are orphaned. Rewards are orphaned when the stake address is deregistered before the rewards are distributed.

* Primary Id: `id`

| Column name | Type | Description |
|-|-|-|
| `id` | integer (64) | |
| `addr_id` | integer (64) | The StakeAddress table index for the stake address that earned the reward. |
| `type` | rewardtype | The source of the rewards; pool `member` vs pool `owner`. |
| `amount` | lovelace | The reward amount (in Lovelace). |
| `epoch_no` | integer (64) | The epoch in which the reward was earned. |
| `pool_id` | integer (64) | The PoolHash table index for the pool the stake address was delegated to when the reward is earned. Will be NULL for payments from the treasury or the reserves. |

### `withdrawal`

A table for withdrawals from a reward account.
Expand Down Expand Up @@ -600,7 +586,8 @@ The pool offline (ie not on chain) for a stake pool.
| `pool_id` | integer (64) | The PoolHash table index for the pool this offline data refers. |
| `ticker_name` | string | The pool's ticker name (as many as 5 characters). |
| `hash` | hash32type | The hash of the offline data. |
| `metadata` | string | The raw offline data. |
| `json` | jsonb | The payload as JSON. |
| `bytes` | bytea | The raw bytes of the payload. |
| `pmr_id` | integer (64) | The PoolMetadataRef table index for this offline data. |

### `pool_offline_fetch_error`
Expand All @@ -618,6 +605,18 @@ A table containing pool offline data fetch errors.
| `fetch_error` | string | The text of the error. |
| `retry_count` | uinteger | The number of retries. |

### `epoch_reward_total_received`

This table is used to help validate the accounting of rewards. It contains the total reward amount for each epoch received from the ledger state and includes orphaned rewards that are later removed from the Reward table.

* Primary Id: `id`

| Column name | Type | Description |
|-|-|-|
| `id` | integer (64) | |
| `earned_epoch` | uinteger | The epoch in which the reward was earned. |
| `amount` | lovelace | The total rewards for the epoch in Lovelace. |

### `reserved_pool_ticker`

A table containing a managed list of reserved ticker names.
Expand Down
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ services:
max-file: "10"

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

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

0 comments on commit 07ee3b0

Please sign in to comment.