github.com/TrueBlocks/trueblocks-core/src/apps/chifra@v0.0.0-20241022031540-b362680128f7/internal/chunks/README.md (about) 1 ## chifra chunks 2 3 The `chifra chunks` routine provides tools for interacting with, checking the validity of, cleaning up, 4 and analyzing the Unchained Index. It provides options to list pins, the Manifest, summary data 5 on the index, Bloom filters, addresses, and appearances. While still in its early stages, this 6 tool will eventually allow users to clean their local index, clean their remote index, study 7 the indexes, etc. Stay tuned. 8 9 ```[plaintext] 10 Purpose: 11 Manage, investigate, and display the Unchained Index. 12 13 Usage: 14 chifra chunks <mode> [flags] [blocks...] [address...] 15 16 Arguments: 17 mode - the type of data to process (required) 18 One of [ manifest | index | blooms | pins | addresses | appearances | stats ] 19 blocks - an optional list of blocks to intersect with chunk ranges 20 21 Flags: 22 -c, --check check the manifest, index, or blooms for internal consistency 23 -i, --pin pin the manifest or each index chunk and bloom 24 -p, --publish publish the manifest to the Unchained Index smart contract 25 -r, --remote prior to processing, retrieve the manifest from the Unchained Index smart contract 26 -b, --belongs strings in index mode only, checks the address(es) for inclusion in the given index chunk 27 -F, --first_block uint first block to process (inclusive) 28 -L, --last_block uint last block to process (inclusive) 29 -m, --max_addrs uint the max number of addresses to process in a given chunk 30 -d, --deep if true, dig more deeply during checking (manifest only) 31 -e, --rewrite for the --pin --deep mode only, writes the manifest back to the index folder (see notes) 32 -U, --count for certain modes only, display the count of records 33 -s, --sleep float for --remote pinning only, seconds to sleep between API calls 34 -x, --fmt string export format, one of [none|json*|txt|csv] 35 -v, --verbose enable verbose output 36 -h, --help display this help screen 37 38 Notes: 39 - Mode determines which type of data to display or process. 40 - Certain options are only available in certain modes. 41 - If blocks are provided, only chunks intersecting with those blocks are displayed. 42 - The --truncate option updates the manifest and removes local data, but does not alter remote pins. 43 - The --belongs option is only available in the index mode. 44 - The --first_block and --last_block options apply only to addresses, appearances, and index --belongs mode. 45 - The --pin option requires a locally running IPFS node or a pinning service API key. 46 - The --publish option requires a private key. 47 - The --publisher option is ignored with the --publish option since the sender of the transaction is recorded as the publisher. 48 - Without --rewrite, the manifest is written to the temporary cache. With it, the manifest is rewritten to the index folder. 49 ``` 50 51 Data models produced by this tool: 52 53 - [appearance](/data-model/accounts/#appearance) 54 - [appearancetable](/data-model/accounts/#appearancetable) 55 - [chunkaddress](/data-model/admin/#chunkaddress) 56 - [chunkbloom](/data-model/admin/#chunkbloom) 57 - [chunkindex](/data-model/admin/#chunkindex) 58 - [chunkpin](/data-model/admin/#chunkpin) 59 - [chunkrecord](/data-model/admin/#chunkrecord) 60 - [chunkstats](/data-model/admin/#chunkstats) 61 - [count](/data-model/other/#count) 62 - [ipfspin](/data-model/admin/#ipfspin) 63 - [manifest](/data-model/admin/#manifest) 64 - [message](/data-model/other/#message) 65 - [rangedates](/data-model/admin/#rangedates) 66 - [reportcheck](/data-model/admin/#reportcheck) 67 68 ### Other Options 69 70 All tools accept the following additional flags, although in some cases, they have no meaning. 71 72 ```[plaintext] 73 -v, --version display the current version of the tool 74 --output string write the results to file 'fn' and return the filename 75 --append for --output command only append to instead of replace contents of file 76 --file string specify multiple sets of command line options in a file 77 ``` 78 79 **Note:** For the `--file string` option, you may place a series of valid command lines in a file using any 80 valid flags. In some cases, this may significantly improve performance. A semi-colon at the start 81 of any line makes it a comment. 82 83 **Note:** If you use `--output --append` option and at the same time the `--file` option, you may not switch 84 export formats in the command file. For example, a command file with two different commands, one with `--fmt csv` 85 and the other with `--fmt json` will produce both invalid CSV and invalid JSON. 86 87 *Copyright (c) 2024, TrueBlocks, LLC. All rights reserved. Generated with goMaker.*