Admin

Tools in the Admin category produce data related to scraping the chain, producing the indexes, and querying the status of the system. Additional data related to sharing the indexes via IPFS and pinning the same are also produced by tools in this category.

Status

The chifra status tool reports on the state (and size) of the various TrueBlocks local binary caches. TrueBlocks produces nine difference caches: abis, blocks, monitors, names, objs, recons, slurps, traces, txs. In general practice, these caches may take up a few GB of hard drive space, however, for very popular smart contract the size of the caches may grow rather large. Keep an eye on it.

The following commands produce and manage status:

Tools
chifra statusreport on the status of the TrueBlocks system

Status data is made of the following data fields:

FieldDescriptionType
clientVersionthe version string as reported by the rpcProviderstring
clientIdsnetword_id and chain_id from the rpcProviderstring
trueblocksVersionthe TrueBlocks version stringstring
rpcProviderthe current rpcProviderstring
configPaththe path to config filesstring
cachePaththe path to the local binary cachesstring
indexPaththe path to the local binary indexesstring
hostthe host portion of the local API serverstring
isTestingtrue if the server is running in test modebool
isApitrue if the server is running in API modebool
isScrapingtrue if the index scraper is runningbool
isArchivetrue if the rpcProvider is an archive nodebool
isTracingtrue if the rpcProvider provides Parity tracesbool
hasEskeytrue if an EtherScan key is presentbool
hasPinkeytrue if a Pinata API key is presentbool
tsthe timestamp when this status data was producedtimestamp
chainsCChainArray
cachesa collection of information concerning the binary cachesCCachePtrArray

Cache

The chifra status reports on the binary caches. Those reports come in the form of the Cache data type. Each cache data object may carry unique information for the given cache. See the source code for more information.

The following commands produce and manage caches:

Tools
chifra statusreport on the status of the TrueBlocks system

Cache data is made of the following data fields:

FieldDescriptionType
typethe type of the cache (one of the nine different types)string
paththe physical path to the cache on the hard drivestring
nFilesthe number of files in the cacheuint64
nFoldersthe number of subfolders in the cacheuint64
sizeInBytesthe size of the cache in bytesuint64
itemsan array of cache itemsCCacheEntryArray

PinnedChunk

The TrueBlocks index scraper periodically creates a chunked portion of the index so that it can be more easily stored in a content-addresable data store such as IPFS. We call these periodically-created chunks, PinnedChunks. The format of said item is described here. A pinned chunk is effectively a relational table relating all of the addresses appearing in the chunk with a list of appearances appearing in the chunk.

The following commands produce and manage pinnedchunks:

Tools
chifra scrapescan the chain and update the TrueBlocks index of appearances
chifra chunksmanage pinned index of appearances and associated Bloom filters

Pinnedchunk data is made of the following data fields:

FieldDescriptionType
rangefor each chunk, the range of blocks contained in that chunkstring
bloomHashthe IPFS hash of the bloom filter at that rangeipfshash
indexHashthe IPFS hash of the index chunk at that rangeipfshash
firstAppthe first appearance in the chunkblknum
latestAppthe latest appearance in the chunkblknum

Manifest

The Manifest details the index of appearance’s PinnedChunks. Each record in the Manifest details the block range represented by the chunk as well as the IPFS hash of the index chunk along with the associated IPFS hash for the Bloom filter of the chunk. The manifest itself is also pushed to IPFS and the IPFS of the hash of the manifest is published periodically to the Unchained Index smart contract.

The following commands produce and manage manifests:

Tools
chifra scrapescan the chain and update the TrueBlocks index of appearances
chifra chunksmanage pinned index of appearances and associated Bloom filters

Manifest data is made of the following data fields:

FieldDescriptionType
versionthe version string hashed into the chunk datastring
chainthe chain to which this manifest belongsstring
schemasIPFS cid of file describing the schemas for the various databasesipfshash
databasesIPFS cid of file containing CIDs for the various databasesipfshash
chunksa list of the IPFS hashes of all of the chunks in the unchained indexCPinnedChunkArray

Chain

FieldDescriptionType
chainThe common name of the chainstring
chainIdThe chain id as reported by the RPCuint64
symbolThe symbol of the base currency on the chainstring
rpcProviderA valid RPC provider for the chainstring
apiProviderA valid API provider for the explorerstring
remoteExplorerA remote explorer for the chain such as EtherScanstring
localExplorerThe local explorer for the chain (typically TrueBlocks Explorer)string
ipfsGatewayAn IPFS gateway for pinning the index if enabledstring

CacheEntry

FieldDescriptionType
addressaddress
namestring

Base types

This documentation mentions the following basic data types.

TypeDescriptionNotes
addressa 20-byte hexadecimal string starting with ‘0x’lowercase
blknuman alias for a uint64
boola value either true, false, 1, or 0
ipfshasha multi-hash produced by IPFSmixed-case
stringa normal character string
timestampa 64-bit unsigned integerUnix timestamp
uint64a 64-bit unsigned integer
Published on: Sep 19, 2022 Last edited: Sep 20, 2022

Edit this page on GitHub