IntersectMBO / IntersectMBO/cardano-db-sync
only_utxo preset populates governance tables - intended, or doc/preset mismatch?
- Dominant language
- Haskell
- Stars
- 318
- Forks
- 168
- PR merge metrics
- No merged PRs in 30d
Description
## Question
`doc/configuration.md` describes the [only_utxo](https://github.com/IntersectMBO/cardano-db-sync/blob/master/doc/configuration.md#only-utxo) preset as loading only `block`, `tx`, `tx_out` and `ma_tx_out`. But the preset enables governance, so a sync with `preset: only_utxo` populates the governance tables. Which side is correct?
## Observed
db-sync 13.7.2.1, preview, `insert_options: { preset: only_utxo }`:
```
drep_registration | 22992
voting_anchor | 16881
gov_action_proposal | 1496
voting_procedure | 4950
```
## Source
`onlyUTxOInsertOptions` (Cardano/DbSync/Config/Types.hs) sets:
```haskell
sioGovernance = GovernanceConfig True
```
Git history: this was `GovernanceConfig False` until commit fda0c897 ("Add offchain_vote_data config flag, default disabled for pools and votes"), which flipped it to `True`. That commit is about a different flag, and the flip has no CHANGELOG entry, no doc update, and no test asserting it, so it is not clear whether it was intentional.
## Resolution
Either:
1. Governance should be off for only_utxo: set `sioGovernance = GovernanceConfig False`.
2. Governance is intended to be on: update doc/configuration.md, which is wrong about more than governance (the preset also enables multi_asset, and the rewards/epoch flags), so the "only block, tx, tx_out, ma_tx_out" line needs a rewrite either way.
Contributor guide
Research direction
Compare doc/configuration.md with onlyUTxOInsertOptions in Cardano/DbSync/Config/Types.hs, then review commit fda0c897 and the observed governance-table behavior. Determine whether only_utxo should enable governance; done means the preset behavior and documentation agree, with the chosen resolution reflected in the relevant source or documentation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- haskell, postgresql
- Domain
- databases, documentation
- Issue type
- Documentation
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100