|
1 | 1 | # Schema Documentation for cardano-db-sync |
2 | 2 |
|
| 3 | +Schema version: 13.3.0.0 (from branch **kderme/prepare-release-13.3** which may not accurately reflect the version number) |
3 | 4 | **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. |
4 | 5 |
|
5 | 6 | ### `schema_version` |
@@ -441,7 +442,7 @@ A table for withdrawals from a reward account. |
441 | 442 |
|
442 | 443 | ### `epoch_stake` |
443 | 444 |
|
444 | | -A table containing the epoch stake distribution for each epoch. This is inserted incrementally in the first blocks of the epoch. The stake distribution is extracted from the `set` snapshot of the ledger. See Shelley specs Sec. 11.2 for more details. |
| 445 | +A table containing the epoch stake distribution for each epoch. This is inserted incrementally in the first blocks of the previous epoch. The stake distribution is extracted from the `set` snapshot of the ledger. See Shelley specs Sec. 11.2 for more details. |
445 | 446 |
|
446 | 447 | * Primary Id: `id` |
447 | 448 |
|
@@ -773,6 +774,22 @@ CostModel for EpochParam and ParamProposal. |
773 | 774 | | `hash` | hash32type | The hash of cost model. It ensures uniqueness of entries. New in v13. | |
774 | 775 | | `costs` | jsonb | The actual costs formatted as json. | |
775 | 776 |
|
| 777 | +### `pool_stat` |
| 778 | + |
| 779 | +Stats per pool and per epoch. |
| 780 | + |
| 781 | +* Primary Id: `id` |
| 782 | + |
| 783 | +| Column name | Type | Description | |
| 784 | +|-|-|-| |
| 785 | +| `id` | integer (64) | | |
| 786 | +| `pool_hash_id` | integer (64) | The pool_hash_id reference. | |
| 787 | +| `epoch_no` | word31type | The epoch number. | |
| 788 | +| `number_of_blocks` | word31type | Number of blocks created on the previous epoch. | |
| 789 | +| `number_of_delegators` | word31type | Number of delegators in the mark snapshot. | |
| 790 | +| `stake` | word31type | Total stake in the mark snapshot. | |
| 791 | +| `voting_power` | word31type | Voting power of the SPO. | |
| 792 | + |
776 | 793 | ### `extra_migrations` |
777 | 794 |
|
778 | 795 | Extra optional migrations. New in 13.2. |
@@ -993,15 +1010,17 @@ The table for the distribution of voting power per DRep per. Currently this has |
993 | 1010 |
|
994 | 1011 | ### `epoch_state` |
995 | 1012 |
|
| 1013 | +Table with governance (and in the future other) stats per epoch. |
| 1014 | + |
996 | 1015 | * Primary Id: `id` |
997 | 1016 |
|
998 | 1017 | | Column name | Type | Description | |
999 | 1018 | |-|-|-| |
1000 | 1019 | | `id` | integer (64) | | |
1001 | | -| `committee_id` | integer (64) | | |
1002 | | -| `no_confidence_id` | integer (64) | | |
1003 | | -| `constitution_id` | integer (64) | | |
1004 | | -| `epoch_no` | word31type | | |
| 1020 | +| `committee_id` | integer (64) | The reference to the current committee. | |
| 1021 | +| `no_confidence_id` | integer (64) | The reference to the current gov_action_proposal of no confidence. TODO: This remains NULL. | |
| 1022 | +| `constitution_id` | integer (64) | The reference to the current constitution. Should never be null. | |
| 1023 | +| `epoch_no` | word31type | The epoch in question. | |
1005 | 1024 |
|
1006 | 1025 | ### `off_chain_pool_data` |
1007 | 1026 |
|
|
0 commit comments