Skip to content

Commit 54dfd2a

Browse files
committed
update configuration docs to include new whitelist opts
1 parent 3647e55 commit 54dfd2a

File tree

2 files changed

+123
-10
lines changed

2 files changed

+123
-10
lines changed

cardano-chain-gen/src/Cardano/Mock/Query.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ module Cardano.Mock.Query (
1717
) where
1818

1919
import qualified Cardano.Db as Db
20-
import Cardano.Prelude hiding (isNothing, from)
20+
import Cardano.Prelude hiding (from, isNothing)
2121
import qualified Data.ByteString.Base16 as Base16
2222
import Data.ByteString.Short (ShortByteString, toShort)
2323
import Database.Esqueleto.Experimental

doc/configuration.md

Lines changed: 122 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -324,9 +324,11 @@ Maintains the ledger state, but doesn't use any of its data, except to load UTxO
324324

325325
Shelley Properties:
326326

327-
| Property | Type | Required |
328-
| :---------------- | :-------- | :------- |
329-
| [enable](#enable) | `boolean` | Optional |
327+
| Property | Type | Required |
328+
| :----------------------------------- | :-------- | :------- |
329+
| [enable](#enable) | `boolean` | Optional |
330+
| [stake\_addresses](#stake-addresses) | `array` | Optional |
331+
330332

331333
#### Enable
332334

@@ -337,6 +339,54 @@ proposals. Does not control `epoch_stake` and `rewards`, For this check `ledger`
337339

338340
* Type: `boolean`
339341

342+
##### Stake Addresses
343+
344+
Whitelist stake addresses. Only set values will be kept in the database, all others will be ignored.
345+
346+
`stake_addresses`
347+
348+
* Type: `string`
349+
350+
The string will be validated and needs to omit `\x` from the start of the hash eg:
351+
352+
`\x6c969320597b755454ff3653ad09725d590c570827a129aeb4385526`
353+
should be entered as:
354+
`6c969320597b755454ff3653ad09725d590c570827a129aeb4385526`
355+
356+
Be mindfull that whitelisting stake address will omit data being present from the following tables unless they have matching stake addresses.
357+
358+
+-----------------------+
359+
| table name |
360+
|-----------------------+
361+
| collateral_tx_out |
362+
| delegation |
363+
| delegation_vote |
364+
| epoch_stake |
365+
| gov_action_proposal |
366+
| instant_reward |
367+
| pool_owner |
368+
| pool_update |
369+
| reserve |
370+
| stake_deregistration |
371+
| stake_registration |
372+
| treasury |
373+
| treasury_withdrawal |
374+
| tx_out |
375+
| withdrawal |
376+
+-----------------------+
377+
378+
#### Example
379+
380+
```json
381+
"shelley": {
382+
"enable": true
383+
"stake_addresses":
384+
["6c969320597b755454ff3653ad09725d590c570827a129aeb4385526"
385+
,"994cf4c18f5613ca49c275f63d464b6d95123bfa8985e82b24b5680b"
386+
]
387+
}
388+
```
389+
340390
### Multi Asset
341391

342392
`multi_asset`
@@ -345,9 +395,10 @@ proposals. Does not control `epoch_stake` and `rewards`, For this check `ledger`
345395

346396
Multi Asset Properties:
347397

348-
| Property | Type | Required |
349-
| :------------------ | :-------- | :------- |
350-
| [enable](#enable-1) | `boolean` | Optional |
398+
| Property | Type | Required |
399+
| :-------------------- | :-------- | :------- |
400+
| [enable](#enable-1) | `boolean` | Optional |
401+
| [policies](#policies) | `array` | Optional |
351402

352403
#### Enable
353404

@@ -357,6 +408,32 @@ Enables or disables multi assets tables and entries.
357408

358409
* Type: `boolean`
359410

411+
#### Policies
412+
413+
Whitelist for multi asset policies hash. Only set values will be kept in the database, all others will be ignored.
414+
415+
`policies`
416+
417+
* Type: `string`
418+
419+
The string will be validated and needs to omit `\x` from the start of the hash eg:
420+
421+
`\x6c969320597b755454ff3653ad09725d590c570827a129aeb4385526`
422+
should be entered as:
423+
`6c969320597b755454ff3653ad09725d590c570827a129aeb4385526`
424+
425+
#### Example
426+
427+
```json
428+
"multi_asset": {
429+
"enable": true
430+
"policies":
431+
["6c969320597b755454ff3653ad09725d590c570827a129aeb4385526"
432+
,"994cf4c18f5613ca49c275f63d464b6d95123bfa8985e82b24b5680b"
433+
]
434+
}
435+
```
436+
360437
### Metadata
361438

362439
`metadata`
@@ -386,6 +463,15 @@ If set, only keep metadata with the specified keys.
386463

387464
* Type: `integer[]`
388465

466+
#### Example
467+
468+
```json
469+
"metadata": {
470+
"enable": true
471+
"keys": [12345, 6789]
472+
}
473+
```
474+
389475
### Plutus
390476

391477
`plutus`
@@ -394,9 +480,10 @@ If set, only keep metadata with the specified keys.
394480

395481
Plutus Properties:
396482

397-
| Property | Type | Required |
398-
| :------------------ | :-------- | :------- |
399-
| [enable](#enable-3) | `boolean` | Optional |
483+
| Property | Type | Required |
484+
| :------------------------------- | :-------- | :------- |
485+
| [enable](#enable-3) | `boolean` | Optional |
486+
| [script\_hashes](#script-hashes) | `string` | Optional |
400487

401488
#### Enable
402489

@@ -406,6 +493,32 @@ Enables or disables most tables and entries related to plutus and scripts.
406493

407494
* Type: `boolean`
408495

496+
#### Script Hashes
497+
498+
Whitelist for plutus hash. Only set values will be kept in the database, all others will be ignored.
499+
500+
`script_hashes`
501+
502+
* Type: `string`
503+
504+
The string will be validated and needs to omit `\x` from the start of the hash eg:
505+
506+
`\x6c969320597b755454ff3653ad09725d590c570827a129aeb4385526`
507+
should be entered as:
508+
`6c969320597b755454ff3653ad09725d590c570827a129aeb4385526`
509+
510+
#### Example
511+
512+
```json
513+
"plututs": {
514+
"enable": true
515+
"script_hashes":
516+
["6c969320597b755454ff3653ad09725d590c570827a129aeb4385526"
517+
,"994cf4c18f5613ca49c275f63d464b6d95123bfa8985e82b24b5680b"
518+
]
519+
}
520+
```
521+
409522
### Governance
410523

411524
`governance`

0 commit comments

Comments
 (0)