Skip to content

Commit 2e8e3ae

Browse files
committed
1780 - add only_gov configuration docs
Signed-off-by: Cmdv <[email protected]>
1 parent c1b4263 commit 2e8e3ae

File tree

2 files changed

+61
-25
lines changed

2 files changed

+61
-25
lines changed

cardano-db/src/Cardano/Db/Schema.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1371,7 +1371,7 @@ schemaDocs =
13711371
CommitteeMemberExpirationEpoch # "The epoch this member expires"
13721372

13731373
Constitution --^ do
1374-
"A table for constitutiona attached to a GovActionProposal. New in 13.2-Conway."
1374+
"A table for constitution attached to a GovActionProposal. New in 13.2-Conway."
13751375
ConstitutionGovActionProposalId # "The GovActionProposal table index for this constitution."
13761376
ConstitutionVotingAnchorId # "The ConstitutionVotingAnchor table index for this constitution."
13771377
ConstitutionScriptHash # "The Script Hash. It's associated script may not be already inserted in the script table."

doc/configuration.md

Lines changed: 60 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ Below is a sample `insert_options` section that shows all the defaults:
4848
}
4949
```
5050

51-
## Properties
51+
# Properties
5252

5353
`insert_options` may contain the following elements:
5454

@@ -67,7 +67,7 @@ Below is a sample `insert_options` section that shows all the defaults:
6767
| [pool\_stat](#pool-stat) | `enum` | Optional |
6868
| [remove\_jsonb_from_schema](#remove-jsonb-from-schema) | `enum` | Optional |
6969

70-
### Preset
70+
## Preset
7171

7272
Preset is an aggregate setting that overrides all other properties. For example, setting
7373
preset to `"full"` will enable all insert options except `"tx_cbor"`.
@@ -80,16 +80,16 @@ preset to `"full"` will enable all insert options except `"tx_cbor"`.
8080

8181
| Value | Explanation |
8282
| :----------- | :----------------------------------------------------------- |
83-
| `"full"` | Enable all options |
84-
| `"only_utxo"` | Only load `block`, `tx`, `tx_out` and `ma_tx_out` |
85-
| `"only_gov"` | Disable most data except governance data. |
86-
| `"disable_all"` | Only load `block`, `tx` and data related to the ledger state |
83+
| ["full"](#Full) | Enable all options |
84+
| ["only_utxo"](#only-utxo) | Only load `block`, `tx`, `tx_out` and `ma_tx_out`. |
85+
| ["only_gov"](#only-gov) | Disable most data except governance data. |
86+
| ["disable_all"](#disable-all) | Only load `block`, `tx` and data related to the ledger state |
8787

88-
**Full**
88+
### Full
8989

9090
This is equivalent to enabling all other settings.
9191

92-
**Only UTxO**
92+
### Only UTxO
9393

9494
This is equivalent to setting:
9595

@@ -121,7 +121,7 @@ doesn't use any of its data. When syncing is completed, it loads the whole UTxO
121121
to the `tx_out` and `ma_tx_out` tables. After that db-sync can be restarted with `ledger` set to
122122
`"disable"` to continue syncing without maintaining the ledger
123123

124-
**Only Gov**
124+
### Only Gov
125125

126126
This is equivalent to setting:
127127

@@ -147,8 +147,9 @@ This is equivalent to setting:
147147
```
148148

149149
Disables most data except `block`, `tx`, and governance data.
150+
View [governance](#governance) for more indepth information into what is effected.
150151

151-
**Disable All**
152+
### Disable All
152153

153154
This is equivalent to setting:
154155

@@ -174,7 +175,7 @@ This is equivalent to setting:
174175

175176
Disables almost all data except `block` and `tx` tables.
176177

177-
### Tx CBOR
178+
## Tx CBOR
178179

179180
`tx_cbor`
180181

@@ -187,7 +188,7 @@ Disables almost all data except `block` and `tx` tables.
187188
| `"enable"` | Enable transaction CBOR collection |
188189
| `"disable"` | Disable transaction CBOR collection |
189190

190-
### Tx Out
191+
## Tx Out
191192

192193
`tx_out`
193194

@@ -263,13 +264,13 @@ fields are left empty:
263264
Until the ledger state migration happens, any restart requires this setting. After completion, this
264265
can be changed.
265266

266-
#### Force Tx In
267+
### Force Tx In
267268

268269
`tx_out.force_tx_in`
269270

270271
* Type: `boolean`
271272

272-
### Ledger
273+
## Ledger
273274

274275
One of the db-sync features that uses the most resources is that it maintains a ledger state and
275276
replays all the ledger rules. This is the only way to get historic reward details and other data
@@ -339,7 +340,7 @@ delete from epoch_param;
339340
Maintains the ledger state, but doesn't use any of its data, except to load UTxO. To be used with
340341
`tx_out` set to `"bootstrap"`
341342

342-
### Shelley
343+
## Shelley
343344

344345
`shelley`
345346

@@ -360,7 +361,7 @@ proposals. Does not control `epoch_stake` and `rewards`, For this check `ledger`
360361

361362
* Type: `boolean`
362363

363-
### Multi Asset
364+
## Multi Asset
364365

365366
`multi_asset`
366367

@@ -380,7 +381,7 @@ Enables or disables multi assets tables and entries.
380381

381382
* Type: `boolean`
382383

383-
### Metadata
384+
## Metadata
384385

385386
`metadata`
386387

@@ -409,7 +410,7 @@ If set, only keep metadata with the specified keys.
409410

410411
* Type: `integer[]`
411412

412-
### Plutus
413+
## Plutus
413414

414415
`plutus`
415416

@@ -429,10 +430,12 @@ Enables or disables most tables and entries related to plutus and scripts.
429430

430431
* Type: `boolean`
431432

432-
### Governance
433+
## Governance
433434

434435
`governance`
435436

437+
This will effect all governance related data/functionality.
438+
436439
* Type: `string`
437440

438441
**enum**: The value of this property must be equal to one of the following values:
@@ -442,7 +445,40 @@ Enables or disables most tables and entries related to plutus and scripts.
442445
| `"enable"` | Enable all data related to governance |
443446
| `"disable"`| Disable all data related to governance |
444447

445-
### Offchain Pool Data
448+
### Example
449+
450+
```json
451+
"governance": "enable"
452+
```
453+
### Tables associated with governance
454+
455+
| Table Name | info |
456+
| :-------------- | :------------ |
457+
| `committee_de_registration` | Every committee de-registration. |
458+
| `committee_member` | Members of the committee. A committee can have multiple members. |
459+
| `committee_registration` | Every committee hot key registration. |
460+
| `committee` | New committee proposed on a governance action proposal in table `gov_action_proposal` |
461+
| `constitution` | Constitution attached to a GovActionProposal (`gov_action_proposal`). |
462+
| `constitution` | Constitutiona attached to a `gov_action_proposal` |
463+
| `delegation_vote` | Delegations from a stake address to a stake pool. |
464+
| `drep_distr` | Distribution of voting power per DRep per. Currently this has a single entry per DRep and doesn't show every delegator. This may change. |
465+
| `drep_registration` | DRep registrations, deregistrations or updates. Registration have positive deposit values, deregistrations have negative and updates have null. Based on this distinction, for a specific DRep, getting the latest entry gives its registration state. |
466+
| `drep_registration` | DRep registrations, deregistrations or updates. Registration have positive deposit values, deregistrations have negative and updates have null. Based on this distinction, for a specific DRep, getting the latest entry gives its registration state. |
467+
| `epoch_stake` | Governance (and in the future other) stats per epoch. |
468+
| `gov_action_proposal` | Every Anchor that appears on Governance Actions. These are pointers to offchain metadata. The tuple of url and hash is unique. |
469+
| `gov_action_proposal` | Proposed Gov action proposals, aka ProposalProcedure, GovAction or GovProposal. This table may be referenced by treasury_withdrawal or new_committee. |
470+
| `off_chain_vote_data` | Offchain metadata related to Vote Anchors. It accepts metadata in a more lenient way than what's decribed in CIP-100. |
471+
| `off_chain_vote_drep_data` | Offchain metadata for Drep Registrations. Implementes CIP-119. |
472+
| `off_chain_vote_external_update`| Offchain metadata external updates, as decribed in CIP-100. New in 13.3-Conway. |
473+
| `off_chain_vote_fetch_error` | Errors while fetching or validating offchain Voting Anchor metadata. |
474+
| `off_chain_vote_gov_action_data` | Offchain metadata for Governance Actions. Implementes CIP-108. New in 13.3-Conway. |
475+
| `off_chain_vote_reference` | Offchain metadata references, as decribed in CIP-100. |
476+
| `treasury_withdrawal` | All treasury withdrawals proposed on a GovActionProposal (`gov_action_proposal`). |
477+
| `treasury_withdrawal` | All treasury withdrawals proposed on a GovActionProposal. |
478+
| `voting_anchor` | Every Anchor that appears on Governance Actions. These are pointers to offchain metadata The tuple of url and hash is unique |
479+
| `voting_procedure` | Voting procedures, aka GovVote. A Vote can be Yes No or Abstain |
480+
481+
## Offchain Pool Data
446482

447483
`offchain_pool_data`
448484

@@ -455,7 +491,7 @@ Enables or disables most tables and entries related to plutus and scripts.
455491
| `"enable"` | Enables fetching offchain metadata. |
456492
| `"disable"`| Disables fetching pool offchain metadata. |
457493

458-
### Pool Stat
494+
## Pool Stat
459495

460496
`pool_stat`
461497

@@ -468,7 +504,7 @@ Enables or disables most tables and entries related to plutus and scripts.
468504
| `"enable"` | Enable pool stats |
469505
| `"disable"` | Disable pool stats |
470506

471-
### Remove Jsonb From Schema
507+
## Remove Jsonb From Schema
472508

473509
`remove_jsonb_from_schema`
474510

@@ -484,13 +520,13 @@ A warning will logw if `remove_jsonb_from_schema` was previously set to `enable`
484520
| `"enable"` | Enables removing [jsonb data types](#data-types-effected) from the schema. |
485521
| `"disable"`| keeps jsonb data types in the schema. |
486522

487-
#### Example
523+
### Example
488524

489525
```json
490526
"remove_jsonb_from_schema": "enable"
491527
```
492528

493-
#### Data Types Effected
529+
### Data Types Effected
494530
When enabling this config, the following columns will no longer have the `jsonb` data type:
495531

496532
| Table | Column |

0 commit comments

Comments
 (0)