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
+88-13Lines changed: 88 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Schema Documentation for cardano-db-sync
2
2
3
-
Schema version: 13.2.0.1
3
+
Schema version: 13.2.0.1 (from branch **master** which may not accurately reflect the version number)
4
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.
5
5
6
6
### `schema_version`
@@ -557,7 +557,7 @@ A table containing redeemers. A redeemer is provided for all items that are vali
557
557
|`unit_mem`| word63type | The budget in Memory to run a script. |
558
558
|`unit_steps`| word63type | The budget in Cpu steps to run a script. |
559
559
|`fee`| lovelace | The budget in fees to run a script. The fees depend on the ExUnits and the current prices. Is null when --disable-ledger is enabled. New in v13: became nullable. |
560
-
|`purpose`| scriptpurposetype | What kind pf validation this redeemer is used for. It can be one of 'spend', 'mint', 'cert', 'reward'.|
560
+
|`purpose`| scriptpurposetype | What kind pf validation this redeemer is used for. It can be one of 'spend', 'mint', 'cert', 'reward', `voting`, `proposing`|
561
561
|`index`| word31type | The index of the redeemer pointer in the transaction. |
562
562
|`script_hash`| hash28type | The script hash this redeemer is used for. |
563
563
|`redeemer_data_id`| integer (64) | The data related to this redeemer. New in v13: renamed from datum_id. |
|`pvt_committee_normal`| double | Pool Voting threshold for new committee/threshold (normal state). New in 13.2-Conway. |
663
663
|`pvt_committee_no_confidence`| double | Pool Voting threshold for new committee/threshold (state of no-confidence). New in 13.2-Conway. |
664
664
|`pvt_hard_fork_initiation`| double | Pool Voting threshold for hard-fork initiation. New in 13.2-Conway. |
665
+
|`pvtpp_security_group`| double ||
665
666
|`dvt_motion_no_confidence`| double | DRep Vote threshold for motion of no-confidence. New in 13.2-Conway. |
666
667
|`dvt_committee_normal`| double | DRep Vote threshold for new committee/threshold (normal state). New in 13.2-Conway. |
667
668
|`dvt_committee_no_confidence`| double | DRep Vote threshold for new committee/threshold (state of no-confidence). New in 13.2-Conway. |
@@ -724,6 +725,7 @@ The accepted protocol parameters for an epoch.
724
725
|`pvt_committee_normal`| double | Pool Voting threshold for new committee/threshold (normal state). New in 13.2-Conway. |
725
726
|`pvt_committee_no_confidence`| double | Pool Voting threshold for new committee/threshold (state of no-confidence). New in 13.2-Conway. |
726
727
|`pvt_hard_fork_initiation`| double | Pool Voting threshold for hard-fork initiation. New in 13.2-Conway. |
728
+
|`pvtpp_security_group`| double ||
727
729
|`dvt_motion_no_confidence`| double | DRep Vote threshold for motion of no-confidence. New in 13.2-Conway. |
728
730
|`dvt_committee_normal`| double | DRep Vote threshold for new committee/threshold (normal state). New in 13.2-Conway. |
729
731
|`dvt_committee_no_confidence`| double | DRep Vote threshold for new committee/threshold (state of no-confidence). New in 13.2-Conway. |
@@ -768,7 +770,7 @@ Extra optional migrations. New in 13.2.
768
770
769
771
### `drep_hash`
770
772
771
-
A table for every unique drep key hash. The existance of an entry doesn't mean the DRep is registered or in fact that is was ever registered. New in 13.2-Conway.
773
+
A table for every unique drep key hash. The existance of an entry doesn't mean the DRep is registered. New in 13.2-Conway.
772
774
773
775
* Primary Id: `id`
774
776
@@ -779,6 +781,18 @@ A table for every unique drep key hash. The existance of an entry doesn't mean t
779
781
|`view`| string | The human readable encoding of the Drep. |
780
782
|`has_script`| boolean | Flag which shows if this DRep credentials are a script hash |
781
783
784
+
### `committee_hash`
785
+
786
+
A table for all committee hot credentials
787
+
788
+
* Primary Id: `id`
789
+
790
+
| Column name | Type | Description |
791
+
|-|-|-|
792
+
|`id`| integer (64) ||
793
+
|`raw`| hash28type | The key or script hash |
794
+
|`has_script`| boolean | Flag which shows if this credential is a script hash |
795
+
782
796
### `delegation_vote`
783
797
784
798
A table containing delegations from a stake address to a stake pool. New in 13.2-Conway.
@@ -805,8 +819,8 @@ A table for every committee hot key registration. New in 13.2-Conway.
805
819
|`id`| integer (64) ||
806
820
|`tx_id`| integer (64) | The Tx table index of the tx that includes this certificate. |
807
821
|`cert_index`| integer (32) | The index of this registration within the certificates of this transaction. |
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 |
822
+
|`cold_key_id`|integer (64) | The reference to the registered cold key hash id|
823
+
|`hot_key_id`|integer (64) | The reference to the registered hot key hash id|
810
824
811
825
### `committee_de_registration`
812
826
@@ -819,7 +833,7 @@ A table for every committee key de-registration. New in 13.2-Conway.
819
833
|`id`| integer (64) ||
820
834
|`tx_id`| integer (64) | The Tx table index of the tx that includes this certificate. |
821
835
|`cert_index`| integer (32) | The index of this deregistration within the certificates of this transaction. |
822
-
|`cold_key`|hash28type | The deregistered cold key hash |
836
+
|`cold_key_id`|integer (64) | The reference to the the deregistered cold key hash id|
823
837
|`voting_anchor_id`| integer (64) | The Voting anchor reference id |
824
838
825
839
### `drep_registration`
@@ -849,6 +863,7 @@ A table for every Anchor that appears on Governance Actions. These are pointers
849
863
|`tx_id`| integer (64) | The Tx table index of the tx that includes this anchor. This only exists to facilitate rollbacks |
850
864
|`data_hash`| blob | A hash of the contents of the metadata URL |
851
865
|`url`| varchar | A URL to a JSON payload of metadata |
866
+
|`type`| anchorType ||
852
867
853
868
### `gov_action_proposal`
854
869
@@ -867,7 +882,7 @@ A table for proposed GovActionProposal, aka ProposalProcedure, GovAction or GovP
867
882
|`expiration`| word31type | Shows the epoch at which this governance action will expire. |
868
883
|`voting_anchor_id`| integer (64) | The Anchor table index related to this proposal. |
869
884
|`type`| govactiontype | Can be one of ParameterChange, HardForkInitiation, TreasuryWithdrawals, NoConfidence, NewCommittee, NewConstitution, InfoAction |
870
-
|`description`|string| A Text describing the content of this GovActionProposal in a readable way. |
885
+
|`description`|jsonb| A Text describing the content of this GovActionProposal in a readable way. |
871
886
|`param_proposal`| integer (64) | If this is a param proposal action, this has the index of the param_proposal table. |
872
887
|`ratified_epoch`| word31type | If not null, then this proposal has been ratified at the specfied epoch. TODO: This is currently always null. |
873
888
|`enacted_epoch`| word31type | If not null, then this proposal has been enacted at the specfied epoch. |
@@ -887,7 +902,7 @@ A table for all treasury withdrawals proposed on a GovActionProposal. New in 13.
887
902
|`stake_address_id`| integer (64) | The address that benefits from this withdrawal. |
888
903
|`amount`| lovelace | The amount for this withdrawl. |
889
904
890
-
### `new_committee`
905
+
### `new_committee_info`
891
906
892
907
A table for new committee proposed on a GovActionProposal. New in 13.2-Conway.
893
908
@@ -899,8 +914,17 @@ A table for new committee proposed on a GovActionProposal. New in 13.2-Conway.
899
914
|`gov_action_proposal_id`| integer (64) | The GovActionProposal table index for this new committee. |
900
915
|`quorum_numerator`| integer (64) | The proposed quorum nominator. |
901
916
|`quorum_denominator`| integer (64) | The proposed quorum denominator. |
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. |
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. |
917
+
918
+
### `new_committee_member`
919
+
920
+
* Primary Id: `id`
921
+
922
+
| Column name | Type | Description |
923
+
|-|-|-|
924
+
|`id`| integer (64) ||
925
+
|`gov_action_proposal_id`| integer (64) ||
926
+
|`committee_hash_id`| integer (64) ||
927
+
|`expiration_epoch`| word31type ||
904
928
905
929
### `constitution`
906
930
@@ -928,9 +952,9 @@ A table for voting procedures, aka GovVote. A Vote can be Yes No or Abstain. New
928
952
|`index`| integer (32) | The index of this VotingProcedure within this transaction. |
929
953
|`gov_action_proposal_id`| integer (64) | The index of the GovActionProposal that this vote targets. |
930
954
|`voter_role`| voterrole | The role of the voter. Can be one of ConstitutionalCommittee, DRep, SPO. |
931
-
|`committee_voter`|blob ||
932
-
|`drep_voter`| integer (64) ||
933
-
|`pool_voter`| integer (64) ||
955
+
|`committee_voter`|integer (64) | A reference to the hot key committee hash entry that voted|
956
+
|`drep_voter`| integer (64) |A reference to the drep hash entry that voted|
957
+
|`pool_voter`| integer (64) |A reference to the pool hash entry that voted|
934
958
|`vote`| vote | The Vote. Can be one of Yes, No, Abstain. |
935
959
|`voting_anchor_id`| integer (64) | The VotingAnchor table index associated with this VotingProcedure. |
936
960
@@ -990,9 +1014,60 @@ The table with the offchain metadata related to Vote Anchors. It accepts metadat
990
1014
|`id`| integer (64) ||
991
1015
|`voting_anchor_id`| integer (64) | The VotingAnchor table index this offchain data refers. |
992
1016
|`hash`| blob | The hash of the offchain data. |
1017
+
|`language`| string | The langauge described in the context of the metadata. Described in CIP-100. New in 13.3-Conway. |
1018
+
|`comment`| string | The title of the metadata. Described in CIP-108. New in 13.3-Conway. |
1019
+
|`title`| string ||
1020
+
|`abstract`| string | The abstract of the metadata. Described in CIP-108. New in 13.3-Conway. |
1021
+
|`motivation`| string | The motivation of the metadata. Described in CIP-108. New in 13.3-Conway. |
1022
+
|`rationale`| string | The rationale of the metadata. Described in CIP-108. New in 13.3-Conway. |
993
1023
|`json`| jsonb | The payload as JSON. |
994
1024
|`bytes`| bytea | The raw bytes of the payload. |
995
1025
|`warning`| string | A warning that occured while validating the metadata. |
1026
+
|`is_valid`| boolean | False if the data is found invalid. db-sync leaves this field null since it normally populates off_chain_vote_fetch_error for invalid data. It can be used manually to mark some metadata invalid by clients. |
1027
+
1028
+
### `off_chain_vote_author`
1029
+
1030
+
The table with offchain metadata authors, as decribed in CIP-100. New in 13.3-Conway.
1031
+
1032
+
* Primary Id: `id`
1033
+
1034
+
| Column name | Type | Description |
1035
+
|-|-|-|
1036
+
|`id`| integer (64) ||
1037
+
|`off_chain_vote_data_id`| integer (64) | The OffChainVoteData table index this offchain data refers. |
1038
+
|`name`| string | The name of the author. |
1039
+
|`witness_algorithm`| string | The witness algorithm used by the author. |
1040
+
|`public_key`| string | The public key used by the author. |
1041
+
|`signature`| string | The signature of the author. |
1042
+
|`warning`| string | A warning related to verifying this metadata. |
1043
+
1044
+
### `off_chain_vote_reference`
1045
+
1046
+
The table with offchain metadata references, as decribed in CIP-100. New in 13.3-Conway.
1047
+
1048
+
* Primary Id: `id`
1049
+
1050
+
| Column name | Type | Description |
1051
+
|-|-|-|
1052
+
|`id`| integer (64) ||
1053
+
|`off_chain_vote_data_id`| integer (64) | The OffChainVoteData table index this entry refers. |
1054
+
|`label`| string | The label of this vote reference. |
1055
+
|`uri`| string | The uri of this vote reference. |
1056
+
|`hash_digest`| string | The hash digest of this vote reference, as described in CIP-108. This only appears for governance action metadata. |
1057
+
|`hash_algorithm`| string | The hash algorithm of this vote reference, as described in CIP-108. This only appears for governance action metadata. |
1058
+
1059
+
### `off_chain_vote_external_update`
1060
+
1061
+
The table with offchain metadata external updates, as decribed in CIP-100. New in 13.3-Conway.
1062
+
1063
+
* Primary Id: `id`
1064
+
1065
+
| Column name | Type | Description |
1066
+
|-|-|-|
1067
+
|`id`| integer (64) ||
1068
+
|`off_chain_vote_data_id`| integer (64) | The OffChainVoteData table index this entry refers. |
1069
+
|`title`| string | The title of this external update. |
1070
+
|`uri`| string | The uri of this external update. |
0 commit comments