You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/schema.md
+26-11Lines changed: 26 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,8 @@
1
+
Resolving dependencies...
2
+
Up to date
1
3
# Schema Documentation for cardano-db-sync
2
4
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)
4
6
**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.
5
7
6
8
### `schema_version`
@@ -124,7 +126,6 @@ A table for transaction outputs.
124
126
|`tx_id`| integer (64) | The Tx table index of the transaction that contains this transaction output. |
125
127
|`index`| txindex | The index of this transaction output with the transaction. |
126
128
|`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. |
128
129
|`address_has_script`| boolean | Flag which shows if this address is locked by a script. |
129
130
|`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. |
130
131
|`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.
145
146
|`tx_id`| integer (64) | The Tx table index of the transaction that contains this transaction output. |
146
147
|`index`| txindex | The index of this transaction output with the transaction. |
147
148
|`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. |
149
149
|`address_has_script`| boolean | Flag which shows if this address is locked by a script. |
150
150
|`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. |
151
151
|`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.
383
383
384
384
### `reward`
385
385
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.
387
387
388
388
* Primary Id: `id`
389
389
390
390
| Column name | Type | Description |
391
391
|-|-|-|
392
392
|`id`| integer (64) ||
393
393
|`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 |
395
395
|`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`. |
397
413
|`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. |
399
414
400
415
### `withdrawal`
401
416
@@ -790,8 +805,8 @@ A table for every committee hot key registration. New in 13.2-Conway.
790
805
|`id`| integer (64) ||
791
806
|`tx_id`| integer (64) | The Tx table index of the tx that includes this certificate. |
792
807
|`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 |
795
810
796
811
### `committee_de_registration`
797
812
@@ -804,7 +819,7 @@ A table for every committee key de-registration. New in 13.2-Conway.
804
819
|`id`| integer (64) ||
805
820
|`tx_id`| integer (64) | The Tx table index of the tx that includes this certificate. |
806
821
|`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 |
808
823
|`voting_anchor_id`| integer (64) | The Voting anchor reference id |
809
824
810
825
### `drep_registration`
@@ -882,7 +897,7 @@ A table for new committee proposed on a GovActionProposal. New in 13.2-Conway.
882
897
|-|-|-|
883
898
|`id`| integer (64) ||
884
899
|`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. |
886
901
|`quorum_denominator`| integer (64) | The proposed quorum denominator. |
887
902
|`deleted_members`| string | The removed members of the committee. This is now given in a text as a description, but may change. TODO: Conway. |
888
903
|`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