Skip to content

Metadata API

These APIs are used to retrieve node metadata and for synchronization between nodes. Some methods are not meant for use by external applications.

API

Method NameRequest TypeResponse TypeDescription
GetInfoGetInfoRequestGetInfoResponseReturns metadata about the node's state
GetTrieMetadataByPrefixTrieNodeMetadataRequestTrieNodeMetadataResponseGet trie metadata for a particular prefix

GetInfoRequest

Empty request, no parameters needed.

GetInfoResponse

FieldTypeLabelDescription
db_statsDbStatsDatabase statistics
num_shardsuint32Number of shards in the node
shard_infosShardInforepeatedInformation about each shard

DbStats

FieldTypeLabelDescription
num_messagesuint64Total number of messages in the node
num_fid_registrationsuint64Number of FID registrations in the node
approx_sizeuint64Approximate size of the database in bytes

ShardInfo

FieldTypeLabelDescription
shard_iduint32Shard identifier
max_heightuint64Maximum block height in the shard
num_messagesuint64Number of messages in the shard
num_fid_registrationsuint64Number of FID registrations in the shard
approx_sizeuint64Approximate size of the shard in bytes
block_delayuint64Block delay in the shard
mempool_sizeuint64Size of the mempool for this shard

TrieNodeMetadataRequest

FieldTypeLabelDescription
shard_iduint32Shard ID to get metadata for
prefixbytesPrefix to get metadata for

TrieNodeMetadataResponse

FieldTypeLabelDescription
prefixbytesPrefix of the trie node
num_messagesuint64Number of messages under this prefix
hashstringHash of the trie node
childrenTrieNodeMetadataResponserepeatedChild nodes of this trie node