github.com/TrueBlocks/trueblocks-core/src/apps/chifra@v0.0.0-20241022031540-b362680128f7/internal/init/README.md (about) 1 ## chifra init 2 3 When invoked, `chifra init` reads a value from a smart contract called **The Unchained Index** 4 (0x0c316b7042b419d07d343f2f4f5bd54ff731183d). 5 6 This value (`manifestHashMap`) is an IPFS hash pointing to a pinned file (called the Manifest) that 7 contains a large collection of other IPFS hashes. These other hashes point to each of the Bloom 8 filter and Index Chunk. TrueBlocks periodically publishes the Manifest's hash to the smart contract. 9 This makes the index available for our software to use and impossible for us to withhold. Both of 10 these aspects of the manifest are by design. 11 12 If you stop `chifra init` before it finishes, it will pick up again where it left off the next 13 time you run it. 14 15 Certain parts of the system (`chifra list` and `chifra export` for example) if you have not 16 previously run `chifra init` or `chifra scrape`. You will be warned by the system until it's 17 satisfied. 18 19 If you run `chifra init` and allow it to complete, the next time you run `chifra scrape`, it will 20 start where `init` finished. This means that only the blooms will be stored on your hard drive. 21 Subsequent scraping will produce both chunks and blooms, although you can, if you wish delete 22 chunks that are not being used. You may periodically run `chifra init` if you prefer not to scrape. 23 24 ```[plaintext] 25 Purpose: 26 Initialize the TrueBlocks system by downloading the Unchained Index from IPFS. 27 28 Usage: 29 chifra init [flags] 30 31 Flags: 32 -a, --all in addition to Bloom filters, download full index chunks (recommended) 33 -e, --example string create an example for the SDK with the given name 34 -d, --dry_run display the results of the download without actually downloading 35 -F, --first_block uint do not download any chunks earlier than this block 36 -s, --sleep float seconds to sleep between downloads 37 -v, --verbose enable verbose output 38 -h, --help display this help screen 39 40 Notes: 41 - If run with no options, this tool will download or freshen only the Bloom filters. 42 - The --first_block option will fall back to the start of the containing chunk. 43 - You may re-run the tool as often as you wish. It will repair or freshen the index. 44 ``` 45 46 Data models produced by this tool: 47 48 - [chunkrecord](/data-model/admin/#chunkrecord) 49 - [manifest](/data-model/admin/#manifest) 50 51 ### Other Options 52 53 All tools accept the following additional flags, although in some cases, they have no meaning. 54 55 ```[plaintext] 56 -v, --version display the current version of the tool 57 --output string write the results to file 'fn' and return the filename 58 --append for --output command only append to instead of replace contents of file 59 --file string specify multiple sets of command line options in a file 60 ``` 61 62 **Note:** For the `--file string` option, you may place a series of valid command lines in a file using any 63 valid flags. In some cases, this may significantly improve performance. A semi-colon at the start 64 of any line makes it a comment. 65 66 **Note:** If you use `--output --append` option and at the same time the `--file` option, you may not switch 67 export formats in the command file. For example, a command file with two different commands, one with `--fmt csv` 68 and the other with `--fmt json` will produce both invalid CSV and invalid JSON. 69 70 *Copyright (c) 2024, TrueBlocks, LLC. All rights reserved. Generated with goMaker.*