IoTeX Analytics Playground is LIVE on analytics.iotexscan.io!
We’re introducing a way for anyone to visualize data related to the IoTeX Network. Query many useful IoTeX metrics with simple commands, available now on the IoTeX Analytics Playground.
There are two IoTeX tools we have built which utilize GraphQL, a query language to visualize data from APIs and enable developer tools:
- Analytics Playground (analytics.iotexscan.io) provides pre-analyzed data from an IoTeX-managed database; ideal for basic queries!
- API-gateway (iotexscan.io/api-gateway/) provides unanalyzed data directly from the IoTeX blockchain; ideal for custom tools / queries!
Now, IoTeX Analytics is fully open source to the public here:
In this blog, we explain how to use the Analytics Playground and metrics available now. Try it out for yourself using the instructions below!
What is GraphQL?
GraphQL provides an interface to read/analyze code and data from a particular data structure (e.g., database, IoTeX blockchain). A GraphQL service is created by defining ‘types’, ‘fields’ on those ‘types’, and ‘functions’ for each ‘field’ on each ‘type’. IoTeX has created pre-defined metrics for you to play with in Analytics Playground!
Metrics Available in Analytics Playground
There are several metrics already available in the Analytics Playground. Each metric below has a set of requests (i.e., inputs) that generate unique responses (i.e., outputs). See our Analytics Playground documentation for the full details!
- Delegate() — overview of delegate status (bookkeeping, reward, productivity, voting buckets data, staking information)
- Chain() — metadata of IoTeX blockchain (latest epoch number, block height, TPS, and number of actions within a range of epochs)
- Voting() — overview of voting results (number of candidates, number of consensus delegates, total weighted votes, total voted tokens)
- Account() — overview of accounts (addresses that participated in latest actions, mapping between Delegates’ aliases and operator addresses)
Delegate
Bookkeeping
Usage: Bookkeeping gives Delegates an overview of the reward distributions to their voters within a range of epochs.
Request:
- startEpoch: starting epoch number
- epochCount: epoch count
- delegateName: delegate name
- percentage: percentage of reward distribution
- includeFoundationBonus: whether include foundation bonus as part of the reward distribution
- Pagination: skip (starting index of displaying reward distribution list), first (number of reward distributions to display)
Response:
- exist: whether the delegate has bookkeeping information within the specified epoch range
- rewardDistribution: voterEthAddress, voterIotexAddress, amount, count
Productivity
Usage: Productivity gives block productivity of producers within a range of epochs.
Request:
- startEpoch: starting epoch number
- epochCount: epoch count
- delegateName: producer name
Response:
- exist: whether the delegate has productivity information within the specified epoch range
- production: number of block productions
- expectedProduction: number of expected block productions
Reward
Usage: Rewards provides reward detail information for candidates within a range of epochs.
Request:
- startEpoch: starting epoch number
- epochCount: epoch count
- delegateName: candidate name
Response:
- exist: whether the delegate has reward information within the specified epoch range
- blockReward: amount of block rewards
- epochReward: amount of epoch rewards
- foundationBonus: amount of foundation bonus
BucketInfo
Usage: BucketInfo provides voting bucket detail information for candidates within a range of epochs.
Request:
- startEpoch: starting epoch number
- epochCount: epoch count
- delegateName: candidate name
Response:
- exist: whether the delegate has voting bucket information within the specified epoch range
- epochNumber: epoch number
- bucketInfoList:
- voterEthAddress: voter’s ERC20 address
- weightedVotes: voter’s weighted votes
- count: total number of buckets in the given epoch for the given delegate
Staking
Usage: Staking provides staking information for candidates within a range of epochs.
Request:
- startEpoch: starting epoch number
- epochCount: epoch count
- delegateName: candidate name
Response:
- exist: whether the delegate has staking information within the specified epoch range
- stakingInfo:
- epochNumber: epoch number
- selfStaking: candidate’s self-staking amount
- totalStaking: total staking amount
Chain
MostRecentEpoch
Usage: MostRecentEpoch gives the latest epoch number.
Request:
- N/A
Response:
- mostRecentEpoch: latest epoch number
MostRecentBlockHeight
Usage: MostRecentBlockHeight gives the latest block height.
Request:
- N/A
Response:
- mostRecentBlockHeight: latest block height
MostRecentTPS
Usage: MostRecentTPS gives the latest transactions per second.
Request:
- blockWindow: number of last blocks that are backtracked to compute TPS
Response:
- mostRecentTPS: latest transactions per second
NumberOfActions
Usage: NumberOfActions gives the number of actions.
Request:
- pagination:
- startEpoch: the starting epoch number for querying number of actions
- epochCount: the epoch count for querying number of actions
Response:
- numberOfActions:
- exist: whether the starting epoch number is less than the most recent epoch number
- count: number of actions
Voting
Voting
Usage: Voting provides metadata of voting results.
Request:
- startEpoch: starting epoch number
- epochCount: epoch count
Response:
- exist: whether the starting epoch number is less than the most recent epoch number
- candidateMeta:
- epochNumber: epoch number
- consensusDelegates: number of consensus delegates in the epoch
- totalCandidates: number of total delegates in the epoch
- totalWeightedVotes: candidate total weighted votes in the epoch
- votedTokens: total voted tokens in the epoch
Account
ActiveAccount
Usage: ActiveAccounts lists most recently active accounts.
Request:
- count: number of account addresses to be queried for active accounts
Response:
- activeAccount: list of account addresses
OperatorAddress
Usage: OperatorAddress finds the delegate’s operator address given the delegate’s alias name.
Request:
- aliasName: delegate’s alias name
Response:
- exist: whether the alias name exists
- operatorAddress: operator address associated with the given alias name
Alias
Usage: Alias finds the delegate’s alias name given the delegate’s operator address.
Request:
- operatorAddress: delegate’s operator address
Response:
- exist: whether the operator address exists
- aliasName: alias name associated with the given operator address
What’s Next?
We hope these data visualization tools will be helpful to everyone — voters, developers, Delegates -and help you understand the IoTeX Network more. Over time, we will continue to evolve the Analytics Playground by adding additional metrics.
We encourage you to build your own front end data visualizations and share them with the community! Reach out to an IoTeX team member with any questions or suggestions.
About IoTeX
IoTeX began the journey in 2017 to build the Internet of Trusted Things, where all physical and virtual “things” — humans, machines, businesses, and dApps — can efficiently exchange information and value at global scale. Backed by a global team of research scientists and top engineers, IoTeX combines blockchain, trusted hardware and edge computing to realize the full potential of IoT.
Stay connected with us!
Website: https://iotex.io/
Twitter: https://twitter.com/iotex_io
Telegram Announcement Channel: https://t.me/iotexchannel
Telegram Group: https://t.me/IoTeXGroup
Medium: https://medium.com/@iotex
Reddit: https://www.reddit.com/r/IoTeX/
Join us: https://iotex.io/careers