Skip to content

Commit 4bb749d

Browse files
committed
Update schema for tag 4.1.0
1 parent f8e1a62 commit 4bb749d

File tree

1 file changed

+88
-13
lines changed

1 file changed

+88
-13
lines changed

doc/schema.md

Lines changed: 88 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Schema Documentation for cardano-db-sync
22

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)
44
**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.
55

66
### `schema_version`
@@ -557,7 +557,7 @@ A table containing redeemers. A redeemer is provided for all items that are vali
557557
| `unit_mem` | word63type | The budget in Memory to run a script. |
558558
| `unit_steps` | word63type | The budget in Cpu steps to run a script. |
559559
| `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` |
561561
| `index` | word31type | The index of the redeemer pointer in the transaction. |
562562
| `script_hash` | hash28type | The script hash this redeemer is used for. |
563563
| `redeemer_data_id` | integer (64) | The data related to this redeemer. New in v13: renamed from datum_id. |
@@ -662,6 +662,7 @@ A table containing block chain parameter change proposals.
662662
| `pvt_committee_normal` | double | Pool Voting threshold for new committee/threshold (normal state). New in 13.2-Conway. |
663663
| `pvt_committee_no_confidence` | double | Pool Voting threshold for new committee/threshold (state of no-confidence). New in 13.2-Conway. |
664664
| `pvt_hard_fork_initiation` | double | Pool Voting threshold for hard-fork initiation. New in 13.2-Conway. |
665+
| `pvtpp_security_group` | double | |
665666
| `dvt_motion_no_confidence` | double | DRep Vote threshold for motion of no-confidence. New in 13.2-Conway. |
666667
| `dvt_committee_normal` | double | DRep Vote threshold for new committee/threshold (normal state). New in 13.2-Conway. |
667668
| `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.
724725
| `pvt_committee_normal` | double | Pool Voting threshold for new committee/threshold (normal state). New in 13.2-Conway. |
725726
| `pvt_committee_no_confidence` | double | Pool Voting threshold for new committee/threshold (state of no-confidence). New in 13.2-Conway. |
726727
| `pvt_hard_fork_initiation` | double | Pool Voting threshold for hard-fork initiation. New in 13.2-Conway. |
728+
| `pvtpp_security_group` | double | |
727729
| `dvt_motion_no_confidence` | double | DRep Vote threshold for motion of no-confidence. New in 13.2-Conway. |
728730
| `dvt_committee_normal` | double | DRep Vote threshold for new committee/threshold (normal state). New in 13.2-Conway. |
729731
| `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.
768770

769771
### `drep_hash`
770772

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.
772774

773775
* Primary Id: `id`
774776

@@ -779,6 +781,18 @@ A table for every unique drep key hash. The existance of an entry doesn't mean t
779781
| `view` | string | The human readable encoding of the Drep. |
780782
| `has_script` | boolean | Flag which shows if this DRep credentials are a script hash |
781783

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+
782796
### `delegation_vote`
783797

784798
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.
805819
| `id` | integer (64) | |
806820
| `tx_id` | integer (64) | The Tx table index of the tx that includes this certificate. |
807821
| `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 |
810824

811825
### `committee_de_registration`
812826

@@ -819,7 +833,7 @@ A table for every committee key de-registration. New in 13.2-Conway.
819833
| `id` | integer (64) | |
820834
| `tx_id` | integer (64) | The Tx table index of the tx that includes this certificate. |
821835
| `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 |
823837
| `voting_anchor_id` | integer (64) | The Voting anchor reference id |
824838

825839
### `drep_registration`
@@ -849,6 +863,7 @@ A table for every Anchor that appears on Governance Actions. These are pointers
849863
| `tx_id` | integer (64) | The Tx table index of the tx that includes this anchor. This only exists to facilitate rollbacks |
850864
| `data_hash` | blob | A hash of the contents of the metadata URL |
851865
| `url` | varchar | A URL to a JSON payload of metadata |
866+
| `type` | anchorType | |
852867

853868
### `gov_action_proposal`
854869

@@ -867,7 +882,7 @@ A table for proposed GovActionProposal, aka ProposalProcedure, GovAction or GovP
867882
| `expiration` | word31type | Shows the epoch at which this governance action will expire. |
868883
| `voting_anchor_id` | integer (64) | The Anchor table index related to this proposal. |
869884
| `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. |
871886
| `param_proposal` | integer (64) | If this is a param proposal action, this has the index of the param_proposal table. |
872887
| `ratified_epoch` | word31type | If not null, then this proposal has been ratified at the specfied epoch. TODO: This is currently always null. |
873888
| `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.
887902
| `stake_address_id` | integer (64) | The address that benefits from this withdrawal. |
888903
| `amount` | lovelace | The amount for this withdrawl. |
889904

890-
### `new_committee`
905+
### `new_committee_info`
891906

892907
A table for new committee proposed on a GovActionProposal. New in 13.2-Conway.
893908

@@ -899,8 +914,17 @@ A table for new committee proposed on a GovActionProposal. New in 13.2-Conway.
899914
| `gov_action_proposal_id` | integer (64) | The GovActionProposal table index for this new committee. |
900915
| `quorum_numerator` | integer (64) | The proposed quorum nominator. |
901916
| `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 | |
904928

905929
### `constitution`
906930

@@ -928,9 +952,9 @@ A table for voting procedures, aka GovVote. A Vote can be Yes No or Abstain. New
928952
| `index` | integer (32) | The index of this VotingProcedure within this transaction. |
929953
| `gov_action_proposal_id` | integer (64) | The index of the GovActionProposal that this vote targets. |
930954
| `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 |
934958
| `vote` | vote | The Vote. Can be one of Yes, No, Abstain. |
935959
| `voting_anchor_id` | integer (64) | The VotingAnchor table index associated with this VotingProcedure. |
936960

@@ -990,9 +1014,60 @@ The table with the offchain metadata related to Vote Anchors. It accepts metadat
9901014
| `id` | integer (64) | |
9911015
| `voting_anchor_id` | integer (64) | The VotingAnchor table index this offchain data refers. |
9921016
| `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. |
9931023
| `json` | jsonb | The payload as JSON. |
9941024
| `bytes` | bytea | The raw bytes of the payload. |
9951025
| `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. |
9961071

9971072
### `off_chain_vote_fetch_error`
9981073

0 commit comments

Comments
 (0)