Admin

The data models produced by the tools in the Admin category relate to scraping the chain, producing the Unchained Index, and querying the configuration of the system. Additional data related to sharing the indexes via IPFS and pinning the same are also produced by tools in this category.

Each data structure is created by one or more tools which are detailed below.

Status

The status data model is a complex beast. It contains various information including a list of registered chains, information about many of the internal binary caches maintained by chifra as well as current status information about the system including version information for both chifra and the node it’s running against.

The following commands produce and manage Status:

Status consist of the following fields:

FieldDescriptionType
cachePaththe path to the local binary cachesstring
cachesa collection of information concerning the binary cachesCacheItem[]
chainthe current chainstring
chainConfigthe path to the chain configuration folderstring
clientVersionthe version string as reported by the rpcProviderstring
chainIdthe path to config filesstring
hasEsKeytrue if an Etherscan key is presentbool
hasPinKeytrue if a Pinata API key is presentbool
indexPaththe path to the local binary indexesstring
isApitrue if the server is running in API modebool
isArchivetrue if the rpcProvider is an archive nodebool
isTestingtrue if the server is running in test modebool
isTracingtrue if the rpcProvider provides Parity tracesbool
isScrapingtrue if the scraper is runningbool
networkIdthe network id as reported by the rpcProviderstring
progressthe progress string of the systemstring
rootConfigthe path to the root configuration folderstring
rpcProviderthe current rpcProviderstring
versionthe TrueBlocks version stringstring
chainsa list of available chains in the config fileChain[]

Manifest

The Manifest details the portions of the index of appearances which are called ChunkRecords. 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:

Manifests consist of the following fields:

FieldDescriptionType
versionthe version string hashed into the chunk datastring
chainthe chain to which this manifest belongsstring
specificationIPFS cid of the specificationipfshash
chunksa list of the IPFS hashes of all of the chunks in the unchained indexChunkRecord[]

ChunkRecord

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 ChunkRecords. 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 ChunkRecords:

ChunkRecords consist of the following fields:

FieldDescriptionType
rangethe block range (inclusive) covered by this chunkblkrange
bloomHashthe IPFS hash of the bloom filter at that rangeipfshash
indexHashthe IPFS hash of the index chunk at that rangeipfshash
bloomSizethe size of the bloom filter in bytesint64
indexSizethe size of the index portion in bytesint64
rangeDatesif verbose, the block and timestamp bounds of the chunk (may be null)RangeDates

ChunkIndex

The indexchunk data model represents internal information about each Unchained Index index chunk. It is used mostly interenally to study the characteristics of the Unchained Index.

The following commands produce and manage ChunkIndexes:

ChunkIndexes consist of the following fields:

FieldDescriptionType
rangethe block range (inclusive) covered by this chunkblkrange
magican internal use only magic number to indicate file formatstring
hashthe hash of the specification under which this chunk was generatedhash
nAddressesthe number of addresses in this chunkuint64
nAppearancesthe number of appearances in this chunkuint64
sizethe size of the chunk in bytesuint64
rangeDatesif verbose, the block and timestamp bounds of the chunk (may be null)RangeDates

ChunkBloom

The blooms data model represents the bloom filter files that front the Unchained Index index portions. The information here is mostly for internal use only as it includes the size and number of the bloom filters present as well as the number of addresses inserted into the bloom. This information is used to study the characteristics of the Unchained Index.

The following commands produce and manage ChunkBlooms:

ChunkBlooms consist of the following fields:

FieldDescriptionType
rangethe block range (inclusive) covered by this chunkblkrange
magican internal use only magic number to indicate file formatstring
hashthe hash of the specification under which this chunk was generatedhash
nBloomsthe number of individual bloom filters in this bloom fileuint64
nInsertedthe number of addresses inserted into the bloom fileuint64
sizethe size on disc in bytes of this bloom fileuint64
byteWidththe width of the bloom filteruint64
rangeDatesif verbose, the block and timestamp bounds of the chunk (may be null)RangeDates

ChunkAddress

The addresses data model is produced by chifra chunks and represents the records found in the addresses table of each Unchained Index chunk. The offset and count fields represent the location and number of records in the appearances table to which the address table is related.

The following commands produce and manage ChunkAddress:

ChunkAddress consist of the following fields:

FieldDescriptionType
addressthe address in this recordaddress
rangethe block range of the chunk from which this address record was takenblkrange
offsetthe offset into the appearance table of the first record for this addressuint64
countthe number of records in teh appearance table for this addressuint64
rangeDatesif verbose, the block and timestamp bounds of the chunk (may be null)RangeDates

IpfsPin

ipfsPin represents the date, CID and metadata filename of a single IPFS pinned file.

The following commands produce and manage IpfsPins:

IpfsPins consist of the following fields:

FieldDescriptionType
cidthe CID of the fileipfshash
datePinnedthe date the CID was first createdstring
statusthe status of the file (one of [allpinned
sizethe size of the file in bytesint64
fileNamethe metadata name of the pinned filestring

ChunkStats

The stats data model is produced by chifra chunks and brings together various statistical information such as average number of addresses in an Unchained Index chunk among other information.

The following commands produce and manage ChunkStats:

ChunkStats consist of the following fields:

FieldDescriptionType
rangethe block range (inclusive) covered by this chunkblkrange
nAddrsthe number of addresses in the chunkuint64
nAppsthe number of appearances in the chunkuint64
nBlocksthe number of blocks in the chunkuint64
nBloomsthe number of bloom filters in the chunk’s bloomuint64
recWidthe record width of a single bloom filteruint64
bloomSzthe size of the bloom filters on disc in bytesuint64
chunkSzthe size of the chunks on disc in bytesuint64
addrsPerBlockthe average number of addresses per blockfloat64
appsPerBlockthe average number of appearances per blockfloat64
appsPerAddrthe average number of appearances per addressfloat64
ratiothe ratio of appearances to addressesfloat64
rangeDatesif verbose, the block and timestamp bounds of the chunk (may be null)RangeDates

MonitorClean

MonitorClean is a report on removing duplicates from monitors.

The following commands produce and manage MonitorCleans:

MonitorCleans consist of the following fields:

FieldDescriptionType
addressthe address being cleanedaddress
sizeThenthe number of appearances in the monitor prior to cleaningint64
sizeNowthe number of appearances in the monitor after cleaningint64
dupsthe number of duplicates removedint64
stagedtrue if the address is in the stage, false otherwisebool
removedtrue if the address was removed from the stage, false otherwisebool

CacheItem

The cacheItem data model is used to display various caches displayed from the chifra config tool.

The following commands produce and manage CacheItems:

CacheItems consist of the following fields:

FieldDescriptionType
typethe type of the cachestring
itemsthe individual items in the cache (if –verbose)any[]
lastCachedthe date of the most recent item added to the cachestring
nFilesthe number of items in the cacheuint64
nFoldersthe number of folders holding that many itemsuint64
paththe path to the top of the given cachestring
sizeInBytesthe size of the cache in bytesint64

ReportCheck

ChunkCheck reports on the results of tests conducted under chifra chunks –check

The following commands produce and manage ReportChecks:

ReportChecks consist of the following fields:

FieldDescriptionType
resultthe result of the checkstring
visitedCntthe number of visited items in the cacheuint64
checkedCntthe number of checksuint64
skippedCntthe number of skipped checksuint64
passedCntthe number of passed checksuint64
failedCntthe number of failed checksuint64
msgStringsan array of messages explaining failed checksstring[]
reasonthe reason for the teststring

ChunkPin

Reports on the result of the command chifra chunks manifest --pin [--deep].

The following commands produce and manage ChunkPins:

ChunkPins consist of the following fields:

FieldDescriptionType
versionthe version string hashed into the chunk datastring
chainthe chain to which this manifest belongsstring
timestampHashIPFS cid of file containing timestampsipfshash
specHashIPFS cid of the specificationipfshash
manifestHashIPFS cid of file containing CIDs for the various chunksipfshash

Chain

The chain data model represents the configured chain data found in the trueBlocks.toml configuration file.

The following commands produce and manage Chains:

Chains consist of the following fields:

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
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

RangeDates

The following commands produce and manage RangeDates:

RangeDates consist of the following fields:

FieldDescriptionType
firstTsthe timestamp of the first block in this rangetimestamp
firstDatethe first timestamp as a datedatetime
lastTsthe timestamp of the most recent block in this rangetimestamp
lastDatethe last timestamp as a datedatetime

Base types

This documentation mentions the following basic data types.

TypeDescriptionNotes
addressan ‘0x’-prefixed 20-byte hex stringlowercase
anyany cache item found in the binary cache
blkrangea pair of nine-digit block numberszero padded
booleither true, false, 1, or 0
datetimea JSON formatted dateas a string
float64a double precision float64 bits
hashan ‘0x’-prefixed 32-byte hex stringlowercase
int64a 64-bit signed integer
ipfshasha multi-hash produced by IPFSmixed-case
stringa normal character string
timestampa 64-bit unsigned integerUnix timestamp
uint64a 64-bit unsigned integer

Copyright (c) 2024, TrueBlocks, LLC. All rights reserved. Generated with goMaker.

Edit this page on GitHub